/* styles.css -- Direction-B UI layer (Lucian, Phase 5+, frontend-contract build).
   Token set + shared components copied verbatim from the approved combined
   mockup (.../scratchpad/levels-planner-mockup.html), which itself copied
   them verbatim from oconnor-mortgage-planning-v2.html lines 13-95 (Design
   Spec token contract). App-specific component classes (login/setup/
   settings/forms/tables/banners) are new, built within the same palette --
   no ad-hoc colors. M8: externalized here -- no inline style attribute
   anywhere in index.html or app.js (CSP style-src 'self', no inline styles
   permitted); the handful of dynamic width/height values app.js sets at
   runtime (meter fills, SVG points) go through the element.style CSSOM
   API, which is unaffected by style-src since it never touches the HTML
   `style` attribute or a `<style>` element. */

/* ============================================================
   THEME TOKENS -- light (default) + dark via prefers-color-scheme,
   with manual :root[data-theme] override in both directions.
   ============================================================ */
:root{
  --bg:#f6f3ec; --paper:#fffdf9; --paper-alt:#efeadc;
  --ink:#1b1f23; --ink-2:#343b41; --muted:#5e6063;
  --line:#ddd5c1; --line-strong:#c8bd9f;
  --field-border:#857d6a; --mix-cash:#8a826f; /* ruled 2026-11-13 (Vesta) */
  --disabled-bg:var(--paper-alt); --disabled-fg:var(--muted); --disabled-border:var(--line-strong);

  --accent:#0d4a44; --accent-ink:#f8f6ee; --accent-bg:#e2efec; --accent-bg-strong:#c7e2db;

  --confirmed:#2a6a45; --confirmed-bg:#e5f1e8;
  --assume:#865b13;    --assume-bg:#faf0d8;
  --derived:#3c5b83;   --derived-bg:#e6edf6;
  --danger:#8a1f28;    --danger-bg:#f8e6e5;
  --ok:#2a6a45; --warn:#865b13;

  --shadow-sm:0 1px 2px rgba(24,20,10,.06);
  --shadow-md:0 4px 16px rgba(24,20,10,.07);

  --font-display:"Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;
  --font-body:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --font-mono:ui-monospace,"SF Mono","Cascadia Code","Roboto Mono",Menlo,Consolas,monospace;

  color-scheme: light;

  /* UX pass 1 (2026-11-13): scales that alias GL-003 values (section 3.2 type, section 4 spacing,
     radius). Radius 4 / 8 / 24 (+ pill) and --text-meta 13px (muted metadata only, never below 13px)
     ruled 2026-11-13 (Vesta). Theme-independent, so declared once here. */
  --text-page:28px;      /* page title, display serif */
  --text-section:22px;   /* = GL-003 --text-h3 */
  --text-card:18px;      /* = GL-003 --text-h4 */
  --text-body:16px;      /* = GL-003 --text-body, prose */
  --text-dense:14px;     /* = GL-003 --text-small, rows, tables, buttons */
  --text-meta:13px;      /* metadata lines */
  --text-caption:12px;   /* = GL-003 --text-caption, eyebrows, field labels, chips */
  --text-figure:40px;    /* = GL-003 --text-h1 size, hero figures */
  --space-xs:4px; --space-sm:8px; --space-md:16px; --space-lg:24px; --space-xl:32px; --space-2xl:48px;
  /* Radius scale pinned 2026-11-13 (QA-1): 4 inputs and chips, 8 buttons and cards, 24 sheets. Vesta to rule on the Levels profile. */
  --radius-sm:4px; --radius-md:8px; --radius-lg:24px; --radius-pill:999px;
  --control-h:40px; --control-h-touch:44px; --control-h-sm:32px;
  --appbar-h:56px;
  /* Media token (Vesta Design Spec D3, 2026-11-14; pending owner ratification per GL-003): equals the pixel baked into
     intro-poster-phone.png and manifest theme_color; changes only when the poster is re-rendered. Theme-independent. */
  --media-poster-bg:#0d4a44;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#14171a; --paper:#1a1e22; --paper-alt:#20252a;
    --ink:#e8e5db; --ink-2:#c7c3b8; --muted:#a0a5ab;
    --line:#2c3237; --line-strong:#3c444b;
    --field-border:#737b83; --mix-cash:#8b9096; /* ruled 2026-11-13 (Vesta) */
  --disabled-bg:var(--paper-alt); --disabled-fg:var(--muted); --disabled-border:var(--line-strong);
    --accent:#3fae9d; --accent-ink:#0a1310; --accent-bg:#173330; --accent-bg-strong:#1f463f;
    --confirmed:#54b47c; --confirmed-bg:#16311f;
    --assume:#dba845;    --assume-bg:#332a11;
    --derived:#86aad9;   --derived-bg:#1d2c3f;
    --danger:#e17178;    --danger-bg:#391a1c;
    --ok:#54b47c; --warn:#dba845;
    --shadow-sm:0 1px 2px rgba(0,0,0,.3); --shadow-md:0 6px 20px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"]{
  --bg:#14171a; --paper:#1a1e22; --paper-alt:#20252a;
  --ink:#e8e5db; --ink-2:#c7c3b8; --muted:#a0a5ab;
  --line:#2c3237; --line-strong:#3c444b;
  --field-border:#737b83; --mix-cash:#8b9096; /* ruled 2026-11-13 (Vesta) */
  --disabled-bg:var(--paper-alt); --disabled-fg:var(--muted); --disabled-border:var(--line-strong);
  --accent:#3fae9d; --accent-ink:#0a1310; --accent-bg:#173330; --accent-bg-strong:#1f463f;
  --confirmed:#54b47c; --confirmed-bg:#16311f;
  --assume:#dba845;    --assume-bg:#332a11;
  --derived:#86aad9;   --derived-bg:#1d2c3f;
  --danger:#e17178;    --danger-bg:#391a1c;
  --ok:#54b47c; --warn:#dba845;
  color-scheme: dark;
}
:root[data-theme="light"]{
  --bg:#f6f3ec; --paper:#fffdf9; --paper-alt:#efeadc;
  --ink:#1b1f23; --ink-2:#343b41; --muted:#5e6063;
  --line:#ddd5c1; --line-strong:#c8bd9f;
  --field-border:#857d6a; --mix-cash:#8a826f; /* ruled 2026-11-13 (Vesta) */
  --disabled-bg:var(--paper-alt); --disabled-fg:var(--muted); --disabled-border:var(--line-strong);
  --accent:#0d4a44; --accent-ink:#f8f6ee; --accent-bg:#e2efec; --accent-bg-strong:#c7e2db;
  --confirmed:#2a6a45; --confirmed-bg:#e5f1e8;
  --assume:#865b13;    --assume-bg:#faf0d8;
  --derived:#3c5b83;   --derived-bg:#e6edf6;
  --danger:#8a1f28;    --danger-bg:#f8e6e5;
  --ok:#2a6a45; --warn:#865b13;
  color-scheme: light;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.55 var(--font-body);}
::selection{background:var(--accent-bg-strong);color:var(--ink)}
a{color:var(--accent)}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
[hidden]{display:none !important}
button{font-family:inherit}

/* ---------- Masthead ---------- */

.theme-toggle,.icon-btn{border:1px solid var(--line-strong);background:var(--paper-alt);color:var(--ink-2);font-family:var(--font-body);font-size:var(--text-caption);letter-spacing:.06em;text-transform:uppercase;padding:7px 12px;border-radius:6px;cursor:pointer;flex:none}
.theme-toggle:hover,.icon-btn:hover{background:var(--accent-bg)}

/* ---------- Sync indicator ---------- */
.sync-indicator{display:inline-flex;align-items:center;gap:6px;font-family:var(--font-body);font-size:var(--text-caption);color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.sync-indicator .dot{width:8px;height:8px;border-radius:50%;background:var(--muted);flex:none}
.sync-indicator[data-state="saved"] .dot{background:var(--confirmed)}
.sync-indicator[data-state="saving"] .dot{background:var(--derived);animation:pulse 1s ease-in-out infinite}
.sync-indicator[data-state="conflict"] .dot{background:var(--danger)}
.sync-indicator[data-state="offline"] .dot{background:var(--assume)}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.35}}

/* ---------- Banners ---------- */
.banner{border-top:1px solid var(--line);border-bottom:2px solid var(--assume);background:var(--assume-bg)}
.banner-inner{max-width:1180px;margin:0 auto;padding:11px 24px;display:flex;gap:12px;align-items:flex-start}
.banner .glyph{flex:none;width:20px;height:20px;border-radius:50%;background:var(--assume);color:var(--paper);display:flex;align-items:center;justify-content:center;font-family:var(--font-body);font-weight:700;font-size:var(--text-caption)}
.banner p{margin:0;font-size:var(--text-dense);color:var(--ink-2)}
.banner strong{color:var(--assume)}
.banner.danger{border-bottom-color:var(--danger);background:var(--danger-bg)}
.banner.danger .glyph{background:var(--danger)}
.banner.danger strong{color:var(--danger)}
.banner.info{border-bottom-color:var(--derived);background:var(--derived-bg)}
.banner.info .glyph{background:var(--derived)}
.banner.info strong{color:var(--derived)}
.banner button.link-btn{margin-left:auto;flex:none}

/* ---------- Tab nav ---------- */
nav.tabnav{display:flex;gap:4px;max-width:1180px;margin:0 auto;padding:0 20px;border-bottom:1px solid var(--line);overflow-x:auto;background:var(--paper)}
nav.tabnav button,nav.tabnav a{appearance:none;background:none;border:none;border-bottom:3px solid transparent;padding:14px 18px 12px;font-family:var(--font-body);font-size:var(--text-dense);font-weight:700;color:var(--muted);cursor:pointer;white-space:nowrap;text-decoration:none}
nav.tabnav button[aria-selected="true"],nav.tabnav a[aria-current="page"]{color:var(--ink);border-bottom-color:var(--accent)}
nav.tabnav button:hover,nav.tabnav a:hover{color:var(--ink)}
/* Mobile scroll-affordance fade (Lector cold-read, 2026-08-11): at narrow
   widths the tab strip overflows (overflow-x:auto above) and the last tab
   clips mid-glyph at the viewport edge with no cue that more tabs exist
   off-screen -- reads as truncated, not scrollable. A right-edge fade
   signals "keep scrolling." Static (not scroll-position-aware -- doesn't
   remove itself once fully scrolled to the end); acceptable for a low-risk
   CSS-only affordance, matches this file's existing max-width:640px
   breakpoint convention (see .tx-scroll-hint above). */
@media (max-width:640px){
  nav.tabnav{-webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 28px),transparent 100%)}
}

/* ---------- Layout ---------- */
.wrap{max-width:1180px;margin:0 auto;padding:26px 20px 90px}
.section-head{margin-bottom:20px}
.section-head h2{font-family:var(--font-display);font-weight:600;font-size:var(--text-page);margin:0 0 6px;color:var(--ink)}
.section-head .sub{color:var(--muted);font-size:var(--text-dense);max-width:70ch;margin:0 0 16px}
.eyebrow{font-family:var(--font-body);font-size:var(--text-caption);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}

/* ---------- Cards ---------- */
.card{background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:22px 24px;margin:18px 0;box-shadow:var(--shadow-sm)}
/* UX pass 3, finding 18: a left stripe is a signal, never decoration. accent = the one next step, danger = destructive, assume = warning. */
.card.stripe-accent{border-left:3px solid var(--accent)}
.card.stripe-assume{border-left:3px solid var(--assume)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.kpi{border:1px solid var(--line);border-radius:9px;padding:13px 15px;background:var(--paper-alt)}
.kpi .lab{font-family:var(--font-body);font-size:var(--text-caption);font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.kpi .val{font-family:var(--font-body);font-size:var(--text-section);font-weight:600;margin-top:3px;color:var(--ink);font-variant-numeric:tabular-nums}
.kpi .note{font-size:var(--text-dense);color:var(--muted);margin-top:4px;line-height:1.4}

/* ---------- Direction-B ladder ---------- */
.hero-rung-b{display:flex;align-items:center;gap:18px;background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:18px 22px;margin-bottom:26px;box-shadow:var(--shadow-sm);flex-wrap:wrap}
.hero-rung-b .medallion{width:56px;height:56px;font-size:var(--text-section)}
.hero-rung-b .hero-text .eyebrow{margin-bottom:2px}
.hero-rung-b .hero-sub{margin:2px 0 0} /* Foundation number sub-line (2026-11-19) */
.levels-eyebrow{margin:var(--space-md) 0 var(--space-xs)} /* "Your levels" above the ladder (2026-11-19) */
.hero-rung-b .hero-figure{font-family:var(--font-display);font-size:var(--text-page);color:var(--ink);font-variant-numeric:tabular-nums}
.hero-rung-b .relock-note{font-size:var(--text-dense);color:var(--warn);margin-top:3px}
.hero-rung-b .chip{margin-left:auto}

.tier-group{margin:30px 0}
/* QA-2 item 1: an empty tier is one 56px line; a closed assumptions card; slider value beside its label */
.tier-group.is-empty{margin:var(--space-sm) 0;padding:var(--space-sm) var(--space-md);border:1px solid var(--line);border-radius:10px;background:var(--paper)}
.tier-group.is-empty .tier-group-head{margin-bottom:0;min-height:40px}
.tier-group.is-empty .tier-goals{display:none}
.tier-group.is-empty .medallion{width:32px;height:32px;font-size:var(--text-meta)}
.tier-group.is-empty .tier-index{display:none}
.tier-group.is-empty .tier-copy .tier-name{font-size:var(--text-dense);margin:0}
.tier-group-head .tier-empty{font-size:var(--text-dense);color:var(--muted)}
.tier-group-head .add-goal-btn{margin-left:auto}
.assumptions > summary{cursor:pointer;font:600 14px/1.4 var(--font-body);color:var(--ink);list-style-position:inside}
.assumptions > summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.slider-label{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-sm)}
.slider-label .range-value{font-size:var(--text-meta)}
.chip.chip-plain{text-transform:none;letter-spacing:0}
.tier-group-head{display:flex;align-items:center;gap:14px;margin-bottom:16px;flex-wrap:wrap}
.tier-group-head .tier-copy .tier-index{display:block;font-family:var(--font-body);font-size:var(--text-caption);letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.tier-group-head .tier-copy .tier-name{font-family:var(--font-display);font-size:var(--text-card);color:var(--ink);font-weight:600}

.medallion{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:var(--font-display);font-weight:700;font-size:var(--text-card);flex:none;border:2px solid}
.medallion.tier-0{background:var(--paper-alt);color:var(--ink-2);border-color:var(--line-strong)}
.medallion.tier-1{background:var(--derived-bg);color:var(--derived);border-color:var(--derived)}
.medallion.tier-2{background:var(--assume-bg);color:var(--assume);border-color:var(--assume)}
.medallion.tier-3{background:var(--accent-bg);color:var(--accent);border-color:var(--accent)}

.tier-goals{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px}
.goal-card{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:18px 20px;box-shadow:var(--shadow-sm)}
.goal-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:12px}
.goal-card h4{margin:0;font-family:var(--font-display);font-size:var(--text-body);color:var(--ink);font-weight:600}
.goal-card-actions{display:flex;gap:6px;margin-top:12px}
.goal-card-actions button{font-size:var(--text-dense)}

/* Bug A fix (Lucian, 2026-08-11): inline-on-card goal editing. The card
   being edited spans the full tier-goals grid row (instead of being
   squeezed into one grid cell) so the three form fields lay out
   comfortably, and it stays visually anchored right where "Edit" was
   clicked -- never off-screen. Composes the existing card/form tokens
   (.eyebrow, .form-grid, .auth-actions) rather than inventing new ones. */
.goal-card.editing{grid-column:1/-1;border-color:var(--accent)}
.goal-card.editing .eyebrow{margin-bottom:10px}

.chip{font-family:var(--font-body);font-size:var(--text-caption);font-weight:600;letter-spacing:0;text-transform:none;padding:4px 10px;border-radius:999px;white-space:nowrap;flex:none;border:none}
.chip.unlocked{background:var(--confirmed-bg);color:var(--confirmed)}
.chip.locked{background:var(--paper-alt);color:var(--muted);border:1px solid var(--line-strong)}
/* Slice 2 (Ariadne, sign-off row 12): a year chip wraps inside its column, never clips. It breaks only between its parts
   (chipText puts U+00A0 inside each part). No cut-off, no ellipsis, nothing hidden. */
.chip.chip-wrap{white-space:normal;flex:0 1 auto;max-width:100%;overflow-wrap:normal;text-align:left;line-height:1.35}

.goal-costs{display:flex;gap:18px;margin-bottom:14px;flex-wrap:wrap}
.goal-costs div{font-family:var(--font-body);font-size:var(--text-dense);color:var(--muted)}
.goal-costs strong{display:block;color:var(--ink);font-size:var(--text-body);font-family:var(--font-body);text-transform:none;letter-spacing:0;font-variant-numeric:tabular-nums;margin-top:2px}

.meter{height:8px;border-radius:999px;background:var(--paper-alt);border:1px solid var(--line);overflow:hidden;margin-top:2px}
.meter > span{display:block;height:100%;background:var(--accent);border-radius:999px 0 0 999px}
.meter-label{display:flex;justify-content:space-between;font-family:var(--font-body);font-size:var(--text-dense);color:var(--muted);margin-top:7px}

/* ---------- Projection chart ---------- */
/* Class B fix (2026-08-11, Lucian): the chart's axis-label text lives in
   SVG user-space units, so letting the svg shrink to 100% of a narrow
   mobile card (as small as ~280px) scaled every label down to ~4px --
   present in the DOM/aria-label but functionally unreadable, which fails
   the same "nothing can be read off this chart" bar the missing labels
   did. min-width holds the svg at a legible physical size; the wrap
   scrolls horizontally on viewports narrower than that (standard pattern
   for a dense 40-year trajectory) instead of shrinking text into noise.
   Unaffected on desktop, where the card is already wider than min-width. */
#projection-chart-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.chart-card svg{width:100%;min-width:680px;height:auto;display:block}
.chart-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:var(--text-dense);color:var(--muted);margin-top:12px}
.chart-legend .item{display:flex;align-items:center}
.chart-legend .dot{width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:6px;flex:none}

/* ---------- Tables (mortgage schedule) ---------- */
.table-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:8px;-webkit-overflow-scrolling:touch;max-height:520px}
table{border-collapse:collapse;width:100%;font-size:var(--text-dense);margin:0;min-width:640px}
th,td{text-align:left;padding:8px 11px;border-bottom:1px solid var(--line);white-space:nowrap}
th:first-child,td:first-child{white-space:normal}
/* QA-1 item 2: monospace only on numeric cells (.num), never on payee, category, account or symbol */
.num{font-family:var(--font-body);font-variant-numeric:tabular-nums;white-space:nowrap}
th.num,td.num{text-align:right}
thead th{position:sticky;top:0;background:var(--paper-alt);font-size:var(--text-caption);color:var(--muted);border-bottom:2px solid var(--line-strong);font-family:var(--font-body);text-transform:uppercase;letter-spacing:.06em;font-weight:700;z-index:1}
tbody tr:last-child td{border-bottom:none}
tr.row-locked-point td{background:var(--accent-bg)}

/* ---------- Transactions table (Budgeting tab) -- scoped via .tx-table so
   the mortgage-schedule table above (same generic .table-scroll/table
   classes, unrelated columns) is unaffected. Fixes three linked defects
   found via computed-style probe against the real dry-run feed:
   BUG#1 (AMOUNT column clipped mid-glyph at 1280px -- PAYEE/CATEGORY/
   ACCOUNT were unconstrained-nowrap and grew to their longest real value,
   e.g. ACCOUNT hit 379px on "TreasuryDirect -- Savings Bonds", pushing the
   table 14px past its .table-scroll box so AMOUNT's right edge sat past
   the visible/clipped boundary) and the DATE-column item (10-char dates
   wrapped onto 3 lines at 1280 because DATE was the one column still
   carrying the generic first-child white-space:normal rule, so the
   browser's auto table-layout treated it as the "compressible" column
   and starved it below its own single-line content width while
   PAYEE/CATEGORY/ACCOUNT held large excess whitespace). */
.tx-table th:first-child,.tx-table td:first-child{white-space:nowrap;min-width:96px}
.tx-table th:nth-child(2),.tx-table td:nth-child(2){max-width:190px;overflow:hidden;text-overflow:ellipsis}
.tx-table th:nth-child(3),.tx-table td:nth-child(3){max-width:150px;overflow:hidden;text-overflow:ellipsis}
.tx-table th:nth-child(4),.tx-table td:nth-child(4){max-width:170px;overflow:hidden;text-overflow:ellipsis}
.tx-table th:nth-child(5),.tx-table td:nth-child(5){min-width:96px}

