/* Wealth Strategy Snapshot intake.
   Airy: no containers, no divider lines. Things are kept apart with space and soft fills.
   Every color, size and radius is a token below. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  /* palette: light */
  --c-bg: #fbfcfb;
  --c-surface: #ffffff;
  --c-soft: #eef3f0;
  --c-soft-hover: #e6eee9;
  --c-soft-focus: #f5f8f6;
  --c-surface-2: var(--c-soft);
  --c-ink: #12241c;
  --c-ink-2: #4a5a53;
  --c-ink-3: #5b6b64;
  --c-sec: #4f7a64;
  --c-track: #d9e4de;
  --c-line: #d9e4de;
  --c-line-strong: #9aa8a1;
  --c-placeholder: #7d8c85;
  --c-brand: #0f4d36;
  --c-brand-strong: #0a3826;
  --c-brand-tint: #e3efe8;
  --c-brand-wash: #f0f6f2;
  --c-on-brand: #f4faf7;
  --c-amber-ink: #6b4a0e;
  --c-amber-bg: #fbf1d9;
  --c-error: #b42318;
  --c-error-bg: #fcecea;
  --c-focus: #2f7a57;
  --c-ring: rgba(15, 77, 54, 0.2);
  --c-selection: #cfe3d7;
  --c-off-bg: #dfe8e3;
  --c-off-ink: #8b9a93;

  /* type */
  --font-display: "Schibsted Grotesk", "Helvetica Neue", system-ui, sans-serif;
  --font-body: "Schibsted Grotesk", "Helvetica Neue", system-ui, sans-serif;
  --fs-xs: 13px;
  --fs-s: 14px;
  --fs-0: 16px;
  --fs-1: 17px;
  --fs-lede: 18px;
  --fs-q: 22px;
  --fs-value: 24px;
  --fs-money: 28px;
  --fs-title: 30px;
  --fs-hero: 40px;
  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-body: 1.55;
  --weight-body: 430;
  --weight-strong: 600;
  --weight-head: 650;
  --measure: 62ch;

  /* space */
  --s-3xs: 4px;
  --s-2xs: 6px;
  --s-xs: 10px;
  --s-s: 12px;
  --s-m: 16px;
  --s-l: 24px;
  --s-xl: 32px;
  --s-q: 44px;
  --s-2xl: 56px;
  --gutter: 24px;

  /* shape */
  --radius-s: 12px;
  --radius-m: 16px;
  --radius-field: 20px;
  --radius-sheet: 24px;
  --radius-pill: 999px;

  /* sizes */
  --tap: 48px;
  --chip-h: 50px;
  --item-h: 52px;
  --field-h: 60px;
  --money-h: 64px;
  --cta-h: 64px;
  --icon: 20px;
  --icon-s: 16px;
  --top-h: 64px;
  --col: 640px;
  --wide: 1240px;
  --wide-pad: 80px;
  --dot: 8px;
  --pill: 26px;

  /* depth */
  --shadow-chip: 0 8px 20px rgba(15, 77, 54, 0.22);
  --shadow-cta: 0 14px 30px rgba(15, 77, 54, 0.3);
  --shadow-sheet: 0 20px 50px rgba(16, 40, 30, 0.14);
  --shadow-paper: 0 10px 28px rgba(16, 40, 30, 0.1);

  /* motion */
  --dur-press: 160ms;
  --dur-fast: 150ms;
  --dur: 200ms;
  --dur-screen: 260ms;
  --dur-slow: 420ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  color-scheme: light;
  accent-color: var(--c-brand);
  interpolate-size: allow-keywords;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #0f1714;
    --c-surface: #17221d;
    --c-soft: #1b2722;
    --c-soft-hover: #22302a;
    --c-soft-focus: #16211c;
    --c-ink: #e8efea;
    --c-ink-2: #b8c6bf;
    --c-ink-3: #9fb1a8;
    --c-sec: #8fc4a5;
    --c-track: #2c3b34;
    --c-line: #2c3b34;
    --c-line-strong: #5d6f67;
    --c-placeholder: #7f9289;
    --c-brand: #8fd3ae;
    --c-brand-strong: #a9e2c2;
    --c-brand-tint: #1d3a2d;
    --c-brand-wash: #142520;
    --c-on-brand: #0b1e15;
    --c-amber-ink: #f1d49a;
    --c-amber-bg: #2e2715;
    --c-error: #f19a8f;
    --c-error-bg: #35201d;
    --c-focus: #8fd3ae;
    --c-ring: rgba(143, 211, 174, 0.28);
    --c-selection: #29523e;
    --c-off-bg: #1f2a25;
    --c-off-ink: #6c7d75;
    --shadow-chip: 0 8px 20px rgba(0, 0, 0, 0.35);
    --shadow-cta: 0 14px 30px rgba(0, 0, 0, 0.45);
    --shadow-sheet: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-paper: 0 10px 28px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: calc(var(--top-h) + var(--s-l));
  scroll-padding-bottom: 140px;
  scrollbar-color: var(--c-track) transparent;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--fs-0);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
  caret-color: var(--c-brand);
}
::selection { background: var(--c-selection); color: var(--c-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button, label, summary, .btn, .opt, .linkbtn, .mini { touch-action: manipulation; }
a { color: var(--c-brand); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--c-ring); outline-offset: 3px; border-radius: var(--radius-s); }
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--weight-head); color: var(--c-ink); text-wrap: balance; letter-spacing: -0.02em; }
p { text-wrap: pretty; }
.icon { width: var(--icon); height: var(--icon); flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.s { width: var(--icon-s); height: var(--icon-s); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s-m); top: -120px; z-index: 50; background: var(--c-brand); color: var(--c-on-brand); padding: var(--s-xs) var(--s-m); border-radius: var(--radius-pill); }
.skip:focus { top: var(--s-m); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--c-bg); }
.top-inner { max-width: calc(var(--col) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); min-height: var(--top-h); display: flex; align-items: center; gap: var(--s-m); }
.brand { display: inline-flex; align-items: center; font-size: var(--fs-0); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top-right { margin-left: auto; display: inline-flex; align-items: center; gap: var(--s-3xs); }
.top-right .linkbtn { white-space: nowrap; }
@media (max-width: 1023px) { .top:has(#dots:not([hidden])) .brand { display: none; } }
.saved { display: inline-flex; align-items: center; gap: var(--s-3xs); font-size: var(--fs-xs); color: var(--c-ink-3); opacity: 0; transition: opacity var(--dur-slow) var(--ease-out); }
.saved.on { opacity: 1; }
.saved .icon { color: var(--c-brand); }
.linkbtn { display: inline-flex; align-items: center; gap: var(--s-3xs); min-height: var(--tap); padding: 0 var(--s-2xs); background: none; border: 0; color: var(--c-ink-2); font-size: var(--fs-s); font-weight: var(--weight-strong); cursor: pointer; text-decoration: none; border-radius: var(--radius-s); transition: color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out); }
.linkbtn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .linkbtn:hover { color: var(--c-ink); } }
.linkbtn.brand-link { color: var(--c-brand); }
@media (hover: hover) and (pointer: fine) { .linkbtn.brand-link:hover { color: var(--c-brand-strong); } }
#start-over { color: var(--c-ink-3); font-weight: 500; }

/* progress dots: done dots, the current pill, then the dots to come. Placed with transforms so the pill slides. */
.dots { position: relative; display: block; flex: none; height: var(--dot); }
.dots i { position: absolute; left: 0; top: 0; width: var(--dot); height: var(--dot); border-radius: var(--radius-pill); background: var(--c-track); transition: transform var(--dur-slow) var(--ease-out), background-color var(--dur) ease; }
.dots i.done, .dots i.now { background: var(--c-brand); }
.dots i.pill { z-index: 1; width: var(--pill); background: var(--c-brand); }

/* test bar and the two header sheets */
.testbar { background: var(--c-amber-bg); color: var(--c-amber-ink); }
.testbar-inner { max-width: calc(var(--col) + 2 * var(--gutter)); margin: 0 auto; padding: var(--s-3xs) var(--gutter); display: flex; align-items: center; gap: var(--s-xs); font-size: var(--fs-s); }
.testbar-tag { font-weight: 700; white-space: nowrap; }
.testbar select { flex: 1; min-width: 0; max-width: 28rem; min-height: 36px; padding: 0 var(--s-xs); border: 0; border-radius: var(--radius-s); background: var(--c-surface); color: var(--c-ink); font-size: var(--fs-s); }
.panelbar { background: var(--c-soft); animation: rise var(--dur) var(--ease-out); }
.panelbar-inner { max-width: calc(var(--col) + 2 * var(--gutter)); margin: 0 auto; padding: var(--s-m) var(--gutter) var(--s-l); }
.panelbar p { margin: 0 0 var(--s-xs); font-weight: var(--weight-strong); max-width: var(--measure); }
.panelbar .row { display: flex; flex-wrap: wrap; gap: var(--s-xs); margin-top: var(--s-s); }
.copyline { display: flex; gap: var(--s-xs); align-items: stretch; margin-top: var(--s-xs); }
.copyline input { flex: 1; min-width: 0; font-size: var(--fs-s); }
.copyline .input { min-height: var(--tap); font-size: max(16px, var(--fs-s)); padding: 0 var(--s-m); background: var(--c-surface); }
.panelbar .copyline .input { background: var(--c-bg); }
@media (max-width: 719px) { .testbar select { font-size: max(16px, var(--fs-s)); } }

/* ---------- shell ---------- */
.shell { max-width: calc(var(--col) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.side { display: none; }
main { outline: none; }
.content { padding: var(--s-m) 0 160px; min-width: 0; }

/* ---------- screen ---------- */
.screen { position: relative; animation: fade var(--dur) var(--ease-out) both; }
@keyframes fade { from { opacity: 0; } }
/* Screen changes: forward comes in from the right, Back from the left. Re-renders of the same screen stay still. */
.screen[data-enter="none"] { animation: none; }
.screen[data-enter="fwd"] { animation: enter-fwd var(--dur-screen) var(--ease-out) backwards; }
.screen[data-enter="back"] { animation: enter-back var(--dur-screen) var(--ease-out) backwards; }
@keyframes enter-fwd { from { opacity: 0; transform: translateX(24px); } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-24px); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.92) translateY(4px); } }
/* Screens filled from the return: a quiet line above the next screen, laid over the top padding. */
.skipnote { position: absolute; left: 0; right: 0; bottom: calc(100% + 2px); margin: 0; display: flex; align-items: center; gap: var(--s-2xs); font-size: var(--fs-xs); font-weight: var(--weight-strong); line-height: 1.3; color: var(--c-brand); pointer-events: none; animation: skipnote 3.2s var(--ease-out) forwards; }
@keyframes skipnote { 0% { opacity: 0; transform: translateY(3px); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
/* First view of a screen: answers from the return fill in with their tint, one after another. */
.reveal .input, .reveal .opt:has(input:checked), .opt.reveal { animation: prefill 700ms var(--ease-out) var(--d, 0ms) backwards; }
@keyframes prefill { from { background-color: var(--c-soft); color: var(--c-ink); } }

.secname { margin: 0; font-size: var(--fs-s); font-weight: var(--weight-strong); color: var(--c-sec); }
.screen h1 { font-size: var(--fs-title); line-height: var(--leading-tight); font-weight: var(--weight-head); letter-spacing: -0.03em; margin: 8px 0 0; outline: none; max-width: 22ch; }
.lede { margin: var(--s-s) 0 0; color: var(--c-ink-2); max-width: var(--measure); }
.body { margin-top: 30px; }
.fields { display: flex; flex-direction: column; gap: 40px; }
/* Follow-up page: no lead column, so the questions keep their own space. */
.lede + .fields { margin-top: var(--s-xl); }
.fields > .panel + .panel { margin-top: 0; }

/* ---------- fields ---------- */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field-label, legend.field-label { display: block; padding: 0; margin: 0 0 var(--s-m); font-size: var(--fs-q); font-weight: var(--weight-head); letter-spacing: -0.02em; line-height: 1.15; max-width: var(--measure); text-wrap: balance; }
.hint { margin: calc(-1 * var(--s-2xs)) 0 var(--s-m); color: var(--c-ink-2); font-size: var(--fs-s); max-width: var(--measure); }
.input, select.input, textarea.input {
  display: block; width: 100%; min-width: 0;
  min-height: var(--field-h); padding: 0 18px;
  background: var(--c-soft); color: var(--c-ink);
  border: 0; border-radius: var(--radius-field);
  font-size: var(--fs-value); font-weight: 500; letter-spacing: -0.01em;
  box-shadow: 0 0 0 0 transparent;
  transition: background-color var(--dur-fast) ease, box-shadow var(--dur) var(--ease-out), opacity var(--dur-fast) ease;
}
.input::placeholder { color: var(--c-placeholder); }
textarea.input { min-height: 132px; padding: var(--s-m) 18px; resize: vertical; line-height: var(--leading-snug); font-size: var(--fs-lede); letter-spacing: 0; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 52px; cursor: pointer; font-size: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b64' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 20px center; background-size: 18px; }
@media (hover: hover) and (pointer: fine) { .input:hover:not(:focus):not(:disabled) { background-color: var(--c-soft-hover); } }
.input:focus-visible, .input:focus { outline: none; background-color: var(--c-soft-focus); box-shadow: 0 0 0 3px var(--c-ring); }
.input[aria-invalid="true"] { background-color: var(--c-error-bg); }
.input:disabled { opacity: 0.45; cursor: not-allowed; }
.money { position: relative; }
.money .cur { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--c-ink-3); pointer-events: none; font-size: var(--fs-money); font-weight: 500; letter-spacing: -0.02em; }
.money .input { min-height: var(--money-h); padding-left: calc(20px + 0.62em); padding-right: 20px; font-size: var(--fs-money); letter-spacing: -0.02em; font-variant-numeric: proportional-nums; }
.input.num { font-variant-numeric: proportional-nums; }
/* Answers filled from the return sit on the brand tint. */
.slot:has(> .rx > .from-return) .input:not(:focus):not([aria-invalid="true"]) { background-color: var(--c-brand-tint); }

/* You and Spouse: side by side for years and short numbers; money stacks on small phones. */
.pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-s); }
.pair.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 479px) { .pair.two:has(.money) { grid-template-columns: minmax(0, 1fr); } }
.cell { min-width: 0; container-type: inline-size; }
.who, .who-block > legend.who { display: block; font-size: var(--fs-xs); font-weight: var(--weight-strong); color: var(--c-ink-3); margin: 0 0 var(--s-2xs); padding: 0; }
.who-block { padding: 0; margin: 0; }
.who-block + .who-block { margin-top: var(--s-l); }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-m) var(--s-s); }
.contact-grid .wide { grid-column: 1 / -1; }
.contact-grid label { display: block; font-size: var(--fs-xs); font-weight: var(--weight-strong); color: var(--c-ink-3); margin-bottom: var(--s-2xs); }
.contact-grid .input { font-size: 20px; }

