/* Public Retirement Planner: shared styles for every page.
   Layout: a calm single column (760px) under a light menu bar. Built for readers in their 50s, 60s and 70s:
   big type, high contrast, large tap targets, no sliders, nothing hidden behind hover. The look is soft and
   modern (white cards, gentle shadows, rounded corners) without giving up contrast: text and control borders
   meet WCAG AA in both color schemes.
   Reader settings live on <html>: data-theme (light | dark | none = match device), data-size (1 | 2 | 3), data-font (clear | book | wide). */
:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-2: #f6f9f7;      /* quiet fill for secondary boxes */
  --ink: #12201a;
  --muted: #45544d;          /* 8:1 on white, so secondary text stays readable */
  --line: #dbe3df;           /* card edges */
  --line-strong: #85968e;    /* form controls: 3:1 on white */
  --accent: #176b43;         /* forest green, 6:1 on white */
  --accent-strong: #105335;
  --on-accent: #ffffff;
  --accent-soft: #e6f2eb;
  --ring: rgba(23, 107, 67, .28);
  --answer: #fff7e3;         /* warm highlight behind the main answer */
  --answer-line: #e7c164;
  --caution: #8a4b00;
  --caution-soft: #fdf0dc;
  --stop: #a3221b;
  --stop-soft: #fce6e4;
  --head-bg: #ffffff;        /* menu bar */
  --shadow-sm: 0 1px 2px rgba(18, 32, 26, .05), 0 1px 3px rgba(18, 32, 26, .07);
  --shadow: 0 2px 4px rgba(18, 32, 26, .04), 0 8px 24px rgba(18, 32, 26, .08);
  --shadow-lg: 0 20px 48px rgba(18, 32, 26, .16), 0 2px 6px rgba(18, 32, 26, .06);
  --radius: 20px;
  --radius-sm: 14px;
  --c-pension: #1b6b45;      /* income stream colors, always paired with a written label */
  --c-iap: #c98f1c;
  --c-ss: #2f6690;
  --c-spouse: #7a4a8c;
  --c-supp: #5b7f2a;
  --font-head: "Lexend", "Atkinson Hyperlegible", Verdana, Tahoma, sans-serif;
  --font-body: "Atkinson Hyperlegible", Verdana, Tahoma, sans-serif;
  --size: 19px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1412; --surface: #161f1b; --surface-2: #1b2521; --ink: #eef5f1; --muted: #bccac3; --line: #2a3832; --line-strong: #6f8279;
    --accent: #72d29e; --accent-strong: #95e0b7; --on-accent: #0a1a11; --accent-soft: #1a3226; --ring: rgba(114, 210, 158, .3);
    --answer: #2c2410; --answer-line: #b8923a; --caution: #f3b866; --caution-soft: #33260f; --stop: #ff9b92; --stop-soft: #3a1916;
    --head-bg: #131b18; --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 8px 24px rgba(0, 0, 0, .35); --shadow-lg: 0 20px 48px rgba(0, 0, 0, .55);
    --c-pension: #5fbf8a; --c-iap: #e0b54e; --c-ss: #8ab9e3; --c-spouse: #c9a0db; --c-supp: #a9cf6e; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1412; --surface: #161f1b; --surface-2: #1b2521; --ink: #eef5f1; --muted: #bccac3; --line: #2a3832; --line-strong: #6f8279;
  --accent: #72d29e; --accent-strong: #95e0b7; --on-accent: #0a1a11; --accent-soft: #1a3226; --ring: rgba(114, 210, 158, .3);
  --answer: #2c2410; --answer-line: #b8923a; --caution: #f3b866; --caution-soft: #33260f; --stop: #ff9b92; --stop-soft: #3a1916;
  --head-bg: #131b18; --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 8px 24px rgba(0, 0, 0, .35); --shadow-lg: 0 20px 48px rgba(0, 0, 0, .55);
  --c-pension: #5fbf8a; --c-iap: #e0b54e; --c-ss: #8ab9e3; --c-spouse: #c9a0db; --c-supp: #a9cf6e; color-scheme: dark;
}
:root[data-size="2"] { --size: 22px; }
:root[data-size="3"] { --size: 26px; }
:root[data-font="book"] { --font-body: "Source Serif 4", Georgia, "Times New Roman", serif; }
:root[data-font="wide"] { --font-body: "Lexend", Verdana, Tahoma, sans-serif; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: var(--size); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.page { max-width: 760px; margin: 0 auto; padding-block: 0 3rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; margin: 0; line-height: 1.22; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.12rem; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--accent-strong); }
strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); color: var(--ink); padding: .6rem 1rem; z-index: 40; font-weight: 700; border-radius: 0 0 12px 0; }
.skip:focus { left: 16px; }