/* BUG#2 follow-through: even after the column caps above, five real
   columns still won't all fit at a 375px viewport -- .table-scroll's
   overflow-x:auto already scrolls correctly (verified: it does NOT force
   page-level overflow, the real 375px overflow culprit was the filter
   <select> elements above, fixed separately), it just had no visible
   affordance telling a household reader that more columns exist off-
   screen. Shown only at narrow widths -- at desktop the column caps above
   already make the table fit without scrolling, so the hint would be
   noise there. */
.tx-scroll-hint{display:none}
@media (max-width:640px){
  .tx-scroll-hint{display:block}
}

/* ---------- Forms ---------- */
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.field{display:flex;flex-direction:column;gap:5px}
.field label{font-family:var(--font-body);font-size:var(--text-dense);font-weight:600;color:var(--ink-2)}
.field .hint{font-size:var(--text-dense);color:var(--muted);line-height:1.45}
.field input[type="text"],.field input[type="number"],.field input[type="date"],.field input[type="password"],.field select{
  border:1px solid var(--field-border);border-radius:6px;padding:9px 10px;background:var(--paper);color:var(--ink);font:14px var(--font-body)}
.field input:focus-visible,.field select:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
/* click-through #8: Chromium does not always match :focus-visible on a date input (focus sits in its inner fields) */
.field input[type="date"]:focus,.field input[type="date"]:focus-within{outline:2px solid var(--accent);outline-offset:1px}
.field input[type="range"]{width:100%;accent-color:var(--accent)}
.field .range-value{font-family:var(--font-body);font-size:var(--text-dense);color:var(--ink);font-variant-numeric:tabular-nums}
fieldset{border:1px solid var(--line);border-radius:10px;padding:16px 18px;margin:0}
legend{font-family:var(--font-body);font-size:var(--text-caption);text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:0 6px}

/* One button system (UX pass 1, finding 11 in the report, #10 in the brief): three variants, one height rule.
   Secondary is the default .btn; .primary fills with the accent; .ghost and .link-btn are the tertiary text button.
   Anchors use the same classes. Disabled is 40% opacity of the same hue, never a different colour. */
.btn,button.link-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-sm);min-height:var(--control-h);padding:0 var(--space-md);border-radius:var(--radius-md);font:600 14px/1.2 var(--font-body);letter-spacing:0;text-transform:none;text-decoration:none;cursor:pointer;border:1px solid var(--line-strong);background:transparent;color:var(--ink);white-space:nowrap;transition:background-color .12s ease,border-color .12s ease,filter .12s ease}
@media (hover:hover){.btn:hover{background:var(--paper-alt);border-color:var(--muted)}}
.btn.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
@media (hover:hover){.btn.primary:hover{background:var(--accent);filter:brightness(1.12)}}
.btn.danger{background:var(--danger);color:var(--paper);border-color:var(--danger)}
@media (hover:hover){.btn.danger:hover{background:var(--danger);filter:brightness(1.1)}}
.btn.ghost,button.link-btn{background:transparent;border-color:transparent;color:var(--accent);padding:0 var(--space-sm)}
@media (hover:hover){.btn.ghost:hover,button.link-btn:hover{background:var(--accent-bg);border-color:transparent}}
/* a11y L3, Vesta ruling 3: disabled is a neutral fill at AA, never 40% opacity; primary and danger look the same when off. */
.btn:disabled,.btn.is-off,.btn[aria-disabled="true"],.btn.primary:disabled,.btn.primary.is-off,.btn.primary[aria-disabled="true"],.btn.danger:disabled,.btn.danger.is-off{background:var(--disabled-bg);color:var(--disabled-fg);border-color:var(--disabled-border);cursor:not-allowed;filter:none;opacity:1}
.btn:disabled:hover,.btn.is-off:hover{background:transparent;border-color:var(--line-strong)}
.btn.primary:disabled:hover,.btn.primary.is-off:hover,.btn.danger:disabled:hover,.btn.danger.is-off:hover{background:var(--disabled-bg);border-color:var(--disabled-border)}
.btn:focus-visible,button.link-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (max-width:600px){.btn,button.link-btn{min-height:var(--control-h-touch)}}
/* D4 (batch 2 staging walk): the count line under a suggested number is a sentence; it wraps inside its card. */
button.link-btn[data-count-line]{white-space:normal;max-width:100%;text-align:left;justify-content:flex-start;height:auto;padding-left:0;padding-right:0}

.error-msg{color:var(--danger);font-size:var(--text-meta);margin-top:4px}
.hint-warn{color:var(--warn);font-size:var(--text-meta);margin-top:8px;background:var(--assume-bg);border:1px solid var(--assume);border-radius:8px;padding:10px 12px}
.field.has-error input{border-color:var(--danger)}

/* ---------- Login / setup screens ---------- */
.centered-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--bg)}
.auth-card{max-width:440px;width:100%;background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:32px 30px;box-shadow:var(--shadow-md)}
.auth-card h1{font-family:var(--font-display);font-size:var(--text-section);margin:0 0 4px;color:var(--ink)}
.auth-card .sub{font-size:var(--text-dense);color:var(--muted);margin:0 0 22px}
.auth-card .field{margin-bottom:16px}
.auth-actions{display:flex;flex-direction:column;gap:10px;margin-top:18px}
.auth-divider{display:flex;align-items:center;gap:10px;margin:18px 0;color:var(--muted);font-size:var(--text-caption);text-transform:uppercase;letter-spacing:.06em}
.auth-divider::before,.auth-divider::after{content:"";flex:1;height:1px;background:var(--line)}

.setup-steps{display:flex;gap:6px;margin-bottom:22px}
.setup-steps .step-dot{flex:1;height:4px;border-radius:2px;background:var(--line)}
.setup-steps .step-dot.done{background:var(--confirmed)}
.setup-steps .step-dot.active{background:var(--accent)}

.passphrase-display{font-family:var(--font-mono);font-size:var(--text-card);font-weight:600;letter-spacing:.01em;background:var(--paper-alt);border:1px solid var(--line-strong);border-radius:8px;padding:14px 16px;word-break:break-all;color:var(--ink);margin:10px 0}

.entropy-meter{height:6px;border-radius:999px;background:var(--paper-alt);border:1px solid var(--line);overflow:hidden;margin-top:8px}
.entropy-meter > span{display:block;height:100%;border-radius:999px 0 0 999px}
.entropy-meter[data-ok="true"] > span{background:var(--confirmed)}
.entropy-meter[data-ok="false"] > span{background:var(--danger)}
.entropy-note{font-size:var(--text-dense);color:var(--muted);margin-top:5px}
.entropy-note.bad{color:var(--danger)}

.kit-warning{background:var(--danger-bg);border:1px solid var(--danger);border-radius:10px;padding:16px 18px;margin:14px 0}
.kit-warning strong{color:var(--danger);display:block;margin-bottom:4px}
.kit-warning p{margin:0;font-size:var(--text-dense);color:var(--ink-2);line-height:1.5}

.dev-only-box{border:2px dashed var(--assume);border-radius:10px;padding:16px 18px;margin-top:24px;background:var(--assume-bg)}
.dev-only-box .eyebrow{color:var(--assume)}
.dev-only-box p{font-size:var(--text-meta);color:var(--ink-2);margin:6px 0 12px}

/* ---------- Settings overlay ---------- */
.overlay-screen{position:fixed;inset:0;background:var(--bg);z-index:50;overflow-y:auto}
.overlay-header{display:flex;justify-content:space-between;align-items:center;max-width:900px;margin:0 auto;padding:20px 20px 0}
.overlay-header h2{font-family:var(--font-display);margin:0}

/* ---------- Auto-lock overlay ---------- */
.autolock-overlay{position:fixed;inset:0;background:rgba(20,17,10,.72);z-index:100;display:flex;align-items:center;justify-content:center;padding:20px}
.autolock-box{background:var(--paper);border-radius:14px;padding:28px 26px;max-width:380px;text-align:center;box-shadow:var(--shadow-md)}
.autolock-box h3{font-family:var(--font-display);margin:0 0 8px}
.autolock-box p{font-size:var(--text-meta);color:var(--muted);margin:0 0 18px}

/* ---------- Dialog (recast lock confirm) ---------- */
.dialog-backdrop{position:fixed;inset:0;background:rgba(20,17,10,.55);z-index:80;display:flex;align-items:center;justify-content:center;padding:20px}
.dialog-box{background:var(--paper);border-radius:14px;padding:24px 26px;max-width:520px;width:100%;box-shadow:var(--shadow-md);max-height:85vh;overflow-y:auto}
.dialog-box h3{font-family:var(--font-display);margin:0 0 10px}
.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}

/* ---------- Recast dual framing ---------- */
.recast-compare{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin:14px 0}
.recast-option{border:1px solid var(--line);border-radius:10px;padding:16px 18px;background:var(--paper-alt)}
.recast-option.selected{border-color:var(--accent);background:var(--accent-bg)}
.recast-option h4{margin:0 0 8px;font-family:var(--font-display);font-size:var(--text-body)}
.recast-option .warn-line{font-size:var(--text-dense);color:var(--warn);margin-top:8px;line-height:1.4}
.recast-option .figure{font-family:var(--font-body);font-size:var(--text-card);color:var(--ink);font-variant-numeric:tabular-nums}

/* ---------- Self-check badge ---------- */
.selfcheck-badge{display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:8px 14px;font-family:var(--font-body);font-size:var(--text-caption);font-weight:700}
.selfcheck-badge[data-pass="true"]{background:var(--confirmed-bg);color:var(--confirmed)}
.selfcheck-badge[data-pass="false"]{background:var(--danger-bg);color:var(--danger)}
.selfcheck-details{margin-top:12px;font-size:var(--text-caption);font-family:var(--font-mono);color:var(--muted);max-height:220px;overflow-y:auto;border:1px solid var(--line);border-radius:8px;padding:10px 12px}
.selfcheck-details .row{display:flex;justify-content:space-between;gap:10px;padding:3px 0}
.selfcheck-details .row.fail{color:var(--danger)}

/* ---------- Master history ---------- */
.master-list{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.master-list li{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid var(--line);border-radius:8px;padding:10px 14px;background:var(--paper-alt);flex-wrap:wrap}
.master-list li.active{border-color:var(--accent);background:var(--accent-bg)}
.master-list .m-label{font-weight:700;font-size:var(--text-dense)}
.master-list .m-meta{font-family:var(--font-body);font-size:var(--text-meta);color:var(--muted)}

.backups-list{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:6px;max-height:260px;overflow-y:auto}
.backups-list li{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid var(--line);border-radius:6px;padding:8px 12px;font-family:var(--font-mono);font-size:var(--text-caption)}

.foot{max-width:1180px;margin:0 auto;font-size:var(--text-caption);color:var(--muted);padding:16px 20px 40px;border-top:1px solid var(--line);line-height:1.6}

/* ---------- Utility classes (replace one-off inline styles, M8) ---------- */
.mt-8{margin-top:8px} .mt-10{margin-top:10px} .mt-12{margin-top:12px} .mt-14{margin-top:14px} .mt-16{margin-top:16px}
.mb-8{margin-bottom:8px} .mb-10{margin-bottom:10px}
.h2-compact{font-size:var(--text-card)}
.row-flex{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.my-12{margin:12px 0}
.text-tight{margin:0 0 12px}
.btn-sm,.btn.btn-sm{min-height:var(--control-h-sm);padding:0 12px;font-size:var(--text-meta)}
@media (max-width:600px){.btn.btn-sm{min-height:var(--control-h-sm)}}
.auth-card-wide{max-width:560px}
.wrap-narrow{max-width:900px;margin-left:auto;margin-right:auto}
.dot-confirmed{background:var(--confirmed)}
.dot-accent{background:var(--accent)}
.checkbox-field{flex-direction:row;align-items:center;display:flex;gap:8px;text-transform:none;font-family:var(--font-body);font-size:var(--text-meta);color:var(--ink-2)}
.checkbox-input{width:auto}
.banner-compact{margin:0 0 16px;border-radius:8px}
.banner-inner-compact{padding:10px 14px}
.entropy-meter > span{width:0}

@media (max-width:600px){
  .auth-card{padding:24px 20px}
  }

@media (prefers-reduced-motion: no-preference){
  .theme-toggle,.card,.goal-card{transition:background-color .15s ease,border-color .15s ease}
}
@media (prefers-reduced-motion: reduce){ *{scroll-behavior:auto !important} }

.import-textarea{width:100%;box-sizing:border-box;border:1px solid var(--field-border);border-radius:6px;padding:10px;background:var(--paper);color:var(--ink);font:13px var(--font-mono);resize:vertical;margin:8px 0}
.import-error{color:var(--assume);margin:0 0 10px}

/* ============================================================
   MASTER-APP MERGE COMPONENTS (Phase 5, Lucian) -- folded verbatim
   from design/mockup-extensions.css per the owner's mockup approval
   (household-finance-master-app-merge-mockup-approved.md, 2026-08-09).
   Zero new hex beyond the two PROPOSED categorical hues below (plum/
   stone for illiquid-equity/home-equity dataviz categories -- flagged
   to Vesta or the owner for ratification per the source file's own note;
   everything else reuses existing Direction-B custom properties.
   ============================================================ */

/* ---------- Freshness / sync chip (Overview + Settings) ---------- */
.freshness-chip{display:inline-flex;align-items:center;gap:8px;font-family:var(--font-body);font-size:var(--text-caption);color:var(--muted);background:var(--paper-alt);border:1px solid var(--line);border-radius:999px;padding:7px 14px}
.freshness-chip .dot{width:8px;height:8px;border-radius:50%;background:var(--confirmed);flex:none}
.freshness-chip[data-state="stale"] .dot{background:var(--assume)}
.freshness-chip[data-state="failed"] .dot{background:var(--danger)}
.freshness-chip strong{color:var(--ink);font-weight:700}

/* ---------- Account groups (Overview accounts drill-down) ---------- */
.account-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;margin-top:16px}
.account-group{background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:16px 18px;box-shadow:var(--shadow-sm)}
.account-group h3{margin:0 0 10px;font-family:var(--font-display);font-size:var(--text-body);font-weight:600;color:var(--ink)}
.account-group .group-total{font-family:var(--font-body);font-variant-numeric:tabular-nums;font-size:var(--text-dense);color:var(--muted);margin-left:6px}
.account-row{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:7px 0;border-bottom:1px solid var(--line)}
.account-row:last-child{border-bottom:none}
.account-row .a-name{font-size:var(--text-dense);color:var(--ink-2)}
.account-row .a-org{display:block;font-family:var(--font-body);font-size:var(--text-meta);color:var(--muted)}
.account-row .a-bal{font-family:var(--font-body);font-variant-numeric:tabular-nums;font-size:var(--text-dense);color:var(--ink);white-space:nowrap}
.account-row .a-bal.negative{color:var(--danger)}

/* ---------- Filter / toolbar chips (Budgeting transaction browser) ---------- */
.table-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:14px 0}
.table-toolbar input[type="search"]{flex:1;min-width:180px;border:1px solid var(--field-border);border-radius:6px;padding:9px 12px;background:var(--paper);color:var(--ink);font:14px var(--font-body)}
.filter-chip{font-family:var(--font-body);font-size:var(--text-dense);font-weight:600;letter-spacing:0;text-transform:none;padding:6px 12px;border-radius:999px;border:1px solid var(--line-strong);background:var(--paper-alt);color:var(--ink-2);cursor:pointer;white-space:nowrap;max-width:100%;min-width:0}
/* select elements (month/account/category filters) auto-size to their
   WIDEST option's intrinsic content in Chromium, not just the currently
   selected/displayed option -- with real long account/category names this
   forces the control past a narrow viewport (BUG#2, 375px page overflow:
   399px rendered vs 375px viewport, isolated via computed-style probe to
   these three <select class="filter-chip"> elements, NOT the transactions
   table itself, which was already properly contained by .table-scroll).
   max-width:100% is the actual fix; the browser truncates the displayed
   selected-option text to fit, the full option list is unaffected. */
select.filter-chip{text-overflow:ellipsis;overflow:hidden}
.filter-chip[aria-pressed="true"]{background:var(--accent-bg);border-color:var(--accent);color:var(--accent)}
.filter-chip:hover{background:var(--accent-bg)}

/* ---------- Preset chip row (scenario planner) ---------- */
.preset-row{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.preset-chip{font-family:var(--font-body);font-size:var(--text-dense);font-weight:700;padding:8px 14px;border-radius:8px;border:1px solid var(--line-strong);background:var(--paper);color:var(--ink-2);cursor:pointer}
.preset-chip[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.preset-chip:hover:not([aria-pressed="true"]){background:var(--accent-bg)}

/* ---------- Slider rows (scenario planner) ---------- */
.slider-row{margin:16px 0}
.slider-row .slider-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:6px}
.slider-row label{font-family:var(--font-body);font-size:var(--text-dense);font-weight:600;color:var(--ink-2)}
.slider-row .range-value{font-family:var(--font-body);font-size:var(--text-dense);color:var(--ink);font-variant-numeric:tabular-nums;font-weight:700}
.slider-row input[type="range"]{width:100%;accent-color:var(--accent)}

/* ---------- Cut chip (scenario planner discretionary trims) ---------- */
.cut-chips{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.cut-chip{display:flex;align-items:center;gap:8px;border:1px solid var(--line-strong);border-radius:8px;padding:8px 12px;background:var(--paper);cursor:pointer;font-size:var(--text-dense)}
.cut-chip input{width:auto;margin:0}
.cut-chip .cc-name{font-weight:600;color:var(--ink-2)}
.cut-chip .cc-detail{display:block;font-family:var(--font-body);font-size:var(--text-meta);color:var(--muted)}
.cut-chip .cc-save{font-family:var(--font-body);font-variant-numeric:tabular-nums;font-size:var(--text-dense);color:var(--confirmed);font-weight:700;margin-left:auto}
.cut-chip:has(input:checked){background:var(--accent-bg);border-color:var(--accent)}
.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--line);border-radius:8px;padding:10px 14px;margin:10px 0}
.toggle-row .tr-label{font-size:var(--text-dense);color:var(--ink-2)}
.toggle-switch{position:relative;width:40px;height:22px;border-radius:999px;border:1px solid var(--line-strong);background:var(--paper-alt);cursor:pointer;flex:none;padding:0}
.toggle-switch::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:var(--muted);transition:transform .15s ease}
.toggle-switch[aria-pressed="true"]{background:var(--accent);border-color:var(--accent)}
.toggle-switch[aria-pressed="true"]::after{background:var(--accent-ink);transform:translateX(18px)}

/* ---------- Provenance marker (live vs estimate) ---------- */
.prov-marker{font-family:var(--font-body);font-size:var(--text-caption);font-weight:700;text-transform:none;letter-spacing:0;padding:3px 8px;border-radius:999px}
.prov-marker.live{background:var(--confirmed-bg);color:var(--confirmed)}
.prov-marker.estimate{background:var(--assume-bg);color:var(--assume)}

/* ---------- Allocation bar (Holdings) ---------- */
.alloc-bar{display:flex;height:14px;border-radius:999px;overflow:hidden;border:1px solid var(--field-border);margin:12px 0 8px}
.alloc-bar span + span{border-left:2px solid var(--paper)} /* a11y M3: segments separate by more than hue */
.alloc-bar span{display:block;height:100%}
.table-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.alloc-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:var(--text-dense);color:var(--muted)}
.alloc-legend .item{display:flex;align-items:center;gap:6px}
.alloc-legend .dot{width:9px;height:9px;border-radius:50%;display:inline-block}

/* ---------- Empty state block (honest empty variants) ---------- */
.empty-state{text-align:center;padding:48px 24px;border:1px dashed var(--line-strong);border-radius:12px;background:var(--paper-alt)}
.empty-state .glyph{width:44px;height:44px;border-radius:50%;background:var(--paper);border:1px solid var(--line-strong);display:flex;align-items:center;justify-content:center;margin:0 auto 14px;font-family:var(--font-display);font-size:var(--text-card);color:var(--muted)}
.empty-state p{margin:0 0 14px;font-size:var(--text-dense);color:var(--ink-2);max-width:44ch;margin-left:auto;margin-right:auto}
.mockup-divider{display:flex;align-items:center;gap:12px;margin:34px 0 20px;color:var(--muted);font-family:var(--font-body);font-size:var(--text-caption);text-transform:uppercase;letter-spacing:.06em}
.mockup-divider::before,.mockup-divider::after{content:"";flex:1;height:1px;background:var(--line-strong)}