/* One "from your return" line under a You and Spouse pair, not one under each. */
@media (min-width: 480px) {
  .pair.two:has(> .slot:first-child .from-return:not(.suggest)) > .slot:nth-child(2) .from-return:not(.suggest) { display: none; }
}
@media (max-width: 479px) {
  .pair.two:not(:has(.money)):has(> .slot:first-child .from-return:not(.suggest)) > .slot:nth-child(2) .from-return:not(.suggest) { display: none; }
  .pair.two:has(.money):has(> .slot:nth-child(2) .from-return:not(.suggest)) > .slot:first-child .from-return:not(.suggest) { display: none; }
}

/* Not sure, where to find it, return lines: small and quiet under the field */
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-m); margin-top: var(--s-2xs); }
.tools:empty { display: none; }
.unsure { position: relative; display: inline-flex; align-items: center; gap: var(--s-xs); min-height: 40px; font-size: var(--fs-xs); font-weight: var(--weight-strong); color: var(--c-ink-3); cursor: pointer; user-select: none; }
.unsure input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.unsure .track { width: 20px; height: 20px; border-radius: 7px; background: var(--c-track); display: grid; place-items: center; flex: none; transition: background-color var(--dur-fast) ease, box-shadow var(--dur) var(--ease-out); }
.unsure .track::after { content: ""; width: 12px; height: 12px; background: var(--c-on-brand); clip-path: inset(0 100% 0 0); transition: clip-path var(--dur) var(--ease-out);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='black' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='black' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.unsure input:checked + .track { background: var(--c-brand); }
.unsure input:checked + .track::after { clip-path: inset(0); }
.unsure:has(input:checked) { color: var(--c-ink); }
.unsure input:focus-visible + .track { box-shadow: 0 0 0 3px var(--c-ring); }
.where { font-size: var(--fs-xs); color: var(--c-ink-3); }
.where summary { display: inline-flex; align-items: center; gap: var(--s-3xs); min-height: 40px; cursor: pointer; list-style: none; font-weight: var(--weight-strong); border-radius: var(--radius-s); }
.where summary::-webkit-details-marker { display: none; }
.where summary::after { content: ""; width: 12px; height: 12px; background: currentColor; transition: transform var(--dur) var(--ease-out);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.where[open] summary::after { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) { .where summary:hover { color: var(--c-ink); } }
.where p { margin: 0 0 var(--s-2xs); color: var(--c-ink-2); font-size: var(--fs-s); max-width: var(--measure); animation: rise var(--dur) var(--ease-out); }
.rx:empty { display: none; }
.from-return { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2xs); margin-top: var(--s-s); font-size: var(--fs-xs); font-weight: var(--weight-strong); color: var(--c-brand); }
.from-return .icon { width: 14px; height: 14px; }
.from-return strong { color: var(--c-ink); font-weight: 700; }
.from-return.suggest { color: var(--c-ink-2); }
.from-return.suggest .icon { color: var(--c-brand); }
.from-return .acts { flex-basis: 100%; display: inline-flex; gap: var(--s-2xs); margin-top: var(--s-3xs); }
.mini { min-height: 38px; padding: 0 var(--s-m); border-radius: var(--radius-pill); border: 0; background: var(--c-soft); color: var(--c-ink); font-size: var(--fs-xs); font-weight: var(--weight-strong); cursor: pointer; display: inline-flex; align-items: center; gap: var(--s-3xs); transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) ease; }
@media (hover: hover) and (pointer: fine) { .mini:hover { background: var(--c-soft-hover); } }
.mini:active { transform: scale(0.97); }
.mini.solid { background: var(--c-brand); color: var(--c-on-brand); }
.hintbtn { display: inline-flex; align-items: center; gap: var(--s-2xs); margin-top: var(--s-s); min-height: 36px; padding: 0; border: 0; border-radius: var(--radius-s); background: transparent; color: var(--c-brand); font-size: var(--fs-xs); font-weight: var(--weight-strong); cursor: pointer; text-align: left; transition: transform var(--dur-press) var(--ease-out), color var(--dur-fast) ease; }
.hintbtn .icon { width: 14px; height: 14px; }
.hintbtn:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .hintbtn:hover { color: var(--c-brand-strong); } }
.hintbtn b { color: var(--c-ink); font-weight: 700; }
.hinttext { margin: var(--s-2xs) 0 0; font-size: var(--fs-xs); color: var(--c-ink-2); }
/* Amount and "how often" sit side by side only when the column is wide enough. */
.period { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-xs); }
@container (min-width: 22rem) { .period { grid-template-columns: minmax(0, 1fr) minmax(8.5rem, 0.7fr); } }
.period select.input { min-height: var(--money-h); font-size: var(--fs-1); color: var(--c-ink-2); }
.period .hours { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s-xs); font-size: var(--fs-xs); font-weight: var(--weight-strong); color: var(--c-ink-3); }
.period .hours .input { width: 6em; min-height: var(--tap); font-size: var(--fs-lede); }
.yearly { margin: var(--s-xs) 0 0; font-size: var(--fs-xs); color: var(--c-ink-2); }
.yearly b { color: var(--c-ink); }

