    :root {
      /* Brand primitives come from /assets/tokens.css (single source of truth).
         Local names map onto them so a brand change propagates here automatically.
         Tokens below without a var() are planner-specific and stay local. */
      --bg:          var(--brand-bg);
      --bg-2:        var(--brand-bg-2);
      --surface:     var(--brand-surface);
      --surface-2:   rgba(255,255,255,0.06);
      --border:      var(--brand-border);
      --border-2:    rgba(255,255,255,0.14);
      --text:        var(--brand-text);
      --muted:       var(--brand-text-muted);
      --muted-2:     #71717a;

      --accent:      var(--brand-accent);   /* indigo — primary / 401k */
      --accent-soft: rgba(99,102,241,0.14);
      --accent-line: rgba(99,102,241,0.45);
      --green:       #2dd4a0;   /* roth + mega */
      --orange:      #f0a832;   /* hsa */
      --purple:      #a79ef5;   /* brokerage */
      --red:         #f07070;   /* withdrawals / danger */

      --font-display: var(--brand-font-display);
      --font-head:   var(--brand-font-head);
      --font-body:   var(--brand-font-body);
      --font-mono:   var(--brand-font-mono);
      --gold:        var(--brand-gold);

      --radius-sm:   10px;
      --radius-md:   14px;
      --radius-lg:   20px;

      --ease-out:    cubic-bezier(0.16,1,0.3,1);
      --maxw:        1180px;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
    html { scroll-behavior: smooth; }
    body {
      background: var(--bg);
      color: var(--text);
      font-family: var(--font-body);
      font-size: 14px;
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
      min-height: 100vh;
      overflow-x: hidden;
    }
    a { color: inherit; text-decoration: none; }
    button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    }

    /* ── Ambient background ── */
    .bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
    .orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
    .orb-1 { width: 480px; height: 480px; top: -160px; right: -120px; background: rgba(99,102,241,0.18); }
    .orb-2 { width: 420px; height: 420px; bottom: -180px; left: -120px; background: rgba(139,92,246,0.13); }

    /* ── Top bar ── */
    .topbar {
      position: sticky; top: 0; z-index: 50;
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px clamp(16px, 4vw, 40px);
      background: rgba(5,5,7,0.72);
      backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
      border-bottom: 1px solid var(--border);
    }
    .brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 18px; letter-spacing: 0.01em; }
    .brand-mark { color: var(--accent); font-size: 16px; }
    .back-link {
      font-size: 13px; color: var(--muted);
      display: inline-flex; align-items: center; gap: 6px;
      transition: color .2s var(--ease-out);
    }
    .back-link:hover { color: var(--text); }

    /* ── Page shell ── */
    .wrap { max-width: var(--maxw); margin: 0 auto; padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 40px) 64px; }

    .page-head { margin-bottom: 28px; }
    .eyebrow {
      font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--brand-credit-tracking, .32em);
      text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
    }
    .page-title { font-family: var(--font-display); font-style: italic; font-size: clamp(34px, 5.5vw, 52px); font-weight: 400; letter-spacing: 0; }
    .page-title span { color: var(--accent); }
    .page-desc { color: var(--muted); margin-top: 10px; max-width: 60ch; font-size: 14px; }

    /* ── Responsive 2-col layout (desktop) ── */
    .layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
    /* min-width: 0 is load-bearing: grid items default to min-width auto, so ONE
       wide descendant (the FIRE-bridge table's intrinsic ~420px was the culprit)
       silently inflates the whole track past the phone viewport — the page then
       loads "zoomed in" with a gap right of the topbar. Never remove this. */
    .layout > * { min-width: 0; }
    @media (min-width: 920px) {
      .layout { grid-template-columns: minmax(340px, 400px) 1fr; gap: 28px; }
      .results { position: sticky; top: 84px; }
    }

    /* ── Card primitive ── */
    .panel {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius-lg); overflow: hidden;
    }
    .inputs > .section + .section { margin-top: 14px; }

    /* ── Collapsible sections ── */
    .section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
    .section-header {
      display: flex; align-items: center; gap: 11px;
      padding: 16px; cursor: pointer; user-select: none;
    }
    .section-header:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius-lg); }
    .section-icon {
      width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center; font-size: 15px;
    }
    .section-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
    .chevron { margin-left: auto; font-size: 11px; color: var(--muted); transition: transform .25s var(--ease-out); }
    .chevron.open { transform: rotate(180deg); }
    .section-body { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; }
    .section-body.collapsed { display: none; }

    /* per-account accents */
    .acc-401k .section-icon { background: var(--accent-soft); }   .acc-401k .section-label { color: #8b8df4; }
    .acc-roth .section-icon { background: rgba(45,212,160,0.15); } .acc-roth .section-label { color: var(--green); }
    .acc-hsa  .section-icon { background: rgba(240,168,50,0.15); } .acc-hsa  .section-label { color: var(--orange); }
    .acc-brok .section-icon { background: rgba(167,158,245,0.15); }.acc-brok .section-label { color: var(--purple); }
    .acc-mega .section-icon { background: rgba(240,112,112,0.15); }.acc-mega .section-label { color: var(--red); }
    .acc-gen  .section-icon { background: rgba(255,255,255,0.06); }.acc-gen  .section-label { color: var(--muted); }

    /* ── Inputs ── */
    .input-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    @media (max-width: 380px) { .input-pair { grid-template-columns: 1fr; } }
    .input-card {
      background: var(--bg-2); border: 1px solid var(--border);
      border-radius: var(--radius-md); overflow: hidden;
      transition: border-color .2s var(--ease-out);
    }
    .input-card:focus-within { border-color: var(--border-2); }
    .input-card-title { font-size: 12px; font-weight: 500; color: var(--muted); padding: 11px 14px 0; }
    .input-row { display: flex; align-items: center; gap: 9px; padding: 6px 14px 11px; }
    .input-prefix { font-family: var(--font-mono); font-size: 15px; color: var(--muted-2); flex-shrink: 0; }
    .input-field {
      flex: 1; min-width: 0; width: 100%;
      background: transparent; border: none; outline: none;
      font-family: var(--font-mono); font-size: 19px; font-weight: 500; color: var(--text);
      caret-color: var(--accent);
    }
    .input-field::placeholder { color: var(--muted-2); }
    .input-suffix { font-family: var(--font-mono); font-size: 12px; color: var(--muted-2); flex-shrink: 0; }
    .acc-401k .input-field:focus { color: #8b8df4; }
    .acc-roth .input-field:focus { color: var(--green); }
    .acc-hsa  .input-field:focus { color: var(--orange); }
    .acc-brok .input-field:focus { color: var(--purple); }
    .acc-mega .input-field:focus { color: var(--red); }

    /* ── Number spinner (±$1,000), styled to mimic native stacked arrows ── */
    .spinner { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
    .spin-btn {
      width: 22px; height: 13px; padding: 0;
      display: flex; align-items: center; justify-content: center;
      background: var(--surface-2); border: 1px solid var(--border);
      border-radius: 5px; color: var(--muted); font-size: 7px; line-height: 1;
      transition: color .12s var(--ease-out), border-color .12s var(--ease-out), background .12s var(--ease-out), transform .08s var(--ease-out);
    }
    .spin-btn:hover { color: var(--text); border-color: var(--border-2); background: rgba(255,255,255,0.09); }
    .spin-btn:active { transform: scale(0.88); }
    .spin-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

    .contrib-total {
      display: flex; justify-content: space-between; align-items: center;
      background: var(--surface-2); border: 1px solid var(--border-2);
      border-radius: var(--radius-md); padding: 12px 14px; font-size: 13px;
    }
    .contrib-total-lbl { color: var(--muted); }
    .contrib-total-val { font-family: var(--font-mono); font-weight: 600; font-size: 15px; }

    /* ── Reset button ── */
    .reset-btn {
      width: 100%; margin-top: 14px; padding: 11px;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius-md); color: var(--muted);
      font-family: var(--font-body); font-size: 13px; font-weight: 500;
      transition: color .15s var(--ease-out), border-color .15s var(--ease-out), background .15s var(--ease-out);
    }
    .reset-btn:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-2); }
    .reset-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

    /* ── Sliders ── */
    /* return-scenario preset switch */
    .scenario-switch { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
    .scenario-lbl { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
    .assumption-tag {
      font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; font-weight: 600;
      color: var(--muted-2); border: 1px solid var(--border-2); border-radius: 999px; padding: 1px 7px;
    }
    .scenario-btns { display: flex; gap: 6px; }
    .scen-btn {
      flex: 1; padding: 8px 6px; border-radius: var(--radius-sm);
      background: var(--surface); border: 1px solid var(--border); color: var(--muted);
      font-size: 12px; font-weight: 600; transition: all .15s var(--ease-out);
    }
    .scen-btn:hover { border-color: var(--accent); color: var(--text); }
    .scen-btn.active {
      background: var(--accent-soft); border-color: var(--accent); color: var(--text);
      box-shadow: 0 0 0 1px var(--accent) inset;
    }

    /* lifetime timeline strip */
    .timeline-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 22px 14px; margin-bottom: 18px; }
    .timeline-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 30px; }
    .timeline-title { font-family: var(--font-head); font-weight: 600; font-size: 14px; }
    .timeline { position: relative; height: 64px; margin: 0 10px; }
    .tl-track { position: absolute; top: 50%; left: 0; right: 0; height: 3px; border-radius: 3px; transform: translateY(-50%);
      background: linear-gradient(90deg, var(--border-2), var(--accent-line)); }
    .tl-gap { position: absolute; top: 50%; height: 10px; transform: translateY(-50%); border-radius: 6px; border: 1px solid rgba(240,112,112,.4);
      background: repeating-linear-gradient(45deg, rgba(240,112,112,.32), rgba(240,112,112,.32) 6px, rgba(240,112,112,.12) 6px, rgba(240,112,112,.12) 12px); }
    .tl-mark { position: absolute; top: 50%; transform: translate(-50%, -50%); }
    .tl-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); }
    .tl-mark.now .tl-dot { background: var(--text); box-shadow: 0 0 0 1px var(--text); }
    .tl-mark.retire .tl-dot { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
    .tl-mark.k59 .tl-dot { background: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
    .tl-mark.medicare .tl-dot { background: var(--purple); box-shadow: 0 0 0 1px var(--purple); }
    .tl-mark.life .tl-dot { background: var(--muted-2); box-shadow: 0 0 0 1px var(--muted-2); }
    .tl-lbl { position: absolute; left: 50%; transform: translateX(-50%); text-align: center; white-space: nowrap; font-size: 10.5px; line-height: 1.2; }
    .tl-lbl b { display: block; color: var(--text); font-weight: 600; }
    .tl-lbl span { color: var(--muted); font-size: 9.5px; }
    .tl-above { bottom: 17px; }
    .tl-below { top: 17px; }
    .tl-tick { position: absolute; top: 50%; width: 2px; height: 16px; transform: translate(-50%, -50%); background: var(--green); opacity: .7; border-radius: 1px; }
    .timeline-note { font-size: 11.5px; color: var(--muted); margin-top: 16px; line-height: 1.5; }
    @media (max-width: 560px) {
      .timeline { margin: 0 4px; }
      .tl-lbl { font-size: 9px; } .tl-lbl span { display: none; }
    }

    /* FIRE bridge — inputs + plan */
    .adv-tag { font-size: 9px; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; color: var(--green);
      border: 1px solid rgba(45,212,160,.4); border-radius: 999px; padding: 1px 6px; margin-left: 5px; }
    .fire-help { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
    .fire-field { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
    .fire-field label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
    .fire-dd { width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: 13px; }
    .fire-dd:focus { outline: none; border-color: var(--accent); }
    .fire-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
    .fs { flex: 1; min-width: 92px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
    .fs-v { font-family: var(--font-mono); font-size: 18px; font-weight: 600; color: var(--text); }
    .fs-l { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.3; }
    .fire-ok { font-size: 12.5px; color: var(--green); background: rgba(45,212,160,.10); border: 1px solid rgba(45,212,160,.3); border-radius: var(--radius-sm); padding: 9px 12px; line-height: 1.45; }
    .fire-warn { font-size: 12.5px; color: var(--orange); background: rgba(240,168,50,.10); border: 1px solid rgba(240,168,50,.35); border-radius: var(--radius-sm); padding: 9px 12px; line-height: 1.45; }
    .fire-note { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 12px; }
    .ladder-title { font-size: 11.5px; color: var(--muted); margin: 16px 0 10px; }
    .ladder { display: flex; gap: 8px; flex-wrap: wrap; }
    .rung { flex: 0 0 auto; min-width: 96px; border-radius: var(--radius-sm); padding: 10px 12px;
      background: linear-gradient(160deg, rgba(45,212,160,.14), rgba(45,212,160,.05)); border: 1px solid rgba(45,212,160,.35); }
    .rung-amt { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--text); }
    .rung-row { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
    .rung-row b { color: var(--text); font-weight: 600; }
    .rung-unlock b { color: var(--green); }
    .rung-rate { font-size: 10px; color: var(--orange); margin-top: 5px; font-weight: 600; }

    /* Auto-recommendation block */
    .fire-reco { background: linear-gradient(160deg, rgba(99,102,241,.12), rgba(99,102,241,.04));
      border: 1px solid rgba(99,102,241,.35); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; }
    .fire-reco-head { font-size: 13px; color: var(--text); font-weight: 600; }
    .fire-reco-why { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 5px; }
    .fire-rank { width: 100%; border-collapse: collapse; margin-top: 11px; font-size: 11.5px; }
    .fire-rank th { text-align: left; color: var(--muted); font-weight: 500; font-size: 10.5px;
      padding: 4px 8px; border-bottom: 1px solid var(--border); }
    .fire-rank td { padding: 5px 8px; color: var(--text); border-bottom: 1px solid rgba(255,255,255,.05); }
    .fire-rank td:nth-child(2), .fire-rank td:nth-child(3) { font-family: var(--font-mono); color: var(--muted); }
    .fire-rank .rank-best td { color: var(--text); font-weight: 600; }
    .fire-rank .rank-ok { color: var(--green); }
    .fire-rank .rank-penalty { color: var(--orange); }
    .fire-rank .rank-short { color: var(--down, #f07070); }
    .fire-reconcile { border-top: 1px solid rgba(255,255,255,.07); padding-top: 11px; }

    /* Chronological action plan */
    .ap-title { font-size: 11.5px; color: var(--muted); margin: 16px 0 10px; }
    .action-plan { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
    .action-plan li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0;
      border-bottom: 1px solid rgba(255,255,255,.05); }
    .action-plan li:last-child { border-bottom: none; }
    .ap-age { flex: 0 0 92px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text); }
    .ap-act { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
    .ap-act b { color: var(--text); font-weight: 600; }
    .action-plan .ap-conv .ap-age { color: var(--green); }
    .action-plan .ap-done .ap-age { color: var(--accent); }

    /* full year-by-year withdrawal schedule */
    .sched { margin-top: 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
    .sched > summary { cursor: pointer; padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--text);
      background: var(--surface); list-style: none; user-select: none; }
    .sched > summary::-webkit-details-marker { display: none; }
    .sched > summary::before { content: '▸ '; color: var(--muted); }
    .sched[open] > summary::before { content: '▾ '; }
    /* bridge plan — table (non-scrolling) + graph */
    .bridge-tbl-wrap { padding: 4px 4px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .bridge-tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; }
    .bridge-tbl th { text-align: right; padding: 7px 8px; font-size: 9.5px; font-weight: 600; text-transform: uppercase;
      letter-spacing: .03em; color: var(--muted-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
    .bridge-tbl th:nth-child(3) { text-align: left; }
    .bridge-tbl td { padding: 7px 8px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: top; }
    .bridge-tbl tbody tr:hover td { background: var(--surface); }
    .bridge-tbl tr.bt-gap td { background: rgba(240,112,112,.08); }
    .bt-yr { font-family: var(--font-mono); font-weight: 600; color: var(--text); white-space: nowrap; }
    .bt-yr span { color: var(--muted-2); font-weight: 400; }
    .bt-n { text-align: right; font-family: var(--font-mono); color: var(--muted); white-space: nowrap; }
    .bt-cv { color: var(--green); }
    .bt-cv em { color: var(--orange); font-style: normal; font-size: 10px; }
    .bt-dash { color: var(--muted-2); }
    .bt-draws { display: flex; flex-wrap: wrap; gap: 4px 8px; }
    .bt-src { font-size: 11px; color: var(--muted); white-space: nowrap; }
    .bt-src b { color: var(--text); font-weight: 600; font-family: var(--font-mono); }
    .bt-src.bt-pen { color: var(--red); }
    .bridge-graph { position: relative; height: 210px; margin: 14px 10px 4px; }
    .sched-note { font-size: 10.5px; color: var(--muted-2); line-height: 1.5; padding: 9px 12px; }

    .slider-grid { display: flex; flex-direction: column; gap: 16px; }
    .sl-group { display: flex; flex-direction: column; gap: 8px; }
    .sl-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); }
    .sl-val { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--text); }
    input[type=range] {
      -webkit-appearance: none; appearance: none;
      width: 100%; height: 4px; border-radius: 4px;
      background: linear-gradient(90deg, var(--accent) 0%, var(--accent) var(--fill,50%), rgba(255,255,255,0.1) var(--fill,50%));
      outline: none; cursor: pointer;
    }
    input[type=range]::-webkit-slider-thumb {
      -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
      background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 1.5px var(--accent), 0 2px 8px rgba(99,102,241,0.4);
      transition: transform .12s var(--ease-out);
    }
    input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.12); }
    input[type=range]::-moz-range-thumb {
      width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--bg);
      background: var(--accent); box-shadow: 0 0 0 1.5px var(--accent);
    }
    input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 8px; }

    /* ── Results ── */
    .banner { border-radius: var(--radius-md); padding: 13px 15px; font-size: 13px; font-weight: 500; line-height: 1.45; margin-bottom: 14px; }
    .banner.safe   { background: rgba(45,212,160,0.12); color: var(--green);  border: 1px solid rgba(45,212,160,0.25); }
    .banner.warn   { background: rgba(240,168,50,0.12); color: var(--orange); border: 1px solid rgba(240,168,50,0.25); }
    .banner.danger { background: rgba(240,112,112,0.12); color: var(--red);   border: 1px solid rgba(240,112,112,0.25); }

    .note { font-size: 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 11px 13px; line-height: 1.6; margin-bottom: 14px; }
    .note strong { color: var(--text); }

    .dual-metrics { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
    @media (min-width: 560px) { .dual-metrics { grid-template-columns: 1fr 1fr; } }
    .metric-group { border-radius: var(--radius-lg); padding: 16px; }
    .metric-group.nominal { background: linear-gradient(135deg, rgba(99,102,241,0.16), rgba(99,102,241,0.04)); border: 1px solid rgba(99,102,241,0.28); }
    .metric-group.real { background: var(--surface); border: 1px solid var(--border); }
    .mg-title { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 13px; }
    .mg-title.nom { color: #8b8df4; } .mg-title.real { color: var(--muted-2); }
    .mg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .mg-item .lbl { font-size: 11px; color: var(--muted-2); margin-bottom: 3px; }
    .mg-item .val { font-family: var(--font-mono); font-size: 21px; font-weight: 500; letter-spacing: -0.01em; }
    .mg-item .sub { font-size: 10px; color: var(--muted-2); margin-top: 2px; }

    .tabs { display: flex; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-2); margin-bottom: 14px; }
    .tab-btn { flex: 1; padding: 11px 4px; font-size: 12px; font-weight: 500; text-align: center; color: var(--muted); transition: all .15s var(--ease-out); }
    .tab-btn.active { background: var(--accent); color: #fff; }
    .tab-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

    .legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
    .leg { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
    .leg-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

    .chart-wrap { position: relative; height: clamp(240px, 38vw, 340px); margin-bottom: 18px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }

    .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 14px; }
    .card-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 13px; }
    .acct-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
    .acct-row:last-of-type { border-bottom: none; }
    .acct-lbl { color: var(--muted); }
    .acct-vals { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
    .acct-nom { font-family: var(--font-mono); font-weight: 500; color: #8b8df4; font-size: 14px; }
    .acct-real { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }
    .acct-legend { display: flex; gap: 14px; margin-top: 11px; font-size: 10px; }
    .acct-legend span:first-child { color: #8b8df4; } .acct-legend span:last-child { color: var(--muted-2); }

    .cf-head, .cf-row { display: grid; grid-template-columns: 48px 1fr 1fr 1fr; }
    .cf-head { font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); padding-bottom: 9px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
    .cf-head span:not(:first-child) { text-align: right; }
    .cf-row { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; align-items: center; }
    .cf-row:last-child { border-bottom: none; }
    .cf-age { font-family: var(--font-mono); color: var(--muted-2); font-size: 11px; }
    .cf-pool { font-family: var(--font-mono); font-weight: 500; color: #8b8df4; text-align: right; }
    .cf-nom-mo { font-family: var(--font-mono); font-weight: 500; text-align: right; }
    .cf-real-mo { font-family: var(--font-mono); text-align: right; font-size: 11px; color: var(--muted-2); }

    .disclaimer { font-size: 11px; color: var(--muted-2); text-align: center; margin-top: 24px; line-height: 1.6; }

    /* fade-in */
    @keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
    .page-head, .inputs, .results { animation: fadeUp .45s var(--ease-out) both; }
    .results { animation-delay: .08s; }