/* ---------- menu bar ---------- */
.site-head { background: var(--head-bg); color: var(--ink); border-bottom: 1px solid var(--line); position: relative; z-index: 30; }
.site-head .headbar { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; padding-block: .55rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; margin-right: auto; padding-block: .35rem; line-height: 1.2; }
.brand:hover { color: var(--ink); }
.brand-mark { flex: none; width: 2.1rem; height: 2.1rem; border-radius: 11px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.brand-mark svg { width: 62%; height: 62%; }
/* Top menu: plain links plus groups that open a panel of cards on click or tap (never on hover). */
.site-nav { order: 5; flex-basis: 100%; }
.nav-list { list-style: none; margin: 0 0 0 -.7rem; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem; }
.nav-top { color: var(--ink); background: none; border: 0; font: inherit; font-size: .98rem; font-weight: 700; text-decoration: none; padding: .45rem .75rem; border-radius: 12px; min-height: 48px; display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.nav-top:hover { background: var(--surface-2); color: var(--ink); }
.nav-top[aria-current="page"], .nav-group.has-current > .nav-top { color: var(--accent); background: var(--accent-soft); }
.nav-top[aria-expanded="true"] { background: var(--accent); color: var(--on-accent); }
.chev { flex: none; width: .75em; height: .5em; opacity: .8; transition: transform .15s; }
.nav-top[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-panel { position: absolute; left: max(12px, calc((100% - 1080px) / 2)); right: max(12px, calc((100% - 1080px) / 2)); top: calc(100% + 8px); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1.2rem 1.3rem 1.3rem; }
.nav-intro { color: var(--muted); margin-bottom: .8rem; font-size: .95rem; }
.nav-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .7rem; }
.nav-card { display: grid; align-content: start; gap: .3rem; height: 100%; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); text-decoration: none; transition: background .15s, border-color .15s; }
.nav-card strong { color: var(--ink); font-size: 1.04rem; line-height: 1.3; }
.nav-card strong::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .5em; border-radius: 50%; background: var(--accent); vertical-align: .12em; }
.nav-card span { color: var(--muted); font-size: .93rem; line-height: 1.45; }
.nav-card:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.nav-card[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent); }
.nav-card[aria-current="page"] strong::after { content: " · You're here"; color: var(--muted); font-weight: 400; font-size: .9rem; }
.head-btn { font-family: var(--font-body); font-size: .95rem; font-weight: 700; min-height: 48px; padding: .4rem 1rem; border-radius: 999px; border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; box-shadow: var(--shadow-sm); }
.head-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.head-btn[aria-expanded="true"] { background: var(--accent-strong); }
.menu-btn { display: none; }
:root[data-theme="dark"] .q-sun { display: none; }
:root[data-theme="dark"] .q-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .q-sun { display: none; } :root:not([data-theme="light"]) .q-moon { display: block; } }
/* Reading settings: three labeled icon buttons that are always in the bar. Each tap moves to the next choice. */
.quick { display: flex; gap: .4rem; }
.quick-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-width: 64px; min-height: 56px; padding: .3rem .45rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--ink); font-family: var(--font-body); cursor: pointer; line-height: 1; transition: background .15s, border-color .15s; }
.quick-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.q-ico { height: 26px; display: inline-flex; align-items: flex-end; justify-content: center; font-weight: 700; color: var(--accent); }
.q-label { font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--muted); }
.q-size { font-family: "Atkinson Hyperlegible", Verdana, sans-serif; font-size: 15px; gap: 1px; }
.q-size b { font-size: 25px; line-height: .9; }
:root[data-size="2"] .quick-btn[data-cycle="size"], :root[data-size="3"] .quick-btn[data-cycle="size"] { background: var(--accent-soft); border-color: var(--accent); }
.q-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; align-self: center; }
.q-moon { display: none; fill: currentColor !important; stroke: none !important; }
.q-font { font-size: 22px; font-family: "Atkinson Hyperlegible", Verdana, sans-serif; }
:root[data-font="book"] .q-font { font-family: "Source Serif 4", Georgia, serif; }
:root[data-font="wide"] .q-font { font-family: "Lexend", Verdana, sans-serif; letter-spacing: .06em; }
.quick-status { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 20px; white-space: nowrap; padding: .65rem 1.2rem; border-radius: 999px; box-shadow: var(--shadow-lg); pointer-events: none; }
@media (max-width: 940px) {
  .site-head .headbar { column-gap: .5rem; }
  .brand { flex-basis: 100%; }
  .menu-btn { display: inline-flex; order: 1; min-height: 56px; font-size: 18px; gap: .4rem; padding-inline: .85rem 1.05rem; }
  .quick { order: 2; margin-left: auto; gap: .3rem; }
  .quick-btn { min-width: 60px; padding-inline: .3rem; }
  .site-nav { display: none; width: 100%; padding-bottom: .5rem; }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; gap: .15rem; margin-left: 0; }
  .nav-top { width: 100%; justify-content: space-between; font-size: 1.08rem; text-align: left; }
  .nav-top[aria-expanded="true"] { border-radius: 12px 12px 0 0; }
  .nav-panel { position: static; box-shadow: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); border-top: 0; padding: .9rem; margin-bottom: .4rem; }
  .nav-cards { grid-template-columns: minmax(0, 1fr); gap: .55rem; }
}