/* ---------- Auto / manual-override toggle pill (Levels rewire) ---------- */
.auto-toggle{display:inline-flex;border:1px solid var(--line-strong);border-radius:999px;overflow:hidden;font-family:var(--font-body);font-size:var(--text-dense);font-weight:700}
.auto-toggle button{border:none;background:var(--paper-alt);color:var(--muted);padding:6px 12px;cursor:pointer}
.auto-toggle button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink)}
.field-with-toggle{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.field-note{font-size:var(--text-dense);color:var(--muted);margin-top:4px;line-height:1.45}

/* ---------- Manual-asset row (Settings) ---------- */
.manual-asset-row{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid var(--line);border-radius:8px;padding:10px 14px;background:var(--paper-alt);flex-wrap:wrap;margin-bottom:8px}
.manual-asset-row .ma-label{font-weight:700;font-size:var(--text-dense);color:var(--ink)}
.manual-asset-row .ma-meta{font-family:var(--font-body);font-size:var(--text-meta);color:var(--muted)}
.manual-asset-row .ma-val{font-family:var(--font-body);font-variant-numeric:tabular-nums;font-size:var(--text-dense);color:var(--ink)}
.manual-asset-row .ma-val.liability{color:var(--danger)}

@media (max-width:480px){
  .account-groups{grid-template-columns:1fr}
  .table-toolbar{flex-direction:column;align-items:stretch}
  .table-toolbar input[type="search"]{width:100%}
}

/* ============================================================
   COCKPIT ELEVATION + insight/action-card primitives -- Vesta
   design-direction (2026-08-09-12-45_vesta_levels-overview-cockpit-
   design-direction.md). Two PROPOSED categorical hexes below (plum,
   stone) pending explicit Vesta or owner ratification -- flagged in
   the return handoff; every other value is an existing token alias.
   ============================================================ */

:root{
  --shadow-lg:0 8px 32px rgba(24,20,10,.10);
  --surface-hero:linear-gradient(180deg, var(--paper) 0%, var(--accent-bg) 130%);
  --surface-insight-critical:var(--danger-bg);
  --surface-insight-attention:var(--assume-bg);
  --surface-insight-positive:var(--confirmed-bg);
  --surface-insight-info:var(--derived-bg);
  --category-investable:var(--accent);
  --category-cash:var(--derived);
  --category-illiquid-equity:#6d4576;   /* plum-600 -- PROPOSED, pending approval */
  --category-home-equity:#6e675c;       /* stone-600 -- PROPOSED, pending approval */
  --motion-fast:120ms;
  --motion-base:220ms;
  --motion-slow:420ms;
}
@media (prefers-color-scheme: dark){
  :root{
    --shadow-lg:0 10px 36px rgba(0,0,0,.40);
    --surface-hero:linear-gradient(180deg, var(--paper) 0%, var(--accent-bg) 160%);
    --category-illiquid-equity:#b48bbd;
    --category-home-equity:#a39a8c;
  }
}
:root[data-theme="dark"]{
  --shadow-lg:0 10px 36px rgba(0,0,0,.40);
  --surface-hero:linear-gradient(180deg, var(--paper) 0%, var(--accent-bg) 160%);
  --category-illiquid-equity:#b48bbd;
  --category-home-equity:#a39a8c;
}
:root[data-theme="light"]{
  --shadow-lg:0 8px 32px rgba(24,20,10,.10);
  --surface-hero:linear-gradient(180deg, var(--paper) 0%, var(--accent-bg) 130%);
  --category-illiquid-equity:#6d4576;
  --category-home-equity:#6e675c;
}

.hero-cockpit{position:relative;background:var(--surface-hero);border:1px solid var(--line);border-radius:16px;padding:24px 26px 22px;margin:18px 0 20px;box-shadow:var(--shadow-lg)}
.hero-cockpit-head{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:2px}
.hero-figure-lg{display:block;font-family:var(--font-display);font-size:var(--text-figure);line-height:1.05;color:var(--ink);font-variant-numeric:tabular-nums;margin:6px 0 4px}
@media (max-width:600px){ .hero-figure-lg{font-size:var(--text-figure)} }

/* Sub2 (2026-08-11, Lucian) -- honest cash-flow surface. Supersedes the
   removed .hero-delta/.since ("$X ahead of plan · Plan target $Y") --
   grep-confirmed unused elsewhere before deletion. */
.cf-safe-to-spend{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;padding:10px 14px;border-radius:10px;background:var(--accent-bg)}
.cf-safe-to-spend.negative{background:var(--danger-bg)}
.cf-safe-to-spend .cf-safe-figure{font-family:var(--font-body);font-weight:600;font-size:var(--text-card);font-variant-numeric:tabular-nums;color:var(--accent)}
.cf-safe-to-spend.negative .cf-safe-figure{color:var(--danger)}
.cf-commitments-list{display:flex;flex-direction:column;gap:2px}
.cf-commitment-row{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:var(--text-dense);padding:8px 0;border-bottom:1px solid var(--line)}
.cf-commitment-row:last-child{border-bottom:none}
.cf-commitment-name{color:var(--ink-2);font-weight:600;flex:1;min-width:120px}
.cf-commitment-amt{font-family:var(--font-body);font-variant-numeric:tabular-nums;color:var(--ink)}
.cf-commitment-due{font-family:var(--font-body);font-size:var(--text-dense);color:var(--muted);white-space:nowrap}
.cf-sparkline-wrap{margin-bottom:12px}
.cf-sparkline{width:100%;height:56px;display:block}

.insight-cards{display:flex;gap:14px;flex-wrap:wrap;margin:16px 0}
.insight-card{flex:1 1 260px;min-width:240px;border-radius:12px;border:1px solid var(--line);padding:16px 18px;box-shadow:var(--shadow-lg);display:flex;flex-direction:column;gap:8px}
.insight-card[data-severity="critical"]{background:var(--surface-insight-critical);border-color:var(--danger)}
.insight-card[data-severity="attention"]{background:var(--surface-insight-attention);border-color:var(--assume)}
.insight-card[data-severity="positive"]{background:var(--surface-insight-positive);border-color:var(--confirmed)}
.insight-card[data-severity="info"]{background:var(--surface-insight-info);border-color:var(--derived)}
.insight-card-head{display:flex;align-items:center;gap:8px}
.insight-card-head .sev-dot{width:9px;height:9px;border-radius:50%;flex:none}
.insight-card[data-severity="critical"] .sev-dot{background:var(--danger)}
.insight-card[data-severity="attention"] .sev-dot{background:var(--assume)}
.insight-card[data-severity="positive"] .sev-dot{background:var(--confirmed)}
.insight-card[data-severity="info"] .sev-dot{background:var(--derived)}
.insight-card-head .sev-label{font-family:var(--font-body);font-size:var(--text-caption);font-weight:700;letter-spacing:0;text-transform:none;color:var(--ink-2)}
.insight-card h4{margin:0;font-family:var(--font-body);font-size:var(--text-body);font-weight:600;color:var(--ink);line-height:1.35}
.insight-card p{margin:0;font-size:var(--text-dense);line-height:1.5;color:var(--ink-2)}
.insight-card-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:auto;padding-top:6px;flex-wrap:wrap}

.action-cards{display:flex;flex-direction:column;gap:12px;margin:16px 0}
.action-card{display:flex;align-items:center;gap:16px;border:1px solid var(--line);border-radius:12px;padding:14px 18px;background:var(--paper);box-shadow:var(--shadow-lg);flex-wrap:wrap}
.action-card .a-rank{flex:none;width:30px;height:30px;border-radius:50%;background:var(--accent-bg);color:var(--accent);display:flex;align-items:center;justify-content:center;font-family:var(--font-display);font-weight:700;font-size:var(--text-dense)}
.action-card .a-body{flex:1;min-width:200px}
.action-card .a-title{font-size:var(--text-dense);font-weight:600;color:var(--ink);margin:0 0 4px}
.action-card .a-meta{display:flex;gap:14px;flex-wrap:wrap;font-family:var(--font-body);font-size:var(--text-meta);color:var(--muted)}
.action-card .a-impact.positive{color:var(--confirmed);font-weight:700}
.action-card .a-impact.risk{color:var(--derived);font-weight:700}
.action-card .a-cta{flex:none}

/* Action Tracker / Open Items (CBI-1663) -- extends the .action-card shell
   above with a check-off control + domain/due/metric meta. Layout-only
   additions, zero new tokens (existing --accent/--danger/--muted/
   --derived-bg/--derived reused throughout). */
.action-card .a-check-wrap{flex:none;width:30px;height:30px;display:flex;align-items:center;justify-content:center}
.action-card .a-check-wrap input[type="checkbox"]{width:19px;height:19px;accent-color:var(--accent);cursor:pointer}
.action-card .a-check-dot{color:var(--muted);font-size:var(--text-body);line-height:1}
.action-card .a-detail{margin:4px 0 0;font-size:var(--text-dense);color:var(--ink-2)}
.action-card .a-due{color:var(--muted)}
.action-card .a-due.overdue{color:var(--danger);font-weight:700}
.action-card .a-condition-note{font-style:italic;color:var(--muted)}
.action-card .a-dismiss{flex:none;margin-left:auto}
.action-card.is-done{color:var(--muted)} /* a11y L4: no opacity drop; the line-through on the title carries 'done' */
.action-card.is-done .a-title{text-decoration:line-through}
.chip.domain{background:var(--derived-bg);color:var(--derived)}

/* Sub3 (2026-08-11, Lucian) -- open-item detail. .a-body-tappable is a
   <details>/<summary> in place of .a-body's plain <div> (native keyboard
   activation, no custom role/keydown handling -- matches
   .accounts-disclosure's idiom). */
.action-card .a-body-tappable{flex:1;min-width:200px;cursor:pointer}
.action-card .a-body-tappable > summary{list-style:none;cursor:pointer}
.action-card .a-body-tappable > summary::-webkit-details-marker{display:none}
.action-card .a-body-tappable > summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
.a-details-chevron{display:inline-block;margin-left:8px;font-family:var(--font-body);font-size:var(--text-meta);font-weight:700;color:var(--accent)}
.a-details-chevron::before{content:"\25B8 ";}
.action-card .a-body-tappable[open] .a-details-chevron::before{content:"\25BE ";}
.a-detail-sheet{margin-top:10px;padding-top:10px;border-top:1px dashed var(--line)}
.a-detail-sheet-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-weight:600;color:var(--ink);margin:0 0 8px;font-size:var(--text-dense)}
.a-detail-sheet p{font-size:var(--text-dense);color:var(--ink-2);line-height:1.55;margin:0 0 10px}
.doc-pointer{display:inline-flex;align-items:center;gap:6px;font-size:var(--text-dense);color:var(--accent);text-decoration:underline}
.doc-pointer.repo{display:flex;flex-wrap:wrap;align-items:center;gap:8px;color:var(--ink-2);text-decoration:none;margin-top:6px}
.doc-pointer-ref{font-family:var(--font-mono);font-size:var(--text-caption);color:var(--muted);background:var(--paper-alt);padding:2px 7px;border-radius:5px;word-break:break-all}

/* Sub4 (2026-08-11, Lucian) -- budget customization surface. */
.commitment-row{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 12px;padding:10px 0;border-bottom:1px solid var(--line);font-size:var(--text-dense)}
.commitment-row:last-child{border-bottom:none}
.commitment-row .commitment-name{color:var(--ink-2);font-weight:600;flex:1;min-width:120px}
.commitment-row .commitment-target{font-family:var(--font-body);font-variant-numeric:tabular-nums;color:var(--ink)}
.commitment-row .commitment-state{font-family:var(--font-body);font-size:var(--text-dense);color:var(--muted);white-space:normal}
@media (max-width:600px){.commitment-row .commitment-state{flex-basis:100%;text-align:right}}
.commitment-row.is-paid .commitment-state{color:var(--confirmed)}
.commitment-row.is-partial .commitment-state{color:var(--assume)}
.budget-cat-block{margin-bottom:16px}
.budget-cat-block:last-child{margin-bottom:0}
.accrual-meter,.savings-meter{margin-bottom:2px}
.cat-customizer{border-top:1px dashed var(--line);padding-top:10px;margin-top:8px}
.cat-customizer-toggle{margin-top:6px}
.type-segmented{display:flex;flex-wrap:wrap;gap:6px}
.seg-btn{font-family:var(--font-body);font-size:var(--text-dense);font-weight:600;letter-spacing:0;text-transform:none;padding:6px 11px;border-radius:7px;border:1px solid var(--line-strong);background:var(--paper-alt);color:var(--ink-2);cursor:pointer}
.seg-btn.active{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.seg-btn:hover:not(.active){background:var(--accent-bg)}

.accounts-disclosure{margin-top:24px}
.accounts-disclosure > summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:8px;font-family:var(--font-body);font-size:var(--text-dense);font-weight:600;color:var(--accent);text-transform:none;letter-spacing:0}
.accounts-disclosure > summary::-webkit-details-marker{display:none}
/* I-09 (2026-11-23): the ::before triangles here outranked account.css G9 when open (two chevrons, a centred title); removed. */
.accounts-disclosure .account-groups{margin-top:14px}

/* BUG#9 root-cause fix (2026-08-11): the reported symptom was "second
   (faded) open-item row drops to near-invisible contrast in dark theme."
   Direct computed-style probe against the real feed found the actual
   cause was NOT a color-contrast deficiency (dark --muted vs --paper
   measures ~5.2:1, above AA) -- it was .action-card's staggered
   cockpit-in entrance animation below: nth-child(2)/(3) start at
   opacity:0 and don't reach opacity:1 until 220ms/440ms of animation-
   delay plus 420ms duration have elapsed (~640ms/860ms total). A probe
   taken shortly after render (any screenshot/verification tool, or a
   real user glancing at the screen on load) catches rows 2-3 mid-fade or
   still at their pre-animation opacity:0 -- reproduced directly: card 2
   measured opacity:0, card 3 measured opacity:0, card 1 measured
   opacity:0.75, all "visibility:visible" (i.e. genuinely invisible, not
   a CSS bug report false positive). This happens in BOTH themes; dark
   theme just made it easier to notice against a busy background. Removed
   entirely for .action-card (kept for .hero-cockpit/.insight-card,
   which weren't reported and load once, not per-row in a list where
   staggered invisibility reads as a real defect). */
@keyframes cockpit-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media (prefers-reduced-motion: no-preference){
  .hero-cockpit,.insight-card{animation:cockpit-in var(--motion-slow,420ms) ease both}
  .insight-card:nth-child(2){animation-delay:var(--motion-base,220ms)}
  .insight-card:nth-child(3){animation-delay:calc(var(--motion-base,220ms) * 2)}
}
@media (prefers-reduced-motion: reduce){
  .hero-cockpit,.insight-card{animation:none}
}

/* ============================================================
   OVERVIEW LEADING-INDICATORS (v3) -- approved surface per
   household-finance-master-app-merge-mockup-approved.md. Net worth
   demoted to a compact honest strip; cash flow / attainment / runway
   lead. Zero new hex -- reuses Direction-B + cockpit tokens above.
   ============================================================ */

.text-confirmed{color:var(--confirmed)}
.text-assume{color:var(--assume)}
.text-derived{color:var(--derived)}
.text-danger{color:var(--danger)}
.meter > span.fill-confirmed,.bullet-fill.fill-confirmed{background:var(--confirmed)}
.meter > span.fill-assume,.bullet-fill.fill-assume{background:var(--assume)}
.meter > span.fill-derived,.bullet-fill.fill-derived{background:var(--derived)}
.meter > span.fill-danger,.bullet-fill.fill-danger{background:var(--danger)}

.bullet-rows{display:flex;flex-direction:column;gap:14px}
.bullet-row-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:6px;flex-wrap:wrap}
.bullet-label{font-family:var(--font-body);font-size:var(--text-dense);font-weight:600;color:var(--ink-2);text-transform:none;letter-spacing:0}
.bullet-value{font-family:var(--font-body);font-size:var(--text-dense);font-variant-numeric:tabular-nums;color:var(--ink)}
.bullet-target{color:var(--muted);font-weight:400;margin-left:4px}
.bullet-bar{position:relative;height:10px;border-radius:999px;background:var(--paper-alt);border:1px solid var(--line);overflow:visible}
.bullet-fill{display:block;height:100%;border-radius:999px;background:var(--accent)}
.bullet-target-mark{position:absolute;top:-3px;bottom:-3px;width:2px;background:var(--ink-2)}
.bullet-target-mark::after{content:"";position:absolute;top:-4px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid var(--ink-2)}

.cf-month-label{display:block;font-family:var(--font-body);font-size:var(--text-caption);color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin-top:2px}
.hero-figure-unit{font-family:var(--font-body);font-size:var(--text-body);font-weight:600;color:var(--ink-2);vertical-align:middle;margin-left:8px}
.cashflow-hero .bullet-bar{background:var(--paper)}

.attainment-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin:16px 0}
.goal-attain-rows{display:flex;flex-direction:column;gap:16px}
.goal-attain-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:6px}
.ga-name{font-size:var(--text-dense);color:var(--ink-2);font-weight:600}
.ga-pct{font-family:var(--font-body);font-size:var(--text-dense);font-weight:700;font-variant-numeric:tabular-nums}

.runway-card .runway-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.runway-figure{font-family:var(--font-body);font-size:var(--text-section);font-weight:600;font-variant-numeric:tabular-nums}
.runway-sub{font-size:var(--text-dense);color:var(--muted)}
.runway-bar{height:14px}
/* BUG#7 fix: was display:flex;justify-content:space-between -- three
   labels at fixed 0/50/100% positions regardless of what they described,
   which put "Floor — 6 mo" at a visual midpoint that never matched the
   floor tick-mark's real position on the bar above (often near the right
   edge once floor > current cash). Now a relative-positioned row with
   each label absolutely placed at the SAME percentage as the thing it
   labels (0 = left edge, floor = mark.style.left set in app.js to match
   the bar's own floor tick exactly, max = right edge), so the axis is
   internally consistent and readable at a glance. */
.runway-scale{position:relative;height:16px;font-family:var(--font-body);font-variant-numeric:tabular-nums;font-size:var(--text-caption);color:var(--muted);margin-top:6px}
.runway-scale .rs-mark{position:absolute;top:0;white-space:nowrap}
.runway-scale .rs-mark-0{left:0}
.runway-scale .rs-mark-floor{transform:translateX(-50%)}