/* ---------- choices: pill chips that wrap; long labels are full-width rounded items ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-xs); }
.options { display: grid; gap: var(--s-xs); max-width: 36rem; }
.opt {
  position: relative; display: inline-flex; align-items: center;
  min-height: var(--chip-h); padding: 0 20px;
  border-radius: var(--radius-pill);
  background: var(--c-soft); color: var(--c-ink);
  font-size: var(--fs-0); font-weight: 450; line-height: 1.25;
  cursor: pointer; user-select: none;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, box-shadow var(--dur) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .opt:hover:not(:has(input:checked)) { background: var(--c-soft-hover); } }
.opt:active { transform: scale(0.97); }
/* The check: no room when off, 16px with an 8px gap when on. */
.opt .dot { flex: none; display: inline-grid; place-items: center; width: 0; height: 16px; margin: 0; overflow: hidden; transition: width var(--dur-fast) var(--ease-out), margin var(--dur-fast) var(--ease-out); }
.opt .dot:empty { display: none; }
.opt .dot .icon { width: 16px; height: 16px; stroke-width: 3; }
.opt:has(input:checked) { background: var(--c-brand); color: var(--c-on-brand); font-weight: var(--weight-strong); box-shadow: var(--shadow-chip); }
.opt:has(input:checked) .dot { width: 16px; margin: 0 8px 0 -6px; }
.opt.just:has(input:checked) .dot .icon path { stroke-dasharray: 24; animation: stroke-draw 260ms var(--ease-out) 40ms backwards; }
.opt:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--c-ring); }
.opt:has(input:checked:focus-visible) { box-shadow: var(--shadow-chip), 0 0 0 3px var(--c-ring); }
.opt small.hinttext { display: block; margin: 2px 0 0; color: inherit; opacity: 0.8; font-weight: 500; }
.options .opt { display: flex; min-height: var(--item-h); padding: 14px 20px; border-radius: var(--radius-field); text-align: left; }
/* A lone consent box: a soft round marker that fills with a check. */
.options:not(:has(> .opt + .opt)) .opt .dot { width: 24px; height: 24px; margin: 0 14px 0 -4px; border-radius: var(--radius-pill); background: var(--c-track); color: transparent; transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease; }
.options:not(:has(> .opt + .opt)) .opt .dot .icon { width: 14px; height: 14px; }
.options:not(:has(> .opt + .opt)) .opt:has(input:checked) .dot { margin: 0 14px 0 -4px; background: var(--c-on-brand); color: var(--c-brand); }
.options:not(:has(> .opt + .opt)) .opt:has(input:checked) .dot .icon path { stroke-dasharray: 24; animation: stroke-draw 260ms var(--ease-out) 40ms backwards; }