/* ---------- page intro ---------- */
.intro { padding-block: 2rem 1rem; display: grid; gap: .8rem; }
.intro p { color: var(--muted); max-width: 60ch; }
.plainnote { background: var(--caution-soft); border: 1px solid color-mix(in srgb, var(--caution) 25%, transparent); padding: .9rem 1.1rem; border-radius: var(--radius-sm); }
.plainnote strong { color: var(--caution); }

/* ---------- step-by-step questions ---------- */
.progress { display: grid; gap: .45rem; margin-block: 1rem .9rem; }
.progress .label { font-weight: 700; color: var(--muted); font-size: .9rem; }
.progress .track { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress .fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width .25s; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem; display: grid; gap: 1.15rem; }
.q .why { color: var(--muted); }
.opts { display: grid; gap: .65rem; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .1rem .8rem; align-items: start; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: .9rem 1rem; min-height: 56px; transition: border-color .15s, background .15s; }
.opt:hover span { border-color: var(--line-strong); }
.opt span::before { content: ""; grid-row: 1 / 3; width: 1.3rem; height: 1.3rem; margin-top: .2rem; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.opt b { font-size: 1.05rem; }
.opt em { font-style: normal; color: var(--muted); font-size: .92rem; }
.opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.opt input:checked + span::before { border: 2px solid var(--accent); background: radial-gradient(var(--accent) 0 42%, var(--surface) 47%); }
.opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.field { display: grid; gap: .35rem; align-content: start; }
.field label { font-weight: 700; }
.fields > .infobox { grid-column: 1 / -1; }
.field .help { color: var(--muted); font-size: .88rem; }
.money, .plain { position: relative; }
.money::before { content: "$"; position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
input[type="number"], select { width: 100%; font-family: var(--font-body); font-size: 1.15rem; font-weight: 700; padding: .65rem .85rem; min-height: 56px; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s; }
.money input { padding-left: 1.85rem; }
input[type="number"]:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); outline: none; }
.tip { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .85rem 1.05rem; font-size: .92rem; }
.tip strong { color: var(--accent); }
.preview { font-weight: 700; font-size: 1.05rem; }
.sub { display: grid; gap: 1rem; border-left: 3px solid var(--accent-soft); padding-left: 1rem; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; cursor: pointer; justify-self: start; text-align: left; min-height: 44px; }
.err { color: var(--stop); font-weight: 700; }
.nav { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-top: 1.2rem; }
.btn { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; min-height: 56px; padding: .7rem 1.7rem; border-radius: 999px; border: 2px solid transparent; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; transition: background .15s, box-shadow .15s, color .15s; }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 4px 12px var(--ring); }
.btn.primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn.secondary { background: var(--surface); color: var(--accent); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- results ---------- */
#results { padding-top: 1.6rem; }
.answer { background: var(--answer); border: 1px solid var(--answer-line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem; display: grid; gap: 1rem; }
.answer .lead { font-size: 1.3rem; line-height: 1.45; }
.answer .lead big { display: block; font-family: var(--font-head); font-size: 2.6rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin-block: .35rem; }
.answer .more { display: grid; gap: .45rem; }
.status { display: flex; gap: .7rem; align-items: flex-start; border-radius: var(--radius-sm); padding: .85rem 1rem; font-weight: 700; }
.status.full { background: var(--accent-soft); color: var(--ink); }
.status.early { background: var(--caution-soft); }
.status.no { background: var(--stop-soft); }
.status .ico { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; color: var(--surface); margin-top: .1rem; }
.status.full .ico { background: var(--accent); } .status.early .ico { background: var(--caution); } .status.no .ico { background: var(--stop); }
.section { margin-top: 1.8rem; display: grid; gap: .8rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.3rem; display: grid; gap: .8rem; min-width: 0; }

/* income timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.stopi { position: relative; padding: 0 0 1.6rem 2rem; border-left: 3px solid var(--line); margin-left: .6rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .45rem; min-width: 0; }
.stopi:last-child { border-left-color: transparent; padding-bottom: 0; }
.stopi::before { content: ""; position: absolute; left: -.9rem; top: .1rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--accent); border: 4px solid var(--surface); box-shadow: 0 0 0 2px var(--accent); }
.stopi.note::before { background: var(--surface); box-shadow: 0 0 0 2px var(--line-strong); }
.stopi .when { font-weight: 700; color: var(--muted); font-size: .92rem; }
.stopi .total { font-family: var(--font-head); font-size: 1.55rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.stopi .total small { font-family: var(--font-body); font-size: .95rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.bar { display: flex; height: 1.3rem; border-radius: 99px; overflow: hidden; background: var(--line); max-width: 100%; }
.bar i { display: block; height: 100%; }
.bar i + i { border-left: 2px solid var(--surface); }
.parts { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .95rem; }
.parts span { display: inline-flex; align-items: center; gap: .45rem; }
.sw { width: .95rem; height: .95rem; border-radius: 4px; flex: none; }
.k-pension { background: var(--c-pension); } .k-iap { background: var(--c-iap); } .k-ss { background: var(--c-ss); } .k-spouse { background: var(--c-spouse); } .k-supp { background: var(--c-supp); }

/* tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .88rem; color: var(--muted); border-bottom-width: 2px; }
td.amt { font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
td .date { display: block; font-size: .85rem; color: var(--muted); }
tr.picked td { background: var(--answer); }
tr.fullrow td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; padding: .12rem .6rem; border-radius: 99px; background: var(--accent-soft); color: var(--ink); white-space: nowrap; }
.tag.cut { background: var(--caution-soft); }
td .pick { font-family: var(--font-body); font-weight: 700; font-size: .9rem; min-height: 44px; padding: .3rem .95rem; border-radius: 999px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--accent); cursor: pointer; white-space: nowrap; }
td .pick:hover { border-color: var(--accent); background: var(--accent-soft); }
tr.picked .pick { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 560px) {
  table.stack thead { display: none; }
  table.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: .2rem .6rem; padding: .75rem .2rem; border-bottom: 1px solid var(--line); }
  table.stack td { border: 0; padding: 0; }
  table.stack tr.picked { background: var(--answer); border-radius: 12px; padding-inline: .6rem; }
  table.stack tr.picked td { background: transparent; }
  table.stack td:first-child { grid-column: 1; font-weight: 700; }
  table.stack td:last-child { grid-column: 2; grid-row: 1; justify-self: end; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: .8rem; font-weight: 400; color: var(--muted); }
  table.stack.text tr { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  table.stack.text td:last-child { grid-column: 1; grid-row: auto; justify-self: stretch; }
}

ol.next { margin: 0; padding-left: 1.4rem; display: grid; gap: .7rem; }
ol.next li::marker { font-weight: 700; color: var(--accent); }
.phone { font-weight: 700; font-size: 1.15rem; white-space: nowrap; user-select: all; }
.email { font-weight: 700; font-size: 1.15rem; overflow-wrap: anywhere; }

/* fold-out math */
details.how { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
details.how > summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 700; font-size: 1.08rem; min-height: 60px; display: flex; align-items: center; gap: .7rem; color: var(--accent); list-style: none; border-radius: var(--radius); }
details.how > summary:hover { background: var(--surface-2); }
details.how > summary::marker { content: ""; }
details.how > summary::-webkit-details-marker { display: none; }
details.how > summary::before { content: "+"; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--accent-soft); flex: none; }
details.how[open] > summary::before { content: "−"; }
.how-body { padding: 0 1.25rem 1.25rem; display: grid; gap: .9rem; }
.steps { margin: 0; padding-left: 1.4rem; display: grid; gap: .8rem; }
.steps .calc { display: block; color: var(--muted); font-size: .92rem; }
.steps .src { display: block; font-size: .85rem; }
.sources { margin: 0; padding-left: 1.4rem; display: grid; gap: .5rem; font-size: .92rem; }

/* ---------- articles and plain pages ---------- */
.prose { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-block: 2rem 0; }
.prose p, .prose li { max-width: 64ch; }
.prose h2 { margin-top: 1.2rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.4rem; display: grid; gap: .45rem; }
.prose .byline { color: var(--muted); font-size: .9rem; }
.prose table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); border-collapse: separate; border-spacing: 0; overflow: hidden; box-shadow: var(--shadow-sm); }
.prose th { background: var(--surface-2); }
.prose th, .prose td { padding-inline: .9rem; }
.prose tr:last-child td { border-bottom: 0; }
.shortanswer { background: var(--answer); border: 1px solid var(--answer-line); border-radius: var(--radius); padding: 1.2rem 1.4rem; display: grid; gap: .5rem; }
.shortanswer .label { font-weight: 700; color: var(--caution); text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; }
.toolcta { background: var(--accent-soft); border-radius: var(--radius); padding: 1.3rem 1.4rem; display: grid; gap: .8rem; justify-items: start; }
.cards { display: grid; gap: 1rem; }
.card { display: grid; gap: .5rem; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.4rem; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.card p { color: var(--muted); }
.card .go { justify-self: start; margin-top: .4rem; color: var(--accent); font-weight: 700; }
.card .go::after { content: " →"; }
.card:hover .go { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.card .label { font-size: .82rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- footer ---------- */
.site-foot { margin-top: 3rem; background: var(--surface); border-top: 1px solid var(--line); }
.site-foot .inner { max-width: 760px; margin: 0 auto; padding-block: 1.6rem 2.2rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: .8rem; color: var(--muted); font-size: .9rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; }
.foot-links a { font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .card:hover { transform: none; } }
@media (max-width: 520px) { .q, .answer, .panel { padding: 1.1rem; } .answer .lead big { font-size: 2.1rem; } .btn { flex: 1 1 auto; } .stopi { padding-left: 1.4rem; } .infobox { padding: .85rem .9rem; } .stopi > .infobox { margin-left: calc(-1.4rem - 3px - .6rem); } h1 { font-size: 1.65rem; } }

/* ---------- printing: one clean plan ---------- */
.print-only { display: none; }
/* "i" buttons and the explanations they open (assets/info.js). The visible circle is small; the tap area is 44px. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button.info { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; width: 44px; height: 44px; margin: -.5rem 0 -.5rem .15rem; padding: 0; border: 0; background: none; cursor: pointer; color: var(--accent); font: inherit; }
button.info > span { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--accent-soft); border: 1.5px solid currentColor; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; font-size: .95rem; line-height: 1; }
button.info:hover > span, button.info[aria-expanded="true"] > span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
button.info:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; border-radius: 50%; }
.infobox { margin: .5rem 0 .8rem; padding: 1.05rem 1.2rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: 1rem; font-weight: 400; font-family: var(--font-body); line-height: 1.6; letter-spacing: 0; text-align: left; display: grid; grid-template-columns: minmax(0, 1fr); gap: .55rem; max-width: 46rem; min-width: 0; overflow-wrap: break-word; }
.infobox p, .infobox ul { margin: 0; }
.infobox ul { padding-left: 1.3rem; display: grid; gap: .25rem; }
.infobox .info-title { font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; }
.infobox .formula { font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .75rem; }
.infobox .info-src { font-size: .95rem; }
.infobox .info-links a { overflow-wrap: anywhere; }
.infobox .info-close { justify-self: start; min-height: 48px; padding: .4rem 1.4rem; }

/* Retirement countdown checklist */
.checktools { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
.checkcount { font-weight: 700; }
.checklist { list-style: none; padding: 0 !important; display: grid; gap: .75rem !important; }
.checklist > li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem .85rem; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 1.05rem 1.15rem; max-width: none; transition: background .15s, border-color .15s; }
.checklist input[type="checkbox"] { width: 30px; height: 30px; margin: .1rem 0 0; accent-color: var(--accent); cursor: pointer; }
.checklist .step-title label { font-weight: 700; font-size: 1.08rem; cursor: pointer; }
.checklist > li:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: none; }
.checklist > li:has(input:checked) .step-title label { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.checklist > li > p, .checklist > li > .infobox { grid-column: 1 / -1; margin: 0; }

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --muted: #333; --line: #999; --answer: #fff; --accent: #000; --accent-soft: #eee; --caution-soft: #f3f3f3; --shadow-sm: none; --shadow: none; --shadow-lg: none; --size: 13pt; color-scheme: light; }
  body { background: #fff; color: #000; }
  .site-head, .quick-status, .site-foot .foot-links, .no-print, .nav, .pick, .skip, button.info, .infobox { display: none !important; }
  .print-only { display: block; }
  details.how > .how-body { display: grid !important; }
  details.how > summary::before { display: none; }
  .section, .answer, .panel, .stopi { break-inside: avoid; }
  a { color: #000; }
  .bar i { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .sw { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* page-level disclaimer under a tool */
.legal { margin-top: 2.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; display: grid; gap: .6rem; }