.networth-strip{display:grid;grid-template-columns:auto 1fr;gap:14px 26px;border:1px solid var(--line);border-radius:12px;padding:16px 20px;background:var(--paper);box-shadow:var(--shadow-sm);align-items:start}
.ns-left{display:flex;flex-direction:column;gap:8px;min-width:140px}
.strip-sparkline{width:140px;height:34px;display:block}
.strip-sparkline .spark-area{fill:var(--accent-bg-strong);opacity:.4}
.strip-sparkline .spark-line{fill:none;stroke:var(--accent);stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.ns-figures{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}
.ns-figure{display:flex;flex-direction:column;gap:3px}
.ns-label{font-family:var(--font-body);font-size:var(--text-caption);color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.ns-value{font-family:var(--font-body);font-size:var(--text-section);font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.ns-caveat{font-family:var(--font-body);font-size:var(--text-caption);color:var(--muted);font-weight:400;margin-left:4px}
.ns-note{font-size:var(--text-dense);line-height:1.45;color:var(--muted)}
.ns-figure-flag .ns-value{color:var(--assume)}
.ns-total{grid-column:1 / -1;margin-top:2px;color:var(--muted)}
.rl-flag{color:var(--assume);margin-left:3px;cursor:help}
@media (max-width:640px){
  .networth-strip{grid-template-columns:1fr}
}

/* ---------- Budget-bars-first IA (B4): spending-by-category donut ---------- */
.donut-row{display:flex;gap:28px;align-items:center;flex-wrap:wrap;margin:14px 0 4px}
.cat-donut-wrap{position:relative;flex:none;width:140px;height:140px}
.cat-donut{width:140px;height:140px;border-radius:50%;border:1px solid var(--line)}
.cat-donut-hole{position:absolute;top:18px;left:18px;right:18px;bottom:18px;border-radius:50%;background:var(--paper);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;box-shadow:var(--shadow-sm)}
.cat-donut-hole .cd-total{font-family:var(--font-body);font-size:var(--text-card);font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums}
.cat-donut-hole .cd-label{font-family:var(--font-body);font-size:var(--text-caption);color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin-top:2px}
.cat-legend{flex:1 1 220px;display:flex;flex-direction:column;gap:9px;min-width:200px}
.cat-legend-row{display:flex;align-items:center;gap:9px;font-size:var(--text-dense)}
.cat-legend-row .dot{width:10px;height:10px;border-radius:50%;flex:none}
.cat-legend-name{flex:1;color:var(--ink-2);font-weight:600}
.cat-legend-val{font-family:var(--font-body);font-size:var(--text-dense);color:var(--muted);font-variant-numeric:tabular-nums}

/* ---------- Inline section head (label + action button on one row) ---------- */
.section-head-inline{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:10px}

/* ---------- Levels: starter-goals suggestion panel (D6/B6) ---------- */
.starter-goal-list{display:flex;flex-direction:column;gap:2px}
.starter-goal-row{display:flex;align-items:center;gap:12px;padding:9px 0;border-top:1px solid var(--line)}
.starter-goal-row:first-child{border-top:none}
.sg-name{flex:1;font-size:var(--text-dense);font-weight:600;color:var(--ink-2)}
.sg-detail{font-family:var(--font-body);font-size:var(--text-dense);color:var(--muted)}

/* ---- Protection tab (Estate & Protection module) ---- */
.pr-headline{font-family:var(--font-body);font-size:var(--text-card);font-weight:600;margin:4px 0 10px;color:var(--ink)}
.pr-person,.pr-doc,.pr-bene-row,.pr-dime{border-top:1px solid var(--line);padding:14px 0;display:flex;flex-direction:column;gap:10px}
.pr-doc-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.pr-chip[data-tone="ok"]{background:var(--confirmed-bg);color:var(--confirmed)}
.pr-chip[data-tone="warn"]{background:var(--paper-alt);color:var(--warn);border:1px solid var(--warn)}
.pr-chip[data-tone="bad"]{background:var(--danger-bg);color:var(--danger)}
/* UX pass 3, finding 12: no red stripes; one summary row, one account open at a time, three selects on one line */
.pr-bene-summary{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--space-sm);padding:var(--space-sm) 0}
.pr-bene-summary p{margin:0;font-size:var(--text-dense);color:var(--ink)}
.pr-bene-line{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:var(--space-sm) var(--space-md);align-items:end}
.pr-bene-line .pr-chip{align-self:center;margin-top:18px}
@media (max-width:600px){.pr-bene-line{grid-template-columns:1fr}.pr-bene-line .pr-chip{justify-self:start;margin-top:0}}
.pr-review-menu{list-style:none;margin:var(--space-sm) 0 0;padding:var(--space-sm);border:1px solid var(--line);border-radius:var(--radius-md);background:var(--paper);display:flex;flex-direction:column;gap:2px;max-width:420px}
.pr-review-menu li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--space-sm)}
.pr-review-menu .field-note{margin:0}
.pr-locked{margin:var(--space-sm) 0 0;color:var(--muted)}
#panel-protection .auth-actions{flex-direction:row;flex-wrap:wrap;align-items:center}
.pr-dime .pr-chip,.pr-person > .btn{align-self:flex-start}
.pr-line{margin:10px 0;font-size:var(--text-dense);line-height:1.5}
.pr-policy-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-top:1px solid var(--line)}
.pr-policy-row .a-org{display:block}
.pr-advisory{margin:12px 0 0;padding-left:18px;font-size:var(--text-dense);line-height:1.55;color:var(--ink)}
.pr-advisory li{margin-bottom:8px}
.grid-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
/* ---------- Allocation panel (allocation-ui.js) ---------- */
.row-between{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:8px 0}
.grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin:12px 0}
/* ============================================================
   ASK (A2) -- floating button + bottom sheet. Tokens only.
   ============================================================ */
.ask-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.ask-fab{position:fixed;right:16px;bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:40;min-height:52px;padding:0 22px;border-radius:999px;border:none;background:var(--accent);color:var(--accent-ink);font:700 16px var(--font-body);box-shadow:var(--shadow-md);cursor:pointer;display:flex;align-items:center;gap:8px}
.ask-fab[hidden]{display:none}
.ask-fab-mark{width:22px;height:22px;border-radius:50%;background:var(--accent-ink);color:var(--accent);display:grid;place-items:center;font-size:var(--text-dense)}
.ask-fab:focus-visible,.ask-root button:focus-visible,.ask-root input:focus-visible,.ask-root summary:focus-visible{outline:3px solid var(--derived);outline-offset:2px}
.ask-scrim{position:fixed;inset:0;z-index:50;background:rgba(20,18,10,.4)}
.ask-scrim[hidden],.ask-sheet[hidden],.ask-stale[hidden]{display:none}
.ask-sheet{position:fixed;left:0;right:0;bottom:0;top:44px;z-index:51;background:var(--paper);color:var(--ink);border-radius:18px 18px 0 0;display:flex;flex-direction:column;box-shadow:0 -6px 24px rgba(0,0,0,.18);max-width:640px;margin:0 auto}
.ask-sheet:before{content:"";width:40px;height:4px;border-radius:9px;background:var(--line-strong);margin:8px auto 0;flex:none}
.ask-head{display:flex;justify-content:space-between;align-items:flex-start;padding:8px 18px 10px;border-bottom:1px solid var(--line);flex:none}
.ask-head h2{margin:0;font:700 22px var(--font-display)}
.ask-sub{margin:2px 0 0;font-size:var(--text-dense);color:var(--muted)}
.ask-x{width:44px;height:44px;border:none;background:none;font-size:var(--text-page);color:var(--ink-2);cursor:pointer;border-radius:50%}
.ask-body{flex:1;overflow:auto;padding:14px 16px;display:flex;flex-direction:column;gap:12px}
.ask-hello h3{font:700 18px var(--font-display);margin:6px 0 2px}
.ask-hello p{margin:0;color:var(--ink-2)}
.ask-sugs{display:flex;flex-direction:column;gap:8px}
.ask-sug{text-align:left;min-height:44px;padding:10px 14px;border:1px solid var(--line-strong);background:var(--paper);color:var(--ink);border-radius:12px;font:600 14px var(--font-body);cursor:pointer}
.ask-sug:hover{background:var(--accent-bg)}
.ask-note{font-size:var(--text-dense);color:var(--muted);margin:4px 0 0}
.ask-msg{max-width:92%;border-radius:14px;padding:11px 14px}
.ask-msg p{margin:0 0 8px;overflow-wrap:anywhere}
.ask-msg p:last-child{margin:0}
.ask-user{align-self:flex-end;background:var(--accent);color:var(--accent-ink)}
.ask-bot{align-self:flex-start;background:var(--paper-alt);border:1px solid var(--line);max-width:100%;width:100%}
.ask-err{background:var(--danger-bg);border-color:var(--danger)}
.ask-err b{color:var(--danger)}
.ask-alt{display:flex;flex-direction:column;gap:6px;margin:8px 0}
.ask-retry{min-height:44px;padding:0 18px;border:none;border-radius:10px;background:var(--danger);color:var(--paper);font:700 14px var(--font-body);cursor:pointer;width:fit-content}
.ask-figs{margin:8px 0;background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:2px 12px}
.ask-figs summary{cursor:pointer;font:700 12px var(--font-body);letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding:9px 0;min-height:36px}
.ask-figs ul{list-style:none;margin:0;padding:0 0 6px}
.ask-figs li{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-top:1px solid var(--line);font-size:var(--text-dense)}
.ask-figs b{font-family:var(--font-body);font-variant-numeric:tabular-nums;white-space:nowrap}
.ask-fnote{font-size:var(--text-dense);color:var(--ink-2)}
.ask-asof{display:flex;align-items:center;gap:7px;font:12px var(--font-body);color:var(--confirmed);margin:6px 0 0}
.ask-dot{width:8px;height:8px;border-radius:50%;background:var(--confirmed);flex:none}
.ask-asof.old{color:var(--assume)}
.ask-asof.old .ask-dot{background:var(--assume)}
.ask-stale{display:flex;gap:10px;padding:10px 16px;background:var(--assume-bg);border-bottom:2px solid var(--assume);flex:none}
.ask-stale p{margin:0;font-size:var(--text-dense);color:var(--ink-2)}
.ask-stale strong{color:var(--assume)}
.ask-glyph{flex:none;width:20px;height:20px;border-radius:50%;background:var(--assume);color:var(--paper);display:grid;place-items:center;font:700 12px var(--font-body)}
.ask-typing{display:flex;gap:6px;padding:4px 0 8px}
.ask-typing i{width:9px;height:9px;border-radius:50%;background:var(--accent);opacity:.35;animation:ask-b 1.2s infinite}
.ask-typing i:nth-child(2){animation-delay:.2s}
.ask-typing i:nth-child(3){animation-delay:.4s}
@keyframes ask-b{50%{opacity:1}}
@media (prefers-reduced-motion:reduce){.ask-typing i{animation:none;opacity:.7}}
.ask-composer{display:flex;gap:8px;padding:10px 14px calc(16px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);background:var(--paper);flex:none}
.ask-composer input{flex:1;min-width:0;min-height:48px;border:1px solid var(--field-border);border-radius:12px;padding:0 14px;background:var(--bg);color:var(--ink);font:16px var(--font-body)}
.ask-send{min-height:48px;padding:0 18px;border:none;border-radius:12px;background:var(--accent);color:var(--accent-ink);font:700 16px var(--font-body);cursor:pointer}
.ask-root button:disabled,.ask-root input:disabled{opacity:.5;cursor:not-allowed}
body.ask-open{overflow:hidden}
body.ask-mounted{padding-bottom:88px}
.chip.stale{background:var(--paper-alt);color:var(--warn);border:1px solid var(--warn);margin-left:8px}

/* ---------- UX pass 2: currency input with a "$" prefix (finding 3) ---------- */
.money-input{position:relative;display:flex;align-items:center}
.money-input .adorn{position:absolute;left:10px;color:var(--muted);font-size:var(--text-dense);pointer-events:none}
.field .money-input input[type="text"]{width:100%;padding-left:22px;font-variant-numeric:tabular-nums}
/* UX pass 3, finding 14: "%" sits after the number */
.money-input.is-suffix .adorn{left:auto;right:12px}
.field .money-input.is-suffix input[type="text"]{padding-left:10px;padding-right:28px}
.form-actions{display:flex;justify-content:flex-end;gap:var(--space-sm)}
/* Suggested goals: a collapsed helper under the ladder (finding 3) */
details.starter-goals > summary{cursor:pointer;font-weight:600;font-size:var(--text-dense);color:var(--ink)}
details.starter-goals[open] > summary{margin-bottom:12px}

/* ---------- QA-1 fold (2026-11-13) ---------- */
/* Buttons size to their label inside cards; auth screens keep full-width actions. Replaces .btn-fit. */
.auth-actions{align-items:flex-start}
.auth-card .auth-actions{align-items:stretch}
/* Item 5: an empty Overview module is one muted line with a tertiary link */
.module-empty{margin:0;font-size:var(--text-dense);color:var(--muted);padding:var(--space-sm) 0;display:flex;align-items:center;flex-wrap:wrap;gap:4px}
.grid > .module-empty,.attainment-grid > .module-empty{align-self:start}
.attainment-grid.goals-empty > *{grid-column:1 / -1}
#profile-form[data-setup="true"] .in-setup-card{display:none}
.budget-edit-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px 12px;margin-top:6px}
.budget-edit-row .budget-amount{flex:0 1 160px;margin:0}
.budget-edit-row .budget-amount .money-input input[type="text"]{min-height:var(--control-h-sm)}
.budget-edit-row > :not(.budget-amount):not(.cat-customizer-toggle){flex-basis:100%}
/* ---------- UX pass 2, finding 10: Holdings ---------- */
.alloc-bar-wrap{position:relative;margin:16px 0 12px}
.alloc-bar-wrap .alloc-bar{margin:0}
.alloc-target{position:absolute;top:-5px;bottom:-5px;width:3px;margin-left:-1.5px;background:var(--ink);border-radius:2px;box-shadow:0 0 0 2px var(--paper)}
.tick-key{display:inline-block;width:2px;height:12px;background:var(--ink);margin-right:6px;vertical-align:-1px}
.target-row .target-edit{width:100%}
.disclaimer p{margin:0 0 8px}

/* axe heading-order fix: an eyebrow that is a real heading keeps the eyebrow look */
h3.eyebrow-heading{margin:0}

/* Design polish 10: a field marked invalid shows it on the field, not only in the sentence under it. */
input[aria-invalid="true"],textarea[aria-invalid="true"]{border-color:var(--danger)}

/* Strict walk fix 21 (2026-11-14): the "Alerts" heading reads as an eyebrow like every other one (never the serif h3 face);
   an empty Overview section is a card, like its neighbours. */
h3.eyebrow-heading{font-family:var(--font-body);font-size:var(--text-caption);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.ov-empty-card .module-empty{padding:0}
.ov-empty-card .eyebrow{margin:0 0 6px}

/* ---------- G1 "What could we afford?" (Mortgage card) and G2 "Your money check-up" (2026-11-19) ----------
   Existing tokens only: no new colour, size, radius or spacing. The position state is plain ink text, never a colour
   chip or check mark (Alex: no verdict marker). */
.afford-title{margin:0 0 var(--space-xs)}
.afford-extras{margin-top:var(--space-md)}
.afford-replaces{justify-content:center}
.afford-replaces .checkbox-field{color:var(--ink);font-weight:600;letter-spacing:0;text-transform:none;font-size:var(--text-dense)}
.afford-replaces .checkbox-input{width:20px;height:20px;accent-color:var(--accent)}
.afford-replaces .checkbox-input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.afford-results,.afford-required{display:flex;flex-direction:column;gap:var(--space-xs);margin-top:var(--space-sm)}
.afford-required{margin-top:var(--space-md)}
.afford-results p,.afford-required p{margin:0}
.afford-figure,.checkup-figure{font-size:var(--text-card);font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.afford-line,.afford-position{font-size:var(--text-dense);color:var(--ink)}
.afford-position{font-weight:600}
.afford-source a,.checkup-page a:not(.btn){color:var(--accent)}
.afford-source a:focus-visible,.checkup-page a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* G1 v2 connected affordability (spec section 3): existing tokens only. Years and Worth a look lines are plain ink text,
   never a colour, chip, icon or check mark; no compare column is highlighted. */
.afford-years,.afford-guard{display:flex;flex-direction:column;gap:var(--space-xs);margin-top:var(--space-lg);padding-top:var(--space-md);border-top:1px solid var(--line)}
.afford-years p,.afford-guard p{margin:0}
.afford-years[hidden],.afford-guard[hidden],.afford-kept-bar[hidden]{display:none}
.afford-eyebrow{margin:0 0 var(--space-xs)}
.afford-stop{font-weight:600}
.afford-kept-bar{margin:var(--space-md) 0}
.afford-kept-bar p{margin:0}
.afford-kept-bar p:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.table-scroll.afford-compare{max-height:none;border-radius:var(--radius-md);margin-bottom:var(--space-sm)}
.afford-compare table{min-width:0;width:100%;font-size:var(--text-dense)}
.afford-compare thead th{text-transform:none;letter-spacing:0;font-size:var(--text-dense);color:var(--ink);vertical-align:bottom}
.afford-compare thead .afford-corner{background:var(--paper-alt);border-bottom:2px solid var(--line-strong);position:sticky;top:0;left:0;z-index:2}
.afford-col-head{display:block;font-weight:700}
.afford-col-sub{display:block;font-weight:400;font-size:var(--text-dense);color:var(--ink-2);font-family:var(--font-body)}
.afford-compare tbody th{font-weight:600;color:var(--ink);background:var(--paper);white-space:normal;min-width:calc(var(--space-2xl) * 3)}
.afford-compare tbody th,.afford-compare tbody td:first-child{position:sticky;left:0;z-index:1;background:var(--paper)}
.afford-compare td{vertical-align:top;color:var(--ink);text-align:right;font-variant-numeric:tabular-nums}
.afford-compare thead th{text-align:right}
@media (min-width:641px){.afford-compare tbody th,.afford-compare thead .afford-corner{width:40%}}
/* Acelin H1: a focused Remove button scrolls clear of the sticky label column and the right-edge fade. */
.table-scroll.afford-compare{scroll-padding-inline:calc(var(--space-2xl) * 3) 28px}
.afford-cell-lines span{display:block}
@media (max-width:640px){
  .table-scroll.afford-compare{-webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 28px),transparent 100%)}
  .afford-compare tbody th{min-width:calc(var(--space-2xl) * 2.5);max-width:calc(var(--space-2xl) * 3)}
  /* Acelin H2: at scroll end the fade falls on empty padding, never on the last column's figures. */
  .table-scroll.afford-compare{padding-inline-end:28px}
  /* Arbiter A1: data cells and column heads wrap, so a whole column fits beside the sticky label on a phone. */
  .afford-compare td,.afford-compare thead th{white-space:normal}
}
/* Arbiter A1 / Acelin L4: under 400px the label column is capped so one full data column shows beside it. */
@media (max-width:400px){
  .afford-compare tbody th{min-width:calc(var(--space-2xl) * 2);max-width:calc(var(--space-2xl) * 2)}
  /* Acelin L6: scroll padding matches the narrower label column. */
  .table-scroll.afford-compare{scroll-padding-inline:calc(var(--space-2xl) * 2) 28px}
}
.checkup-required p{margin:0 0 var(--space-xs)}
.checkup-actions{display:flex;flex-wrap:wrap;gap:var(--space-sm);align-items:center;margin:var(--space-md) 0 var(--space-xs)}
.checkup-print-warning{margin:0 0 var(--space-md)}
.checkup-sections{display:grid;grid-template-columns:1fr;gap:var(--space-md)}
@media (min-width:641px){.checkup-sections{grid-template-columns:repeat(2,minmax(0,1fr))}}
.checkup-section{margin:0}
.checkup-row > .checkup-section{height:100%}
.checkup-section h3{margin:0 0 var(--space-sm)}
.checkup-section p{margin:0 0 var(--space-xs)}
.checkup-list{margin:0 0 var(--space-xs);padding-left:var(--space-md);font-size:var(--text-dense);color:var(--ink)}
.checkup-list li{margin:0 0 var(--space-xs)}
.checkup-entry{margin:var(--space-md) 0}
/* The check-up page is a layout table so its tfoot can repeat in print; on screen it is plain blocks, footer hidden. */
/* Arbiter R-1: the global table rule (min-width:640px, nowrap cells) must not reach this layout table; its --text-dense
   size stays (a scale token, 14px, the same as the body text it would inherit). */
.checkup-page,.checkup-page > tbody,.checkup-page > tbody > tr,.checkup-page > tbody > tr > td{display:block;width:auto;min-width:0;padding:0;border:0;white-space:normal}
.checkup-page > tfoot{display:none}
/* Print (the browser's own; G2 only, html.checkup-open is set while the check-up is the open page): light tokens on a
   white page, app chrome hidden, cards kept whole, and the two required sentences in a footer on every page. */
@media print{
  html.checkup-open:root,html.checkup-open[data-theme]{
    --bg:#f6f3ec; --paper:#fffdf9; --paper-alt:#efeadc;
    --ink:#1b1f23; --ink-2:#343b41; --muted:#5e6063;
    --line:#ddd5c1; --line-strong:#c8bd9f;
    --accent:#0d4a44; --accent-ink:#f8f6ee; --accent-bg:#e2efec;
    color-scheme:light}
  @page{size:letter;margin:0.6in}
  html.checkup-open,html.checkup-open body{background:Canvas;color:var(--ink)}
  html.checkup-open header.appbar,html.checkup-open nav.tabnav,html.checkup-open .bottombar,html.checkup-open .appbar-ask,
  html.checkup-open .ask-fab,html.checkup-open .no-print,html.checkup-open .skip-link,html.checkup-open .banner,
  html.checkup-open header.masthead,html.checkup-open .foot,html.checkup-open .ask-root{display:none !important}
  html.checkup-open .card{break-inside:avoid;box-shadow:none;background:Canvas;margin:0 0 var(--space-md)}
  /* Arbiter A-1: a real table's tfoot repeats at the foot of every printed page and each page keeps room for it, so
     both required sentences print on every page and never cover a card. (A div with display:table-footer-group did
     not repeat in Chromium; a fixed footer covered a card.) */
  html.checkup-open .checkup-page{display:table;width:100%;border-collapse:collapse}
  html.checkup-open .checkup-page > tbody{display:table-row-group}
  html.checkup-open .checkup-page > tfoot{display:table-footer-group}
  html.checkup-open .checkup-page > tbody > tr,html.checkup-open .checkup-page > tfoot > tr{display:table-row}
  html.checkup-open .checkup-page > tbody > tr > td,html.checkup-open .checkup-page > tfoot > tr > td{display:table-cell;padding:0;border:0;white-space:normal}
  html.checkup-open .checkup-footer{display:block;padding-top:var(--space-md);font-size:var(--text-caption);color:var(--ink)}
  html.checkup-open .checkup-footer p:first-child{border-top:1px solid var(--line);padding-top:var(--space-xs)}
  html.checkup-open .checkup-footer p{margin:0}
}