/* Yes and No (follow-up page): two short pills side by side. */
.options.yesno { display: flex; flex-wrap: wrap; }
.options.yesno .opt { display: inline-flex; min-height: var(--chip-h); padding: 0 24px; border-radius: var(--radius-pill); }

/* stay helper */
.helper { margin-top: var(--s-s); padding: var(--s-m); border-radius: var(--radius-field); background: var(--c-soft); animation: rise var(--dur) var(--ease-out); }
.helper .pair { margin-top: 0; }
.helper label { display: block; font-size: var(--fs-xs); font-weight: var(--weight-strong); color: var(--c-ink-3); margin-bottom: var(--s-2xs); }
.helper .input { min-height: 52px; font-size: 20px; background: var(--c-bg); }
.helper .result { margin: var(--s-s) 0 0; font-size: var(--fs-s); color: var(--c-ink-2); }
.helper .result:empty { display: none; }

/* debts: one group per debt, no box */
.debt h3 { margin: 0 0 var(--s-m); font-size: var(--fs-q); letter-spacing: -0.02em; line-height: 1.15; }
.debt .sub, .debt legend.sub { display: block; padding: 0; font-size: var(--fs-xs); font-weight: var(--weight-strong); color: var(--c-ink-3); margin: 0 0 var(--s-2xs); }
.debt .rate-wrap { margin-top: var(--s-l); }
.debt .pair.two { gap: var(--s-s); }
@media (max-width: 479px) { .debt .pair.two { grid-template-columns: minmax(0, 1fr); } }

/* notes and errors */
.note { display: flex; gap: var(--s-2xs); align-items: flex-start; margin: var(--s-s) 0 0; padding: var(--s-xs) var(--s-m); border-radius: var(--radius-m); background: var(--c-amber-bg); color: var(--c-amber-ink); font-size: var(--fs-s); line-height: var(--leading-snug); animation: rise var(--dur) var(--ease-out); }
.note .icon { margin-top: 1px; }
.err { display: flex; gap: var(--s-2xs); align-items: flex-start; margin: var(--s-s) 0 0; color: var(--c-error); font-weight: var(--weight-strong); font-size: var(--fs-s); animation: rise var(--dur) var(--ease-out); }
.err .icon { margin-top: 2px; }
.blocked { display: flex; gap: var(--s-2xs); align-items: center; margin: var(--s-l) 0 0; padding: var(--s-s) var(--s-m); border-radius: var(--radius-m); background: var(--c-error-bg); color: var(--c-error); font-weight: var(--weight-strong); font-size: var(--fs-s); animation: rise var(--dur) var(--ease-out); }

