/* The planner (all five apps). The same white, tight-type look as the site, sized for reading glasses:
   18px text, 52px buttons, high contrast, nothing that only appears on hover. */
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #ffffff;
  --page: #f7f7f5;
  --surface: #f3f3f1;
  --surface-2: #e9e9e6;
  --card: #ffffff;
  --ink: #111111;
  --ink-2: #4a4a47;
  --ink-3: #6b6b67;
  --line: rgba(0, 0, 0, .09);
  --line-2: rgba(0, 0, 0, .16);
  --pill: #111111;
  --pill-ink: #ffffff;
  --pill-2: #ececea;
  --pill-2-hover: #e2e2df;
  --good: #0a7a3f;
  --good-bg: #e7f5ec;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --bad: #c0302f;
  --bad-bg: #fdecec;
  --focus: #2a78d6;
  --spectrum: linear-gradient(95deg, #0b7a5a 0%, #1f78c8 40%, #5b3df5 75%, #a821e8 100%);
  /* Chart roles (validated: dataviz palette, light). */
  --c-pretax: #eb6834;
  --c-roth: #1baf7a;
  --c-taxable: #2a78d6;
  --c-cash: #eda100;
  --c-line: #2a78d6;
  --c-wall: #d03b3b;
  --c-grid: #e6e5df;
  --c-axis: #c3c2b7;
  --c-muted: #898781;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .05), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .05), 0 12px 32px -8px rgba(0, 0, 0, .14);
  --shadow-3: 0 2px 4px rgba(0, 0, 0, .06), 0 32px 64px -16px rgba(0, 0, 0, .24);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --radius: 22px;
  --max: 1180px;
  --gutter: clamp(16px, 3vw, 36px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0b0b;
  --page: #0b0b0b;
  --surface: #161616;
  --surface-2: #202020;
  --card: #121212;
  --ink: #f4f4f2;
  --ink-2: #c4c3bd;
  --ink-3: #a3a29b;
  --line: rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .18);
  --pill: #f4f4f2;
  --pill-ink: #111111;
  --pill-2: #222222;
  --pill-2-hover: #2c2c2c;
  --good: #3fcf86;
  --good-bg: #0f2a1d;
  --warn: #f2b84b;
  --warn-bg: #2c2210;
  --bad: #ff6b66;
  --bad-bg: #2f1414;
  --spectrum: linear-gradient(95deg, #3fcf9d 0%, #4d9fff 40%, #8c7bff 75%, #cf6bff 100%);
  --c-pretax: #d95926;
  --c-roth: #199e70;
  --c-taxable: #3987e5;
  --c-cash: #c98500;
  --c-line: #3987e5;
  --c-wall: #e66767;
  --c-grid: #2a2a28;
  --c-axis: #3d3d3a;
  --c-muted: #8f8e88;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px -8px rgba(0, 0, 0, .6);
  --shadow-3: 0 2px 4px rgba(0, 0, 0, .5), 0 32px 64px -16px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 18px/1.55 "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
::selection { background: #2a78d6; color: #fff; }
.num, .tab-nums { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; }
.muted { color: var(--ink-3); }
.small { font-size: 15.5px; line-height: 1.5; }
.grad { background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

/* ---- buttons ---- */
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 99px; font-weight: 600; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; transition: transform .2s var(--ease), background-color .2s, box-shadow .2s; }
.btn:active { transform: scale(.98); }
.btn-dark { background: var(--pill); color: var(--pill-ink); }
.btn-soft { background: var(--pill-2); color: var(--ink); }
.btn-soft:hover { background: var(--pill-2-hover); }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-line:hover { background: var(--surface); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: default; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; font-weight: 550; }
.link:hover { text-decoration-color: currentColor; }

/* ---- top bar ---- */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 18px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 680; font-size: 20px; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(140deg, #0b7a5a, #1f78c8 60%, #5b3df5); display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand-mark svg { width: 22px; height: 22px; }
.tabs { display: flex; gap: 4px; margin-inline: auto; padding: 5px; background: var(--surface); border-radius: 99px; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 99px; font-weight: 560; font-size: 16.5px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-1); }
.tab .ic { width: 19px; height: 19px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.airgap { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 99px; background: var(--good-bg); color: var(--good); font-weight: 600; font-size: 15px; }
.airgap .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent); }
.airgap.offline { background: var(--surface); color: var(--ink-2); }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface); color: var(--ink); }

