/* ============================================================
   BudgetApp pages (overview, privacy, terms). Loaded after
   ../assets/css/site.css, which supplies the shared navy chrome,
   page hero, CTA band and footer. This file adds only the
   BudgetApp layer: a product sub-bar, the warm sub-brand as an
   accent (warm neutral #f7f3ec, deep teal #0f6b5c), the phone
   illustration, editorial feature rows and the policy rows.
   Scoped under body.site. Content is visible by default; motion
   (meter fill, orbit drift) only runs with html.js AND
   prefers-reduced-motion: no-preference. Hover and focus never
   change layout: colour, background, shadow and transform only.
   ============================================================ */

body.site {
  --warm-bg: #f7f3ec; --warm-screen: #fbf8f2; --warm-line: #e4dccd;
  --warm-ink: #2b2a26; --warm-ink-2: #5d5a52; --warm-teal: #0f6b5c; --warm-teal-2: #0b5448;
  --warm-amber: #b45309; --warm-red: #b3261e;
}

/* dark surfaces added by this page get the light-teal focus ring */
.site .ba-subbar :focus-visible { outline-color: var(--teal-soft); }

/* ---------- Product sub-bar (secondary navigation, under the header) ---------- */
.site .ba-subbar { background: var(--navy); border-bottom: 1px solid var(--line); }
.site .ba-subbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px 28px; flex-wrap: wrap; min-height: 56px; }
.site .ba-brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: #fff; text-decoration: none; font: 700 1.02rem/1.1 var(--font); letter-spacing: -.01em; }
.site .ba-brand:hover { color: #fff; }
.site .ba-brand small { display: block; margin-top: 3px; font: 400 .68rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--on-2); }
.site .ba-mark { position: relative; flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; background: var(--warm-bg); box-shadow: inset 0 0 0 1px var(--warm-line); }
.site .ba-mark::before { content: ""; position: absolute; left: 7px; right: 7px; bottom: 7px; height: 4px; border-radius: 2px; background: var(--warm-teal); }
.site .ba-mark::after { content: ""; position: absolute; left: 7px; width: 9px; top: 9px; height: 4px; border-radius: 2px; background: var(--warm-teal); opacity: .55; }
.site .ba-subbar ul { display: flex; flex-wrap: wrap; gap: 2px; }
.site .ba-subbar nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--on-2); text-decoration: none; font-size: .92rem; font-weight: 500; white-space: nowrap; transition: color .2s, background-color .2s, box-shadow .2s; }
.site .ba-subbar nav a:hover { color: #fff; background-color: rgba(255, 255, 255, .06); }
.site .ba-subbar nav a[aria-current="page"] { color: #fff; border-radius: 0; box-shadow: inset 0 -2px 0 var(--teal); }

/* ---------- Hero ---------- */
.site .ba-hero .hero-copy { position: relative; }
.site .ba-hero h1 { max-width: 13ch; }
.site .ba-hero .eyebrow, .site .ba-eyebrow { color: var(--teal-soft); margin: 0 0 20px; }
.site .ba-status { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.site .ba-status p { margin: 0; max-width: 34em; font-size: .97rem; color: var(--on-2); }
.site .ba-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid rgba(94, 224, 196, .4); border-radius: 999px; font: 500 .8rem/1.3 var(--mono); letter-spacing: .04em; color: var(--on); background: rgba(4, 20, 47, .45); }
.site .ba-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); flex-shrink: 0; }