/* ---------- files: the upload area and the file rows ---------- */
.upslot { display: flex; flex-direction: column; }
.drop { display: grid; gap: var(--s-s); justify-items: start; padding: 20px; border-radius: var(--radius-sheet); background: var(--c-soft); transition: opacity var(--dur) ease; }
.drop.off { opacity: 0.5; }
.drop.big { min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: var(--s-l) var(--s-m); border-radius: 28px; text-align: center; }
.upmark { width: 64px; height: 64px; border-radius: var(--radius-pill); background: var(--c-bg); color: var(--c-brand); display: grid; place-items: center; box-shadow: 0 8px 20px rgba(15, 77, 54, 0.1); animation: float 2.4s ease-in-out infinite; }
.upmark .icon { width: 26px; height: 26px; }
.uptitle { margin: 10px 0 0; font-size: var(--fs-lede); font-weight: var(--weight-head); letter-spacing: -0.01em; }
.upsub { margin: 0; font-size: var(--fs-s); color: var(--c-ink-3); }
.uprow { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.drop.big .uprow { margin-top: 14px; }
.drop:not(.big) .uprow { justify-content: flex-start; }
.uprow .btn { position: relative; overflow: hidden; min-height: 46px; padding: 0 20px; font-size: 15px; }
.uprow .pick .icon { display: none; }
.uprow .photo { padding: 0 18px; background: var(--c-bg); color: var(--c-ink); gap: 6px; }
.uprow .photo .icon { width: 17px; height: 17px; }
.drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop input[type="file"]:disabled { cursor: not-allowed; }
.uprow .btn:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--c-ring); }
.drop .types { margin: 0; font-size: var(--fs-xs); color: var(--c-ink-3); }
/* After the first file: the rows come first, then a quiet "Add more pages" pill. */
.drop.has-files { min-height: 0; display: block; padding: 0; margin-top: var(--s-s); background: transparent; }
.drop.has-files :is(.upmark, .uptitle, .upsub, .photo, .types) { display: none; }
.drop.has-files .uprow { margin: 0; justify-content: flex-start; }
.drop.has-files .pick { min-height: 44px; padding: 0 18px 0 14px; gap: 6px; background: var(--c-soft); color: var(--c-ink); }
.drop.has-files .pick .icon { display: block; stroke-width: 2.4; }
.upslot:has(.drop.has-files) .files { order: -2; margin-top: 0; }
.upslot:has(.drop.has-files) .drop { order: -1; }
.lock { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: var(--fs-xs); color: var(--c-ink-3); max-width: var(--measure); }
.lock .icon { width: 15px; height: 15px; margin-top: 1px; }
.files { list-style: none; margin: var(--s-s) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: var(--s-xs); }
.files:empty { display: none; }
.file { display: flex; align-items: center; gap: 14px; padding: 14px 10px 14px 14px; border-radius: 22px; background: var(--c-soft); animation: rise var(--dur) var(--ease-out); }
.ftile { width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--c-bg); color: var(--c-brand); display: grid; place-items: center; }
.ftile .icon { width: 22px; height: 22px; }
.fmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file .fname { font-size: var(--fs-0); font-weight: var(--weight-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .fstate { margin-top: 2px; font-size: var(--fs-xs); color: var(--c-ink-3); }
.file .fpct { margin: 0; flex: none; font-weight: var(--weight-strong); font-variant-numeric: tabular-nums; }
.file .bar { display: block; margin-top: 9px; height: 6px; border-radius: var(--radius-pill); background: var(--c-track); overflow: hidden; }
.file .bar span { display: block; height: 100%; border-radius: inherit; background: var(--c-brand); transform-origin: left; transform: scaleX(0); transition: transform var(--dur) linear; }
.file.failed .fstate { color: var(--c-error); font-weight: var(--weight-strong); }
.fok { width: 28px; height: 28px; flex: none; border-radius: var(--radius-pill); background: var(--c-brand); color: var(--c-on-brand); display: grid; place-items: center; animation: ring 260ms var(--ease-out); }
.fok .icon { width: 15px; height: 15px; stroke-width: 3; }
.fok .icon path { stroke-dasharray: 24; animation: stroke-draw 360ms var(--ease-out) 100ms backwards; }
.fx { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--c-ink-3); cursor: pointer; transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out); }
.fx:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .fx:hover { background: var(--c-soft-hover); color: var(--c-ink); } }

/* the return screen: the consent copy and the consent item */
.rf-copy p { margin: 0 0 6px; font-size: 15px; line-height: 1.5; color: var(--c-ink-2); max-width: var(--measure); }
.options.consent { margin-top: 22px; max-width: none; }
.options.consent .opt { min-height: 56px; padding: 10px 18px 10px 14px; font-size: 15px; font-weight: var(--weight-strong); line-height: 1.35; }
.options.consent .opt .dot, .options.consent .opt:has(input:checked) .dot { margin: 0 12px 0 0; }
.rf-upload { margin-top: 14px; }