/* Bottom tab bar on narrower screens (iPad portrait and phones). */
.bottom { display: none; }
@media (max-width: 1060px) {
  .tabs { display: none; }
  .top-right { margin-left: auto; }
  .bottom { display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 2px; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .bottom .tab { flex: 1; flex-direction: column; gap: 3px; min-height: 60px; padding: 6px 4px; font-size: 13.5px; border-radius: 14px; }
  .bottom .tab .ic { width: 22px; height: 22px; }
  /* Each tab starts at its label's width and shares the spare room; labels only shorten if the bar is truly too narrow. */
  .bottom .tab { flex: 1 1 auto; min-width: 0; }
  .bottom .tab > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom .tab[aria-current="page"] { background: var(--surface); box-shadow: none; }
  main { padding-bottom: 110px; }
}
@media (max-width: 560px) {
  .airgap .lbl { display: none; }
  .airgap { padding: 0 12px; }
  .top-in { height: 64px; gap: 10px; }
  .brand { font-size: 18px; }
}

/* ---- page ---- */
main { min-height: calc(100vh - 76px); }
.page { padding-block: clamp(24px, 4vw, 48px) 72px; display: grid; gap: 22px; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.page-head h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.035em; font-weight: 660; }
.page-head p { color: var(--ink-2); max-width: 720px; margin-top: 8px; font-size: 18.5px; }
.eyebrow { font-size: 14.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 2.6vw, 30px); box-shadow: var(--shadow-1); }
.card h2 { font-size: 23px; letter-spacing: -.02em; font-weight: 640; line-height: 1.25; }
.card h3, .card h2.h3, .card h1.h3 { font-size: 19px; letter-spacing: -.015em; font-weight: 620; line-height: 1.3; }
.card .sub { color: var(--ink-2); margin-top: 6px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
/* Tablets keep two across (an iPad in portrait is 768-834 wide); phones go to one. */
@media (max-width: 980px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid3, .grid2 { grid-template-columns: 1fr; } }

/* ---- hero numbers ---- */
.hero-n { display: grid; gap: 10px; align-content: start; }
.hero-n .lbl { font-size: 17px; font-weight: 600; color: var(--ink-2); }
.hero-n .val { font-size: clamp(40px, 4.6vw, 56px); line-height: 1.02; letter-spacing: -.04em; font-weight: 680; }
.hero-n .val small { font-size: .42em; letter-spacing: -.01em; font-weight: 560; color: var(--ink-2); margin-left: 6px; }
.hero-n .note { color: var(--ink-2); font-size: 16.5px; }
/* Radius = half a one-line chip's height: a pill on one line, a rounded box when the text wraps on a phone. */
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 17px; font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.chip > svg { flex: none; }
a.chip-link { text-decoration: none; transition: filter .15s var(--ease), transform .12s var(--ease); }
a.chip-link:hover { filter: brightness(.96); }
a.chip-link:active { transform: scale(.98); }
a.chip-link > svg:last-child { width: 14px; height: 14px; opacity: .7; }
.chip .ic { width: 18px; height: 18px; }
.chip-good { background: var(--good-bg); color: var(--good); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-bad { background: var(--bad-bg); color: var(--bad); }
.chip-soft { background: var(--surface); color: var(--ink-2); }

.todo { display: grid; gap: 14px; }
.todo li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.todo .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-weight: 650; font-size: 16px; }
.todo b { font-weight: 650; }

/* ---- forms ---- */
.field { display: grid; gap: 8px; min-width: 0; }
.field > label, .field > .label { font-weight: 620; font-size: 17.5px; }
.field .help { color: var(--ink-3); font-size: 15.5px; }
.input { display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 0 16px; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow .15s; }
.input:focus-within { box-shadow: inset 0 0 0 2px var(--focus); }
.input input, .input select { flex: 1 1 auto; width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 20px; font-weight: 560; padding: 12px 0; font-variant-numeric: tabular-nums; }
.input select { font-size: 18.5px; cursor: pointer; }
.input .pre, .input .post { color: var(--ink-3); font-weight: 560; font-size: 18px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; background: var(--surface); border-radius: 16px; }
.seg button { min-height: 48px; padding: 0 18px; border-radius: 12px; font-weight: 580; font-size: 16.5px; color: var(--ink-2); }
/* Touch feedback: no grey flash on tap (iOS), and a slight press on every tappable control, as in native apps. */
html { -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .seg button, .tab, .icon-btn, .years button, .sample-card, .jump-chip, .cell-btn, .client-open { transition: transform .12s var(--ease, ease), background-color .2s, color .2s; }
  .seg button:active, .tab:active, .icon-btn:active, .years button:active, .sample-card:active, .jump-chip:active { transform: scale(.96); }
}
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-1); }
/* Phones: the options share the full width evenly; long labels go two to a row (an odd last one spans both). */
@media (max-width: 560px) {
  .seg { display: grid; width: 100%; grid-template-columns: repeat(var(--n, 2), auto); }
  .seg.seg-long { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg.seg-long > button:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .seg button { padding: 0 10px; line-height: 1.25; }
  .wrap-gap > .field { flex: 1 1 100%; min-width: 0; }
}
/* The narrowest phones (320-360 px): two columns leave a long single word ("Marketplace") no room; one per row. */
@media (max-width: 360px) {
  .seg.seg-long { grid-template-columns: minmax(0, 1fr); }
  .seg.seg-long > button:last-child:nth-child(odd) { grid-column: auto; }
}
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.stack { display: grid; gap: 16px; align-content: start; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.range { width: 100%; accent-color: var(--ink); height: 32px; }

/* ---- onboarding ---- */
.start { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: start; }
@media (max-width: 980px) { .start { grid-template-columns: 1fr; } }
.steps { display: grid; gap: 18px; counter-reset: step; }
.step { position: relative; display: grid; gap: 16px; padding: 26px 26px 26px 82px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 24px; top: 24px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--pill); color: var(--pill-ink); font-weight: 650; font-size: 18px; }
.step h2 { font-size: 22px; letter-spacing: -.02em; font-weight: 640; }
.step .why { color: var(--ink-2); font-size: 16.5px; margin-top: -8px; }
@media (max-width: 560px) { .step { padding: 22px 18px 22px 18px; } .step::before { position: static; margin-bottom: -4px; } }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .pair { grid-template-columns: 1fr; } }
.preview { position: sticky; top: 100px; display: grid; gap: 18px; }