/* P1 ages (Daedalus spec 2026-11-19 section 3): "Your ages" rows in the assumptions fold, the hero age and Today lines,
   and the "At an age you choose" card. Existing tokens only; every figure in --ink; no colour, chip or meter on a line. */
.people-fields{grid-column:1/-1;display:flex;flex-direction:column;gap:var(--space-md);border-top:1px solid var(--line);padding-top:var(--space-md)}
.people-fields > .eyebrow{margin:0}
.people-fields > div{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:var(--space-sm) var(--space-md);align-items:start}
.people-fields > div > .eyebrow{grid-column:1/-1;margin:0;color:var(--ink)}
.hero-rung-b [data-age-line],.hero-rung-b [data-today-line]{font-size:var(--text-dense);color:var(--ink);margin:var(--space-xs) 0 0;max-width:68ch;line-height:1.45}
.age-card{margin-bottom:var(--space-lg)}
.age-card > .eyebrow{margin:0}
.age-card > .field{margin-top:var(--space-md)}
/* 390: the label stays on one line; the readout drops under it instead of leaving "AGE" alone. */
.age-card .slider-label{flex-wrap:wrap;row-gap:var(--space-xs)}
.age-card .slider-label > label{white-space:nowrap}
.age-lines{display:flex;flex-direction:column;gap:var(--space-sm);margin-top:var(--space-md)}
.age-lines > p{margin:0;font-size:var(--text-body);color:var(--ink);line-height:1.5;overflow-wrap:anywhere}
.age-lines > .btn{align-self:flex-start}
.age-card > .field-note{font-size:var(--text-dense);line-height:1.45;margin:var(--space-md) 0 0}
.age-card > .field-note + .field-note{margin-top:var(--space-xs)}

/* Typed manual accounts (assessment item 2): the one-time Goals prompt and the untyped-entry line in Settings. */
.type-prompt{margin-top:var(--space-sm);padding:10px 12px;border:1px solid var(--assume);border-radius:8px;background:var(--assume-bg)}
.type-prompt .field-note{color:var(--ink);margin:0}
.type-prompt-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.manual-asset-row .ma-meta.ma-untyped{color:var(--warn)}

/* ---- Five levels of financial freedom (2026-11-20). Existing tokens only. ---- */
.level-group .tier-copy{flex:1 1 220px;min-width:0}
.level-group .level-sub{margin:2px 0 0}
.level-group .level-target{margin:4px 0 0;font-family:var(--font-body);font-size:var(--text-card);color:var(--ink);font-variant-numeric:tabular-nums}
.level-group .chip{margin-left:auto}
.level-goals-head{display:flex;align-items:center;gap:var(--space-sm);flex-wrap:wrap;margin:var(--space-sm) 0}
.level-goals-head .tier-empty{font-size:var(--text-meta);color:var(--muted)}
.level-goals-head .add-goal-btn{margin-left:auto}
.levels-math summary,.core-split summary{cursor:pointer;font-weight:600;color:var(--ink)}
.levels-math .math-example{font-size:var(--text-body);font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.levels-math .table-wrap{overflow-x:auto}
.levels-math .math-table{min-width:520px}
.levels-math .math-table caption{text-align:left;font-size:var(--text-dense);color:var(--muted);padding-bottom:var(--space-xs)}
.levels-math .math-table td.num,.levels-math .math-table thead th:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}
.core-split-rows{list-style:none;padding:0;margin:var(--space-sm) 0}
.core-split-row{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);padding:var(--space-xs) 0;border-bottom:1px solid var(--line)}
.core-split-row label{color:var(--ink)}
.levels-disclosure,.levels-home-line{font-size:var(--text-meta);color:var(--ink-2);max-width:72ch}
.page-video-slot{margin:0 0 var(--space-sm)}
.page-video-dialog{margin:auto;inset:0;max-width:min(92vw,720px);border:1px solid var(--line-strong);color:var(--ink);background:var(--paper)}
.page-video-dialog::backdrop{background:rgba(0,0,0,.45)}
.page-video-dialog .page-video{width:100%;height:auto}
.swr-setting select{max-width:12rem}
button.chip{cursor:pointer;font:inherit}
button.chip:focus-visible,.page-video-link:focus-visible,.levels-math summary:focus-visible,.core-split summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---- Five levels fix round 1 (2026-11-20). Existing tokens only. ---- */
.levels-math .math-em-note{text-align:left;color:var(--muted);font-size:var(--text-dense);white-space:normal}
/* Phone: the math table stacks as label and value pairs, so Target is in view at 390 with no sideways swipe. */
@media (max-width:600px){
  .levels-math .table-wrap.math-wrap{overflow-x:visible}
  .levels-math .math-table,.levels-math .math-table tbody,.levels-math .math-table caption{display:block;min-width:0;width:100%}
  .levels-math .math-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .levels-math .math-table tbody tr{display:block;padding:var(--space-xs) 0;border-bottom:1px solid var(--line)}
  .levels-math .math-table tbody th{display:block;text-align:left;padding:var(--space-xs) 0;border:0}
  .levels-math .math-table tbody td{display:flex;justify-content:space-between;gap:var(--space-sm);padding:2px 0;border:0;text-align:right}
  .levels-math .math-table tbody td[data-label]::before{content:attr(data-label);color:var(--muted);text-align:left;font-family:var(--font-body)}
  .levels-math .math-table tbody td.math-em-note{display:block;text-align:left;white-space:normal}
}
.rate-notice{border:1px solid var(--line-strong);border-radius:var(--radius-md);padding:var(--space-sm);margin:0 0 var(--space-sm);color:var(--ink);background:var(--paper)}
.rate-notice p{margin:0 0 var(--space-xs)}
.rate-notice-actions{display:flex;align-items:center;gap:var(--space-sm);flex-wrap:wrap}
.rate-notice .btn:focus-visible,.rate-notice .link-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.ov-levels .ov-level-line{margin:var(--space-xs) 0 0;color:var(--ink);font-variant-numeric:tabular-nums}
.goal-costs [data-goal-target] strong{font-variant-numeric:tabular-nums}

/* ============================================================
   UX workup 2026-11-21 (Daedalus review). Existing tokens only, no new colour, size or radius.
   ============================================================ */
