/* QL Retirement — page styles on top of /budget.css (shared cards, grid, module tools, QL Intelligence panel). */
.rt-sub { color: var(--muted); font-size: 12px; margin: -2px 0 10px; line-height: 1.45; }
.chipbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.chipbar .schip b { color: inherit; }
.chipbar .schip small { display: block; font-size: 10px; font-weight: 500; opacity: .8; }
.rtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; margin: 0 0 10px; }
.gauge { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; margin: 0 0 10px; }
.gauge svg { max-width: 96px; }
.gauge .g-l { font-size: 12px; color: var(--muted); line-height: 1.5; }
.gauge .g-l b { color: var(--fg); font-size: 14px; }
.levers { display: grid; gap: 6px; margin: 8px 0 10px; }
.lever { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 76px auto; gap: 8px; align-items: center; font-size: 12px; }
.lever .lb { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lever .tr { position: relative; height: 12px; background: #161b22; border-radius: 4px; overflow: hidden; }
.lever .tr i { position: absolute; top: 0; bottom: 0; }
.lever .vl { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg); white-space: nowrap; }
.lever .btn.small { padding: 2px 8px; font-size: 11px; }
.mstones { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.mstone { display: grid; grid-template-columns: 54px 16px 1fr; gap: 8px; align-items: start; padding: 6px 0; font-size: 12.5px; position: relative; }
.mstone .ma { color: var(--fg); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.mstone .ma small { display: block; color: var(--dim); font-weight: 500; font-size: 10.5px; }
.mstone .md { width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin-top: 4px; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); }
.mstone .mt b { color: var(--text); }
.mstone .mt i { display: block; font-style: normal; color: var(--dim); font-size: 11.5px; }
.mstone.passed { opacity: .55; }
.mstone.key .md { background: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.mstone.bad .md { background: var(--red); box-shadow: 0 0 0 1px var(--red); }
.mstone.bad .mt b { color: var(--red); }
.mstone::before { content: ''; position: absolute; left: 66px; top: 20px; bottom: -6px; width: 1px; background: var(--line); }
.mstone:last-child::before { display: none; }
.rgoal { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; display: grid; gap: 6px; }
.rgoal .gv { font-size: 19px; font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }
.rgoal .gv small { font-size: 12px; color: var(--muted); font-weight: 500; }
.rgoal .gbar { height: 8px; background: #0a0e14; border-radius: 4px; overflow: hidden; }
.rgoal .gbar i { display: block; height: 100%; border-radius: 4px; }
.rgoals { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 0 0 10px; }
.gform { display: grid; grid-template-columns: 1.4fr 1.4fr 1fr auto; gap: 8px; align-items: end; }
.gform label { display: grid; gap: 3px; font-size: 11px; color: var(--dim); }
/* Goals: edit in place, and say what happened (2026-09-14). */
.gu { color: var(--muted); font-weight: 600; }
.gform label .gu { display: inline; }
.rgoal .gacts { display: flex; gap: 6px; margin-top: 2px; }
.rgoal .gacts .btn { padding: 3px 9px; font-size: 11px; }
.rgoal .gacts .btn:hover { border-color: rgba(234,88,12,.55); color: var(--fg); }
.rgoal.editing { border-color: rgba(234,88,12,.5); }
.rgoal .gedit { display: grid; gap: 7px; }
.rgoal .gedit label { display: grid; gap: 3px; font-size: 11px; color: var(--dim); }
.rgoal .gedit input, .rgoal .gedit select { width: 100%; }
.rgoal .gedit .grow { display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.rgoal .gedit .grow .sp { flex: 1; }
.rgoal .gedit .btn.small { padding: 4px 10px; font-size: 11px; }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: rgba(248,81,73,.6); background: rgba(248,81,73,.1); }
/* The add form's one line of feedback used to be dim grey on near-black — an
   error you could not see is an error you did not get. */
.status[data-state="error"] { color: var(--red); }
.status[data-state="ok"] { color: var(--green); }
#goalStatus { margin-top: 8px; }
@media (max-width: 720px) { .gform { grid-template-columns: 1fr 1fr; } }
.isec { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--panel2); }
.isec h3 { margin: 0 0 8px; font-size: 13px; }
.isec .hint { margin: 0 0 8px; }
.inputs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.isec .settings-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.isec label { font-size: 11px; }
.isec label.chk { flex-direction: row; align-items: center; display: flex; gap: 8px; }
.isec label.chk input { width: auto; }
.pill.est { color: var(--yellow); border-color: rgba(210,153,34,.5); }
.plaidrow { margin-top: 6px; }
/* Milestone reminders (step 6) */
.msremind { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 12px; }
.remctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.remctl label { font-size: 11px; color: var(--dim); display: inline-flex; gap: 4px; align-items: center; }
.remctl select { width: auto; }
.remctl label.chk input { width: auto; }
/* Plan report exports (step 5) */
.exportrow { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; background: var(--panel); font-size: 12px; }
.exportrow .status[data-state="error"] { color: var(--red); } .exportrow .status[data-state="ok"] { color: var(--green); } .exportrow .status[data-state="busy"] { color: var(--yellow); }
.exportrow input[type=text] { width: 100%; }
#rt-report { display: none; }
@media print {
  @page { margin: 14mm 12mm; }
  html.rt-printing body > * { display: none !important; }
  html.rt-printing body { background: #fff !important; color: #111 !important; padding: 0 !important; }
  html.rt-printing #rt-report { display: block !important; color: #111; font: 11px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
  .rt-report h1 { font-size: 18px; margin: 0 0 4px; } .rt-report h2 { font-size: 14px; margin: 16px 0 6px; border-bottom: 1px solid #ccc; padding-bottom: 3px; page-break-after: avoid; } .rt-report h3 { font-size: 12px; margin: 10px 0 4px; }
  .rt-report .rt-report-kicker { font-size: 10px; letter-spacing: .08em; color: #666; margin: 0; } .rt-report .rt-report-sub, .rt-report .rt-report-fine, .rt-report .rt-report-note, .rt-report .rt-report-foot { font-size: 9.5px; color: #555; }
  .rt-report table { width: 100%; border-collapse: collapse; margin: 4px 0 8px; page-break-inside: auto; } .rt-report th, .rt-report td { border-bottom: 1px solid #ddd; padding: 3px 5px; text-align: left; vertical-align: top; font-size: 10px; } .rt-report th { background: #f2f2f2; } .rt-report td.k { color: #333; white-space: nowrap; }
  .rt-report figure { margin: 6px 0 10px; page-break-inside: avoid; } .rt-report figure svg { width: 100%; height: auto; max-height: 260px; } .rt-report figcaption { font-size: 9.5px; color: #555; margin-top: 2px; }
  .rt-report blockquote { border-left: 3px solid #999; margin: 4px 0; padding: 4px 8px; color: #333; }
  .rt-report footer { margin-top: 16px; border-top: 1px solid #ccc; padding-top: 6px; }
}
/* Withdrawals & taxes: the numbers under the chart (2026-09-14). */
.wd-sub { margin: 14px 0 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
#wdTiles { margin-top: 12px; }
.wd-phases td, .wd-phases th { padding: 5px 6px; }
.wd-phases tbody tr { transition: background .12s ease; }
.wd-phases tr.tot td { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 700; color: var(--fg); }
/* The caption belongs under the number, not beside it: `.hbar .val` is nowrap,
   so "77% · taxed as ordinary income" on one line pushed the card 15px past the
   viewport at the width where the grid is still two columns. */
#wdSources .hbar { grid-template-columns: minmax(84px, 150px) 1fr minmax(84px, auto); }
#wdSources .hbar .val small { display: block; margin-left: 0; white-space: normal; }
.rmdtag { font-size: 9px; font-weight: 800; letter-spacing: .06em; color: #7ea6d8; border: 1px solid rgba(36,92,156,.7); border-radius: 999px; padding: 0 5px; vertical-align: middle; }
@media (hover: hover) { .wd-phases tbody tr:not(.tot):hover td { background: #141b24; color: var(--fg); } }
@media (prefers-reduced-motion: reduce) { .wd-phases tbody tr { transition: none; } }
.plaidlist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.plaidlist .pill { font-variant-numeric: tabular-nums; }
.pill.seed { color: var(--blue); border-color: rgba(88,166,255,.45); }
.scen-tbl td.num, .scen-tbl th.num { white-space: nowrap; }
.scen-tbl tr.base td { font-weight: 700; color: var(--fg); background: rgba(234,88,12,.06); }
.scen-tbl .btn.small { padding: 2px 8px; font-size: 11px; }
/* Hover affordances on the scenario table + lever list (2026-09-14). A row is
   a live thing you can act on, so it lights up under the pointer and marks
   itself with an orange rail in the first cell; its Apply button — the one
   action on the row — goes solid orange. Hover-driven state is behind
   `@media (hover: hover)` so a tap on a phone doesn't leave a row stuck lit;
   :active and :focus-visible are outside it, so touch and keyboard still get
   feedback (the shared .btn has no focus ring of its own). */
.scen-tbl tbody tr td { transition: background .12s ease, color .12s ease, box-shadow .12s ease; }
.scen-tbl tbody tr td:first-child { box-shadow: inset 0 0 0 0 var(--orange); }
@media (hover: hover) {
  .scen-tbl tbody tr:hover td { background: #141b24; color: var(--fg); }
  .scen-tbl tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 0 var(--orange); }
  .scen-tbl tbody tr:hover td .dim { color: var(--muted); }
  /* The base row already carries an orange tint — deepen it rather than
     replacing it, so "Your plan" still reads as the anchor while hovered. */
  .scen-tbl tbody tr.base:hover td { background: rgba(234,88,12,.12); }
  /* The button is one of fourteen at rest; the hovered row promotes its own. */
  .scen-tbl tbody tr:hover .btn.small { border-color: rgba(234,88,12,.55); color: var(--fg); }
  .lever:hover .lb { color: var(--fg); }
  .lever:hover .btn.small { border-color: rgba(234,88,12,.55); }
  /* Last and most specific ON PURPOSE: you cannot hover the button without
     hovering its row, so the two rules above would otherwise out-specify this
     one and the button would light up only halfway (orange fill, unchanged
     border and text). Both the row-hovered and bare forms are listed. */
  .scen-tbl tbody tr:hover .btn.small:hover, .scen-tbl .btn.small:hover,
  .lever:hover .btn.small:hover, .lever .btn.small:hover {
    background: var(--orange); border-color: var(--orange); color: #fff;
    transform: translateY(-1px); box-shadow: 0 4px 12px rgba(234,88,12,.35);
  }
}
.scen-tbl .btn.small:active, .lever .btn.small:active { transform: translateY(0); box-shadow: none; filter: brightness(.92); }
.scen-tbl .btn.small:focus-visible, .lever .btn.small:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.lever .lb, .lever .btn.small { transition: color .12s ease, border-color .12s ease, background .12s ease, transform .12s ease, box-shadow .12s ease; }
@media (prefers-reduced-motion: reduce) {
  .scen-tbl tbody tr td, .lever .lb, .lever .btn.small { transition: none; }
  .scen-tbl .btn.small:hover, .lever .btn.small:hover { transform: none; }
}
.ord { display: grid; gap: 6px; }
.ord .row { justify-content: space-between; font-size: 12px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); }
.ord .row.on { border-color: rgba(234,88,12,.5); }
.ord .row b { color: var(--fg); font-variant-numeric: tabular-nums; }
.simbadge { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--purple); border: 1px solid rgba(188,140,255,.45); border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }
.sb-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.kpi .v.small { font-size: 18px; }
.ssrow td { font-variant-numeric: tabular-nums; }
.ssrow.on td { color: var(--fg); font-weight: 700; background: rgba(234,88,12,.06); }
/* Claim-age picker (2026-09-15): a chip is a what-if, not a commit — it carries
   the check and what that age does to the odds, and the row under it applies. */
.ssrow[data-claimrow] { cursor: pointer; }
.ssrow[data-claimrow]:hover td { background: rgba(234,88,12,.08); }
.ssrow[data-claimrow]:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.ssrow td .fav, .ssrow td .dim { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-left: 4px; }
.schip.claim { position: relative; text-align: center; padding: 5px 12px; }
.schip.claim .cdelta { display: block; font-style: normal; font-size: 10px; font-weight: 700; margin-top: 1px; color: var(--dim); }
.schip.claim.up .cdelta { color: var(--green); }
.schip.claim.down .cdelta { color: var(--red); }
.schip.claim[aria-pressed="true"] { box-shadow: 0 0 0 1px var(--orange) inset; }
.pickbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; min-height: 26px; }
.pickbar .pickline { font-size: 12.5px; color: var(--text); flex: 1 1 100%; }
.pickbar .pickline b { color: var(--fg); }
@media (max-width: 720px) { .schip.claim { padding: 4px 9px; } }
.tl-marker { font-size: 10px; }
@media (max-width: 720px) { .lever { grid-template-columns: 100px 1fr 60px auto; } .gauge { grid-template-columns: 80px 1fr; } }
/* 401(k) & linked accounts performance (step 7) */
.perf-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.perf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 8px 0 10px; align-items: start; }
.perf-grid h3 { margin: 0 0 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.perf-grid table { font-size: 12px; } .perf-grid td, .perf-grid th { padding: 4px 5px; }
.perf-grid .alloc { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #161b22; margin: 4px 0 6px; } .perf-grid .alloc i { display: block; height: 100%; }
.perf-grid .lg { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--muted); } .perf-grid .lg b { color: var(--fg); font-weight: 600; }
.perf-cta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 0 6px; font-size: 13px; color: var(--muted); }
.up { color: var(--green); } .dn { color: var(--red); }
.inputs-save { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; font-size: 12px; }
.perf-acct-tax td { color: var(--dim); }

/* ── Saved plan profiles (2026-09-15) ───────────────────────────────────── */
.profilebar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.profilebar > span:first-child { color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: 11px; font-weight: 700; }
.profilebar select { width: auto; max-width: 260px; font-size: 13px; padding: 4px 8px; }
.profilebar .pcount { color: var(--muted); font-size: 11px; }
.profilebar .lock { color: var(--yellow); font-size: 11px; }
.profilebar .pmenu { position: relative; display: inline-block; }
.profilebar .pmenu-list { position: absolute; top: 100%; left: 0; z-index: 30; min-width: 220px; margin-top: 4px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.35); padding: 6px; display: none; }
.profilebar .pmenu.open .pmenu-list { display: block; }
.profilebar .pmenu-list button { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 12.5px; }
.profilebar .pmenu-list button:hover { background: rgba(255,255,255,.06); }
.profilebar .pmenu-list small { display: block; color: var(--muted); font-size: 11px; }

/* ── Recommended next moves ─────────────────────────────────────────────── */
.recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 6px; }
.rec { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 12px 12px 10px 14px; background: rgba(255,255,255,.02); display: flex; flex-direction: column; gap: 6px; }
.rec::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--blue); }
.rec.cat-timing::before { background: var(--purple); } .rec.cat-savings::before { background: var(--green); } .rec.cat-income::before { background: var(--blue); }
.rec.cat-spending::before { background: var(--yellow); } .rec.cat-taxes::before { background: #d95926; } .rec.cat-allocation::before { background: #9085e9; }
.rec.cat-resilience::before { background: #c98500; } .rec.cat-upside::before { background: #199e70; } .rec.cat-info::before { background: var(--muted); }
.rec .rh { display: flex; align-items: baseline; gap: 8px; }
.rec .rn { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--muted); }
.rec .rt { font-weight: 700; font-size: 13.5px; color: #f0f6fc; }
.rec .rw { font-size: 12px; color: var(--muted); line-height: 1.45; }
.rec .ri { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.rec .ri b { font-size: 11px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); font-weight: 700; }
.rec .ri b.up { color: var(--green); } .rec .ri b.dn { color: #f85149; } .rec .ri b.cat { color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }
.rec .ra { display: flex; gap: 6px; margin-top: 4px; align-items: center; }
.rec .ra .dim { font-size: 11px; }
.rec.applied { border-color: rgba(63,185,80,.5); }

/* ── Scenario explorer ──────────────────────────────────────────────────── */
.explorer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 6px; }
.smallmult { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 6px; background: rgba(255,255,255,.02); }
.smallmult h4 { margin: 0 0 2px; font-size: 12px; font-weight: 700; color: #f0f6fc; display: flex; justify-content: space-between; gap: 8px; }
.smallmult h4 small { color: var(--muted); font-weight: 500; }
.smallmult .sub { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.exsub { margin: 16px 0 4px; font-size: 13px; font-weight: 700; color: #f0f6fc; }
.explorer-grid svg text { font-size: 9px; }

/* ── Your data note ─────────────────────────────────────────────────────── */
.privacy { font-size: 12px; color: var(--muted); line-height: 1.5; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; margin: 10px 0; }
.privacy b { color: #f0f6fc; }
.privacy .btn { margin-left: 6px; }

/* ── "Save my inputs" (2026-09-17): hover lift, a saving state, a ✓ Saved flash ───────────
   The button is .btn.small.primary from budget.css; the shared .btn:hover only greys the border, which on an orange
   fill reads as nothing happening. Same lift-and-shadow language as the lever / scenario buttons above. */
#btnSaveInputs { transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease, filter .15s ease; }
@media (hover: hover) {
  #btnSaveInputs:hover:not(:disabled) { background: #f97316; border-color: #f97316; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(234,88,12,.35); }
}
#btnSaveInputs:active:not(:disabled) { transform: translateY(0); box-shadow: none; filter: brightness(.92); }
#btnSaveInputs:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
#btnSaveInputs.is-saving { opacity: .85; cursor: progress; }
#btnSaveInputs.is-saved, #btnSaveInputs.is-saved:hover { background: var(--green); border-color: var(--green); color: #0b0f14; transform: none; box-shadow: 0 0 0 4px rgba(63,185,80,.22); }
#inputsSaved[data-state="ok"] { color: var(--green); }
#inputsSaved[data-state="err"] { color: var(--red); }
@media (prefers-reduced-motion: reduce) {
  #btnSaveInputs { transition: none; }
  #btnSaveInputs:hover:not(:disabled) { transform: none; }
}

/* A blocked interaction has to answer where the click happened. #banner sits at
   the very top of this page; by the time a reader is choosing a Roth bracket or
   editing a goal it is thousands of pixels away, so writing there and returning
   reads as a dead button. This lands in the viewport, carries the one action
   that fixes it, and never traps focus or blocks the content underneath. */
.rtoast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(10px); z-index: 60; display: none; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 32px)); background: #161b22; border: 1px solid #30363d; border-radius: 12px; padding: 11px 12px 11px 15px; box-shadow: 0 18px 44px rgba(0,0,0,.55); color: #e6edf3; font-size: 13px; line-height: 1.45; opacity: 0; transition: opacity .18s ease, transform .18s ease; }
.rtoast.show { display: flex; opacity: 1; transform: translateX(-50%) translateY(0); }
.rtoast .rtoast-msg { flex: 1; min-width: 0; }
.rtoast .btn { white-space: nowrap; flex: none; }
.rtoast .rtoast-x { flex: none; background: none; border: 0; color: var(--muted, #9aa4b2); font-size: 13px; line-height: 1; cursor: pointer; padding: 4px 2px; }

/* ── Social Security statement upload modal & provenance bar ───────────── */
.ss-head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 12px; }
.ssa-modal-bg { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.72); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ssa-modal-bg[hidden] { display: none; }
.ssa-modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel, #0d1117); border: 1px solid var(--line, #30363d); border-radius: 14px; padding: 18px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.65); display: flex; flex-direction: column; gap: 12px; }
.ssa-mhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ssa-mhead h3 { margin: 0; font-size: 16px; color: #f0f6fc; }
.ssa-target-row, .ssa-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ssa-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 24px 16px; border: 1.5px dashed var(--line, #30363d); border-radius: 12px; background: rgba(255,255,255,.02); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.ssa-drop:hover, .ssa-drop.drag { border-color: var(--orange, #ea580c); background: rgba(234,88,12,.08); }
.ssa-drop-ico { font-size: 26px; line-height: 1; }
.ssa-drop-title { font-size: 13.5px; font-weight: 700; color: #f0f6fc; }
.ssa-drop-sub { font-size: 12px; color: var(--muted, #8b949e); }
.ssa-howto { margin-top: 8px; font-size: 12px; color: var(--muted, #8b949e); border: 1px solid var(--line, #30363d); border-radius: 8px; padding: 8px 10px; background: rgba(255,255,255,.015); }
.ssa-howto summary { cursor: pointer; font-weight: 600; color: #c9d1d9; }
.ssa-howto ol { margin: 6px 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 4px; line-height: 1.45; }
#ssaPasteInput { width: 100%; box-sizing: border-box; background: var(--panel2, #161b22); color: #f0f6fc; border: 1px solid var(--line, #30363d); border-radius: 8px; padding: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; resize: vertical; }
.ssa-status { font-size: 12.5px; min-height: 16px; }
.ssa-status.err { color: var(--red, #f85149); }
.ssa-status.ok { color: var(--green, #3fb950); }
.ssa-preview { border: 1px solid rgba(63,185,80,.4); background: rgba(63,185,80,.05); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ssa-phead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ssa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .ssa-grid { grid-template-columns: 1fr; } }
.ssa-tile { background: var(--panel2, #161b22); border: 1px solid var(--line, #30363d); border-radius: 8px; padding: 8px 10px; }
.ssa-tile .k { font-size: 11px; color: var(--muted, #8b949e); }
.ssa-tile .v { font-size: 16px; font-weight: 800; color: #f0f6fc; margin-top: 2px; }
.ssa-tile .s { font-size: 10.5px; color: var(--muted, #8b949e); margin-top: 2px; }
.ssa-override { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.ssa-override label { font-size: 12px; color: #c9d1d9; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 190px; }
.ssa-override label.chk { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 6px; }
.ssa-earnings { font-size: 12px; color: #c9d1d9; line-height: 1.45; }
.ssa-warn { font-size: 11.5px; color: var(--yellow, #d29922); background: rgba(210,153,34,.08); border: 1px solid rgba(210,153,34,.35); border-radius: 8px; padding: 8px 10px; line-height: 1.45; }
.ssa-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ssa-privacy { font-size: 11.5px; color: var(--muted, #8b949e); border-top: 1px solid var(--line, #30363d); padding-top: 10px; line-height: 1.45; }

/* ── SSA Earnings Record & Zero-Year Replacement Simulator ─────────────── */
.ss-earn-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line, #30363d); display: flex; flex-direction: column; gap: 10px; }
.ss-earn-box[hidden] { display: none; }
.ss-earn-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ss-earn-head h3 { margin: 0; font-size: 13.5px; font-weight: 700; color: #f0f6fc; }
.ss-earn-sliders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; background: rgba(255,255,255,.02); border: 1px solid var(--line, #30363d); border-radius: 10px; padding: 10px 12px; }
@media (max-width: 560px) { .ss-earn-sliders { grid-template-columns: 1fr; } }
.ss-earn-slider label { display: flex; justify-content: space-between; font-size: 12px; color: #c9d1d9; margin-bottom: 4px; }
.ss-earn-slider label b { color: #f0f6fc; font-variant-numeric: tabular-nums; }
.ss-earn-slider input[type="range"] { width: 100%; accent-color: var(--orange, #ea580c); cursor: pointer; }
.ss-earn-chart { width: 100%; overflow-x: auto; }
.ss-earn-chart svg { display: block; width: 100%; height: auto; }
.ss-earn-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted, #8b949e); align-items: center; }
.ss-earn-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.ss-earn-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Couples Spousal & Survivor Social Security Optimizer ─────────────── */
.ss-couple-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line, #30363d); display: flex; flex-direction: column; gap: 10px; }
.ss-couple-box[hidden] { display: none; }
.ss-couple-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ss-couple-head h3 { margin: 0; font-size: 13.5px; font-weight: 700; color: #f0f6fc; }
.ss-cmat { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 11.5px; }
.ss-cmat th { color: var(--muted, #8b949e); font-weight: 600; text-align: center; padding: 4px 6px; }
.ss-cmat th.rowh { text-align: right; white-space: nowrap; }
.ss-cmat td { padding: 0; }
.ss-cmat button.cmcell { width: 100%; border: 1px solid var(--line, #30363d); border-radius: 7px; padding: 6px 5px; background: rgba(255,255,255,.025); color: #e6edf3; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; font-variant-numeric: tabular-nums; transition: border-color .14s ease, transform .12s ease; }
.ss-cmat button.cmcell:hover { border-color: var(--orange, #ea580c); transform: translateY(-1px); }
.ss-cmat button.cmcell.best { border-color: rgba(63,185,80,.7); background: rgba(63,185,80,.13); }
.ss-cmat button.cmcell.cur { border-color: var(--orange, #ea580c); box-shadow: inset 0 0 0 1px rgba(234,88,12,.45); }
.ss-cmat button.cmcell b { font-size: 12px; color: #f0f6fc; }
.ss-cmat button.cmcell small { font-size: 10px; color: var(--muted, #8b949e); }
.ss-cmat button.cmcell small.up { color: var(--green, #3fb950); }
.ss-cmat button.cmcell small.dn { color: var(--red, #f85149); }
.ss-couple-tbl td, .ss-couple-tbl th { font-size: 12px; }
.rtoast .rtoast-x:hover { color: #e6edf3; }
/* Clear of the "Ask QL Intelligence" launcher on narrow screens. */
@media (max-width: 720px) { .rtoast { bottom: 88px; left: 16px; right: 16px; transform: none; max-width: none; } .rtoast.show { transform: none; } }
@media (prefers-reduced-motion: reduce) { .rtoast { transition: none; } }