@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes ring { from { transform: scale(0.6); opacity: 0; } }
@keyframes pulse { 50% { transform: scale(0.55); opacity: 0.55; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 22px; border-radius: var(--radius-pill); border: 0; font-size: var(--fs-0); font-weight: var(--weight-strong); letter-spacing: -0.005em; cursor: pointer; text-decoration: none; transition: background-color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out), opacity var(--dur-fast) ease, box-shadow var(--dur) var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--c-brand); color: var(--c-on-brand); }
@media (hover: hover) and (pointer: fine) { .btn.primary:hover { background: var(--c-brand-strong); } }
.btn.ghost { background: var(--c-soft); color: var(--c-ink); }
@media (hover: hover) and (pointer: fine) { .btn.ghost:hover { background: var(--c-soft-hover); } }
.panelbar .btn.ghost { background: var(--c-bg); }
.btn.soft { background: var(--c-brand-tint); color: var(--c-brand); }
.btn.plain { min-height: var(--tap); padding: 0 6px; background: transparent; color: var(--c-ink-2); }
@media (hover: hover) and (pointer: fine) { .btn.plain:hover { color: var(--c-ink); } }
.btn.small { min-height: 44px; padding: 0 var(--s-m); font-size: var(--fs-s); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .icon { transition: transform var(--dur) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn.primary:hover .icon.go { transform: translateX(3px); } }

/* The big actions: Next, Looks right, Start, Continue, Submit. */
.nav #next, #start, #submit, #rf-continue { min-height: var(--cta-h); padding: 0 26px; font-size: var(--fs-1); box-shadow: var(--shadow-cta); }
#submit[disabled] { box-shadow: none; }
.nav #next .icon, #start .icon, #rf-continue .icon { width: 20px; height: 20px; stroke-width: 2.2; }
.nav #next.round { width: var(--cta-h); padding: 0; }
.nav #next.round .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav #next.round .icon { width: 24px; height: 24px; }

/* Actions on phones: a fixed area at the bottom in the page color. */
.nav, .readnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--c-bg); padding: var(--s-s) 0 calc(26px + env(safe-area-inset-bottom)); }
.nav::before, .readnav::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 28px; background: linear-gradient(to bottom, color-mix(in srgb, var(--c-bg) 0%, transparent), var(--c-bg)); pointer-events: none; }
.nav-inner { max-width: calc(var(--col) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.nav-left { display: inline-flex; align-items: center; gap: var(--s-2xs); }
.nav #next[disabled] { opacity: 1; background: var(--c-off-bg); color: var(--c-off-ink); box-shadow: none; }

/* ---------- welcome and done ---------- */
.hero { padding-top: var(--s-xl); }
.hero h1 { font-size: var(--fs-hero); line-height: 1.02; letter-spacing: -0.035em; max-width: 13ch; margin: 0 0 var(--s-l); }
.hero .lede { font-size: var(--fs-lede); color: var(--c-ink-2); margin: 0; }
/* The one "no documents" choice: a plain warning with the upload button first. */
.nodocs { margin-top: 28px; padding: 20px 22px; border-radius: var(--radius-field); background: var(--c-soft); animation: pop 320ms var(--ease-out) backwards; }
.nodocs p { margin: 0; color: var(--c-ink-2); max-width: var(--measure); }
.nodocs .nodocs-title { margin-bottom: 6px; font-weight: var(--weight-head); color: var(--c-ink); font-size: var(--fs-1); }
.nodocs-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 18px; }

/* Before you start: two lists to gather. A tap ticks an item. */
.prep-lists { display: grid; gap: 36px; margin-top: 32px; }
.prep-group h2 { margin: 0 0 10px; font-size: var(--fs-s); font-weight: var(--weight-strong); color: var(--c-sec); letter-spacing: 0; }
.prep-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.prep-item { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: flex-start; gap: 14px; padding: 12px 14px; margin: 0 -14px; border-radius: var(--radius-field); cursor: pointer; font-size: var(--fs-0); line-height: 1.4; color: var(--c-ink); transition: background-color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out); }
.prep-item:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) { .prep-item:hover { background: var(--c-soft); } }
.prep-item:focus-visible { box-shadow: 0 0 0 3px var(--c-ring); }
.prep-item .dot { flex: none; width: 26px; height: 26px; margin-top: -1px; border-radius: var(--radius-pill); background: var(--c-soft); color: transparent; display: grid; place-items: center; transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.prep-item .dot svg { width: 15px; height: 15px; }
.prep-item[aria-pressed="true"] .dot { background: var(--c-brand); color: var(--c-on-brand, #fff); }
.prep-item[aria-pressed="true"] > span:last-child { color: var(--c-ink-2); }
.hero #start { margin-top: 36px; min-width: 10rem; }
.fine { margin: var(--s-l) 0 0; font-size: var(--fs-xs); color: var(--c-ink-3); max-width: 44ch; }
.done-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--c-brand); color: var(--c-on-brand); margin-bottom: var(--s-l); box-shadow: var(--shadow-chip); }
.done-mark .icon { width: 30px; height: 30px; stroke-width: 2.6; }
/* Done: the circle comes in, the check draws, then the heading and text rise. */
.screen:has(> .done-mark) { animation: none; }
.done-mark { animation: mark-in 320ms var(--ease-out) backwards; }
.done-mark .icon path { stroke-dasharray: 24; animation: stroke-draw 380ms var(--ease-out) 180ms backwards; }
.done-mark ~ h1 { animation: rise 280ms var(--ease-out) 320ms backwards; }
.done-mark ~ .lede { animation: rise 280ms var(--ease-out) 380ms backwards; }
@keyframes mark-in { from { opacity: 0; transform: scale(0.85); } }
@keyframes stroke-draw { from { stroke-dashoffset: 24; } }

/* ---------- reading the return: reading, found, done ---------- */

.readbody { display: flex; flex-direction: column; }
.readbody > * { animation: enter-fwd 360ms var(--ease-out) backwards; }
.readlead .secname { display: inline-flex; align-items: center; gap: 8px; }
.readlead .secname .icon { width: 15px; height: 15px; }
.screen .readbody h1 { margin: 8px 0 0; }
/* the page stack and the moving band */
.readstage { position: relative; height: 290px; margin-top: 10px; }
.rsheet, .readpage { position: absolute; left: 50%; top: 40px; width: 136px; height: 176px; margin-left: -68px; border-radius: 14px; }
.rsheet.one { background: var(--c-soft-hover); transform: translate(-7px, 10px) rotate(-8deg); }
.rsheet.two { background: var(--c-soft); transform: translate(8px, 4px) rotate(5deg); }
.readpage { overflow: hidden; padding: 20px 16px; display: flex; flex-direction: column; gap: 9px; background: var(--c-surface); box-shadow: 0 16px 36px rgba(15, 77, 54, 0.14); }
.readpage i { display: block; height: 5px; border-radius: var(--radius-pill); background: var(--c-brand-tint); }
.readpage i:nth-of-type(1) { width: 44px; height: 7px; background: var(--c-track); }
.readpage i:nth-of-type(2), .readpage i:nth-of-type(4), .readpage i:nth-of-type(7) { width: 100%; }
.readpage i:nth-of-type(3) { width: 86%; }
.readpage i:nth-of-type(5) { width: 70%; background: var(--c-brand); opacity: 0.55; }
.readpage i:nth-of-type(6) { width: 92%; }
.readpage i:nth-of-type(8) { width: 60%; }
.readpage i:nth-of-type(9) { width: 84%; }
.readband { position: absolute; left: 0; right: 0; top: 0; height: 34px; background: rgba(15, 77, 54, 0.1); animation: scan 1.7s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateY(-36px); } to { transform: translateY(176px); } }
.readfiles { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; padding: 0; }
/* steps: done has a check that draws, now has a pulsing dot, the rest wait in soft circles */
.readsteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-m); }
.readsteps li { display: flex; align-items: center; gap: 14px; font-size: var(--fs-1); color: var(--c-ink-2); transition: color var(--dur) ease; }
.readsteps li.now { color: var(--c-ink); font-weight: var(--weight-head); }
.readsteps li.todo { color: var(--c-placeholder); }
.rmark { position: relative; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--radius-pill); background: var(--c-soft); color: var(--c-on-brand); transition: background-color var(--dur) var(--ease-out); }
.rmark .icon { width: 14px; height: 14px; stroke-width: 3; }
.rmark .icon path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 360ms var(--ease-out) 100ms; }
.readsteps li.now .rmark { background: var(--c-brand-tint); }
.readsteps li.now .rmark::after { content: ""; width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--c-brand); animation: pulse 1.2s ease-in-out infinite; }
.readsteps li.done .rmark { background: var(--c-brand); animation: ring 260ms var(--ease-out); }
.readsteps li.done .rmark .icon path { stroke-dashoffset: 0; }
.readtime { margin: 22px 0 0; font-size: var(--fs-s); color: var(--c-ink-3); }
/* found: a value and a label for each thing, one after another */
.readbody[data-phase="found"] { cursor: pointer; }
.readbody[data-phase="found"] h1 { margin-bottom: 30px; }
.readgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; }
.readgrid li { display: flex; flex-direction: column; gap: 4px; min-width: 0; animation: pop 380ms var(--ease-out) var(--d, 0ms) backwards; }
.gicon { width: 40px; height: 40px; margin-bottom: 8px; border-radius: var(--radius-pill); background: var(--c-soft); color: var(--c-brand); display: grid; place-items: center; }
.gicon .icon { width: 19px; height: 19px; }
.gval { font-size: 19px; font-weight: var(--weight-head); letter-spacing: -0.01em; line-height: 1.2; overflow-wrap: anywhere; }
.glab { font-size: var(--fs-xs); color: var(--c-ink-3); }
.fillbar { position: fixed; left: var(--gutter); right: var(--gutter); bottom: calc(34px + env(safe-area-inset-bottom)); }
.fillbar p { margin: 0 0 10px; font-size: var(--fs-s); font-weight: var(--weight-strong); color: var(--c-ink-2); }
.fbar { display: block; height: 6px; border-radius: var(--radius-pill); background: var(--c-track); overflow: hidden; }
.fbar span { display: block; height: 100%; border-radius: inherit; background: var(--c-brand); transform-origin: left; animation: fill var(--fill, 4s) linear forwards; }
@keyframes fill { from { transform: scaleX(0.04); } to { transform: scaleX(1); } }
/* done: the drawn check, the count, the forms and the two count lines */
.readbody .done-mark { width: 68px; height: 68px; margin: var(--s-m) 0 0; box-shadow: var(--shadow-cta); animation: ring 420ms var(--ease-out) backwards; }
.readbody .done-mark .icon { width: 32px; height: 32px; }
.readbody .done-mark .icon path { animation: stroke-draw 480ms var(--ease-out) 220ms backwards; }
.readbody[data-phase="done"] h1 { margin-top: 28px; font-size: 34px; line-height: 1.05; letter-spacing: -0.035em; }
.readcount { margin: 10px 0 0; font-size: var(--fs-1); color: var(--c-ink-2); animation: pop 420ms var(--ease-out) 280ms backwards; }
.readcount strong { font-weight: var(--weight-head); color: var(--c-ink); font-variant-numeric: tabular-nums; }
.readmore { margin-top: 28px; }
.readfound { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.readfound li { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border-radius: var(--radius-pill); background: var(--c-brand-tint); color: var(--c-brand); font-size: 15px; font-weight: var(--weight-strong); animation: pop 380ms var(--ease-out) var(--d, 0ms) backwards; }
.readlines { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 14px; animation: pop 420ms var(--ease-out) 760ms backwards; }
.taxsum { margin-top: 36px; animation: pop 420ms var(--ease-out) 560ms backwards; }
.taxsum h2 { margin: 0 0 14px; font-size: var(--fs-0); font-weight: var(--weight-head); color: var(--c-ink); }
.taxsum dl { margin: 0; display: grid; gap: 12px; }
.taxsum dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.taxsum dt { color: var(--c-ink-2); font-size: var(--fs-0); }
.taxsum dd { margin: 0; font-weight: var(--weight-head); font-size: var(--fs-1); white-space: nowrap; color: var(--c-ink); }
.readlines li { display: flex; align-items: center; gap: 12px; font-size: var(--fs-0); }
.rnum { width: 32px; height: 32px; flex: none; border-radius: var(--radius-pill); background: var(--c-soft); color: var(--c-brand); display: grid; place-items: center; font-size: var(--fs-s); font-weight: 700; }
.readnav .nav-inner { justify-content: flex-end; }

/* Review, first view only: key facts and the return list come in with a short stagger. */
.screen.first .facts > div, .screen.first #auto-facts > li { animation: rise 240ms var(--ease-out) var(--d, 0ms) backwards; }

/* ---------- groups without boxes: return consent, spouse invite, review ---------- */
.panel + .panel { margin-top: var(--s-q); }
.panel h2 { margin: 0 0 var(--s-m); font-size: var(--fs-q); line-height: 1.15; }
.panel > p { margin: 0 0 var(--s-s); color: var(--c-ink-2); max-width: var(--measure); }
.panel > .options { margin-top: var(--s-l); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px var(--s-l); }
.facts div { min-width: 0; }
.facts dt { font-size: var(--fs-xs); font-weight: var(--weight-strong); color: var(--c-ink-3); }
.facts dd { margin: var(--s-3xs) 0 0; font-size: var(--fs-1); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.facts .money-big dd { font-size: var(--fs-value); font-weight: var(--weight-head); letter-spacing: -0.02em; line-height: 1.15; }
.signoff { margin-block: var(--s-m) var(--s-l); }
.rf-upload { margin-top: var(--s-q); }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-m); margin-top: var(--s-l); }
.skips, .checks { list-style: none; margin: 0; padding: 0; }
.skips { display: flex; flex-wrap: wrap; gap: var(--s-xs); }
.skips li { display: inline-flex; align-items: center; gap: var(--s-2xs); min-height: 48px; max-width: 100%; padding: 6px 6px 6px 18px; border-radius: 24px; background: var(--c-soft); font-size: var(--fs-s); line-height: 1.3; }
.skips li .linkbtn { flex: none; min-height: 36px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--c-bg); }
.checks { display: grid; gap: var(--s-2xs); }
.checks li { display: flex; gap: var(--s-s); align-items: center; justify-content: space-between; padding: var(--s-xs) var(--s-xs) var(--s-xs) var(--s-m); border-radius: var(--radius-m); background: var(--c-amber-bg); color: var(--c-amber-ink); font-size: var(--fs-s); }
.checks li .linkbtn { color: var(--c-amber-ink); min-height: 36px; flex: none; }
.review-sec { margin-top: var(--s-xs); }
.all-answers > h2 + .review-sec { margin-top: 0; }
.review-screen { padding: var(--s-m) 20px var(--s-2xs); }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-m); }
.review-head h4 { margin: 0; font-size: var(--fs-0); font-weight: var(--weight-head); letter-spacing: -0.01em; }
.review-head .linkbtn { color: var(--c-brand); min-height: 36px; }
.review-screen dl { margin: var(--s-2xs) 0 0; display: grid; gap: var(--s-s); }
.review-screen dt { font-size: var(--fs-xs); color: var(--c-ink-3); }
.review-screen dd { margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-line; }
.review-screen dd .who { display: inline-flex; margin: 0 var(--s-2xs) 0 0; font-size: var(--fs-xs); }
.review-screen dd .empty { color: var(--c-ink-3); }
.submit-box { margin-top: var(--s-2xl); }
.submit-box h2 { margin: 0; font-size: var(--fs-q); line-height: 1.15; }
.ts { min-height: 70px; margin-bottom: var(--s-m); }
.submit-box #submit { width: 100%; }
@media (min-width: 40rem) { .submit-box #submit { width: auto; min-width: 14rem; } }
.spouse-invite { margin-top: var(--s-q); }
.spouse-invite .panel > .btn { margin-top: var(--s-2xs); }
.spouse-invite .input { min-height: 56px; font-size: 18px; margin-bottom: var(--s-xs); }

/* review sections: soft rows with a chevron that open smoothly */
details.review-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s-m); min-height: 60px; padding: var(--s-s) 20px; border-radius: var(--radius-field); background: var(--c-soft); transition: background-color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out); }
details.review-sec > summary:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) { details.review-sec > summary:hover { background: var(--c-soft-hover); } }
details.review-sec > summary::-webkit-details-marker { display: none; }
details.review-sec > summary h3 { margin: 0; font-size: var(--fs-1); font-weight: var(--weight-head); letter-spacing: -0.01em; }
details.review-sec > summary .count { display: inline-flex; align-items: center; gap: var(--s-xs); font-size: var(--fs-xs); font-weight: var(--weight-strong); color: var(--c-ink-3); white-space: nowrap; }
details.review-sec > summary .count::after { content: ""; width: 16px; height: 16px; background: currentColor; transition: transform var(--dur) var(--ease-out);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
details.review-sec[open] > summary .count::after { transform: rotate(180deg); }
details.review-sec > summary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--c-ring); }
details.review-sec::details-content { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-slow) var(--ease-out), content-visibility var(--dur-slow) allow-discrete; }
details.review-sec[open]::details-content { grid-template-rows: 1fr; }
.rv-body { min-height: 0; overflow: hidden; }