/* OV2: safe to spend is the one hero figure; label above, the cleared basis line under it, then two compact rows. */
.cashflow-hero .hero-cockpit-head h3{margin:0}
.hero-label{margin:var(--space-md) 0 0;font-size:var(--text-body);font-weight:600;color:var(--ink-2)}
.hero-answer{margin:0 0 var(--space-xs);font-size:var(--text-body);color:var(--ink-2);max-width:72ch;line-height:1.5}
.hero-facts{display:flex;flex-direction:column;margin-top:var(--space-md)}
.hero-fact{border-top:1px solid var(--line);padding:var(--space-sm) 0}
.hero-fact .field-note{margin:2px 0 0}
.hero-fact-row,details.cf-commitments > summary{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-sm)}
.hero-fact-label{font-size:var(--text-dense);font-weight:600;color:var(--ink)}
.hero-fact-figure{font-size:var(--text-card);font-weight:600;color:var(--ink)}
details.cf-commitments.hero-fact{padding:0}
details.cf-commitments > summary{border-top:0}
details.cf-commitments > summary .hero-fact-label{margin-right:auto}
.hero-bars{margin-top:var(--space-md)}
@media (min-width:720px){.hero-bars{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-lg)}}
.hero-foot{display:flex;justify-content:flex-end;margin-top:var(--space-md)}
/* OV3/OV4: three equal stat tiles, then budget and goals side by side. */
.ov-stats{display:grid;grid-template-columns:1fr;gap:14px;margin:18px 0}
.ov-stats > div{display:flex}
.ov-stats .card{margin:0;flex:1;display:flex;flex-direction:column}
@media (min-width:900px){.ov-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
.ov-stat h3{margin:0 0 var(--space-xs)}
.ov-stat-figure,.ov-stat .runway-figure,.ov-stat .ns-value{display:block;margin:var(--space-xs) 0;font-family:var(--font-body);font-size:var(--text-section);font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.ov-stat .runway-head{flex-direction:column;gap:0;margin-bottom:var(--space-xs)}
.ov-stat .networth-strip{display:block;border:0;padding:0;background:none;box-shadow:none}
.ov-stat .ns-figures{display:flex;flex-direction:column;gap:var(--space-sm)}
.ov-stat-link{margin:auto 0 0;padding-top:var(--space-sm);font-size:var(--text-dense)}
.ov-levels .ov-level-line{font-size:var(--text-dense)}
.level-segs{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin:var(--space-sm) 0}
.level-seg{display:block;height:8px;border-radius:var(--radius-pill);background:var(--paper-alt);border:1px solid var(--line-strong)}
.level-seg.is-reached{background:var(--confirmed);border-color:var(--confirmed)}
.level-seg.is-current{border:2px solid var(--accent)}
.attainment-grid.ov-two{margin-top:0}
@media (min-width:900px){.attainment-grid.ov-two{grid-template-columns:repeat(2,minmax(0,1fr))}}
.attainment-grid.ov-two > .card{margin:0}
/* OV5: one To do card. Empty: no card, one muted line. */
.ov-todo h3{margin:0 0 var(--space-xs)}
.ov-todo.is-empty{background:none;border:0;box-shadow:none;padding:0 var(--space-xs)}
.ov-todo.is-empty > h3{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ov-todo .insight-cards,.ov-todo .action-cards{margin:var(--space-sm) 0}
.todo-row{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm) var(--space-md);flex-wrap:wrap;border-top:1px solid var(--line);padding:var(--space-sm) 0}
.todo-row p{margin:0}
.todo-row-title{font-weight:600;color:var(--ink)}
.ov-todo #ov-open-items:empty{display:none}
.hero-answer{max-width:none}
.cashflow-hero{margin-top:var(--space-sm)}
@media (max-width:600px){
  .card{padding:16px;margin:12px 0}
  .hero-cockpit{padding:16px;margin:12px 0 12px}
  .ov-stats{gap:12px;margin:12px 0}
  .attainment-grid{gap:12px;margin:12px 0}
  .goal-attain-rows{gap:12px}
  .wrap{padding-top:16px}
}
/* GO1: the one ladder card. Five rows, a 1px line between; number, name and sub-line, target, status. */
.levels-position{margin:0 0 var(--space-sm);font-size:var(--text-body);font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.levels-ladder-card{padding:0;overflow:hidden}
.ladder-rows{list-style:none;margin:0;padding:0}
.ladder-row{padding:var(--space-md) var(--space-lg);border-top:1px solid var(--line)}
.ladder-row:first-child{border-top:0}
.ladder-row.is-current{box-shadow:inset 3px 0 0 var(--accent);background:var(--accent-bg)}
.ladder-row-head{display:grid;grid-template-columns:40px minmax(0,1fr) auto auto;gap:var(--space-xs) var(--space-md);align-items:start}
.ladder-num{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;border:2px solid var(--line-strong);color:var(--ink-2);font:600 var(--text-dense)/1 var(--font-body);background:var(--paper)}
.ladder-num.is-reached{background:var(--confirmed);border-color:var(--confirmed);color:var(--paper)}
.ladder-row.is-current .ladder-num:not(.is-reached){border-color:var(--accent);color:var(--accent)}
.ladder-name h3.tier-name{margin:2px 0 2px;font-family:var(--font-display);font-size:var(--text-card);font-weight:600;color:var(--ink)}
.ladder-name .level-sub{margin:0;font-size:var(--text-dense);color:var(--muted);line-height:1.45}
.ladder-row .level-target{margin:4px 0 0;font-family:var(--font-body);font-size:var(--text-section);font-weight:600;color:var(--ink);text-align:right;white-space:nowrap}
.ladder-status{text-align:right;padding-top:6px;min-width:0}
.ladder-status-text{font-size:var(--text-dense);color:var(--muted);overflow-wrap:anywhere}
.ladder-status-text.chip-wrap{white-space:normal;max-width:100%;overflow-wrap:normal;text-align:left;line-height:1.35}
.ladder-progress,.ladder-row > .field-note,.ladder-row > .ladder-goals,.ladder-row > .ladder-goals-empty,.ladder-row > .core-split,.ladder-row > p{margin-left:calc(40px + var(--space-md))}
.ladder-progress{margin-top:var(--space-sm)}
.ladder-progress .meter{height:6px}
.ladder-caption{margin:6px 0 0}
.ladder-row > .ladder-goals{margin-top:var(--space-sm)}
.ladder-goals-empty{margin-top:var(--space-xs)}
.core-split.in-ladder{margin-top:var(--space-sm);margin-bottom:0;box-shadow:none}
.goal-rows{list-style:none;margin:0;padding:0}
.goal-row{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);padding:var(--space-sm) 0;border-top:1px solid var(--line)}
.goal-row.is-editing{display:block}
.goal-row-main{min-width:0}
.goal-row h4{margin:0;font-size:var(--text-dense);font-weight:600;color:var(--ink)}
.goal-row-meta{margin:2px 0 0;font-size:var(--text-dense);color:var(--muted);font-variant-numeric:tabular-nums}
.ladder-goals .add-goal-btn{margin:var(--space-xs) 0}
.levels-ladder-card.is-preview .ladder-row-head{grid-template-columns:40px minmax(0,1fr)}
@media (max-width:600px){
  .ladder-row{padding:var(--space-md)}
  .ladder-row-head{grid-template-columns:32px minmax(0,1fr);gap:var(--space-xs) var(--space-sm)}
  .ladder-num{width:28px;height:28px}
  .ladder-row .level-target,.ladder-status{grid-column:2;text-align:left;padding-top:0;margin:0}
  .ladder-progress,.ladder-row > .field-note,.ladder-row > .ladder-goals,.ladder-row > .ladder-goals-empty,.ladder-row > .core-split,.ladder-row > p{margin-left:calc(32px + var(--space-sm))}
}
/* GO3: the age card's first result line at --text-body, the rest at --text-dense. */
.age-lines > p{font-size:var(--text-dense)}
.age-lines > p:first-child{font-size:var(--text-body)}
/* GO5: two tiles on the white card style; a phone draws the chart to fit; one legend; a numbered key. */
#projection-kpis .kpi{background:var(--paper);box-shadow:var(--shadow-sm)}
@media (max-width:480px){.chart-card svg{min-width:0}#projection-chart-wrap{overflow-x:visible}}
.chart-key{list-style:none;margin:var(--space-sm) 0 0;padding:0;display:flex;flex-wrap:wrap;gap:var(--space-xs) var(--space-lg);font-size:var(--text-dense);color:var(--ink-2)}
.chart-key li{display:flex;align-items:center;gap:var(--space-sm)}
.chart-key-n{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:var(--accent);color:var(--accent-ink);font:700 var(--text-caption)/1 var(--font-body)}
@media (max-width:600px){
  .ladder-row-head{grid-template-columns:28px auto minmax(0,1fr)}
  .ladder-name{grid-column:2 / 4}
  .ladder-row .level-target{grid-column:2;font-size:var(--text-card)}
  .ladder-status{grid-column:2 / 4;text-align:left;align-self:start;min-width:0} /* D6: the status takes the row's width under the name, never past the screen */
  #projection-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-sm)}
  #projection-kpis .kpi .val{font-size:var(--text-card)}
}
/* MO1: one payment figure, two ratio bars, three fact rows, the years as one table. */
.afford-results-eyebrow{margin-top:var(--space-lg)}
.afford-results .afford-figure-label{margin-top:var(--space-xs)}
.afford-results .afford-figure{margin:4px 0 2px;font-family:var(--font-display);font-size:var(--text-figure);font-weight:400;line-height:1.05}
.afford-ratio{margin-top:var(--space-sm)}
.afford-ratio .bullet-bar{margin-top:6px;max-width:560px}
.afford-results .afford-position{margin-top:var(--space-sm)}
.afford-facts{display:flex;flex-direction:column;margin-top:var(--space-sm)}
.afford-fact{border-top:1px solid var(--line);padding:var(--space-sm) 0}
.afford-years .afford-fact:last-of-type{border-bottom:1px solid var(--line)}
.afford-results .afford-line,.afford-years .afford-line,.afford-guard .afford-line{font-size:var(--text-dense)}
.afford-years-table{max-height:none;margin:var(--space-sm) 0}
.afford-years-table table{min-width:0}
.afford-years-table caption{text-align:left;padding:0 0 var(--space-xs);font-size:var(--text-dense);font-weight:600;color:var(--ink)}
.afford-years-table tbody th{font-weight:600;white-space:normal}
.afford-meta{font-size:var(--text-meta);max-width:72ch}
.afford-full-row{grid-column:1 / -1;justify-content:flex-start}
.afford-compare-stack{display:none}
@media (max-width:480px){
  .table-scroll.afford-compare{display:none}
  .afford-compare-stack{display:flex;flex-direction:column;gap:var(--space-sm);margin-bottom:var(--space-sm)}
  .afford-stack-block{border:1px solid var(--line);border-radius:var(--radius-md);padding:var(--space-sm) var(--space-md);background:var(--paper)}
  .afford-stack-block h5{margin:0;font-size:var(--text-body)}
  .afford-stack-block dl{margin:var(--space-xs) 0 0}
  .afford-stack-row{display:flex;justify-content:space-between;gap:var(--space-md);padding:6px 0;border-top:1px solid var(--line);font-size:var(--text-dense)}
  .afford-stack-row dt{color:var(--ink-2);flex:1 1 auto;min-width:0}
  .afford-stack-row dd{margin:0;text-align:right;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
}
/* MO2/MO5: Your mortgage card (three tiles and text buttons), the payments log on request, the schedule closed. */
.mortgage-tiles{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.mortgage-tiles .kpi{background:var(--paper)}
.mortgage-actions{margin-top:var(--space-sm)}
.mortgage-actions .link-btn{padding-left:0;padding-right:var(--space-md)}
.mortgage-payments-panel{border-top:1px solid var(--line);margin-top:var(--space-sm);padding-top:var(--space-md)}
details.mortgage-schedule > summary{border-top:0;font-size:var(--text-body)}
@media (max-width:480px){
  .afford-stack-block{padding:0 var(--space-md)}
  .afford-stack-block > summary{border-top:0;min-height:56px;align-items:center}
  .afford-stack-sum{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}
  .afford-stack-sum .afford-col-sub{font-weight:400}
  .afford-stack-cost{margin:0 var(--space-sm);font-weight:600}
  .afford-stack-block > dl{margin:0 0 var(--space-sm)}
  .afford-stack-block > .btn{margin:0 0 var(--space-sm)}
}
@media (max-width:600px){
  .afford-card > .form-grid:first-of-type{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-sm)}
  .mortgage-tiles{grid-template-columns:1fr;gap:0}
  .mortgage-tiles .kpi{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:0 var(--space-sm);border:0;border-top:1px solid var(--line);border-radius:0;background:none;padding:var(--space-sm) 0}
  .mortgage-tiles .kpi .val{margin:0;font-size:var(--text-card)}
  .mortgage-tiles .kpi .note{flex-basis:100%;margin:0}
}
/* BU1: what is left, with the donut beside it (below on a phone). */
.bg-summary{display:grid;grid-template-columns:1fr;gap:var(--space-md) var(--space-xl);align-items:center}
@media (min-width:900px){.bg-summary{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
.bg-summary-figures h3{margin:0 0 var(--space-sm)}
.bg-summary-row{border-bottom:1px solid var(--line);padding-bottom:var(--space-sm);margin-bottom:var(--space-sm)}
.bg-summary .donut-row{margin:0}
.bg-summary-empty{grid-column:1 / -1}
/* BU7: the legend sits beside the donut, never 900px away. */
.cat-legend{max-width:360px}
/* BU2: grouped rows, one shape, a 6px bar always. */
.budget-group + .budget-group{margin-top:var(--space-lg)}
.budget-group-head{margin:0 0 var(--space-sm);font-size:var(--text-dense);font-weight:600;color:var(--muted)}
.budget-bar{height:6px;border:0;background:var(--paper-alt)}
.budget-row .bullet-row-head{margin-bottom:4px}
/* BU3: on a phone each transaction is two lines, payee and amount, then date, category and account. */
.tx-meta-cell{display:none}
.table-scroll.tx-scroll{max-height:none}
.bg-tx-filter-toggle{display:none}
.bg-tx-more-filters{display:contents}
.card-eyebrow-row{display:flex;align-items:center;gap:var(--space-sm);margin-bottom:var(--space-xs)}
.card-eyebrow-row h3{margin:0}
@media (max-width:480px){
  .table-toolbar#bg-tx-toolbar{flex-direction:row;flex-wrap:wrap}
  #bg-tx-toolbar input[type="search"]{flex:1 1 100%}
  #bg-tx-toolbar #bg-tx-month-filter{flex:1 1 0}
  .bg-tx-filter-toggle{display:inline-flex;flex:none}
  .bg-tx-more-filters{display:none}
  #bg-tx-toolbar.filters-open .bg-tx-more-filters{display:flex;flex:1 1 100%;gap:10px;flex-direction:column}
  .tx-scroll{border:0;overflow:visible}
  .tx-table{min-width:0;display:block}
  .tx-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .tx-table tbody{display:block}
  .tx-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:var(--space-sm);padding:10px 0;border-bottom:1px solid var(--line)}
  .tx-table td{border:0;padding:0;max-width:none !important}
  .tx-table td:nth-child(1),.tx-table td:nth-child(3),.tx-table td:nth-child(4){display:none}
  .tx-table td:nth-child(2){grid-column:1;grid-row:1;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .tx-table td:nth-child(5){grid-column:2;grid-row:1;min-width:0}
  .tx-table td.tx-meta-cell{display:block;grid-column:1 / -1;grid-row:2;font-size:var(--text-meta);color:var(--muted);white-space:normal}
  .tx-table tr.tx-empty td{display:block;grid-column:1 / -1}
}
/* PR2: the Next step headline reads as a headline; up to two more items under it. PR3: one row per person on desktop. */
.pr-next-title{margin:var(--space-xs) 0 var(--space-xs);font-size:var(--text-card);font-weight:600;color:var(--ink)}
.pr-next-list{margin:var(--space-sm) 0;padding-left:var(--space-md);font-size:var(--text-dense);color:var(--ink-2)}
.pr-next-list li{margin:0 0 var(--space-xs)}
@media (min-width:720px){
  .pr-person{flex-direction:row;align-items:flex-end;gap:var(--space-md)}
  .pr-person > .form-grid{flex:1}
  .pr-person > .btn{align-self:flex-end}
}
/* AS2: a failed lookup is a warning, not a danger state; Try again is an outline button. */
.ask-err{background:var(--assume-bg);border-color:var(--assume)}
.ask-err b{color:var(--ink)}
.ask-retry{background:transparent;color:var(--ink);border:1px solid var(--line-strong)}
.ask-notice p{margin:0 0 var(--space-sm)}
/* UAT 2026-11-21: the chart region takes keyboard focus (it scrolls sideways between 481px and 680px); a visible ring. */
#projection-chart-wrap:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* After-walk polish (2026-11-21): the transaction's second line reads at --text-dense; ladder rows a little tighter.
   Layout standard section 9 (2026-11-23, I-23/M16) supersedes the side-by-side tiles: one tile per row on a phone. */
@media (max-width:600px){
  .ov-stats{grid-template-columns:minmax(0,1fr)}
  .ov-stats > #ov-levels{grid-column:1 / -1}
  .ladder-row{padding:12px var(--space-md)}
}
@media (max-width:480px){.tx-table td.tx-meta-cell{font-size:var(--text-dense)}}

/* Spending-trust slice 2: Your yearly spending is a child page of Goals (#/levels/spending); the rest of Goals hides. */
#panel-levels[data-sub="spending"] > :not(#panel-spending){display:none !important}
.visually-hidden{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.floor-block .floor-row{margin:4px 0}

/* Goals inputs strip (spec 6.8, SCR-05 v5.4): three inputs, each with its figure, its date and a Review link. */
.lv-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:var(--radius-md);background:var(--paper);box-shadow:var(--shadow-sm);overflow:hidden;margin:var(--space-md) 0}
.lv-strip-item{padding:var(--space-md) var(--space-lg);border-left:1px solid var(--line);display:flex;flex-direction:column;gap:2px;min-width:0}
.lv-strip-item:first-child{border-left:0}
.lv-strip-item.is-next{box-shadow:inset 0 3px 0 var(--accent);background:var(--accent-bg)}
.lv-strip-item .eyebrow{margin:0}
.lv-strip-item .lv-fig-md{margin:2px 0;font:600 var(--text-section)/1.2 var(--font-body);font-variant-numeric:tabular-nums;color:var(--ink);overflow-wrap:anywhere}
.lv-strip-item .lv-wait{font:600 var(--text-body)/1.3 var(--font-body);color:var(--ink-2);margin:2px 0}
.lv-strip-item .lv-meta{font-size:var(--text-dense);color:var(--muted);margin:4px 0 0;line-height:1.45;overflow-wrap:anywhere}
.lv-strip-item .chip{align-self:flex-start;margin-top:var(--space-xs)}
.lv-strip-item .btn,.lv-strip-item .lv-link{align-self:flex-start;margin-top:var(--space-sm)}
.lv-link{display:inline-flex;align-items:center;min-height:var(--control-h-touch);color:var(--accent);font-weight:600;text-decoration:underline;text-underline-offset:2px}
@media (max-width:600px){.lv-strip{grid-template-columns:1fr}.lv-strip-item{border-left:0;border-top:1px solid var(--line)}.lv-strip-item:first-child{border-top:0}.lv-strip-item .btn{white-space:normal;height:auto}}
/* 2026-11-23 categorize a transaction: the category is a button; its editor is one compact row under the transaction,
   controls inline with their labels, left-aligned */
.tx-cat-btn{padding:0;text-align:left;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tx-pick{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px;text-align:left}
.tx-pick label{font-weight:600}
.tx-pick-always{display:inline-flex;align-items:center;gap:4px}
.tx-pick-always label{font-weight:400}

/* ============================================================
   UI blockers 2026-11-23 (Paragon REJECT-BUILD on 6cbe4d5; Daedalus layout standard
   Deliverables/2026-11-23-levels-layout-standard/standard.md). Existing tokens only; no new values.
   ============================================================ */

/* Standard 9: nothing is wider than the screen. Flex and grid children may shrink; on a phone a button's label wraps. */
.card,.field,.form-grid > *,.grid > *,.auth-actions > *,.bullet-rows > *{min-width:0}
@media (max-width:600px){
  .btn{white-space:normal;text-align:center;max-width:100%;height:auto;line-height:1.3;padding-top:var(--space-xs);padding-bottom:var(--space-xs)}
  .wrap{overflow-wrap:anywhere}
}

/* Standard 3: a group label that is not a <label> (a segmented or radio group) reads like a field label. */
.field-label{margin:0;font-family:var(--font-body);font-size:var(--text-dense);font-weight:600;color:var(--ink-2)}
.field{gap:var(--space-xs)}
.field > .hint,.field > .field-note{margin:0;max-width:60ch}
/* Standard 3 (I-06 root cause): a checkbox in a .field was stretched across the column and centred. It sits on the left
   of its label, on the label's first line; the help goes under the label. */
.field:has(> input[type="checkbox"]){display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:var(--space-sm);row-gap:var(--space-xs);align-items:start}
.field:has(> input[type="checkbox"]) > label{grid-column:2;grid-row:1}
.field:has(> input[type="checkbox"]) > input[type="checkbox"]{grid-column:1;grid-row:1;width:16px;height:16px;margin:3px 0 0;accent-color:var(--accent)}
.field:has(> input[type="checkbox"]) > :not(label):not(input){grid-column:2}
input[type="checkbox"]:focus-visible,input[type="radio"]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* Chips: an even gap between every chip, rows included (the owner; Paragon M3). */
.chips{display:flex;flex-wrap:wrap;gap:var(--space-sm);margin:var(--space-sm) 0 var(--space-md)}
.chip-btn[aria-pressed="true"]{background:var(--accent-bg);border-color:var(--accent);color:var(--ink);font-weight:600}
/* A segmented group of .seg-btn: one line, sized to its options, the chosen one raised (account.css .seg-opt look). */
.seg:has(> .seg-btn){display:inline-flex;flex-wrap:nowrap;width:max-content;max-width:100%;gap:2px}
.seg > .seg-btn{flex:1 1 auto;min-height:var(--control-h-sm);padding:0 var(--space-md);border:0;border-radius:6px;background:transparent;color:var(--ink-2);font-weight:500;white-space:nowrap}
.seg > .seg-btn[aria-pressed="true"]{background:var(--paper);color:var(--ink);font-weight:600;box-shadow:var(--shadow-sm),inset 0 0 0 1px var(--field-border)}
.seg > .seg-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
@media (max-width:600px){.seg > .seg-btn{min-height:var(--control-h-touch)}}

/* B1 / I-15: Your yearly spending forms. */
.line-form .form-grid{margin-bottom:var(--space-md)}
.line-form > .field{margin-bottom:var(--space-md)}
.line-form .line-asof-field input[type="date"]{max-width:220px}
.line-form .form-actions{margin-top:var(--space-lg)}
.field .money-input input[type="text"]{min-height:var(--control-h)}
[data-spending-number] .spending-yours{margin-top:var(--space-md)}
[data-spending-number] .spending-yours .money-input{max-width:240px}
.typed-line{padding:var(--space-sm) 0;border-top:1px solid var(--line)}
.typed-line p{margin:0 0 var(--space-xs)}
.follow-up{display:flex;flex-wrap:wrap;gap:var(--space-sm);align-items:center}
.follow-up > p{flex-basis:100%;margin:0}

/* B2 / I-02: What you earn and keep. A ledger: an operator gutter, the label with its note under it, the figure right
   and tabular; the totals ruled above. The operator is the element before its row, drawn into the row's gutter. */
[data-earn] .earn-row{display:grid;grid-template-columns:var(--space-lg) minmax(0,1fr) auto;column-gap:var(--space-sm);align-items:baseline;padding:var(--space-sm) 0;border-top:1px solid var(--line)}
[data-earn] .earn-row-text{grid-column:2;display:flex;flex-direction:column;gap:2px;min-width:0}
[data-earn] .earn-row-label{font-size:var(--text-dense);font-weight:600;color:var(--ink)}
[data-earn] .earn-row-text .field-note{margin:0;font-size:var(--text-meta)}
[data-earn] .earn-row-figure{grid-column:3;text-align:right;font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap;color:var(--ink)}
[data-earn] .earn-op{display:block;height:0;width:var(--space-lg);padding:0;overflow:visible;font:600 var(--text-dense)/1.5 var(--font-body);color:var(--muted);text-align:center;position:relative;top:calc(var(--space-sm) + 1px);z-index:1}
[data-earn] .earn-row[data-tax-total],[data-earn] .earn-row[data-take-home],[data-earn] .earn-row[data-left],[data-earn] .earn-row[data-invested]{border-top:1px solid var(--line-strong)}
[data-earn] .earn-row[data-tax-total] .earn-row-figure,[data-earn] .earn-row[data-left] .earn-row-figure{font-size:var(--text-body)}
[data-earn] > .field,[data-earn] .field + .field{margin-top:var(--space-md)}
[data-earn] .money-input,[data-earn] .field > select{max-width:320px}
[data-earn] .earn-row + .link-btn,[data-earn] > .link-btn{padding-left:0;padding-right:0;margin-left:calc(var(--space-lg) + var(--space-sm))}
[data-earn] > .btn{margin-top:var(--space-md)}
[data-earn] > .field-note{margin-top:var(--space-sm)}
/* m20: two to four answers are a compact row of chips, never full-width stacked pills. */
[data-earn] .field[role="group"]{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:var(--space-sm)}
[data-earn] .field[role="group"] > p{flex-basis:100%;margin:0}
[data-earn] .field[role="group"] > .chip-btn{flex:none}

/* B3 / I-01: Saved or Spent. Two equal choice cards whose text wraps, never a nowrap .btn wider than the phone. */
.freed-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:var(--space-sm)}
.freed-options .btn{white-space:normal;height:auto;min-height:var(--control-h);justify-content:flex-start;text-align:left;line-height:1.4;padding:var(--space-sm) var(--space-md);font-weight:500;background:var(--paper)}
.freed-options .btn[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-bg);font-weight:600}
.freed-rows{margin:var(--space-sm) 0;padding-left:var(--space-lg)}
.freed-rows li{margin:0 0 var(--space-xs)}
.freed-prompt > .field-note,.freed-prompt > .afford-line{max-width:72ch}

/* I-04: Future plans and Children. One row per plan or child (text left, Edit and Remove trailing), the form a panel. */
.future-plans > .eyebrow{margin:0 0 var(--space-xs)}
.future-plan-group{margin-top:var(--space-md)}
.future-plan-group > .eyebrow{margin:0 0 var(--space-sm)}
.future-plan-row{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:var(--space-md);row-gap:var(--space-xs);align-items:start;padding:var(--space-md) 0;border-top:1px solid var(--line)}
.future-plan-row > *{grid-column:1;margin:0}
.future-plan-row > .auth-actions,.future-plan-row > .btn{grid-column:2;grid-row:1;flex-direction:row;margin:0;gap:var(--space-xs)}
details.future-plan-row,div.plan-home-row{display:block}
details.future-plan-row > .plan-home-body,div.plan-home-row > .plan-home-body{margin-top:var(--space-sm)}
.child-form{display:flex;flex-direction:column;gap:var(--space-md);margin:var(--space-md) 0;padding:var(--space-lg);border:1px solid var(--line);border-radius:var(--radius-md);background:var(--paper-alt)}
.child-form > .field,.child-form > p{margin:0;max-width:60ch}
.child-form input[type="number"]{max-width:160px}
.child-form .auth-actions{flex-direction:row;margin-top:0}
.child-preview{margin:0;padding-left:var(--space-lg)}
.child-preview li{margin:0 0 var(--space-xs)}
.future-plan-kinds{list-style:none;margin:var(--space-sm) 0 0;padding:0;border-top:1px solid var(--line)}
.future-plan-kinds li{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-xs) var(--space-sm);padding:var(--space-sm) 0;border-bottom:1px solid var(--line);font-size:var(--text-dense);color:var(--muted)}
.future-plan-kinds li > a{font-weight:600;color:var(--accent)}
.future-plans > .auth-actions{flex-direction:row;margin-top:var(--space-md)}
@media (max-width:600px){.child-form{padding:var(--space-md)}.future-plan-row{grid-template-columns:minmax(0,1fr)}.future-plan-row > .auth-actions{grid-column:1;grid-row:auto}}

/* Standard 5 (I-09, I-11): one disclosure. Title left, one chevron right that turns, no native triangle, nothing centred. */
details.accounts-disclosure > summary::before,details.accounts-disclosure[open] > summary::before{content:none;display:none}
details.accounts-disclosure > summary{justify-content:flex-start}
details.accounts-disclosure > summary::after{margin-left:auto}
.assumptions > summary,details.starter-goals > summary,.levels-math > summary,.core-split > summary,details.advanced > summary,.ask-figs > summary{display:flex;align-items:center;gap:var(--space-sm);min-height:var(--control-h);list-style:none;cursor:pointer;text-align:left}
.assumptions > summary::-webkit-details-marker,details.starter-goals > summary::-webkit-details-marker,.levels-math > summary::-webkit-details-marker,.core-split > summary::-webkit-details-marker,details.advanced > summary::-webkit-details-marker,.ask-figs > summary::-webkit-details-marker{display:none}
.assumptions > summary::after,details.starter-goals > summary::after,.levels-math > summary::after,.core-split > summary::after,details.advanced > summary::after,.ask-figs > summary::after{content:"";flex:none;margin-left:auto;margin-right:6px;width:8px;height:8px;border-right:2px solid var(--accent);border-bottom:2px solid var(--accent);transform:rotate(45deg) translateY(-2px);transition:transform .12s ease}
.assumptions[open] > summary::after,details.starter-goals[open] > summary::after,.levels-math[open] > summary::after,.core-split[open] > summary::after,details.advanced[open] > summary::after,.ask-figs[open] > summary::after{transform:rotate(-135deg) translateY(-2px)}
@media (prefers-reduced-motion:reduce){details > summary::after{transition:none}}
/* I-10: a two-line note is a footnote, never behind a click. */
.afford-source{margin-top:var(--space-lg);padding-top:var(--space-sm);border-top:1px solid var(--line)}
.afford-source > .field-label{font-size:var(--text-meta)}
.afford-source > .field-note{margin:var(--space-xs) 0 0;font-size:var(--text-meta);max-width:72ch}

/* Budget progress, built to the approved mockup (Deliverables/2026-11-23-levels-layout-standard/mockups/budget-progress.html;
   the owner 2026-11-23: "much better"; layout standard 1, 6 and 9). One grid for the column header, the group rows and
   the category rows: Category, bar, Spent, Budget, Left, options. 48px per category on a desktop with the budget edited
   in its own column; two lines and a meta line on a phone, where a tap on the row opens its sheet. */
#bg-budget-bars-card{--bp-cols:minmax(160px,1fr) minmax(120px,2fr) 96px 112px 120px var(--control-h-sm)}
#bg-budget-bars-card .card-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-md);margin:0 0 var(--space-md)}
#bg-budget-bars-card .card-title{margin:0;font:600 var(--text-card)/1.3 var(--font-display);color:var(--ink);letter-spacing:0;text-transform:none}
#bg-budget-bars-card .card-sub{margin:var(--space-xs) 0 0;font-size:var(--text-meta);color:var(--muted)}
.budget-edit-toggle{min-height:var(--control-h-sm);font-size:var(--text-meta);background:var(--paper)}
.budget-edit-toggle.is-on{background:var(--accent-bg);border-color:var(--accent);color:var(--accent)}
.budget-groups{margin-top:0;border-top:1px solid var(--line)}
.budget-group + .budget-group{margin-top:0}
.budget-group-title{margin:0}
#bg-budget-bars-card .bullet-rows{gap:0}
.bp-colhead,.bp-group-head,.bp-row{display:grid;grid-template-columns:var(--bp-cols);align-items:center;column-gap:var(--space-md)}
.bp-colhead{min-height:var(--control-h-sm);font:600 var(--text-caption) var(--font-body);letter-spacing:.06em;text-transform:uppercase;color:var(--muted);border-bottom:1px solid var(--line);padding-left:var(--space-sm)}
.bp-colhead .r,.bp-row .r,.bp-group-head .r{text-align:right}
.bp-group-head{width:100%;min-height:var(--control-h);margin:0;padding:0 0 0 var(--space-sm);border:0;border-bottom:1px solid var(--line);background:var(--paper-alt);color:var(--ink);font:600 var(--text-dense) var(--font-body);text-align:left;cursor:pointer}
.bp-group-head .g-name{grid-column:1 / 3;grid-row:1;display:flex;align-items:center;gap:var(--space-sm);min-width:0;white-space:nowrap}
.bp-group-head .g-spent{grid-column:3;grid-row:1}
.bp-group-head .g-budget{grid-column:4;grid-row:1}
.bp-group-head .g-x{display:none}
.bp-group-head .g-count{font-weight:400;color:var(--muted)}
.bp-group-head .g-fig{font-size:var(--text-meta);font-weight:400;color:var(--muted);font-variant-numeric:tabular-nums}
.bp-group-head .chev{flex:none;width:8px;height:8px;border-right:2px solid var(--accent);border-bottom:2px solid var(--accent);transform:rotate(45deg) translateY(-2px)}
.bp-group-head[aria-expanded="false"] .chev{transform:rotate(-45deg)}
.bp-group-head:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
@media (hover:hover){.bp-group-head:hover .g-name{color:var(--accent)}}
.bp-row{position:relative;min-height:48px;margin:0;padding:var(--space-sm) 0 var(--space-sm) var(--space-sm);border-bottom:1px solid var(--line);font-size:var(--text-dense)}
.bp-row .r-name{grid-column:1;grid-row:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:var(--space-md);font-weight:600;color:var(--ink-2)}
.bp-row .r-bar{grid-column:2;grid-row:1;position:relative;height:6px;border-radius:var(--radius-pill);background:var(--paper-alt);overflow:hidden}
.bp-row .r-bar > span{display:block;height:100%;border-radius:var(--radius-pill)}
.bp-row .r-bar > .fill-confirmed{background:var(--confirmed)}
.bp-row .r-bar > .fill-derived{background:var(--derived)}
.bp-row .r-bar > .fill-danger{background:var(--danger)}
.bp-row .r-bar > .fill-neutral{background:var(--muted)}
.bp-row .r-spent{grid-column:3;grid-row:1}
.bp-row .r-budget-text,.bp-row .budget-amount{grid-column:4;grid-row:1;margin:0}
.bp-row .r-left{grid-column:5;grid-row:1;font-weight:600;text-align:right}
.bp-row > .budget-opt-btn{grid-column:6;grid-row:1}
.bp-row .r-meta{display:none}
.bp-row > .field-note{grid-column:1 / -1;margin:0;padding-left:var(--space-md);font-size:var(--text-meta)}
.bp-row > .budget-edit-row{display:contents}
.bp-row .budget-amount .money-input input[type="text"]{min-height:var(--control-h-sm);text-align:right;padding:0 var(--space-sm) 0 var(--space-lg)}
.bp-row .s-paid{color:var(--confirmed)} .bp-row .s-over{color:var(--danger)} .bp-row .s-none{color:var(--assume)} .bp-row .s-left{color:var(--ink)}
.bp-row.is-selected{background:var(--accent-bg);box-shadow:inset var(--space-xs) 0 0 var(--accent)}
.bp-row.is-arrived{background:var(--accent-bg);transition:background-color 1.6s ease}
@media (prefers-reduced-motion:reduce){.bp-row.is-arrived{transition:none;background:transparent;outline:2px solid var(--accent);outline-offset:-2px}}
.budget-opt-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--control-h-sm);height:var(--control-h-sm);padding:0;border:0;border-radius:var(--radius-md);background:transparent;color:var(--muted);font:700 var(--text-body)/1 var(--font-body);letter-spacing:0;text-transform:none;cursor:pointer}
@media (hover:hover){.budget-opt-btn:hover{background:var(--accent-bg);color:var(--accent)}}
.budget-opt-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.budget-opt-btn[aria-expanded="true"]{background:var(--accent-bg);color:var(--accent)}
/* Phone (mockup, 390): no Edit mode and no column header; each row is the tap target for its sheet. The options button
   stays in the tab order for keyboards, out of sight until it has focus. */
@media (max-width:600px){
  #bg-budget-bars-card .budget-edit-toggle,.bp-colhead{display:none}
  .bp-group-head{grid-template-columns:minmax(0,1fr) auto;padding-right:var(--space-sm);min-height:var(--control-h-touch)}
  .bp-group-head .g-x,.bp-group-head .g-spent{display:none}
  .bp-group-head .g-name{grid-column:1;white-space:normal}
  .bp-group-head .g-budget{grid-column:2}
  .bp-row{grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"name left opt" "bar bar bar" "meta meta meta";row-gap:var(--space-xs);padding-right:var(--space-sm);cursor:pointer}
  .bp-row .r-name:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
  .bp-row .r-name{grid-area:name;padding-left:0;white-space:normal}
  .bp-row .r-bar{grid-area:bar}
  .bp-row .r-spent,.bp-row .r-budget-text{display:none}
  .bp-row .r-left{grid-area:left}
  .bp-row .budget-amount{grid-area:left;width:112px}
  .bp-row.edit .r-left{display:none}
  .bp-row .r-meta{display:block;grid-area:meta;font-size:var(--text-meta);color:var(--muted)}
  .bp-row > .field-note{padding-left:0}
  .bp-row > .budget-opt-btn{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  /* Acelin item 8: with keyboard focus it takes its own column, beside the Left figure, never over it. */
  .bp-row > .budget-opt-btn:focus-visible{position:static;grid-area:opt;width:var(--control-h-touch);height:var(--control-h-touch);clip:auto;overflow:visible}
}

/* Standard 4: the options sheet. Right edge from 601px (400 wide), bottom sheet on a phone. The list stays usable. */
.sheet-layer{position:fixed;top:var(--appbar-h);right:0;bottom:0;z-index:45;display:flex;justify-content:flex-end;pointer-events:none}
.sheet-layer .sheet{pointer-events:auto;width:min(400px,100vw);height:100%;display:flex;flex-direction:column;background:var(--paper);border-left:1px solid var(--line);box-shadow:var(--shadow-md);border-radius:var(--radius-lg) 0 0 var(--radius-lg)}
.sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-sm);padding:var(--space-md) var(--space-lg);border-bottom:1px solid var(--line)}
.sheet-head h4{margin:0;font:600 var(--text-card)/1.3 var(--font-display);color:var(--ink)}
.sheet-sub{margin:var(--space-xs) 0 0;font-size:var(--text-meta);color:var(--muted)}
.sheet-head .icon-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--control-h-sm);height:var(--control-h-sm);padding:0;border:0;border-radius:var(--radius-md);background:transparent;color:var(--muted);font:400 var(--text-section)/1 var(--font-body);letter-spacing:0;text-transform:none}
.sheet-head .icon-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sheet-body{flex:1;overflow:auto;padding:var(--space-lg);display:flex;flex-direction:column;gap:var(--space-lg)}
.sheet-body .field input[type="text"],.sheet-body .field select{min-height:var(--control-h);width:100%}
.sheet-foot{display:flex;justify-content:flex-end;gap:var(--space-sm);padding:var(--space-md) var(--space-lg);border-top:1px solid var(--line);background:var(--paper)}
.sheet .grab{display:none}
.radio-list{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:var(--radius-md);overflow:hidden}
.radio-opt{display:flex;align-items:flex-start;gap:var(--space-sm);padding:var(--space-sm) var(--space-md);min-height:var(--control-h);border-bottom:1px solid var(--line);cursor:pointer;font-weight:400}
.radio-opt:last-child{border-bottom:0}
.radio-opt.is-on,.radio-opt:has(input:checked){background:var(--accent-bg)}
.radio-opt input,.check-row input{flex:none;width:16px;height:16px;margin:3px 0 0;accent-color:var(--accent)}
.radio-text,.check-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.radio-text .t,.check-text .t{font:600 var(--text-dense)/1.4 var(--font-body);color:var(--ink)}
.radio-text .help,.check-text .help{font-size:var(--text-meta);line-height:1.45;color:var(--muted);max-width:60ch}
.check-list{display:flex;flex-direction:column;gap:var(--space-md)}
.check-row{display:flex;align-items:flex-start;gap:var(--space-sm);cursor:pointer}
.sheet-move-note{margin:var(--space-sm) 0 0;color:var(--derived);font-size:var(--text-meta)}
@media (min-width:1200px){body:has([data-budget-sheet-layer]) #planner-host{padding-right:calc(400px + 20px)}}
@media (max-width:600px){
  .sheet-layer{top:auto;left:0;align-items:flex-end;z-index:46}
  .sheet-layer .sheet{width:100%;height:auto;max-height:85vh;border-left:0;border-top:1px solid var(--line);border-radius:var(--radius-lg) var(--radius-lg) 0 0;padding-bottom:env(safe-area-inset-bottom,0px)}
  .sheet .grab{display:block;width:var(--space-xl);height:var(--space-xs);border-radius:var(--radius-pill);background:var(--line-strong);margin:var(--space-sm) auto 0}
  .sheet-head{padding:var(--space-sm) var(--space-md) var(--space-md)}
  .sheet-body{padding:var(--space-md);gap:var(--space-md)}
  .sheet-foot{padding:var(--space-sm) var(--space-md) var(--space-md)}
  .sheet-foot .btn{flex:1;min-height:var(--control-h-touch)}
}

/* I-12 / standard 8: the app bar's save status, beside Ask. Empty until an edit. */
.save-status{font-size:var(--text-meta);color:var(--muted);white-space:nowrap;min-width:0}
.save-status:empty{display:none}
.save-status[data-state="saved"]{color:var(--confirmed)}
.save-status[data-state="conflict"],.save-status[data-state="offline"]{color:var(--danger)}
/* Standard 7 (I-08): a deep link's target lands under the app bar and is marked for 1.6 s. */
.card[id],section[id]{scroll-margin-top:calc(var(--appbar-h) + var(--space-md))}
.card.is-arrived{box-shadow:0 0 0 2px var(--accent);background:var(--accent-bg);transition:background-color 1.6s ease,box-shadow 1.6s ease}
@media (prefers-reduced-motion:reduce){.card.is-arrived{transition:none;background:var(--paper)}}
/* B5: a page that did not load says so, with a way to try again. */
.load-error .eyebrow{color:var(--danger)}
[data-budget-empty] .auth-actions{flex-direction:row}
#bg-summary-card[data-budget-empty]{display:block}
#bg-summary-card[data-budget-empty] > *{margin:0 0 var(--space-sm);max-width:72ch}
/* I-21: one card-title style; the afford card's title is sentence case in the card serif, not an uppercase eyebrow. */
h3.afford-title.eyebrow{font:600 var(--text-card)/1.3 var(--font-display);letter-spacing:0;text-transform:none;color:var(--ink)}
/* I-22 / M6: shell pages sit on the same left edge as the logo and tabs, in a left-aligned reading column. */
main .col:not(.col-wide) > *{margin-left:0;margin-right:auto}

/* ============================================================
   Paragon loop 2 on #292 (2026-11-23): the open majors, and the loop-1 majors re-checked. Existing tokens only.
   ============================================================ */
/* M12 (standard 2): a text link in a column of text starts on the text edge; hover underlines instead of a pad. */
button.link-btn,a.link-btn,.page-video-link{padding-left:0;padding-right:0}
@media (hover:hover){button.link-btn:hover,a.link-btn:hover{background:transparent;text-decoration:underline;text-underline-offset:2px}}

/* M5 (standard 3): Saved / Spent are radio cards: a mark on each, the chosen one filled; the pair no wider than the text. */
.freed-options{max-width:72ch}
.freed-options .btn{position:relative;padding-left:calc(var(--space-md) + var(--space-lg))}
.freed-options .btn::before{content:"";position:absolute;left:var(--space-md);top:calc(var(--space-sm) + 3px);width:16px;height:16px;border-radius:50%;border:2px solid var(--field-border);background:var(--paper);box-sizing:border-box}
.freed-options .btn[aria-pressed="true"]::before{border-color:var(--accent);box-shadow:inset 0 0 0 3px var(--paper);background:var(--accent)}
.freed-options .btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* M13 (I-21): one card-title style on Budget, the same serif title the Budget progress card uses, sentence case. */
#bg-summary-card .bg-summary-figures > h3.eyebrow-heading,#bg-alerts-card > h3.eyebrow-heading,#bg-tx-card > p.eyebrow:first-child,
#bg-scenario-card .card-eyebrow-row > h3.eyebrow-heading,[data-budget-empty] > h3.eyebrow-heading{font:600 var(--text-card)/1.3 var(--font-display);letter-spacing:0;text-transform:none;color:var(--ink);margin:0 0 var(--space-sm)}
h3#future-plans-title.eyebrow{font:600 var(--text-card)/1.3 var(--font-display);letter-spacing:0;text-transform:none;color:var(--ink);margin:0 0 var(--space-xs)}
#bg-tx-card > p.eyebrow:first-child #bg-tx-count-label{font:400 var(--text-meta) var(--font-body);color:var(--muted)}

/* M15 (Goals): the year each level is reached leads; the target figure follows, smaller. */
.ladder-row-head .ladder-status{grid-column:3;grid-row:1}
.ladder-row-head .level-target{grid-column:4;grid-row:1}
.ladder-status-text,.ladder-status-text.chip-wrap{font:600 var(--text-card)/1.3 var(--font-body);color:var(--ink)}
.ladder-row .level-target{font-size:var(--text-dense);font-weight:400;color:var(--muted)}
@media (max-width:600px){
  .ladder-row-head .ladder-status{grid-column:2 / 4;grid-row:2}
  .ladder-row-head .level-target{grid-column:2 / 4;grid-row:3;font-size:var(--text-dense)}
}

/* M20 (Overview): the Protection set-up prompt is set apart from the household's own to-do list. */
#ov-protection [data-protection-unset],#ov-protection [data-protection-row]{background:var(--accent-bg);border-left:var(--space-xs) solid var(--accent);border-radius:var(--radius-md);padding:var(--space-sm) var(--space-md);margin:0 0 var(--space-md)}

/* N2 and N3 (Earn): the figure in use is a box of its own, so the ledger starts with its first part; the closing line
   of a ledger with no total is ruled like a total; a field before a ledger row keeps its gap. */
[data-earn] .earn-row[data-tax-confirmed]{grid-template-columns:minmax(0,1fr) auto;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--paper-alt);padding:var(--space-sm) var(--space-md);margin:var(--space-sm) 0}
[data-earn] .earn-row[data-tax-confirmed] .earn-row-text{grid-column:1}
[data-earn] .earn-row[data-tax-confirmed] .earn-row-figure{grid-column:2}
/* Alex on #292 (N2): with the state part missing, a subtotal stands in the total's place, styled as an ordinary row:
   no total rule, no bold. K1's line sits directly under it. */