/* ---- charts ---- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: inherit; fill: var(--ink-3); font-size: 13px; }
.chart .tick { font-variant-numeric: tabular-nums; }
.chart .grid line { stroke: var(--c-grid); stroke-width: 1; }
.chart .axis { stroke: var(--c-axis); stroke-width: 1; }
.chart .zone-lbl { fill: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.chart .zone-rate { fill: var(--ink); font-size: 15px; font-weight: 700; }
.chart .wall-lbl { fill: var(--bad); font-size: 13px; font-weight: 650; }
.tip { position: absolute; z-index: 5; pointer-events: none; min-width: 190px; max-width: 280px; padding: 12px 14px; border-radius: 14px; background: var(--bg); box-shadow: var(--shadow-3), 0 0 0 1px var(--line); font-size: 15px; line-height: 1.4; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.tip.on { opacity: 1; transform: none; }
.tip .v { font-size: 19px; font-weight: 680; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tip .k { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.tip .r { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 15.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.legend i.line { height: 3px; border-radius: 2px; }

.sw-pretax { background: var(--c-pretax); }
.sw-roth { background: var(--c-roth); }
.sw-taxable { background: var(--c-taxable); }
.sw-cash { background: var(--c-cash); }
.sw-line { background: var(--ink-2); }

/* Landmine map */
.map-wrap { display: grid; gap: 18px; }
.map-read { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .map-read { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* A row of short figures stays two across on a phone (an odd last one takes the full width). */
@media (max-width: 700px) {
  .grid3.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid3.stats > :nth-child(odd):last-child { grid-column: 1 / -1; }
}
.stat { padding: 16px 18px; border-radius: 16px; background: var(--surface); display: grid; gap: 4px; align-content: space-between; }
.stat .lbl { font-size: 15px; color: var(--ink-2); font-weight: 560; }
.stat .val { font-size: 27px; font-weight: 680; letter-spacing: -.025em; line-height: 1.1; }
.stat .note { font-size: 14px; font-weight: 560; color: var(--ink-2); }
.stat .note.bad { color: var(--bad); }
/* Sideways drags on a chart belong to the chart (the map's pin); vertical swipes still scroll, pinch still zooms. */
.chart svg { touch-action: pan-y pinch-zoom; }
.pin-handle { cursor: grab; }
/* The pin's tag: its own ink, not the chart's grey tick text. */
.chart .pin-tag-bg { fill: var(--ink); }
.chart .pin-tag-t { fill: var(--bg); font-size: 15px; font-weight: 700; }
.pin-handle:active { cursor: grabbing; }
.why { padding: 18px 20px; border-radius: 16px; background: var(--surface); font-size: 17.5px; line-height: 1.55; }
.zones { display: grid; gap: 10px; }
.zone { display: grid; grid-template-columns: 12px 1fr auto; gap: 14px; align-items: start; padding: 14px 16px; border-radius: 14px; background: var(--surface); }
.zone .bar { width: 12px; align-self: stretch; border-radius: 6px; }
.zone .rate { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.zone .what { font-weight: 640; }
.zone .parts { color: var(--ink-2); font-size: 15.5px; }

/* Zones get one color each, quiet in the chart, clear in the list. */
.z-valley { --z: #1baf7a; }
.z-bracket { --z: #2a78d6; }
.z-torpedo { --z: #eda100; }
.z-gains { --z: #eb6834; }
.z-senior { --z: #e87ba4; }
.z-aca { --z: #6250d6; }
.z-niit { --z: #e34948; }
.zone .bar { background: var(--z); }

/* Strategy bars */
.bars { display: grid; gap: 14px; }
/* A ranked list: the name and the amount on one line, a full-width bar on a light track under them. */
.bars { gap: 18px; }
.barrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; align-items: baseline; }
.barrow .name { font-weight: 580; min-width: 0; }
.barrow.best .name { font-weight: 680; }
.barrow .track { grid-column: 1 / -1; order: 3; height: 10px; border-radius: 99px; background: var(--surface); overflow: hidden; }
.barrow .fill { height: 100%; border-radius: 99px; background: var(--c-muted); }
.barrow.best .fill { background: var(--c-roth); }
.barrow .amt { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.barrow .amt small { margin-right: 10px; color: var(--ink-3); font-weight: 560; font-size: 14.5px; }

/* Tables */
.tbl-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 12px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl thead th { position: sticky; top: 0; background: var(--surface); font-size: 14.5px; font-weight: 640; color: var(--ink-2); }
.tbl tbody tr:hover { background: var(--surface); }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr:last-child td { border-bottom: 0; }
/* Year-by-year tables keep the Year column in view while they scroll sideways. */
.tbl.yr td:first-child, .tbl.yr th:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); box-shadow: inset -1px 0 0 var(--line); }
.tbl.yr thead th:first-child { z-index: 2; background: var(--surface); }
.tbl.yr tbody tr:hover td:first-child { background: var(--surface); }
@media (max-width: 560px) { .tbl th, .tbl td { padding: 11px 10px; } }

/* Form 1040 */
.form { border-radius: 18px; border: 1px solid var(--line-2); background: var(--card); overflow: hidden; }
.form-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 18px 22px; background: var(--surface); border-bottom: 1px solid var(--line-2); }
.form-head .t { font-weight: 700; font-size: 20px; letter-spacing: -.015em; }
.form-head .s { color: var(--ink-3); font-size: 15px; }
.fl { display: grid; grid-template-columns: 64px 1fr minmax(120px, auto); gap: 12px; align-items: baseline; padding: 11px 22px; border-bottom: 1px solid var(--line); font-size: 16.5px; }
.fl:last-child { border-bottom: 0; }
.fl .ln { font-weight: 650; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.fl .amt { text-align: right; font-weight: 620; font-variant-numeric: tabular-nums; font-family: "Geist Mono", ui-monospace, monospace; font-size: 16px; }
.fl.total { background: var(--surface); font-weight: 650; }
.fl.total .amt { font-weight: 750; }
.fl.zero .amt { color: var(--ink-3); font-weight: 450; }
.fl .src { display: block; color: var(--ink-3); font-size: 14px; margin-top: 2px; }
.forms-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.years { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.years button { flex: none; scroll-snap-align: start; min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--surface); font-weight: 600; font-variant-numeric: tabular-nums; }
/* On touch screens the row scrolls by swiping: no scrollbar line, and the right edge fades to show there is more. */
@media (pointer: coarse) {
  .years { scrollbar-width: none; padding-right: 36px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
  .years::-webkit-scrollbar { display: none; }
  .years.scrolled { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 36px), transparent); }
}
.years button[aria-pressed="true"] { background: var(--pill); color: var(--pill-ink); }

/* Checklist */
.task { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.task .n { width: 48px; height: 48px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: 20px; }
.task h2, .task h3 { font-size: 20px; letter-spacing: -.015em; font-weight: 650; line-height: 1.3; }
.task p { color: var(--ink-2); margin-top: 8px; }
.task .big { font-size: 30px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); margin-top: 6px; font-variant-numeric: tabular-nums; }
.quarters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.quarters div { padding: 12px 14px; border-radius: 14px; background: var(--surface); }
.quarters .catch-up { background: var(--warn-bg); }
.quarters .catch-up span { color: var(--warn); opacity: 1; font-weight: 600; }
.quarters b { display: block; font-size: 21px; font-variant-numeric: tabular-nums; }

/* Banners, overlays */
.banner { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: var(--surface); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.good { background: var(--good-bg); color: var(--good); }
.banner.bad { background: var(--bad-bg); color: var(--bad); }
.banner p { color: var(--ink); }
.busy { position: fixed; z-index: 60; left: 50%; bottom: 28px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 99px; background: var(--pill); color: var(--pill-ink); font-weight: 600; font-size: 16px; box-shadow: var(--shadow-3); opacity: 0; pointer-events: none; transition: opacity .2s; }
.busy.on { opacity: 1; }
/* A new screen eases in (a short fade and lift); reduced-motion settings skip it. */
main.enter > .page { animation: page-in .22s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { main.enter > .page { animation: none; } }
@media (max-width: 1060px) { .busy { bottom: calc(96px + env(safe-area-inset-bottom)); } }
.busy { white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .busy { font-size: 14.5px; padding: 10px 16px; gap: 8px; } .busy .spin { width: 15px; height: 15px; } }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dim { opacity: .55; transition: opacity .2s; }

.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .4); display: grid; place-items: center; padding: 18px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: var(--bg); border-radius: 24px; padding: 28px; box-shadow: var(--shadow-3); display: grid; gap: 18px; }
.modal h2 { font-size: 25px; letter-spacing: -.02em; }
.menu { position: absolute; right: 0; top: 56px; z-index: 50; min-width: 260px; padding: 8px; border-radius: 18px; background: var(--bg); box-shadow: var(--shadow-3), 0 0 0 1px var(--line); display: grid; }
.menu button, .menu a { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 14px; border-radius: 12px; text-align: left; font-weight: 560; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

.drop { display: grid; place-items: center; gap: 10px; padding: 34px 20px; border-radius: var(--radius); border: 2px dashed var(--line-2); text-align: center; background: var(--surface); transition: background .15s, border-color .15s; }
.drop.over { border-color: var(--focus); background: color-mix(in srgb, var(--focus) 8%, var(--surface)); }
.events { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.ev { flex: none; width: 240px; padding: 16px; border-radius: 18px; background: var(--surface); display: grid; gap: 6px; }
.ev .y { font-size: 14.5px; font-weight: 650; color: var(--ink-3); }
.ev .t { font-weight: 640; }
.lock { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; color: var(--ink-3); }
.paywall { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 34px 20px; }
.foot { padding: 30px 0 60px; color: var(--ink-3); font-size: 15px; border-top: 1px solid var(--line); margin-top: 20px; }

.hide-sm { }
@media (max-width: 700px) { .hide-sm { display: none; } }

/* Front door */
.doors { align-items: stretch; }
.door { display: flex; flex-direction: column; gap: 12px; min-height: 300px; }
.door h2 { font-size: 25px; }
.door-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #0b7a5a, #1f78c8 60%, #5b3df5); }
.door-ic .ic { width: 26px; height: 26px; }
.doors .door:nth-child(2) .door-ic { background: linear-gradient(140deg, #6250d6, #a821e8); }
.doors .door:nth-child(3) .door-ic { background: linear-gradient(140deg, #eb6834, #e8175d); }
.doors .door:nth-child(4) .door-ic { background: linear-gradient(140deg, #1baf7a, #0b7a5a); }

/* Inherited IRA: yearly withdrawals */
.ih-chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; align-items: end; padding-top: 10px; }
.ih-col { display: grid; gap: 6px; text-align: center; min-width: 0; align-content: end; }
.ih-amt { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ih-bar { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; align-items: center; height: 220px; }
.ih-req, .ih-extra { width: min(100%, 24px); }
.ih-req { background: var(--c-pretax); border-radius: 0 0 0 0; }
.ih-extra { background: var(--c-taxable); border-radius: 4px 4px 0 0; }
.ih-bar .ih-extra + .ih-req { border-radius: 0; }
.ih-y { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ih-w { font-size: 12.5px; }
@media (max-width: 640px) { .ih-chart { gap: 4px; } .ih-amt { font-size: 11px; } .ih-y { font-size: 12px; } .ih-w { display: none; } }

/* =========================================================================================================
   Shared by the five apps: brand tokens (each app's brand.css sets them), samples, the review card, charts and
   the app-specific screens.
   ========================================================================================================= */
:root { --brand: #1f78c8; --brand-2: #2bb3c0; --brand-3: #5b3df5; --brand-ink: #ffffff; --c-min: #b9bfcb; --brand-soft: color-mix(in srgb, var(--brand) 9%, var(--bg)); }
:root[data-theme="dark"] { --c-min: #5a606c; }
.brand-mark { background: linear-gradient(140deg, var(--brand), var(--brand-2) 62%, var(--brand-3)); }
.brand-name { white-space: nowrap; }
.keybox { width: 100%; font-size: 17px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--bg); font-family: "Geist Mono", ui-monospace, monospace; resize: vertical; }
.step-n { display: none; }
/* Disclosures: a chevron at the right that turns when open, in place of the browser's triangle. */
details > summary { list-style: none; cursor: pointer; position: relative; padding-right: 34px; border-radius: 10px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; position: absolute; right: 6px; top: .5em; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s var(--ease), top .2s var(--ease); }
details[open] > summary::after { top: .78em; transform: rotate(-135deg); }
details[open]:not(.more-settings) > summary { margin-bottom: 14px; }
.step.details { padding: 22px 26px; }
.step.details::before { content: none; }
.step.details summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.step.details summary::-webkit-details-marker { display: none; }
.step.details summary b { font-size: 19px; }
.step.details summary .sum-sub { flex-basis: 100%; font-size: 16px; }
.step.details[open] summary { margin-bottom: 16px; }
.section-title { margin-top: 10px; }
.section-title h2 { font-size: 24px; letter-spacing: -.02em; font-weight: 650; }
.wrap-gap { flex-wrap: wrap; gap: 18px; }
.scroll-x { overflow-x: auto; padding-bottom: 4px; }
.sub-card { padding: 16px; border-radius: 16px; background: var(--surface); }
.sub-card > summary { cursor: pointer; }
.more-settings { border-radius: var(--radius); border: 1px dashed var(--line-2); padding: 18px 20px; display: grid; gap: 18px; }
.more-settings > summary { cursor: pointer; font-weight: 620; color: var(--ink-2); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 620; font-variant-numeric: tabular-nums; }

/* Samples: one click to a live result. */
.samples { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.sample-card { text-align: left; display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; align-content: start; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid transparent; transition: border-color .15s, transform .15s var(--ease), background .15s; }
.sample-card:hover { border-color: var(--line-2); background: var(--brand-soft); transform: translateY(-1px); }
.sample-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--brand-ink); background: linear-gradient(140deg, var(--brand), var(--brand-2)); }
.sample-t { font-weight: 650; font-size: 17.5px; letter-spacing: -.01em; }
.sample-l { color: var(--ink-2); font-size: 15.5px; line-height: 1.45; }
.sample-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 620; font-size: 15px; color: var(--brand); }
.sample-go .ic { width: 16px; height: 16px; }

/* The "Confirm extracted numbers" card. */
.modal:has(.rv-list) { width: min(760px, 100%); }
.modal:has(.batch) { width: min(1180px, 100%); }
.rv-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rv-list { display: grid; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.rv-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 280px); gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.rv-row:last-child { border-bottom: 0; }
.rv-row.missing { background: color-mix(in srgb, var(--warn-bg) 55%, transparent); }
.rv-label { font-weight: 620; }
.rv-src { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 3px; font-size: 13.5px; }
.rv-ok, .rv-miss { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.rv-ok { color: var(--good); }
.rv-miss { color: var(--warn); }
.rv-ok .ic, .rv-miss .ic { width: 15px; height: 15px; }
.rv-info { font-weight: 560; color: var(--ink-2); }
.rv-c .input { min-height: 48px; }
.rv-c .input input { font-size: 18px; padding: 8px 0; }
.rv-c .seg button { min-height: 40px; padding: 0 12px; font-size: 15px; }
.drop-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--bg); color: var(--brand); box-shadow: var(--shadow-1); }
.drop-t { font-weight: 650; font-size: 18.5px; max-width: 560px; }
.drop.big { padding: 44px 24px; }

/* Charts. */
.chart .bar-lbl { font-size: 13px; font-weight: 650; fill: var(--ink); font-variant-numeric: tabular-nums; }
.chart .tick.strong { font-weight: 700; fill: var(--ink); }
.mini-bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 130px; padding-top: 8px; }
.mini-bars .mb { display: grid; justify-items: center; gap: 6px; align-content: end; }
.mini-bars .mb-pair { display: flex; gap: 2px; align-items: end; height: 100px; }
.mini-bars i { display: block; width: 9px; border-radius: 3px 3px 0 0; background: var(--brand); }
.mini-bars i.min { background: var(--c-min); }
.mini-bars span { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hero-n.warnish .val { color: var(--bad); }

/* HeirLedger: the year slider with its ceiling marks. */
.slider-read { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.slider-read b { font-size: 34px; letter-spacing: -.03em; font-weight: 700; }
.slider-box { position: relative; padding-bottom: 46px; }
.ticks-row { position: absolute; left: 0; right: 0; top: 34px; height: 40px; }
.tick-mark { position: absolute; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; font-size: 12.5px; font-weight: 620; color: var(--ink-2); }
.tick-mark::before { content: ""; width: 2px; height: 12px; border-radius: 1px; background: var(--ink-3); }
.tick-mark.k-irmaa, .tick-mark.k-aca { color: var(--bad); }
.tick-mark.k-irmaa::before, .tick-mark.k-aca::before { background: var(--bad); }
.tick-mark span { white-space: nowrap; padding: 2px 6px; border-radius: 6px; background: var(--surface); }
.tick-mark:hover span { background: var(--pill); color: var(--pill-ink); }

/* ClearUnwind. */
.timeline { display: grid; gap: 12px; }
.t-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) minmax(150px, auto); gap: 14px; align-items: center; }
.t-y { display: grid; }
.t-bar { height: 14px; border-radius: 7px; background: var(--surface); overflow: hidden; }
.t-bar i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.t-v { display: grid; text-align: right; }
.timeline.small .t-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
.q-stats { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--ink-2); font-size: 15.5px; }
.q-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.guard { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); }
.guard.now { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 40%, transparent); }
.guard b { font-variant-numeric: tabular-nums; }

/* Comparisons (DrawdownSolver's big decisions, PensionShield, StrataTax scenarios). */
.tbl.cmp th.best, .tbl.cmp td.best { background: var(--brand-soft); }
.tbl.cmp th .chip { margin-left: 8px; padding: 3px 9px; font-size: 13px; }
.tbl.cmp td:first-child { white-space: normal; min-width: 220px; }
.short-cell { color: var(--bad); font-weight: 620; white-space: nowrap; }

/* StrataTax Pro. */
.clients-tbl tr.on td { background: var(--brand-soft); }
.clients-tbl td .chip { margin-left: 8px; padding: 2px 9px; font-size: 13px; }
/* A table row that opens something: its first cell is a plain-looking button, so the keyboard can reach it. */
.client-open, .cell-btn { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.client-open { font-weight: 650; color: var(--ink); }
.client-open:hover, .cell-btn:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.search-box input { font-size: 18px; font-weight: 500; }
.skipped { display: grid; gap: 8px; }
.skip-list { list-style: none; display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border-left: 3px solid var(--warn, #b7791f); }
.skip-list li { display: grid; gap: 2px; font-size: 15px; line-height: 1.4; }
.skip-list li b { font-weight: 620; overflow-wrap: anywhere; }
.skip-list li span { color: var(--ink-2); }
.empty { text-align: center; padding: 30px 10px; display: grid; gap: 6px; justify-items: center; }
.empty-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); color: var(--ink-2); margin-bottom: 6px; }
.empty-ic svg { width: 22px; height: 22px; }
/* StrataTax: the workspace lock, centered like a sign-in screen. */
.lock-wrap { min-height: calc(100vh - 200px); min-height: calc(100dvh - 200px); display: grid; place-items: center; padding: 24px 0 48px; }
.lock-card { width: min(100%, 440px); display: grid; gap: 14px; padding: 32px 28px 26px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.lock-card h1 { font-size: 30px; letter-spacing: -.025em; line-height: 1.15; margin-top: -6px; }
.lock-card .sub { margin-top: -6px; }
.lock-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--brand), var(--brand-2) 62%, var(--brand-3)); margin-bottom: 6px; }
.lock-ic svg { width: 24px; height: 24px; }
.lock-msg { color: var(--bad); font-weight: 560; font-size: 15px; margin: -4px 0 0; }
.lock-msg:empty { display: none; }
.lock-foot { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.btn-block { width: 100%; justify-content: center; }
.input .reveal { flex: none; border: 0; background: none; color: var(--ink-2); font: inherit; font-weight: 620; font-size: 15px; padding: 6px 4px; cursor: pointer; border-radius: 8px; }
.input .reveal:hover { color: var(--ink); }
@media (max-width: 560px) { .lock-card { padding: 26px 20px 22px; } .lock-card h1 { font-size: 26px; } }
.tbl.wp td, .tbl.wp th { padding: 9px 12px; font-size: 15px; }
.tbl.wp tr.strong td { font-weight: 700; background: var(--surface); }
.tbl.batch td { padding: 6px 8px; }
.tbl.batch .input { min-height: 42px; padding: 0 10px; }
.tbl.batch .input input, .tbl.batch .input select { font-size: 15px; padding: 6px 0; }
/* StrataTax firm branding: a miniature of the study's cover page (always paper-white, like the PDF). */
.brand-prev { --bp: #3d5bd9; position: relative; aspect-ratio: 8.5 / 11; max-width: 420px; width: 100%; justify-self: center; overflow: hidden; border-radius: 10px; background: #fff; color: #16181d; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 18px 40px -18px rgba(0, 0, 0, .35); padding: 9% 9% 0; display: flex; flex-direction: column; font-size: 12px; }
.bp-bar { position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--bp); }
.bp-logo { position: absolute; top: 5%; right: 9%; height: 38px; display: grid; place-items: center end; color: #9aa0ab; font-size: 11px; }
.bp-logo img { max-height: 38px; max-width: 140px; }
.bp-title { margin-top: 22%; font-size: 21px; line-height: 1.12; font-weight: 750; letter-spacing: -.02em; }
.bp-title span { color: var(--bp); }
.bp-for { margin-top: 8px; font-size: 12.5px; color: #4b5060; }
.bp-by { margin-top: auto; font-size: 11px; color: #4b5060; display: grid; gap: 3px; }
.bp-by b { color: #16181d; font-size: 12px; }
.bp-foot { margin-top: 18px; border-top: 1px solid #e3e6ec; padding: 5px 0 12px; font-size: 7.5px; line-height: 1.35; color: #7a7f8c; display: grid; gap: 3px; }
.bp-fl { display: flex; justify-content: space-between; gap: 8px; }
.bp-fl b { color: #7a7f8c; }
.swatch { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 99px; background: var(--pill-2); font-weight: 580; font-size: 15px; cursor: pointer; }
.swatch input[type=color] { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.swatch input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.swatch input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }

textarea { width: 100%; border-radius: 14px; border: 1.5px solid var(--line-2); padding: 12px 14px; background: var(--bg); font-size: 16px; }

@media (max-width: 760px) {
  .rv-row { grid-template-columns: 1fr; }
  /* Year and amount on one line, the bar full width beneath. */
  .t-row, .timeline.small .t-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "y v" "bar bar"; row-gap: 8px; }
  .t-row .t-y { grid-area: y; }
  .t-row .t-v { grid-area: v; }
  .t-row .t-bar { grid-area: bar; height: 10px; }
}

.tbl.wp td:nth-child(2), .tbl.wp th:nth-child(2), .tbl.wp td:last-child, .tbl.wp th:last-child { text-align: left; }
.tbl.cmp td:first-child, .tbl.cmp th:first-child { text-align: left; }
.rv-est { color: var(--ink-3); font-weight: 600; }

/* Loading skeleton: the outline of the screen that is coming. */
.sk { border-radius: 10px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 45%, var(--surface) 90%); background-size: 220% 100%; animation: sk-sweep 1.5s ease-in-out infinite; }
@keyframes sk-sweep { from { background-position: 110% 0; } to { background-position: -110% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.sk-head { display: grid; gap: 12px; width: min(560px, 100%); }
.sk-eyebrow { width: 150px; height: 12px; }
.sk-title { width: 78%; height: 34px; border-radius: 12px; }
.sk-line { width: 92%; height: 14px; }
.sk-line.short { width: 60%; }
.sk-card { display: grid; gap: 12px; min-height: 132px; align-content: start; }
.sk-lbl { width: 46%; height: 12px; }
.sk-val { width: 70%; height: 36px; border-radius: 12px; }
.sk-status { gap: 12px; font-weight: 600; color: var(--ink-2); }
.sk-bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 8px; }
.sk-bars .sk { flex: 1; border-radius: 8px 8px 3px 3px; }

/* A short list of label / figure rows inside a card. */
.kv-list { display: grid; }
.kv-list .kv { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; color: var(--ink-2); }
.kv-list .kv:last-child { border-bottom: 0; }
.kv-list .kv b { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv-list .kv b.good { color: var(--good); }
/* StrataTax batch intake: the Filing and State choices keep room for their words. */
.tbl.batch td:nth-child(3) .input { min-width: 108px; }
.tbl.batch td:nth-child(4) .input { min-width: 140px; }
.tbl.batch td:nth-child(1) .input { min-width: 130px; }
.tbl.batch td:nth-child(n+5) .input { min-width: 108px; }
.tbl.batch th, .tbl.batch td { padding-inline: 8px; }
.tbl.batch th:nth-child(-n+4), .tbl.batch td:nth-child(-n+4) { text-align: left; }
/* ClearUnwind's sell list on a phone: one block per holding (name, then what to sell and its gain, then notes). */
@media (max-width: 560px) {
  .tbl-wrap:has(> table.q-tbl) { overflow: visible; border: 0; border-radius: 0; }
  table.q-tbl, table.q-tbl tbody { display: block; }
  table.q-tbl thead { display: none; }
  table.q-tbl tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
  table.q-tbl tbody tr:last-child { border-bottom: 0; }
  table.q-tbl td { display: block; padding: 0; border: 0; background: none; text-align: left; white-space: normal; min-width: 0; }
  table.q-tbl td:nth-child(1) { grid-column: 1 / -1; font-weight: 620; color: var(--ink); }
  table.q-tbl td:nth-child(2)::before { content: 'Sell '; color: var(--ink-3); font-weight: 500; }
  table.q-tbl td:nth-child(3) { text-align: right; }
  table.q-tbl td:nth-child(3)::before { content: 'Gain '; color: var(--ink-3); font-weight: 500; }
  table.q-tbl td:nth-child(4) { grid-column: 1 / -1; }
  table.q-tbl td:nth-child(4):empty { display: none; }
}
/* A compact breakdown inside a headline card. */
.kv-list.small-kv { margin-top: 6px; border-top: 1px solid var(--line); }
.kv-list.small-kv .kv { font-size: 15px; padding: 9px 0; }
.hero-n .val.good { color: var(--good); }

/* The map's cliffs: where each sits and the lump it costs. */
.cliffs { display: grid; }
.cliff { display: grid; grid-template-columns: 10px 1fr auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cliff:last-child { border-bottom: 0; padding-bottom: 2px; }
.cliff .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-wall); margin-top: 8px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-wall) 16%, transparent); }
.cliff .what { font-weight: 620; }
.cliff .parts { color: var(--ink-3); font-size: 15px; margin-top: 3px; }
.cliff .at { display: grid; gap: 3px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cliff .at span { color: var(--bad); font-size: 15px; font-weight: 620; }

/* Form lines on a phone: a narrow line-number column and an amount column only as wide as its figure, so the
   description gets the room. */
@media (max-width: 560px) {
  .fl { grid-template-columns: 38px 1fr auto; gap: 10px; padding: 10px 14px; font-size: 16px; }
  .fl .amt { font-size: 15px; }
  .fl .src { font-size: 13.5px; }
  .form-head { flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 14px; }
}

/* Checklist steps tick off: the number becomes a check. */
.task button.n { border: 0; color: var(--ink); font: inherit; font-weight: 700; font-size: 20px; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), transform .12s var(--ease); }
.task button.n:hover { background: var(--surface-2); }
.task button.n:active { transform: scale(.94); }
.task button.n svg { width: 24px; height: 24px; }
.task.done button.n { background: var(--good-bg); color: var(--good); }
.task.done h2, .task.done h3 { color: var(--ink-3); }
.task.done p, .task.done .big { opacity: .62; }
@media (max-width: 560px) {
  /* The number sits beside the title; everything under the title uses the card's full width. */
  .task { grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 0; padding: 18px; align-items: start; }
  .task > div { display: contents; }
  .task > div > h2, .task > div > h3 { padding-top: 7px; font-size: 19px; }
  .task > div > :not(h2):not(h3) { grid-column: 1 / -1; }
  .task .n { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
}

/* Tick lists inside the planner (the landing pages style their own). */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; color: var(--ink-2); }
.ticks li > svg, .ticks li > .ic { width: 20px; height: 20px; color: var(--good); margin-top: 3px; }

/* Nothing may push a page wider than the screen: grid children can shrink, and long button labels wrap on phones. */
.wrap.page > *, .card > *, .stack > *, .task > div { min-width: 0; }
@media (max-width: 560px) {
  .btn { white-space: normal; max-width: 100%; line-height: 1.25; text-align: center; }
}

/* Side-by-side comparisons on a phone: one card per row, each value labeled with its column. */
@media (max-width: 560px) {
  .tbl-wrap:has(> table.cmp) { overflow: visible; border: 0; border-radius: 0; }
  table.tbl.cmp, table.tbl.cmp tbody { display: block; }
  table.tbl.cmp thead { display: none; }
  table.tbl.cmp tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px 14px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
  table.tbl.cmp tbody tr:last-child { border-bottom: 0; }
  table.tbl.cmp td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; min-width: 0; }
  table.tbl.cmp td:first-child { grid-column: 1 / -1; font-weight: 640; color: var(--ink); min-width: 0; }
  table.tbl.cmp td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-bottom: 2px; }
  table.tbl.cmp td.best { background: none; color: var(--brand); font-weight: 700; }
  table.tbl.cmp tbody tr:hover { background: none; }
}

/* Chart labels that sit over lines get a halo in the card's color, so the line never runs through the words. */
.chart .wall-lbl, .chart .bar-lbl { paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; }

/* StrataTax client list on a phone or tablet: one row per client, the actions at the right. */
@media (max-width: 900px) {
  .tbl-wrap:has(> table.clients-tbl) { overflow: visible; border: 0; border-radius: 0; }
  table.clients-tbl, table.clients-tbl tbody { display: block; }
  table.clients-tbl thead { display: none; }
  table.clients-tbl tr { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 2px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  table.clients-tbl tbody tr:last-child { border-bottom: 0; }
  table.clients-tbl td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; min-width: 0; }
  table.clients-tbl td:nth-child(1) { grid-column: 1; }
  table.clients-tbl td:nth-child(2), table.clients-tbl td:nth-child(3) { grid-column: 1; color: var(--ink-3); font-size: 14.5px; }
  table.clients-tbl td:nth-child(4) { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  table.clients-tbl td:nth-child(4) .btn { padding-inline: 12px; }
  table.clients-tbl td:nth-child(3)::before { content: "Updated "; }
}

/* The workpaper grid scrolls sideways through the years with its line and item columns pinned, like a spreadsheet. */
.tbl.wp td:nth-child(1), .tbl.wp th:nth-child(1) { position: sticky; left: 0; z-index: 1; width: 58px; min-width: 58px; background: var(--card); }
.tbl.wp td:nth-child(2), .tbl.wp th:nth-child(2) { position: sticky; left: 58px; z-index: 1; background: var(--card); box-shadow: 1px 0 0 var(--line); }
.tbl.wp thead th:nth-child(1), .tbl.wp thead th:nth-child(2) { z-index: 2; background: var(--surface); }
.tbl.wp tr.strong td:nth-child(1), .tbl.wp tr.strong td:nth-child(2) { background: var(--surface); }
@media (max-width: 560px) {
  .tbl.wp td:nth-child(1), .tbl.wp th:nth-child(1) { width: 46px; min-width: 46px; padding-inline: 8px; }
  .tbl.wp td:nth-child(2), .tbl.wp th:nth-child(2) { left: 46px; white-space: normal; min-width: 132px; max-width: 132px; font-size: 14px; }
}

/* When the top bar would not fit on one line (measured in app.js), it drops the tab icons, the privacy label (the
   green dot stays, its explanation a tap away) and the numbers label. */
.top.tight .tab { padding: 0 13px; gap: 6px; font-size: 16px; }
.top.tight .tabs .tab .ic { display: none; }
.top.tight .airgap .lbl { display: none; }
.top.tight .airgap { padding: 0 13px; }
.top.tight .top-right .btn .hide-sm { display: none; }
.top.tight .top-in { gap: 12px; }

/* A quiet explanation under a comparison (survivor protection and the like). */
.shield-note { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 14px 16px; border-radius: 16px; background: var(--surface); color: var(--ink-2); font-size: 15.5px; }
.shield-note svg { width: 20px; height: 20px; color: var(--brand); margin-top: 2px; }

/* "Your numbers": section shortcuts that stay in view under the top bar. */
.jump { position: sticky; top: 76px; z-index: 6; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -6px calc(-1 * var(--gutter)) 0; padding: 10px var(--gutter); background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.jump::-webkit-scrollbar { display: none; }
.jump-chip { flex: none; padding: 9px 15px; border-radius: 99px; background: var(--pill-2); color: var(--ink-2); font-weight: 580; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background .2s var(--ease), color .2s var(--ease); }
.jump-chip:hover { background: var(--pill-2-hover); color: var(--ink); }
.jump-chip.on { background: var(--pill); color: var(--pill-ink); }
section.card[id] { scroll-margin-top: 150px; }
@media (max-width: 560px) { .jump { top: 64px; } .jump-chip { padding: 8px 13px; font-size: 14.5px; } section.card[id] { scroll-margin-top: 130px; } }

/* The hidden attribute always wins over a component's own display. */
[hidden] { display: none !important; }

/* The menu: wide enough that every item stays on one line on a phone, and wrapped text keeps its rhythm. */
.menu { width: max-content; max-width: min(340px, calc(100vw - 24px)); }
.menu button, .menu a { min-height: 48px; padding: 10px 14px; line-height: 1.3; }
.menu button svg, .menu a svg { flex: none; }

/* The top bar may run wider than the page column on big screens, so every label fits there. */
.top .wrap { max-width: calc(1440px + var(--gutter) * 2); }
/* Nothing in the top bar squeezes or wraps; if it can't fit, the bar measures that and tightens instead. */
.top-in > * { flex-shrink: 0; }
.airgap, .top-right .btn { white-space: nowrap; }
/* Still too wide (six tabs just above the phone layout): the app name leaves, its mark stays. */
.top.tighter .brand-name { display: none; }
.top.tighter .tab { padding: 0 11px; font-size: 15.5px; }

/* Dialogs on a phone are bottom sheets: they rise from the bottom edge, with a grabber, within thumb reach. */
@media (max-width: 560px) {
  .modal-bg { place-items: end center; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 26px 26px 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); gap: 16px; animation: sheet-up .32s var(--ease); position: relative; }
  .modal::before { content: ""; position: absolute; top: 9px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line-2); }
  .modal h2 { font-size: 22px; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .modal { animation: none; } }
/* A dialog's title and its close button share the top line, however long the title. */
.modal > .row-between:first-child { flex-wrap: nowrap; align-items: flex-start; gap: 12px; }
.modal > .row-between:first-child h2 { flex: 1; min-width: 0; }
.modal > .row-between:first-child .icon-btn { flex: none; margin-top: -4px; }

.modal:focus { outline: none; }

/* Long sheets keep their buttons in reach: the action row sticks to the bottom edge on a phone. */
@media (max-width: 560px) {
  .modal > .row:last-child { position: sticky; bottom: calc(-22px - env(safe-area-inset-bottom)); z-index: 2; margin: 0 -20px calc(-22px - env(safe-area-inset-bottom)); padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); flex-wrap: nowrap; }
  .modal > .row:last-child .btn { flex: 1 1 auto; justify-content: center; }
}
/* Three cards on a tablet: two across, the third full width below rather than leaving a hole. */
@media (min-width: 701px) and (max-width: 980px) { .grid3 > :nth-child(3):last-child { grid-column: 1 / -1; } }

/* The live answer, kept in view on a phone or tablet while the start screen's questions are answered. */
.peek { position: fixed; left: 50%; top: calc(74px + env(safe-area-inset-top)); z-index: 39; display: inline-flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 10px 14px 10px 18px; border: 0; border-radius: 99px; background: var(--pill); color: var(--pill-ink); box-shadow: var(--shadow-2); font: inherit; font-size: 15px; cursor: pointer; transform: translate(-50%, -12px); opacity: 0; pointer-events: none; transition: transform .28s var(--ease), opacity .2s var(--ease); }
.peek.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.peek .peek-l { opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.peek b { font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.peek svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 560px) { .peek { top: calc(70px + env(safe-area-inset-top)); } }
@media (min-width: 981px) { .peek { display: none; } }
@media (prefers-reduced-motion: reduce) { .peek { transition: none; } }

/* The narrowest phones (under 375 px): six tabs still fit, with tighter labels. */
@media (max-width: 374px) {
  .bottom { padding-inline: 4px; gap: 0; }
  .bottom .tab { padding-inline: 1px; font-size: 11.5px; letter-spacing: -.01em; }
}
@media (max-width: 330px) { .bottom .tab { font-size: 10.5px; letter-spacing: -.02em; } }

/* Printing a screen (the checklist, a year's Form 1040): paper colors whatever the theme, no app chrome, and cards
   kept whole across pages. The PDFs remain the full documents. */
@media print {
  :root, :root[data-theme="dark"] {
    --bg: #ffffff; --page: #ffffff; --surface: #f3f3f1; --surface-2: #e9e9e6; --card: #ffffff;
    --ink: #111111; --ink-2: #333333; --ink-3: #555555; --line: rgba(0, 0, 0, .14); --line-2: rgba(0, 0, 0, .22);
    --pill: #111111; --pill-ink: #ffffff; --pill-2: #ececea;
    --good: #0a7a3f; --good-bg: #e7f5ec; --warn: #8a5a00; --warn-bg: #fff4dc; --bad: #c0302f; --bad-bg: #fdecec;
    --c-grid: #e6e5df; --c-axis: #c3c2b7;
  }
  body { background: #fff !important; color: #111; }
  header.top, nav.bottom, .busy, .peek, .jump, .menu, .modal-bg, .btn, button.icon-btn, .years { display: none !important; }
  .task button.n { background: none !important; border: 1.5px solid #d6d6d2 !important; color: #111 !important; }
  main, .wrap { padding: 0 !important; max-width: none !important; }
  .card, .task, .stat, .hero-n, .form, .tbl-wrap { box-shadow: none !important; border: 1px solid #d6d6d2 !important; break-inside: avoid; }
  .page-head h1 { font-size: 22pt; }
  a { color: inherit; text-decoration: none; }
  main.enter > .page { animation: none !important; }
}

/* The file chooser in the Open dialog: a row with the file's name, also a place to drop the file. */
.pick { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 64px; padding: 10px 10px 10px 12px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: var(--surface); transition: border-color .15s, background .15s; }
.pick.over { border-color: var(--focus); background: color-mix(in srgb, var(--focus) 8%, var(--surface)); }
.pick.picked { border-style: solid; background: var(--bg); }
.pick-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg); color: var(--brand); box-shadow: var(--shadow-1); }
.pick.picked .pick-ic { background: var(--surface); }
.pick-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 620; }
.pick:not(.picked) .pick-name { color: var(--ink-3); font-weight: 520; }
.pick .btn { flex: none; }
/* A Choose button is a label over a hidden file input: the input's keyboard focus shows on the button. */
.drop:has(input.sr:focus-visible) label.btn, .pick:has(input.sr:focus-visible) label.btn { outline: 2px solid var(--focus); outline-offset: 2px; }
/* What a drop box says after reading: red when a file couldn't be used. */
.drop-msg.bad { color: var(--bad); font-weight: 560; }
/* While a file is dragged over the window, the drop boxes show where it can go. */
.dragging-file .drop { border-color: var(--focus); background: color-mix(in srgb, var(--focus) 6%, var(--surface)); }
.input .reveal { min-height: 40px; padding: 6px 10px; margin-right: -8px; }
.input .reveal:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.menu button:focus-visible, .menu a:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* The plan's error card: what went wrong and the two ways forward. */
.card.empty { padding: 44px 20px 40px; }
.empty .row { margin-top: 14px; }
.empty[role="alert"] .empty-ic { background: var(--warn-bg); color: var(--warn); }
.keybox:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
/* A phone held sideways (or any short window): the header scrolls away with the page and the tab bar puts each
   icon beside its label, so the screen keeps most of its height for the plan. */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1060px) {
  .top { position: relative; }
  .top-in { height: 60px; }
  .jump { top: 0; }
  section.card[id] { scroll-margin-top: 70px; }
  html { scroll-padding-top: 16px; }
  .bottom { padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); }
  .bottom .tab { flex-direction: row; gap: 7px; min-height: 42px; font-size: 13.5px; }
  .bottom .tab .ic { width: 19px; height: 19px; }
  main { padding-bottom: 72px; }
  .busy { bottom: calc(62px + env(safe-area-inset-bottom)); }
  .peek { top: calc(12px + env(safe-area-inset-top)); }
  .modal { max-height: calc(100vh - 16px); }
}
/* On a phone the sample households are one swipeable row (the next card peeks in), so the ways to start with one's
   own numbers come into view sooner. */
@media (max-width: 560px) {
  .samples { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -20px; padding: 2px 20px 6px; scroll-padding-inline: 20px; overscroll-behavior-x: contain; }
  .samples::-webkit-scrollbar { display: none; }
  .samples > .sample-card { scroll-snap-align: start; }
}
/* Buttons sharing a row fill it evenly, matching the full-width buttons of neighbouring cards. */
.row.fill > .btn { flex: 1 1 0; min-width: max-content; }
/* The page covers the whole screen (viewport-fit=cover, for the home-indicator strip). A notched iPhone held sideways
   then puts the notch over one side: the page and the tab bar keep their content clear of it. */
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.bottom { padding-left: calc(8px + env(safe-area-inset-left)); padding-right: calc(8px + env(safe-area-inset-right)); }
/* Windows High Contrast (forced colours) drops backgrounds and shadows: controls get real borders, and the chosen
   option, the current tab and the section in view are marked with the system highlight. Charts and their legend keys
   keep their own colours, so each series can still be told apart. */
@media (forced-colors: active) {
  .btn, .icon-btn, .chip, .jump-chip, .tab, .seg button, .years button, .sample-card, .pick, .reveal, .airgap, .peek, .menu, .modal, .busy { border: 1px solid ButtonBorder; }
  .input, .keybox, .barrow .track { border: 1px solid CanvasText; box-shadow: none; }
  .input:focus-within { outline: 2px solid Highlight; outline-offset: 1px; }
  .tab[aria-current="page"], .seg button[aria-pressed="true"], .years button[aria-pressed="true"], .jump-chip.on {
    forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .barrow .fill { forced-color-adjust: none; background: Highlight; }
  .chart svg, .legend i, .airgap .dot { forced-color-adjust: none; }
  .drop { border: 2px dashed CanvasText; }
}
/* On a narrow screen a client row is a stacked card: the open client is marked as one rounded block, not cell by cell. */
@media (max-width: 900px) {
  table.clients-tbl tr { padding: 14px 12px; border-radius: 14px; }
  table.clients-tbl tr.on { background: var(--brand-soft); border-bottom-color: transparent; }
  table.clients-tbl tr.on td { background: none; }
}
/* Safari before 16.2 (iPads and iPhones that cannot update past iOS 15 or 16.1) has no color-mix(): plain colours
   there, so the header, the tab bar and the highlights never turn see-through or disappear. */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  :root, :root[data-theme="dark"] { --brand-soft: var(--surface); }
  .top, .bottom, .jump { background: var(--bg); }
  .rv-row.missing { background: var(--warn-bg); }
  .drop.over, .pick.over, .dragging-file .drop { background: var(--surface); }
}
/* A toast sizes to its words (up to the screen width less a margin), not to half the screen: long file names wrap once, centred. */
.busy { width: max-content; max-width: min(560px, calc(100vw - 32px)); border-radius: 23px; text-align: center; }
/* The note on a sample when the person's own numbers are put aside: one line, its button at the end. */
.sample-note { align-items: center; margin-bottom: 18px; }
.sample-note p { flex: 1 1 auto; }
.sample-note .btn { flex: none; }
@media (max-width: 560px) { .sample-note { flex-wrap: wrap; } .sample-note .btn { margin-left: 36px; } }
/* A year with no lines inside its range has no marks row (no blank band under the slider). */
.ticks-row:empty { display: none; }
.slider-box:has(> .ticks-row:empty) { padding-bottom: 6px; }