/* ---------- desktop: the two-column layout ---------- */
@media (min-width: 720px) {
  .screen h1 { font-size: 40px; letter-spacing: -0.035em; }
  .hero h1 { font-size: 52px; }
  .fields { gap: var(--s-q); }
}
@media (min-width: 1024px) {
  .top { position: static; }
  .top-inner { max-width: var(--wide); padding: 48px var(--wide-pad) 0; min-height: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 0; }
  .brand { grid-column: 1; grid-row: 1; min-height: var(--tap); }
  .top-right { grid-column: 2; grid-row: 1; }
  .dots { grid-column: 1; grid-row: 2; margin-top: 72px; }
  /* Finish later sits with the actions at the bottom left. */
  #finish-later { position: fixed; z-index: 25; bottom: 52px; left: max(calc(var(--wide-pad) - 8px), calc((100vw - var(--wide)) / 2 + var(--wide-pad) - 8px)); font-size: 15px; }
  .testbar-inner, .panelbar-inner { max-width: var(--wide); padding-inline: var(--wide-pad); }
  /* Start over and Finish later open as a floating sheet, so they show at any scroll place. */
  .panelbar { position: fixed; z-index: 40; top: 24px; left: 50%; width: min(560px, 100vw - 48px); transform: translateX(-50%); border-radius: var(--radius-sheet); box-shadow: var(--shadow-sheet); animation: sheet-in var(--dur) var(--ease-out); }
  .panelbar-inner { padding: var(--s-l); }
  @keyframes sheet-in { from { opacity: 0; transform: translate(-50%, -8px); } }

  .shell { max-width: var(--wide); padding: 0 var(--wide-pad); }
  .content { padding: 28px 0 200px; }
  .screen:has(> .lead) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--wide-pad); align-items: start; }
  .screen > .lead { position: sticky; top: 48px; }
  .screen > .body { margin-top: 0; padding-top: 2px; }
  .screen > .readview { grid-column: 1 / -1; grid-row: 1; }
  .secname { font-size: 15px; }
  .screen h1 { font-size: 56px; line-height: 1.02; letter-spacing: -0.045em; margin-top: 10px; max-width: 14ch; }
  .screen .lede { margin-top: 22px; font-size: var(--fs-1); }

  .nav, .readnav { padding: var(--s-m) 0 44px; }
  .nav-inner { max-width: var(--wide); padding: 0 var(--wide-pad); justify-content: flex-end; }
  .nav #next:not(.round) { padding: 0 30px; }

  .hero { padding-top: 88px; }
  .hero[data-screen="welcome"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--wide-pad); align-items: start; }
  .hero[data-screen="welcome"] > * { grid-column: 2; }
  .hero[data-screen="welcome"] > h1 { grid-column: 1; grid-row: 1 / span 8; font-size: 72px; line-height: 0.98; letter-spacing: -0.045em; max-width: 9ch; margin: 0; }
  .hero[data-screen="welcome"] > .lede { margin-top: 8px; }
  .hero[data-screen="welcome"] > #start { justify-self: start; }
  .hero h1 { font-size: 64px; letter-spacing: -0.045em; }
  /* reading the return on a laptop: the steps or the result on the left, the pages or what was found on the right */
  .readbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 72px; align-items: start; }
  .readbody > .readlead { grid-column: 1; grid-row: 1; }
  .screen .readbody h1 { margin-top: 10px; font-size: 56px; line-height: 1.02; letter-spacing: -0.045em; }
  .readlead .secname { font-size: 15px; }
  .readbody[data-phase="reading"] .readstage { grid-column: 2; grid-row: 1 / span 3; height: 300px; margin-top: 40px; }
  .readbody[data-phase="reading"] .readsteps { grid-column: 1; grid-row: 2; margin-top: 36px; gap: 18px; }
  .readbody[data-phase="reading"] .readtime { grid-column: 1; grid-row: 3; margin-top: 56px; }
  .readsteps li { font-size: var(--fs-lede); }
  .rmark { width: 28px; height: 28px; }
  .rsheet, .readpage { width: 170px; height: 220px; margin-left: -85px; top: 14px; }
  .readpage { padding: 24px 20px; gap: 11px; }
  .readpage i { height: 6px; }
  .readpage i:nth-of-type(1) { width: 54px; height: 8px; }
  .readband { height: 40px; }
  @keyframes scan { from { transform: translateY(-40px); } to { transform: translateY(230px); } }
  .readbody[data-phase="found"] .readgrid { grid-column: 2; grid-row: 1 / span 2; margin-top: 40px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 20px; }
  .gicon { width: 38px; height: 38px; background: var(--c-brand-tint); }
  .readbody[data-phase="found"] .fillbar { position: static; grid-column: 1; grid-row: 2; max-width: 22rem; margin-top: 8px; }
  .readbody[data-phase="done"] .readmore { grid-column: 2; grid-row: 1; margin-top: 40px; }
  .readbody[data-phase="done"] h1 { font-size: 56px; }
  .readnav .nav-inner { justify-content: flex-end; }
}