[data-earn] .earn-row[data-tax-subtotal]{border-top:1px solid var(--line)}
[data-earn] .earn-row[data-tax-subtotal] .earn-row-label,[data-earn] .earn-row[data-tax-subtotal] .earn-row-figure{font-weight:400}
[data-earn] [data-tax-no-total]{margin-top:var(--space-xs)}
[data-earn] .field + .earn-row{margin-top:var(--space-md)}

/* M19 (Ask at desktop): the page behind the drawer is dimmed, and the focus ring is the app's one accent ring. */
body.ask-open .ask-root .ask-scrim{background:rgba(20,18,10,.4)}
body .ask-root button:focus-visible,body .ask-root input:focus-visible,body .ask-root summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* M2 and M17: every checkbox and radio is the same native control in the accent colour; Spend less on's boxes match. */
input[type="checkbox"],input[type="radio"]{accent-color:var(--accent)}
.cut-chip input[type="checkbox"]{width:16px;height:16px;margin:0;flex:none}

/* M14: kinds of account as a tile grid, not eight full-width rows. */
.ma-type:not(.own-question){display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:var(--space-sm)}
.ma-type:not(.own-question) > legend,.ma-type:not(.own-question) > .hint,.ma-type:not(.own-question) > .error-msg{grid-column:1 / -1}
.ma-type:not(.own-question) .ma-type-opt{margin:0}

/* M11 (and the close-out): What you own rows on two lines: the name, then one line of text (its date, what it counts
   toward, its chips) that flows like a sentence, so a separator never starts a line on its own. */
.own-list .main{display:block}
.own-list .main > .t{display:block}
.own-list .main > .m,.own-list .main > .own-chips{display:inline}
.own-list .main > .m + .m::before,.own-list .main > .m + .own-chips::before{content:" \00B7 ";color:var(--muted)}
.own-list .own-chips .own-chip{margin-left:var(--space-xs)}
/* The account-type pickers (What you own, Settings > Banks) are the app's select, not the tiny native control. */
select.acct-type-pick,.acct-type-pick select{min-height:var(--control-h);max-width:100%;border:1px solid var(--field-border);border-radius:var(--radius-sm);padding:0 var(--space-sm);background:var(--paper);color:var(--ink);font:var(--text-dense) var(--font-body)}
select.acct-type-pick:focus-visible,.acct-type-pick select:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
/* Overview at 390: the set-up bar's progress takes its own line; its next step and Hide sit under it, unsquashed. */
@media (max-width:600px){.gs-compact-row > .gs-toggle{flex:1 1 100%}.gs-compact-row > :not(.gs-toggle){flex:0 0 auto}}
/* Standard 7 (close-out): the desktop tab row stays in view under the app bar, so a deep link's arrival shows where it
   landed; the target lands below both. Its way back sits just above it. */
/* The shell's header and tab row live in #app while a planner page renders in #planner-host beside it; with #app as a
   wrapper-less box, the sticky header and tab row stick to the page, over the planner pages too. */
body.has-bottombar #app{display:contents}
@media (min-width:601px){
  nav.tabnav{position:sticky;top:var(--appbar-h);z-index:29;background:var(--paper)}
  .card[id],section[id],.arrive-back{scroll-margin-top:calc(var(--appbar-h) + var(--space-2xl) + var(--space-md))}
}
@media (max-width:600px){.arrive-back{scroll-margin-top:calc(var(--appbar-h) + var(--space-md))}}
.arrive-back{margin:0 0 var(--space-sm)}

/* Extra money (Ariadne's call 1, 2026-11-23), on the layout standard (Deliverables/2026-11-23-levels-layout-standard):
   token spacing only; a left-aligned 720px form, labels above fields, fields in one row sharing a top edge; the side
   by side reads left to right in its fixed order, no column styled apart; Check the math is the G9 disclosure row
   (title left, one chevron right, no triangle), and it never scrolls on expand. */
.extra-money{display:flex;flex-direction:column;gap:var(--space-sm);margin-top:var(--space-md)}
.extra-money-form{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:var(--space-md);max-width:720px;align-items:start}
.extra-money-form > .field{min-width:0}
.extra-money-form > .field-wide,.extra-money-form > .field-note{grid-column:1/-1;margin:0}
.extra-money-table th,.extra-money-table td{text-align:left;vertical-align:top}
.extra-money-table td p{margin:0 0 var(--space-xs)}
details.extra-money-math > summary{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);width:100%;min-height:var(--control-h-touch);border-top:1px solid var(--line);cursor:pointer;list-style:none;color:var(--ink);font:600 var(--text-dense)/1.3 var(--font-body)}
details.extra-money-math > summary::-webkit-details-marker{display:none}
details.extra-money-math > summary::before{content:none}
details.extra-money-math > summary::after{content:"";flex:none;width:8px;height:8px;margin-right:6px;border-right:2px solid var(--accent);border-bottom:2px solid var(--accent);transform:rotate(45deg) translateY(-2px);transition:transform .12s ease}
details.extra-money-math[open] > summary::after{transform:rotate(-135deg) translateY(-2px)}
details.extra-money-math > summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ============================================================
   Visual review fixes (Iris on the 97d6be6 release captures, 2026-11-24). Existing tokens only; app defects only
   (the capture artifacts in that review are fixed in the u24 kit, not here).
   ============================================================ */
/* Future plans and Mortgage years table: the generic td is nowrap, so a long "With this home" cell ("2051, with 6 years
   of loan payments left") took the whole row at 390 and squeezed the label column to one letter per line (rows
   1,200 px tall). Cells wrap at word breaks and the label column keeps a readable floor. */
.afford-years-table th,.afford-years-table td{white-space:normal;overflow-wrap:normal;word-break:normal;vertical-align:top}
.afford-years-table td.num{white-space:nowrap}
.afford-years-table tbody th{min-width:calc(var(--space-2xl) * 2.5)}
/* Mortgage: the down-payment block sits under the debt and housing fields as its own section, and its money fields
   (closing costs, sale price, payoff, selling costs) are the app's money field in both themes. */
.replace-block:not([hidden]){margin-top:var(--space-lg)}
.replace-box{margin-top:var(--space-md)}
.replace-block > .replace-box:first-child{margin-top:0}
.replace-row{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-xs);margin:var(--space-sm) 0}
.replace-row > .afford-line,.replace-row > .hint{margin:0}
.replace-money{width:100%;max-width:240px}
input.replace-input{width:100%;min-height:var(--control-h);border:1px solid var(--field-border);border-radius:6px;padding:9px 10px;background:var(--paper);color:var(--ink);font:14px var(--font-body);font-variant-numeric:tabular-nums}
.replace-row > input.replace-input{max-width:240px}
.replace-money input.replace-input{padding-left:22px}
input.replace-input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
/* Worth a look: the footer at the helper size on a readable measure (no third, smaller size). */
.afford-guard .afford-guard-foot{max-width:72ch}
/* Mortgage: the freed-money choice cards keep a section gap above the Home price row. */
#afford-card .freed-prompt:not([hidden]){margin-bottom:var(--space-lg)}
/* The choice cards: the picked card is shown by its filled dot, border and tint; its three-line label stays regular. */
.freed-options .btn[aria-pressed="true"]{font-weight:500}
/* Budget progress: the row grid's minimums fit the column left beside the open options sheet (it overflowed the card
   by about 40 px at 1280), so the row menu button stays inside the table edge. Name and bar give way first. */