/* one extra orbit ring, drifting slowly over site.css's static hero orbit */
.site .ba-orbit { position: absolute; z-index: -1; right: -150px; top: 50%; width: 640px; height: 640px; margin-top: -320px; pointer-events: none;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'><circle cx='320' cy='320' r='250' fill='none' stroke='rgba(94,224,196,.22)' stroke-dasharray='2 12'/><circle cx='320' cy='70' r='4' fill='%235ee0c4'/><circle cx='320' cy='70' r='10' fill='none' stroke='rgba(94,224,196,.35)'/><circle cx='97' cy='433' r='3' fill='%23f7f3ec' fill-opacity='.8'/></svg>") center / contain no-repeat; }

/* ---------- Phone illustration (CSS only, sample figures) ---------- */
.site .ba-device { position: relative; justify-self: center; width: min(300px, 100%); margin: 0; }
.site .ba-ring { position: absolute; z-index: -1; left: 50%; top: 46%; width: 440px; height: 440px; margin: -220px 0 0 -220px; border-radius: 50%; border: 1px solid rgba(247, 243, 236, .16); box-shadow: 0 0 0 46px rgba(94, 224, 196, .03), 0 0 0 47px rgba(94, 224, 196, .14); pointer-events: none; }
.site .phone { background: #10213d; padding: 10px; border-radius: 40px; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 30px 70px rgba(2, 10, 26, .55), inset 0 0 0 1px rgba(0, 0, 0, .4); }
.site .phone-screen { position: relative; background: var(--warm-screen); border-radius: 31px; padding: 30px 18px 28px; color: var(--warm-ink); }
.site .phone-screen::before { content: ""; position: absolute; top: 10px; left: 50%; width: 64px; height: 6px; margin-left: -32px; border-radius: 3px; background: var(--warm-line); }
.site .ph-top { font: 600 .95rem/1 var(--font); color: var(--warm-ink); }
.site .ph-card { margin-top: 14px; background: var(--warm-teal); color: #fff; border-radius: 18px; padding: 16px 18px; }
.site .ph-card small { display: block; font-size: .74rem; color: #e3f1ed; }
.site .ph-card strong { display: block; color: #fff; font: 600 1.7rem/1.2 var(--font); font-variant-numeric: tabular-nums; }
.site .bucket { margin-top: 18px; }
.site .bucket .row { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--warm-ink); }
.site .bucket .row span:last-child { font-weight: 500; color: var(--warm-ink-2); }
.site .bucket .row .over { color: var(--warm-red) !important; }
.site .meter { height: 8px; margin-top: 7px; border-radius: 6px; background: var(--warm-line); overflow: hidden; }
.site .meter i { display: block; height: 100%; border-radius: 6px; background: var(--warm-teal); transform-origin: left center; }
.site .meter.m-18 i { width: 18%; }
.site .meter.m-92 i { width: 92%; }
.site .meter.m-100 i { width: 100%; }
.site .meter.near i { background: var(--warm-amber); }
.site .meter.over i { background: var(--warm-red); }
.site .bucket small { display: block; margin-top: 5px; font-size: .76rem; color: var(--warm-ink-2); }
.site .ba-device .illustration-caption { max-width: none; margin: 16px 0 0; }

/* ---------- Feature rows: an editorial index, not icon cards ---------- */
.site .ba-rows { border-top: 2px solid var(--navy); }
.site .ba-row { position: relative; display: grid; grid-template-columns: 72px minmax(0, 5fr) minmax(0, 7fr); gap: 10px 32px; align-items: baseline; padding: 36px 0; border-bottom: 1px solid var(--hair-strong); }
.site .ba-row::before { content: ""; position: absolute; left: 0; top: -1px; width: 72px; height: 2px; background: var(--warm-teal); transform: scaleX(0); transform-origin: left center; transition: transform .35s ease; }
.site .ba-row:hover::before { transform: scaleX(1); }
.site .ba-num { font: 500 .82rem/1 var(--mono); letter-spacing: .14em; color: var(--teal-deep); }
.site main .ba-row h2 { margin: 0; font: 700 clamp(1.3rem, 1.1rem + .8vw, 1.7rem)/1.2 var(--font); letter-spacing: -.02em; color: var(--navy); }
.site .ba-row p { margin: 0; max-width: 38em; font-size: 1.03rem; line-height: 1.7; color: var(--ink-2); }

/* ---------- Warm band: the sub-brand accent ---------- */
.site .ba-warm { background: var(--warm-bg); border-block: 1px solid var(--warm-line); }
.site .ba-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.site .ba-split-head { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.site main .ba-split-head h2 { margin: 0; max-width: 14em; font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); color: var(--warm-ink); }
.site .ba-lock { width: 56px; height: 56px; background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-32 -32 64 64'><g fill='none' stroke='%23e4dccd' stroke-width='1.5'><circle r='20'/><circle r='28'/></g><circle r='28' fill='none' stroke='%230f6b5c' stroke-width='2.2' stroke-dasharray='44 132'/><rect x='-8' y='-3' width='16' height='13' rx='2.5' fill='%230f6b5c'/><path d='M-5 -3v-4a5 5 0 0 1 10 0v4' fill='none' stroke='%230f6b5c' stroke-width='2.4'/><circle cx='19.8' cy='-19.8' r='3.6' fill='%2300b894'/></svg>") center / contain no-repeat; }
.site .ba-split-body { border-left: 2px solid var(--warm-teal); padding-left: clamp(20px, 3vw, 36px); }
.site .ba-split-body p { max-width: 40em; font-size: 1.06rem; line-height: 1.75; color: var(--warm-ink-2); }

/* ---------- CTA band ---------- */
.site .ba-cta-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.site .ba-cta .lede a { color: var(--teal-soft); font-weight: 600; overflow-wrap: anywhere; }
.site .ba-cta .lede a:hover { color: #fff; }
.site .ba-cta :focus-visible { outline-color: var(--teal-soft); }
.site .ba-note { margin: 0; padding: 22px 24px; border: 1px solid var(--line); border-left: 2px solid var(--warm-bg); border-radius: 0 12px 12px 0; background: rgba(4, 20, 47, .55); font-size: .97rem; color: var(--on-2); }

/* ---------- Legal pages ---------- */
.site .ba-hero--legal .hero-copy { max-width: 40em; }
.site .ba-hero--legal h1 { max-width: none; }
.site .ba-meta { display: inline-block; margin: 0 0 24px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 18px; font: 400 .8rem/1.5 var(--mono); letter-spacing: .03em; color: var(--on-2); }
.site .ba-meta::before { content: ""; display: inline-block; vertical-align: middle; width: 7px; height: 7px; margin: -2px 10px 0 0; border-radius: 50%; background: var(--teal); }
.site .ba-meta time { white-space: nowrap; }
.site .ba-hero--legal .lede a { font-weight: 500; }
.site .ba-legal-grid { align-items: end; }
.site .ba-legal-side { justify-self: end; width: 100%; max-width: 380px; }
.site .ba-legal-side--mark { aspect-ratio: 1; max-width: 300px; background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-160 -160 320 320'><g fill='none'><circle r='150' stroke='rgba(180,196,221,.16)'/><circle r='112' stroke='rgba(94,224,196,.32)'/><circle r='74' stroke='rgba(180,196,221,.14)'/></g><rect x='-34' y='-44' width='68' height='88' rx='8' fill='none' stroke='rgba(247,243,236,.55)' stroke-width='2'/><path d='M-20 -20h40M-20 -4h40M-20 12h26' stroke='rgba(247,243,236,.45)' stroke-width='2' stroke-linecap='round'/><circle cx='79.2' cy='-79.2' r='5' fill='%235ee0c4'/><circle cx='-74' cy='0' r='3.5' fill='%2300b894'/></svg>") center / contain no-repeat; }
.site .ba-toc { padding: 0; }
.site .ba-toc ul { border-left: 1px solid var(--line); }
.site .ba-toc li { border-bottom: 1px solid var(--line); }
.site .ba-toc li:last-child { border-bottom: 0; }
.site .ba-toc a { position: relative; display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 6px 0 6px 24px; color: #fff; text-decoration: none; font-weight: 600; font-size: 1rem; transition: color .2s, background-color .2s; }
.site .ba-toc a::before { content: ""; flex-shrink: 0; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(94, 224, 196, .7); background: radial-gradient(circle, var(--teal) 0 2px, transparent 2.5px); }
.site .ba-toc a:hover { color: var(--teal-soft); background-color: rgba(255, 255, 255, .04); }
.site .hero--page .ba-toc a:not(.btn) { color: #fff; }
.site .hero--page .ba-toc a:not(.btn):hover { color: var(--teal-soft); }

.site .ba-policy { border-top: 2px solid var(--navy); border-bottom: 1px solid var(--hair-strong); }
.site .ba-sec { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); column-gap: clamp(32px, 6vw, 96px); padding-block: clamp(36px, 4.5vw, 56px); border-top: 1px solid var(--hair); }
.site .ba-sec:first-child { border-top: 0; }
.site main .ba-sec h2 { align-self: start; position: sticky; top: calc(var(--header-h) + 32px); margin: 0; font: 700 clamp(1.3rem, 1.12rem + .7vw, 1.65rem)/1.2 var(--font); letter-spacing: -.02em; color: var(--navy); }
.site .ba-sec-body { min-width: 0; }
.site .ba-sec-body p, .site .ba-sec-body li { max-width: 62ch; font-size: 1.0625rem; line-height: 1.75; color: var(--ink-2); }
.site .ba-sec-body p { margin: 0 0 1.1em; }
.site .ba-sec-body p:last-child { margin-bottom: 0; }
.site .ba-sec-body ul { margin: 0 0 1.2em; }
.site .ba-sec-body li { position: relative; padding-left: 26px; }
.site .ba-sec-body li + li { margin-top: .7em; }
.site .ba-sec-body li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 9px; height: 9px; border-radius: 3px; background: var(--warm-teal); }
.site .ba-sec-body a { font-weight: 500; overflow-wrap: anywhere; }
.site .ba-sec-body code { padding: 2px 7px; border-radius: 6px; background: var(--mist-2); border: 1px solid var(--hair); font: 400 .88em/1.4 var(--mono); color: var(--ink); }

/* ---------- Motion: only with JS and no reduced-motion request; nothing stays hidden ---------- */
@media (prefers-reduced-motion: no-preference) {
  .site .ba-orbit { animation: ba-drift 140s linear infinite; }
  @keyframes ba-drift { to { transform: rotate(360deg); } }
  .js body.site .ba-device.reveal .meter i { transform: scaleX(0); }
  .js body.site .ba-device.reveal.in .meter i { transform: none; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1) .35s; }
  .js body.site .ba-device.reveal.in .bucket + .bucket .meter i { transition-delay: .5s; }
  .js body.site .ba-device.reveal.in .bucket + .bucket + .bucket .meter i { transition-delay: .65s; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .site .ba-device { justify-self: center; margin-top: 8px; }
  .site .ba-orbit { width: 420px; height: 420px; right: -160px; top: -140px; margin-top: 0; }
  .site .ba-legal-side { justify-self: start; max-width: 520px; }
  .site .ba-legal-side--mark { display: none; }
  .site .ba-split, .site .ba-cta-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .site .ba-row { grid-template-columns: minmax(0, 1fr); padding: 28px 0; }
  .site .ba-sec { grid-template-columns: minmax(0, 1fr); }
  .site main .ba-sec h2 { position: static; margin-bottom: 18px; }
}
@media (max-width: 640px) {
  .site .ba-subbar-inner { padding-block: 6px; gap: 2px 16px; }
  .site .ba-subbar nav { margin-inline: -12px; }
  .site .ba-subbar nav a { padding: 0 10px; }
  .site .ba-ring { width: 340px; height: 340px; margin: -170px 0 0 -170px; }
  .site .ba-device { justify-self: center; }
  .site .ba-split-body { padding-left: 18px; }
  .site .ba-badge { font-size: .74rem; letter-spacing: 0; padding-inline: 12px; }
}

@media print {
  body.site { background: #fff; color: #000; font-size: 11pt; }
  .site .trust-bar, .site .ba-subbar, .site .nav-toggle, .site .header-cta, .site .hero-actions, .site .ba-orbit, .site .dot-grid, .site .ba-ring { display: none; }
  .site .hero--page, .site .cta-band, .site .site-footer { background: #fff !important; color: #000; }
  .site .hero--page h1, .site .cta-band h2, .site .ba-sec h2 { color: #000; }
  .site .ba-sec h2 { position: static; }
  .site .ba-sec, .site .ba-row { break-inside: avoid; }
  .site a { color: inherit; }
  .js body.site .ba-device.reveal .meter i { transform: none !important; transition: none !important; }
}