/* ---------- reduced motion: fades only ---------- */
@media (prefers-reduced-motion: reduce) {
  @keyframes enter-fwd { from { opacity: 0; } }
  @keyframes enter-back { from { opacity: 0; } }
  @keyframes rise { from { opacity: 0; } }
  @keyframes pop { from { opacity: 0; } }
  @keyframes mark-in { from { opacity: 0; } }
  @keyframes sheet-in { from { opacity: 0; } }
  @keyframes skipnote { 0% { opacity: 0; } 8%, 85% { opacity: 1; } 100% { opacity: 0; } }
  @keyframes stroke-draw { from { opacity: 0; } }
  @keyframes breathe { from { opacity: 0.6; } }
  .readband { display: none; }
  .upmark, .rmark::after, .readsteps li.now .rmark::after { animation: none; }
  @keyframes ring { from { opacity: 0; } }
  @keyframes fill { from { transform: scaleX(1); opacity: 0; } }
  .dots i, .opt .dot, .where summary::after, details.review-sec > summary .count::after { transition-property: background-color, opacity; }
  details.review-sec::details-content { transition: none; }
  .btn:active, .opt:active, .mini:active, .linkbtn:active, .hintbtn:active, details.review-sec > summary:active { transform: none; }
  .rmark .icon path { transition: none; }
  html { scroll-behavior: auto; }
}