#bg-budget-bars-card{--bp-cols:minmax(96px,1fr) minmax(40px,2fr) 96px 112px 120px var(--control-h-sm)}
/* The options sheet is not the old inline customizer: no dashed rule or gap above it. */
.sheet-layer.cat-customizer{border-top:0;padding-top:0;margin-top:0}
/* Scenario planner footnote: the inline "Goals tab" link no longer stretches its line to a 40 px button height. */
.scenario-outputs > .field-note > button.link-btn{display:inline;min-height:0;height:auto;padding:0;vertical-align:baseline;font:inherit;font-weight:600;white-space:normal}
/* How the math works: column heads wrap, so the widened table (costs that end) fits its card at 1000. */
.levels-math .math-table thead th{white-space:normal;vertical-align:bottom}
/* Payment schedule: row numbers stay on one line. Iris rehearsal on 976f654: the earlier right-edge fade was too faint
   to read, and the last row was cut mid-glyph at the bottom. Scroll shadows instead: a shaded edge on the right and at
   the bottom while there is more to scroll, which the paper-coloured covers (fixed to the content's own ends) hide once
   the end is reached. Theme tokens, so it reads in both themes, at every width. */
.schedule-scroll th:first-child,.schedule-scroll td:first-child{white-space:nowrap}
.table-scroll.schedule-scroll{background:
  linear-gradient(to left,var(--paper) 50%,transparent) right center / var(--space-2xl) 100% no-repeat local,
  linear-gradient(to left,color-mix(in srgb,var(--ink) 30%,transparent),transparent) right center / var(--space-lg) 100% no-repeat scroll,
  var(--paper)}
/* Polish 2 (fd89512): the bottom cue is no longer a grey band drawn under the rows (it took the content's width on a phone
   and greyed the last row in light). The scroll box itself fades its last 24px to the card colour, the box's own width
   in both themes, and its bottom padding is that height, so at the end of the list the fade falls on empty space. */
.table-scroll.schedule-scroll{padding-bottom:var(--space-lg);-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - var(--space-lg)),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - var(--space-lg)),transparent)}
/* Polish review on c715f0d: each paper cover (fixed to the content's own end) is now solid over the whole shadow it
   hides (half of 48px = the 24px shadow), so when nothing overflows no band shows; the shadow only appears while there
   is more to scroll, in the theme's own ink. */
/* RC review of 60746d9 (390): the shadow alone did not register. The shadow is now drawn in the ink colour (dark on the
   light theme, light on the dark one), and on a phone the columns take set widths so the fifth column is cut mid-column
   at the right edge: a peek that says the table goes on. # and Date stay put while the rest scrolls under them. */
@media (max-width:480px){
  /* Fixed layout needs a set table width; each cell's width includes its padding (border-box): 36 + 88 + 7 x 76 px. The
     first four columns take 276px of the ~314px box, so the fifth shows about 38px, cut mid-column. */
  .schedule-scroll table{table-layout:fixed;width:calc(var(--space-xl) + var(--space-xs) + var(--space-2xl) * 1.75 + var(--space-xs) + 7 * (var(--space-2xl) + var(--space-lg) + var(--space-xs)));min-width:0}
  .schedule-scroll th,.schedule-scroll td{box-sizing:border-box;padding-left:var(--space-xs);padding-right:var(--space-xs)}
  .schedule-scroll th:nth-child(1),.schedule-scroll td:nth-child(1){width:calc(var(--space-xl) + var(--space-xs));position:sticky;left:0;z-index:2;background:var(--paper)}
  .schedule-scroll th:nth-child(2),.schedule-scroll td:nth-child(2){width:calc(var(--space-2xl) * 1.75 + var(--space-xs));position:sticky;left:calc(var(--space-xl) + var(--space-xs));z-index:2;background:var(--paper);box-shadow:1px 0 0 var(--line)}
  .schedule-scroll th:nth-child(n+3),.schedule-scroll td:nth-child(n+3){width:calc(var(--space-2xl) + var(--space-lg) + var(--space-xs))}
  .schedule-scroll thead th:nth-child(-n+2){z-index:3;background:var(--paper-alt)}
}
/* Check-up, empty: the line uses the card's width and its link stays whole; Back to Overview lines up with the heading. */
.card.checkup-empty .sub{max-width:none;margin:0}
.card.checkup-empty a{white-space:nowrap}
.checkup-actions > .btn.ghost:first-child{margin-left:calc(-1 * var(--space-sm))}
/* Privacy page: each run of up to three sentences is its own paragraph, with space between (the size is account.css PT1). */
body[data-legal] .statement p + p{margin-top:var(--space-md)}
/* Ariadne's ruling 2: one source line, the last line of each page head (muted, wraps, never cut off), and the same text
   as a caption on Goals' Year by year chart and How the math works table. */
.section-head > .page-source,.page-source{margin:var(--space-xs) 0 var(--space-md);font-size:var(--text-meta);line-height:1.45;color:var(--muted);max-width:72ch;overflow-wrap:normal}
.source-caption{margin:0 0 var(--space-sm);font-size:var(--text-meta);line-height:1.45;color:var(--muted);max-width:72ch}

/* ============================================================
   Iris rehearsal on staging 976f654 (2026-11-24): Budget, Goals, Protection, the legal pages, the video dialog.
   Existing tokens only.
   ============================================================ */
/* Budget options sheet, 601 to 1199px. Layout standard 4: "At 1280 the sheet docks and the list narrows beside it. At
   1000 it overlays." A docked list needs about 600px beside the 400px sheet, which 601 to 1199 does not have, so there
   the sheet is a true overlay: a scrim that dims and blocks the page (app.js makes the page inert and the sheet
   aria-modal, as on a phone). A tap on the scrim closes it. No half-covered numbers or tabs. */
@media (min-width:601px) and (max-width:1199px){
  .sheet-layer[data-sheet-modal="true"]{top:0;left:0;pointer-events:auto;background:rgba(20,18,10,.4)}
}
/* WCAG 2.4.11: a focused control and its help line stop clear of the Done footer (app.js scrolls to the whole row; the
   padding is the footer's height). The footer casts a soft edge, so a line cut at the bottom reads as "more below". */
.sheet-body{scroll-padding-bottom:calc(var(--control-h) + 2 * var(--space-md))}
.sheet-foot{position:relative;z-index:1;box-shadow:0 calc(-1 * var(--space-sm)) var(--space-md) calc(-1 * var(--space-sm)) rgba(20,18,10,.18)}
/* Budget transactions at 390: the open category editor (Category, Always use, Save, Cancel) is its own full-width block.
   It was the row's first cell, which the phone layout hides, so only an empty bordered strip showed. */
@media (max-width:480px){
  .tx-table tr.tx-pick-row{display:block;padding:var(--space-sm) 0 var(--space-md)}
  .tx-table tr.tx-pick-row > td{display:block;white-space:normal;min-width:0}
  .tx-table tr.tx-pick-row .tx-pick select{flex:1 1 0;min-width:0;min-height:var(--control-h-touch)}
  .tx-table tr.tx-pick-row .tx-pick-always{flex:1 1 100%;align-items:flex-start}
  .tx-table td.tx-meta-cell .tx-cat-btn{min-height:24px;padding:0;font:inherit;font-weight:600;vertical-align:baseline}
}
/* The app bar on a phone: "Saving..." keeps a gutter from Ask. */
.appbar-actions > .save-status{margin-right:var(--space-xs)}
/* Row actions (Edit, Remove) never break mid-word ("Remov/e", "E/d/i/t"): the action keeps its one line and the text
   beside it wraps instead. Every list that puts an action button beside a text block. */
:is(.goal-row,.pr-policy-row,.manual-asset-row,.pr-person,.master-list li,.rows li) > :is(.btn,button.link-btn){flex:none;white-space:nowrap}
.goal-row > .goal-row-main,.pr-policy-row > span:first-child{flex:1 1 auto;min-width:0}
/* Year-by-year chart: app.js draws it again when the 480px line is crossed; until it does, a wide drawing on a phone
   keeps a readable width and scrolls sideways with a fade at the right edge, never shrinking to 4px labels. */
@media (max-width:480px){
  .chart-card svg:not([data-narrow]){min-width:680px}
  #projection-chart-wrap:has(> svg:not([data-narrow])){overflow-x:auto;-webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 28px),transparent 100%)}
}
/* The page video dialog: centred with equal gutters at every width (.card's mobile margin had pinned it left). */
dialog.page-video-dialog{margin:auto;box-sizing:border-box;width:min(720px,calc(100vw - 2 * var(--space-md)));max-width:none}
/* Overview: Budget categories and Household goals keep their own heights. */
.attainment-grid.ov-two{align-items:start}
/* Settings > Banks: "Levels couldn't tell" is a chip, like the app's other status chips. */
.chip[data-type-unsure]{background:var(--assume-bg);color:var(--assume)}

/* ============================================================
   RC review of 60746d9 (2026-11-24): Goals reading layout. Words unchanged.
   ============================================================ */
/* Future plans, the planned home: each detail section folds under its own heading, one G9 disclosure row (title left,
   one chevron right that turns, no triangle); its paragraphs keep a reading measure with space between. */
details.plan-home-more{border-top:1px solid var(--line);margin-top:var(--space-sm)}
details.plan-home-more > summary{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);min-height:var(--control-h-touch);cursor:pointer;list-style:none}
details.plan-home-more > summary::-webkit-details-marker{display:none}
details.plan-home-more > summary::before{content:none}
details.plan-home-more > summary::after{content:"";flex:none;width:8px;height:8px;margin-right:6px;border-right:2px solid var(--accent);border-bottom:2px solid var(--accent);transform:rotate(45deg) translateY(-2px);transition:transform .12s ease}
details.plan-home-more[open] > summary::after{transform:rotate(-135deg) translateY(-2px)}
details.plan-home-more > summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
details.plan-home-more > summary .afford-eyebrow{margin:0}
@media (prefers-reduced-motion:reduce){details.plan-home-more > summary::after{transition:none}}
.plan-home-body > p,details.plan-home-more > p{max-width:72ch;margin:0 0 var(--space-sm)}
/* Goals, under the level cards: the required disclosure and its notes read at body size, on a reading measure, with
   space between them (they had been caption size, a fine-print wall). Text unchanged and always visible. The p. prefix
   outranks account.css's shared caption rule for these classes, which loads later. */
p.levels-disclosure,p.levels-home-line{font-size:var(--text-dense);line-height:1.55;color:var(--muted);max-width:68ch;margin:var(--space-md) 0 0} /* polish 2: the card body size, muted (it read larger than the cards) */

/* ============================================================
   Polish review on c715f0d (full-resolution Iris pass, 2026-11-24). Layout only, words unchanged, existing tokens.
   ============================================================ */
/* 1, 2: the years tables (Mortgage, Goals): the caption sits inset from the frame, the last row has no stub border under
   its sticky label, and the rounded frame clips its cells (the cells wrap, so nothing is hidden). */
.afford-years-table caption{padding:calc(var(--space-sm) + var(--space-xs)) calc(var(--space-sm) + var(--space-xs)) var(--space-xs)}
.table-scroll.afford-years-table{overflow:hidden}
tbody tr:last-child th{border-bottom:none}
.afford-compare tbody tr:last-child th{border-bottom-left-radius:var(--radius-md)}
/* 3: the compare table: row labels sit at the top like their values; the Remove row centres label, dashes and Remove
   on one line, and Remove keeps the row's text height. */
.afford-compare tbody th{vertical-align:top}
.afford-compare tbody tr:last-child > *{vertical-align:middle}
.afford-compare tbody tr:last-child .btn{min-height:0;padding-top:0;padding-bottom:0}
/* 4: the mortgage form at 601px and up: every label takes two lines' height and sits on its input, so the inputs share
   one top edge when a long label wraps. */
@media (min-width:601px){#mortgage-note-form > .field > label{min-height:calc(2 * 1.4 * var(--text-dense));line-height:1.4;display:flex;align-items:flex-end}}
/* 6: What you own: each dot separator stays with the item before it, so no line starts with a dot. */
.own-list .main > .m + .m::before,.own-list .main > .m + .own-chips::before{content:none}
.own-list .main > .m:has(+ .m)::after,.own-list .main > .m:has(+ .own-chips)::after{content:"\00A0\00B7 ";color:var(--muted)}
/* 7: Add a plan: the three choices share one look (the link look of "A home"). */
.future-plan-kinds li > a,.future-plan-kinds li > button,.future-plan-kinds li > .btn.ghost.btn-sm{display:inline-flex;align-items:center;min-height:24px;margin:0;padding:0;border:0;background:none;font:600 var(--text-dense)/1.4 var(--font-body);color:var(--accent);text-decoration:underline;cursor:pointer}
.future-plan-kinds li > button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* 8: Future plans' foot: a gap under Add a plan, space above "When a payment or cost ends", and "Take this home out of my
   plan" on the text edge. */
.future-plans > .auth-actions + .field-note{margin-top:var(--space-sm)}
.future-plans > h4.eyebrow{margin-top:var(--space-lg)}
.plan-home-body > .auth-actions > .btn.ghost:first-child{margin-left:calc(-1 * var(--space-sm))}
/* 9: the age card's inline "Add tax on what you take out" keeps the sentence's line height. */
[data-age-add-tax] > button.link-btn{display:inline;min-height:0;height:auto;padding:0;vertical-align:baseline;font:inherit;font-weight:600;white-space:normal}
/* 11: the chart key's numbers stay circles at every width. */
.chart-key-n{flex:none;min-width:20px}
/* 12: a child row being edited says so: the accent edge, the form directly under it. */
.future-plan-row.is-editing{box-shadow:inset var(--space-xs) 0 0 var(--accent);padding-left:var(--space-sm);background:var(--accent-bg)}
/* 13: What you earn and keep: Confirm what you invest has room above the next row's rule. */
[data-confirm-invest]{margin:var(--space-sm) 0 var(--space-md)}
/* 14, 15: Protection, Insurance on file: POLICIES has the card's section-label space and rule; each Life cover block is
   tight under a section heading. */
.pr-section-label{margin:var(--space-lg) 0 var(--space-xs);padding-top:var(--space-md);border-top:1px solid var(--line)}
.pr-dime{gap:var(--space-xs)}
.pr-dime > p{margin:0}
.pr-dime > .a-title{font:600 var(--text-dense)/1.4 var(--font-body);color:var(--ink)}
/* 16: Log a review: the button and its status line share one left edge at every width. */
.pr-review-menu li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:var(--space-sm)}
.pr-review-menu li > .btn.ghost{justify-content:flex-start;text-align:left;padding-left:0}
/* Polish 2 (fd89512): at every width each review keeps its label and status on one row, with a rule between reviews. */
.pr-review-menu li{padding:var(--space-xs) 0;border-bottom:1px solid var(--line)}
.pr-review-menu li:last-child{border-bottom:0}
.pr-review-menu li > .field-note{text-align:right}
/* 17: the unlock screen's "Sign out" never breaks. */
p.disclaimer > a[href="#"]{white-space:nowrap}

/* ============================================================
   Polish 2 (the Iris pass on RC fd89512, 2026-11-24). Layout only, words unchanged, existing tokens.
   ============================================================ */
/* 1: What you own: each detail is its own line, so no separator is ever needed (none trails a line); a typed date never
   breaks across lines. */
.own-list .main > .m,.own-list .main > .own-chips{display:block}
.own-list .main > .m:has(+ .m)::after,.own-list .main > .m:has(+ .own-chips)::after{content:none}
.own-list .own-chips .own-chip{margin:var(--space-xs) var(--space-xs) 0 0}
.nowrap{white-space:nowrap}
/* 3: If you lived on your investments: an open form sits inside its own row, under the row's title, full width. */
.rows li.has-form{flex-wrap:wrap}
.rows li.has-form > .ma-form{flex:1 1 100%;margin-top:var(--space-sm)}
/* 5: The down payment fold: the total, then a two-column list (each account's figure, then the rest of its sentence),
   then the caveats in smaller muted type. */
details.plan-home-more .dp-total{font-weight:600;color:var(--ink);margin:var(--space-sm) 0}
.dp-sources{list-style:none;margin:var(--space-sm) 0;padding:0;border-top:1px solid var(--line)}
.dp-sources > li{display:grid;grid-template-columns:minmax(calc(var(--space-2xl) * 1.75),auto) minmax(0,1fr);column-gap:var(--space-md);align-items:baseline;padding:var(--space-sm) 0;border-bottom:1px solid var(--line);font-size:var(--text-dense);line-height:1.5;color:var(--ink)}
.dp-sources .dp-amt{font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;text-align:right}
.dp-sources .dp-what{grid-column:2;min-width:0}
/* Alex on #314: an account's own notes, under its sentence (column 2) inside its row, muted, at the row's size. */
.dp-sources .dp-line{display:contents}
.dp-sources .dp-note{grid-column:2;margin:var(--space-xs) 0 0;max-width:68ch}
.dp-caveats{margin-top:var(--space-sm)}
.dp-caveats > .field-note{max-width:68ch;margin:0 0 var(--space-sm)}
/* 7: Overview, the set-up checklist opened from its one-row form: its text and status circles clear the accent stripe. */
.gs-full .first-run{padding-left:calc(var(--space-md) + var(--space-xs))}

/* ============================================================
   Polish 3 (the Iris pass on RC a792300, 2026-11-24). Layout only, words unchanged, existing tokens.
   ============================================================ */
/* 2: the opened set-up checklist is ONE element carrying both classes (first-run get-started gs-full), so the round-2
   descendant rule never matched: the rail padding goes on that element itself. */
.first-run.gs-full{padding-left:var(--space-md)}
/* 3: on a phone every step's link sits under its text, as a button step does, so the text keeps the row's width.
   (.get-started outranks account.css's .fr-step .gs-link{flex:none}, which loads after this sheet.) */
@media (max-width:600px){.get-started .fr-step .gs-link{flex:1 1 calc(100% - 44px)}}
/* 4: the Saved / Spent choice cards: only the lead ("Saved:", "Spent:") is bold. */
.freed-options .btn,.freed-options .btn[aria-pressed="true"]{font-weight:400}
.freed-options .btn .freed-lead{font-weight:600}
.freed-options .btn .freed-text{display:block;min-width:0}
/* 5: the down payment rows on a phone: the figure above its sentence (no fixed gutter), the account's own notes still
   inside its row, under the sentence. */
@media (max-width:480px){
  .dp-sources > li{grid-template-columns:minmax(0,1fr);row-gap:var(--space-xs)}
  .dp-sources .dp-amt{text-align:left}
  .dp-sources .dp-what,.dp-sources .dp-note{grid-column:1}
}

/* ============================================================
   Polish 4 (the Iris pass on RC 24e014f, 2026-11-24). Layout only, words unchanged, existing tokens.
   ============================================================ */
/* 2: What you own: a row's amount keeps one right-aligned slot and its one button a fixed slot beside it, so every
   amount lines up; the row's question ("Does this count?") sits under the row's text. */
.own-list .rows li > .end{display:grid;grid-template-columns:auto calc(var(--space-2xl) * 1.75);column-gap:var(--space-sm);align-items:center;justify-items:end}
.own-list .rows li > .end > .num{grid-column:1;text-align:right;white-space:nowrap}
.own-list .rows li > .end > .btn{grid-column:2;white-space:nowrap}
/* the row's text takes what is left beside the amount and button at every width (it no longer wraps them below) */
.own-list .rows li > .main{flex:1 1 0}
.own-list .main > .own-prompt{display:block;margin-top:var(--space-xs);font-size:var(--text-dense);color:var(--ink-2)}
/* 3: What this assumes: one grid, each label above its value, every column the same width; the links sit at the left
   under their value. */
#profile-form > .field > .slider-label{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:var(--space-xs);margin:0}
#profile-form > .field > .slider-label > span:first-child{font-family:var(--font-body);font-size:var(--text-dense);font-weight:600;color:var(--ink-2)}
#profile-form > .field > .slider-label > .range-value{font-size:var(--text-body)}
#profile-form > .field > .link-btn{align-self:flex-start}
#profile-form > .field > button.link-btn{padding-left:0;padding-right:0;justify-content:flex-start}
/* 4: The down payment's first paragraph: regular weight, its total figure bold. */
details.plan-home-more .dp-total{font-weight:400}
details.plan-home-more .dp-total .dp-total-fig{font-weight:600}

/* ============================================================
   Polish 5 (the Iris pass on RC c8d5086, 2026-11-24). Layout only, words unchanged, existing tokens.
   ============================================================ */
/* 1: Affordability's "Add to my plan" area is its own section: the same hairline and space above as Worth a look,
   so it no longer reads as a caption to the compare table's footnotes. Every width, both states. */
.afford-add-plan{margin-top:var(--space-lg);padding-top:var(--space-md);border-top:1px solid var(--line)}
.afford-add-plan[hidden]{display:none}
/* 2: Overview's "See all N accounts": each group card is its own height, never stretched to the tallest beside it. */
.account-groups{align-items:start}
