/* Bonafide landing + flow, design prototype (v7). The tokens come from the coin's world: cream paper, banknote ink,
   enamel teal for interaction, the coin's silver for every hairline. Marcellus speaks the name, the questions and the
   plan's section titles; Hanken Grotesk carries the UI and every number; Newsreader only quotes a bank's own words.
   Orange marks money in the plan and never appears in the hero. Light only. */

:root {
  color-scheme: light;
  interpolate-size: allow-keywords;        /* lets "More options" open smoothly where the browser supports it */
  /* colour */
  --paper: #F8F4EC;                        /* the page (owner): the intro's cream, so the hand-off has no seam */
  --sheet: #FFFDF8;                        /* surfaces a person acts on */
  --ink: #17221F;                          /* banknote ink: a green-black */
  --ink-2: #4A5651;
  --ink-3: #6B746F;
  --silver: #DDD6C9;                       /* hairlines: the coin's metal on paper */
  --silver-2: #C4BBAB;                     /* edges of controls */
  --accent: #0F5E56;                       /* the coin's enamel: everything you can act on */
  --accent-2: #0B4A44;
  --accent-wash: #E4EFEB;
  --accent-ink: #FFFFFF;
  --money: #EB6834;
  --money-ink: #B84A1B;             /* money as text: 5.1:1 on the sheet; the fills keep --money */
  --ok: #0F5E56;
  --caution: #7A5E00;
  --caution-wash: #F3E9C6;
  --error: #A8261E;
  --seg-0: #0F5E56;
  --seg-1: #2E7D72;
  --seg-2: #4F998E;
  /* read by main.js for the hero */
  --strand: rgba(15, 94, 86, 0.22);
  --ribbon: #0F5E56;
  /* a cheque's line tint: two crossing families of fine waves, the coin's guilloche at a whisper */
  --tint: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='8'%3E%3Cg fill='none' stroke='%230F5E56' stroke-width='.55'%3E%3Cpath stroke-opacity='.075' d='M0 4Q12 .8 24 4T48 4T72 4T96 4'/%3E%3Cpath stroke-opacity='.05' d='M0 4Q12 7.2 24 4T48 4T72 4T96 4'/%3E%3C/g%3E%3C/svg%3E");
  /* type: the classical scale (Bringhurst) */
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --display-family: "Marcellus", Georgia, serif;   /* the name, the questions, the plan's sections (swap here) */
  --serif: "Newsreader", Georgia, serif;
  --t-12: 0.75rem;
  --t-14: 0.875rem;
  --t-16: 1rem;
  --t-18: 1.125rem;
  --t-21: 1.3125rem;
  --t-24: 1.5rem;
  --t-36: 2.25rem;
  --t-48: 3rem;
  --t-72: 4.5rem;
  /* space: 4-pt steps; the body's 24px line is the rhythm */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  /* radius hierarchy: a sheet holds controls, a control holds marks */
  --r-sheet: 16px;
  --r-control: 10px;
  --r-mark: 6px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-16)/1.5 var(--sans);
  font-feature-settings: "tnum" 1, "lnum" 1;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
img { -webkit-user-drag: none; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- the paper's line tint: static, faded toward the edges ---------- */
.tint {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--tint);
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 36%, #000 25%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 62% at 50% 36%, #000 25%, transparent 100%);
}

/* ---------- top bar: the small coin and name, and a close button, inside the flow ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  max-width: 1280px;
  min-height: 72px;
  margin: 0 auto;
  padding: var(--s-4) var(--gutter);
}
body[data-screen="home"] .topbar { display: none; }   /* the home has its own coin and name */
.topbar__brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; border-radius: var(--r-control); }
.brand__coin {                            /* the hero's rendered coin, cropped to the coin itself */
  width: 32px; height: 32px; flex: none;
  border-radius: 50%; overflow: hidden;
  box-shadow: 0 1px 2px rgba(23, 34, 31, 0.2);
}
.brand__coin img { width: 200%; height: 200%; max-width: none; margin: -50%; }   /* the coin is the image's middle half */
.brand__word { font: 400 var(--t-24)/1 var(--display-family); }
.topbar__close {
  width: 40px; height: 40px;
  display: none; place-items: center;
  border: 1px solid var(--silver-2);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.topbar__close:hover { color: var(--ink); background: var(--sheet); }
.topbar__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
body[data-screen="flow"] .topbar__close, body[data-screen="scan"] .topbar__close { display: grid; }

/* ---------- home: the coin and its motion, the name, one button ---------- */
.screen--home { height: 100svh; display: flex; flex-direction: column; overflow: hidden; }
.hero {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--gutter) 4vh;           /* lifts the group a little: the eye reads centre slightly above the middle */
}
.home__legal { text-align: center; font-size: var(--t-12); color: var(--ink-3); padding: 0 var(--gutter) max(var(--s-4), env(safe-area-inset-bottom)); }
.home__legal a, .q__note a { margin-left: 2px; color: var(--accent-2); text-underline-offset: 3px; }
.home__legal p + p { margin-top: 4px; }
.home__legal .btn--text { min-height: 0; padding: 0; font: inherit; color: var(--accent-2); }   /* "Tell us": a link's size */
.stage {
  position: relative;
  width: min(440px, 47vh, 86vw);
  aspect-ratio: 1;
}
.stage-slot { display: grid; place-items: center; }
.rosette { position: absolute; inset: 0; width: 100%; height: 100%; }
.rosette--front { z-index: 2; }           /* the near half of the ribbon passes in front of the seal */
.stage, .stage * {                        /* purely decorative: no selection, no drag, no tap flash, no pointer */
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  pointer-events: none;
}
.seal {                                   /* the rendered coin: the intro's last frame, shadow included */
  position: absolute;
  left: 50%; top: 50%;
  width: 62%;                             /* the image is 2x the coin, so the coin itself is 31% of the stage */
  aspect-ratio: 1;
  translate: -50% -50%;
  z-index: 1;
}
.seal img { width: 100%; height: 100%; }
.wordmark { margin-top: var(--s-2); font: 400 clamp(var(--t-48), 6.4vw, var(--t-72))/1 var(--display-family); text-wrap: nowrap; }
.tagline { margin-top: var(--s-4); color: var(--ink-2); font-size: var(--t-21); line-height: 1.35; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--s-5);
  border: 1px solid transparent;
  border-radius: var(--r-control);
  font: 600 var(--t-16)/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.btn--primary:hover { background: var(--accent-2); }
.btn--primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn--quiet { background: transparent; color: var(--ink); border-color: var(--silver-2); }
.btn--quiet:hover { background: var(--sheet); }
.btn--big { min-height: 60px; padding: 0 48px; font-size: 19px; margin-top: clamp(var(--s-5), 4vh, var(--s-6)); }
.btn--small { min-height: 40px; padding: 0 var(--s-4); font-size: var(--t-14); }
.btn--text {
  min-height: 40px; padding: 0 var(--s-1);
  background: none; border: 0;
  color: var(--accent); font: 600 var(--t-14)/1.2 var(--sans);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  cursor: pointer;
}
.btn--text:hover { color: var(--accent-2); }

/* ---------- the four questions ---------- */
.screen--flow { padding: 0 var(--gutter) var(--s-8); }
.flow { max-width: 560px; margin: 0 auto; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.progress span { height: 3px; border-radius: 2px; background: var(--silver); transition: background-color 0.3s var(--ease); }
.progress .is-on { background: var(--accent); }
.flow__count { margin-top: var(--s-4); font-size: var(--t-14); color: var(--ink-3); }
.q { border: 0; margin: 0; padding: 0; min-width: 0; }
.q legend { padding: 0; }
.q__title { margin-top: var(--s-2); font: 400 var(--t-36)/1.22 var(--display-family); outline: none; text-wrap: balance; }
.q__help { margin-top: var(--s-3); max-width: 46ch; text-wrap: pretty; color: var(--ink-2); font-size: var(--t-18); line-height: 1.55; }
.q__note { margin-top: var(--s-4); font-size: var(--t-14); color: var(--ink-3); }

/* step 1: two even tiles */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-6); }
.choice {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: 64px; padding: 0 var(--s-4);
  border: 1px solid var(--silver-2);
  border-radius: var(--r-control);
  background: var(--sheet);
  font-size: var(--t-18); font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.choice:hover { border-color: var(--ink-3); }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-wash); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice input, .seg input { appearance: none; -webkit-appearance: none; margin: 0; }
.choice input {
  width: 20px; height: 20px; flex: none;
  display: grid; place-items: center;
  border: 1.5px solid var(--silver-2); border-radius: 50%;
  background: var(--sheet);
  transition: border-color 0.15s;
}
.choice input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform 0.18s var(--ease); }
.choice input:checked { border-color: var(--accent); }
.choice input:checked::after { transform: scale(1); }
.choice input:focus-visible { outline: none; }

/* fields */
.field { display: grid; gap: 6px; margin-top: var(--s-5); min-width: 0; }
.field__label { font-size: var(--t-14); font-weight: 600; color: var(--ink-2); }
.field__input {
  width: 100%; min-width: 0; min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--silver-2); border-radius: var(--r-control);
  background: var(--sheet);
  font-size: var(--t-16);
  transition: border-color 0.15s;
}
.field__input:hover { border-color: var(--ink-3); }
.field__input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field__input[aria-invalid="true"] { border-color: var(--error); }
select.field__input { appearance: none; padding-right: 40px; background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234A5651' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center; }
.field__hint { font-size: var(--t-12); line-height: 1.5; color: var(--ink-3); }
.field--zip .field__input { max-width: 220px; min-height: 56px; font-size: var(--t-21); letter-spacing: 0.04em; }
.field__error { margin-top: var(--s-2); display: flex; gap: var(--s-2); align-items: center; color: var(--error); font-size: var(--t-14); font-weight: 500; }
.field__error::before { content: "!"; width: 18px; height: 18px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--error); color: var(--sheet); font: 700 var(--t-12)/1 var(--sans); }
.flow__actions { display: flex; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-7); }

/* step 3: the bank picker */
.search { position: relative; margin-top: var(--s-6); }
.search__icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; fill: none; stroke: var(--ink-3); stroke-width: 1.7; stroke-linecap: round; pointer-events: none; }
.search__input {
  width: 100%; min-height: 52px;
  padding: 0 14px 0 44px;
  border: 1px solid var(--silver-2); border-radius: var(--r-control);
  background: var(--sheet);
  font-size: var(--t-16);
  transition: border-color 0.15s;
}
.search__input::placeholder { color: var(--ink-3); }
.search__input:hover { border-color: var(--ink-3); }
.search__input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.search__input::-webkit-search-cancel-button {          /* the clear button, in the page's ink instead of system blue */
  -webkit-appearance: none; width: 16px; height: 16px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' stroke='%236B746F' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.suggest {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: var(--s-1);
  list-style: none;
  border: 1px solid var(--silver-2); border-radius: var(--r-control);
  background: var(--sheet);
  box-shadow: 0 18px 40px -18px rgba(23, 34, 31, 0.32);
}
.suggest__opt {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  min-height: 44px; padding: 0 var(--s-3);
  border-radius: var(--r-mark);
  cursor: pointer;
}
.suggest__opt b { font-weight: 700; }
.suggest__opt.is-active { background: var(--accent-wash); }
.suggest__opt[aria-disabled="true"] { color: var(--ink-3); cursor: default; }
.suggest__added { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-14); }
.suggest__added svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.suggest__none { padding: var(--s-3); font-size: var(--t-14); color: var(--ink-2); }
.picker__label { margin-top: var(--s-5); font-size: var(--t-14); font-weight: 600; color: var(--ink-2); }
.picker__label span { font-weight: 500; color: var(--ink-3); }
.popular { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-2); }
.toggle {
  position: relative;
  min-height: 44px; padding: 0 var(--s-2);
  border: 1px solid var(--silver); border-radius: var(--r-control);
  background: var(--sheet);
  font-size: var(--t-14); font-weight: 500; line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.toggle:hover { border-color: var(--silver-2); }
.toggle span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* selected: an enamel badge with a tick on the corner, so every name keeps the full width */
.toggle svg {
  position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; padding: 3px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--paper);
  fill: none; stroke: var(--accent-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 16; stroke-dashoffset: 16;
  transform: scale(0);
  transition: transform 0.18s var(--ease), stroke-dashoffset 0.2s var(--ease) 0.08s;
}
.toggle[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-wash); color: var(--accent-2); }
.toggle[aria-pressed="true"] svg { transform: scale(1); stroke-dashoffset: 0; }
.banks {
  margin: var(--s-2) 0 0; padding: 0;
  list-style: none;
  border: 1px solid var(--silver); border-radius: var(--r-sheet);
  background: var(--sheet);
}
.bank {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--s-2) var(--s-3);
  padding: var(--s-3) var(--s-2) var(--s-3) var(--s-4);
}
.bank + .bank { border-top: 1px solid var(--silver); }
.bank.is-new { animation: arrive 0.24s var(--ease); }
@keyframes arrive { from { opacity: 0; transform: translateY(-4px); } }
.bank__name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.bank__remove {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: var(--r-control);
  background: transparent; color: var(--ink-3);
  cursor: pointer;
}
.bank__remove:hover { color: var(--ink); background: var(--paper); }
.bank__remove svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.bank__month { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); font-size: var(--t-14); color: var(--ink-2); }
.bank__month input { min-height: 40px; padding: 0 10px; border: 1px solid var(--silver-2); border-radius: var(--r-control); background: var(--paper); font-size: var(--t-14); }
.bank__month input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.banks__empty { margin-top: var(--s-2); padding: var(--s-4); border: 1px dashed var(--silver-2); border-radius: var(--r-sheet); font-size: var(--t-14); color: var(--ink-3); text-align: center; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--silver-2); border-radius: var(--r-control); background: var(--paper); }
.seg label { position: relative; display: block; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.seg span { display: block; padding: 6px 10px; border-radius: var(--r-mark); font-size: var(--t-14); line-height: 1.3; color: var(--ink-2); white-space: nowrap; transition: background-color 0.15s, color 0.15s; }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* step 4: the amount, its slider, more options */
.money-input { display: flex; align-items: center; max-width: 240px; min-height: 60px; padding-left: var(--s-4); border: 1px solid var(--silver-2); border-radius: var(--r-control); background: var(--sheet); transition: border-color 0.15s; }
.money-input:hover { border-color: var(--ink-3); }
.money-input:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.money-input > span { color: var(--ink-3); font-weight: 600; font-size: var(--t-24); }
.money-input .field__input { border: 0; background: transparent; padding-left: 6px; font-size: var(--t-24); font-weight: 600; outline: none; min-height: 58px; }
.slider { --fill: 20%; width: 100%; height: 24px; margin: var(--s-5) 0 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.slider::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--fill), var(--silver) var(--fill)); }
.slider::-moz-range-track { height: 4px; border-radius: 2px; background: var(--silver); }
.slider::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border: 1px solid var(--silver-2); border-radius: 50%; background: var(--sheet); box-shadow: 0 1px 3px rgba(23, 34, 31, 0.22); transition: transform 0.12s var(--ease); }
.slider::-moz-range-thumb { width: 22px; height: 22px; border: 1px solid var(--silver-2); border-radius: 50%; background: var(--sheet); box-shadow: 0 1px 3px rgba(23, 34, 31, 0.22); }
.slider:active::-webkit-slider-thumb { transform: scale(1.1); }
.slider:focus-visible { outline: none; }
.slider:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.slider:focus-visible::-moz-range-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.slider__ends { display: flex; justify-content: space-between; margin-top: var(--s-1); font-size: var(--t-12); color: var(--ink-3); }
.more { margin-top: var(--s-6); border-top: 1px solid var(--silver); }
.more summary {
  display: flex; align-items: center; gap: var(--s-2);
  width: max-content; min-height: 48px;
  color: var(--accent); font-weight: 600;
  list-style: none; cursor: pointer;
  border-radius: var(--r-mark);
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: ""; width: 8px; height: 8px; margin: 0 4px 3px 2px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); transition: transform 0.2s var(--ease), margin 0.2s var(--ease); }
.more[open] summary::before { transform: rotate(225deg); margin-bottom: -3px; }
.more::details-content { block-size: 0; overflow: clip; transition: block-size 0.28s var(--ease), content-visibility 0.28s allow-discrete; }
.more[open]::details-content { block-size: auto; }
.more__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-5); align-items: start; padding-bottom: var(--s-1); }
.more__grid .field:nth-child(-n+2) { margin-top: var(--s-2); }
.more__grid .field__label { display: flex; align-items: flex-end; min-height: 3em; }   /* side by side: the boxes line up under a one- or two-line label */

/* ---------- finding your offers ---------- */
.screen--scan { min-height: calc(100svh - 72px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-5); padding: 0 var(--gutter) 10vh; text-align: center; }
.screen--scan .stage { width: min(380px, 50vh, 80vw); }
.scan__status { min-height: 1.6em; font-size: var(--t-18); color: var(--ink-2); }

/* ---------- the cards screen (#plan, spec 2026-10-18 §4): drawn by cards.js; the mockup is the reference ----------
   One sheet per bonus on the paper. Orange only on bonus amounts and what was earned, teal only on what you can act on
   or have done, and a status colour always beside its icon and words. */
body[data-screen="results"]:has(.bonuses) .topbar { display: none; }   /* the screen draws its own coin and name */
.screen--results { padding: 0 var(--gutter) var(--s-8); }
.results { max-width: 720px; margin: 0 auto; }
.results__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.bonuses .btn { gap: var(--s-2); }
.bonuses .btn svg { flex: none; }

.bonuses__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: 22px 0 6px; }
.bonuses__brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; border-radius: var(--r-control); }
.bonuses__brand .brand__word { font-size: 22px; letter-spacing: 0.01em; }
.bonuses__saved { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); transition: color 0.3s; }
.bonuses__saved svg { color: var(--accent); }
.bonuses__saved.is-flash { color: var(--accent); }
.bonuses__title { margin: 40px 0 10px; font: 400 clamp(38px, 7vw, 52px)/1.04 var(--display-family); letter-spacing: -0.005em; outline: none; }
.bonuses__lede { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 26px; color: var(--ink-2); }
.bonuses__lede .btn--text { min-height: 24px; padding: 0; font-weight: 500; text-decoration: none; }
.bonuses__tools { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; margin-top: 8px; }   /* Find my offers again, Save for my AI */

/* the ledger: three figures, then a thin bar of their shares. Only Earned is orange: money that arrived */
.ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--silver); }
.ledger__item { min-width: 0; padding: 14px 0 14px 18px; border-left: 1px solid var(--silver); }
.ledger__item:first-child { padding-left: 0; border-left: 0; }
.ledger__lab { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); }
.ledger__fig { display: block; font-size: 30px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.ledger__fig--money { color: var(--money-ink); }
.ledger__more { display: block; font-size: 13px; color: var(--ink-3); }
.ledger__sw { width: 9px; height: 9px; flex: none; border-radius: 3px; }
.ledger__sw--earned, .ledger__part--earned { background: var(--money); }
.ledger__sw--progress, .ledger__part--progress { background: repeating-linear-gradient(-45deg, var(--ink-3) 0 2px, var(--silver) 2px 4px); }
.ledger__sw--open, .ledger__part--open { background: var(--silver-2); }
.ledger__meter { display: flex; gap: 2px; height: 6px; margin-top: 16px; overflow: hidden; border-radius: 99px; background: var(--silver); }
.ledger__part { display: block; min-width: 4px; height: 100%; }
.ledger__part--open { opacity: 0.55; }

/* the groups: In progress, Open to you (with its sort), Finished by year */
.group { margin-top: 44px; }
.group__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.group__head h2 { font: 400 25px/1.2 var(--display-family); }
.group__count { margin-left: 8px; font: 400 15px var(--sans); color: var(--ink-3); }
.group__cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.group__quiet { margin-top: 14px; padding: 0 4px; font-size: 14.5px; color: var(--ink-3); text-wrap: pretty; }
.group__quiet .btn--text { min-height: 24px; padding: 0; font-size: inherit; }
.group__empty { padding: 6px 4px; font-size: 15px; color: var(--ink-3); }
.group__tools { margin-top: 14px; }
.sort { display: inline-flex; padding: 3px; border: 1px solid var(--silver-2); border-radius: 11px; background: var(--sheet); }
.sort button { padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; font: 500 13.5px var(--sans); color: var(--ink-2);
  cursor: pointer; transition: background-color 0.2s var(--ease), color 0.2s; }
.sort button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.year { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 2px 10px; }
.group__head + .year { margin-top: 0; }
.year__title { font: 600 16px var(--sans); }
.year__earned { margin-left: 8px; color: var(--money-ink); }
.year__files { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.year__files .btn--text { min-height: 32px; padding: 0; font-weight: 500; }   /* the deposits CSV: quiet, beside the tax one */

/* a card: its head is one button that opens and closes it */
.card { min-width: 0; background: var(--sheet); border: 1px solid var(--silver); border-radius: 18px;
  box-shadow: 0 1px 0 rgba(23, 34, 31, 0.03), 0 14px 32px -24px rgba(23, 34, 31, 0.35); transition: box-shadow 0.25s var(--ease), border-color 0.25s; }
.card:hover { border-color: var(--silver-2); box-shadow: 0 1px 0 rgba(23, 34, 31, 0.04), 0 18px 40px -24px rgba(23, 34, 31, 0.45); }
.card.is-entering { animation: card-enter 0.45s var(--ease); }                    /* just ticked open: it lands here */
@keyframes card-enter { from { opacity: 0; transform: translateY(6px); } }
.card__head { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 2px 16px;
  width: 100%; padding: 20px 22px 18px; border-radius: 18px; cursor: pointer; }
.card__head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.card__mono { grid-row: span 2; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 50%; background: var(--accent-wash); color: var(--accent); font: 400 19px var(--display-family); }
.card__who { align-self: center; min-width: 0; }
.card__bank { font-size: 17.5px; font-weight: 600; }
.card__product { margin-left: 3px; font-size: 14.5px; color: var(--ink-3); }
.card__amt { display: flex; align-items: center; gap: 8px; align-self: center; font-size: 28px; font-weight: 600; line-height: 1;
  letter-spacing: -0.015em; color: var(--money-ink); text-align: right; white-space: nowrap; }
.card__amt small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.card__amt--upto { font-weight: 500; color: var(--ink-2); }                     /* a maximum, not counted: drawn lighter */
.card__amt--none { color: var(--ink-3); }
.card__coin { width: 26px; height: 26px; }
.card__ask { grid-column: 2 / 4; display: block; font-size: 15.5px; color: var(--ink-2); }
.card__reach { grid-column: 2 / 4; display: block; margin-top: 2px; font-size: 14.5px; color: var(--ink-3); }
.card__track { grid-column: 2 / 4; display: flex; gap: 4px; margin-top: 14px; }
.card__track i { flex: 1; height: 4px; border-radius: 99px; background: var(--silver); }
.card__track i.is-on { background: var(--accent); }
.card__next { grid-column: 2 / 4; display: block; margin-top: 10px; font-size: 15.5px; }
.card__next.is-caution { display: flex; align-items: baseline; gap: 6px; color: var(--caution); }
.card__next.is-caution svg { flex: none; align-self: center; }
.card__past { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 500; color: var(--error); white-space: nowrap; }   /* an abandoned card */
.card__past svg { flex: none; }
.card__chips { grid-column: 2 / 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.card__toggle { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 13px; color: var(--ink-3); }
.card.is-open .card__toggle svg { transform: rotate(180deg); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border: 1px solid var(--silver); border-radius: 99px;
  background: var(--paper); font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.chip svg { flex: none; }
.chip--soon { border-color: color-mix(in srgb, var(--caution) 28%, var(--caution-wash)); background: var(--caution-wash); color: var(--caution); }
.chip--again { border-color: color-mix(in srgb, var(--accent) 25%, transparent); background: var(--accent-wash); color: var(--accent-2); }
.chip--quiet { background: transparent; }

/* its quest: what you do, your record, the terms */
.card__body { padding: 0 22px 22px 84px; }
.card__body::before { content: ""; display: block; height: 1px; margin-bottom: 4px; background: var(--silver); }
.card__body.is-opening { animation: card-open 0.28s var(--ease); }              /* just opened by its head */
@keyframes card-open { from { opacity: 0; transform: translateY(-4px); } }
.card__h { margin: 22px 0 6px; font: 600 14px var(--sans); color: var(--ink-3); }
.card__body > .where, .card__others, .card__notice { margin-top: 18px; }
.card__notice { display: grid; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--caution-wash); font-size: 14.5px; }
.card__notice-title { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--caution); }
.changed__row { display: grid; gap: 4px; }
.changed__label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.changed__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.changed__pair > * { min-width: 0; }
.changed__when { font-size: 12.5px; color: var(--ink-3); }
.card__others { font-size: 14.5px; }
.card__others > summary { display: flex; align-items: center; gap: var(--s-2); width: max-content; max-width: 100%; min-height: 32px; list-style: none;
  color: var(--accent-2); font-weight: 600; cursor: pointer; }
.card__others > summary::-webkit-details-marker { display: none; }
.card__others > summary::before { content: ""; width: 7px; height: 7px; margin: 0 3px 3px 1px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg); transition: transform 0.2s var(--ease), margin 0.2s var(--ease); }
.card__others[open] > summary::before { transform: rotate(225deg); margin-bottom: -3px; }
.card__others ul { list-style: none; margin: 6px 0 0; padding: 0; }
.card__others li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; padding: 4px 0; border-bottom: 1px solid var(--silver); }
.card__others .btn--text { min-height: 32px; padding: 0; }
.card__steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--silver); }
.step:last-child { border-bottom: 0; }
.step__main { min-width: 0; }
.step__tick { all: unset; position: relative; box-sizing: border-box; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px;
  border: 1.5px solid var(--silver-2); border-radius: 7px; background: var(--sheet); color: var(--accent-ink); cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, transform 0.12s; }
.step__tick::after { content: ""; position: absolute; inset: -11px; }         /* a 44px target for a finger */
.step__tick:active { transform: scale(0.92); }
.step__tick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.step__tick svg { opacity: 0; transform: scale(0.5); transition: opacity 0.18s, transform 0.22s var(--ease); }
.step.is-done .step__tick { background: var(--accent); border-color: var(--accent); }
.step.is-done .step__tick svg { opacity: 1; transform: none; }
.step__tick[disabled] { opacity: 0.5; cursor: default; }
.step__title { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.step__n { margin-right: 6px; font-weight: 500; color: var(--ink-3); }
.step.is-done .step__title { color: var(--ink-2); }
.step__say { margin-top: 2px; font-size: 14.5px; color: var(--ink-2); text-wrap: pretty; }
.step__when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 7px; font-size: 14.5px; }
.step__when b { font-weight: 600; }
.step__src { font-size: 13.5px; color: var(--ink-3); }
.step__left { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 500; color: var(--caution); }
.step__left svg { flex: none; }
.step.is-past .step__left { color: var(--error); }                              /* past the bank's deadline */
.step.is-caution .step__when b { color: var(--caution); }
.step__sugg { display: inline-flex; align-items: center; padding: 0 8px; border: 1px dashed var(--silver-2); border-radius: 99px; font: 500 12px var(--sans); color: var(--ink-3); }
.step__done { all: unset; border-bottom: 1px dotted color-mix(in srgb, var(--accent) 50%, transparent); font-size: 14px; font-weight: 500; color: var(--accent); cursor: pointer; }
.step__done:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.step__date { min-height: 36px; padding: 0 8px; border: 1px solid var(--silver-2); border-radius: 7px; background: var(--sheet); font: 14px var(--sans); color: var(--ink); }
.step__date:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.step__date[aria-invalid="true"] { border-color: var(--error); }
.step__ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14.5px; color: var(--ink-2); }
.step__enroll { margin-top: 6px; }
.step__enroll .btn--text { min-height: 32px; padding: 0; }
.step__go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.step__code { padding: 1px 6px; border: 1px solid var(--silver); border-radius: 5px; background: var(--paper); font: 500 0.92em ui-monospace, "SF Mono", Menlo, monospace; }
.step__exact { margin-top: 4px; }
.step__check { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); }
.step__exact > summary, .terms__exact > summary { width: max-content; list-style: none; border-bottom: 1px dotted var(--silver-2);
  font-size: 12.5px; font-weight: 500; color: var(--ink-3); cursor: pointer; }
.step__exact > summary::-webkit-details-marker, .terms__exact > summary::-webkit-details-marker { display: none; }
.step__exact[open] > summary, .terms__exact[open] > summary, .step__exact > summary:hover, .terms__exact > summary:hover { border-color: var(--accent); color: var(--accent); }
.step__quote, .terms__quote p { font: italic 400 15px/1.5 var(--serif); color: var(--ink-2); }   /* the bank's own words */
blockquote.step__quote, .terms__quote { margin: 6px 0 2px; }

/* deposits, counted the bank's way */
.dep { margin-top: 12px; }
.dep__bar { height: 7px; overflow: hidden; border: 1px solid var(--silver); border-radius: 99px; background: var(--paper); }
.dep__bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.5s var(--ease); }
.dep__line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.dep__add { min-height: 32px; padding: 0; font-size: 13.5px; text-decoration: none; }
.dep__tier { margin-top: 2px; font-size: 13.5px; color: var(--ink-2); }
.dep__none { margin-top: 2px; font-size: 13.5px; color: var(--ink-3); }
.dep__list { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13.5px; color: var(--ink-2); }
.dep__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.dep__list .btn--text { min-height: 32px; padding: 0; font-size: 13px; }
.dep__why { color: var(--ink-3); }
.dep__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 10px; }
.dep__field { display: grid; gap: 2px; font-size: 12.5px; color: var(--ink-3); }
.dep__field input { width: 140px; min-height: 40px; padding: 0 10px; border: 1px solid var(--silver-2); border-radius: 9px; background: var(--sheet); font: 15px var(--sans); color: var(--ink); }
.dep__field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.dep__field input[aria-invalid="true"] { border-color: var(--error); }

/* your record and the terms */
.record { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; margin: 0; padding: 14px 16px; border: 1px solid var(--silver);
  border-radius: 14px; background: var(--paper); font-size: 14.5px; }
.record dt { color: var(--ink-3); }
.record dd { min-width: 0; margin: 0; }
.record__deps { list-style: none; margin: 0; padding: 0; }
.record__why { font-size: 13px; color: var(--ink-3); }
.terms { margin: 0; overflow: hidden; border: 1px solid var(--silver); border-radius: 14px; background: var(--sheet); }
.terms__row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 16px; padding: 11px 14px; border-top: 1px solid var(--silver); }
.terms__row:first-child { border-top: 0; }
.terms__row dt { padding-top: 1px; font-size: 14px; color: var(--ink-3); }
.terms__row dd { min-width: 0; margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.terms__exact { margin-top: 4px; }
.terms__link { font-size: 12.5px; color: var(--accent-2); text-underline-offset: 3px; }
.terms__src { margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }
.terms__src a { font-weight: 500; color: var(--accent); text-decoration: none; }
.card__dismiss { margin: -10px 0 0; padding: 0 22px 12px 84px; }                 /* "Don't show me this", under the chips */
.card__dismiss .btn--text { min-height: 28px; padding: 0; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.card__dismiss .btn--text:hover { color: var(--accent-2); }
.card__end { margin-top: 18px; }
.card__end .btn--text { min-height: 32px; padding: 0; color: var(--ink-2); }   /* quiet: "It didn't pay" */

/* the one-time note, and the footer */
.card-note { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 14px;
  border-radius: 12px; background: var(--accent-wash); color: var(--accent-2); font-size: 14.5px; }
.card-note svg { align-self: start; margin-top: 3px; }
.bonuses__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 18px; margin-top: 56px; padding-top: 18px;
  border-top: 1px solid var(--silver); font-size: 13.5px; color: var(--ink-3); }
.bonuses__foot .btn--text { min-height: 32px; padding: 0; font: inherit; font-weight: 500; color: var(--accent-2); }   /* "Tell us" */
.where { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; font-size: var(--t-14); color: var(--ink-2); }   /* most pages don't say where: a quiet line */
.where svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--caution); stroke-width: 1.4; }
.where a { color: var(--accent-2); font-weight: 600; text-underline-offset: 3px; }
/* Offers that might be open where the person lives: listed quietly after Open to you, never in the cards or totals */
.maybe { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--silver); }
.maybe__title { font: 400 var(--t-24)/1.25 var(--display-family); }
.maybe__list { list-style: none; padding: 0; margin: var(--s-3) 0 0; }
.maybe__group { margin-top: var(--s-5); font-size: var(--t-14); font-weight: 600; color: var(--ink-2); }
.maybe__group + .maybe__list { margin-top: var(--s-1); }
.maybe__list li { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem minmax(0, 2fr) auto; gap: var(--s-1) var(--s-4); align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--silver); font-size: var(--t-14); }
.maybe__bank { font-weight: 600; }
.maybe__amt { text-align: right; color: var(--ink-2); font-weight: 600; }
.maybe__why { min-width: 0; color: var(--ink-2); }
.maybe__quote { margin: var(--s-1) 0 0; padding-left: var(--s-3); border-left: 2px solid var(--silver-2); }
.maybe__quote p { font: italic 400 var(--t-16)/1.5 var(--serif); color: var(--ink); }   /* the bank's own words */
.maybe__link { color: var(--accent-2); font-weight: 600; text-underline-offset: 3px; }
.results__wait { margin-top: 12vh; text-align: center; color: var(--ink-2); font-size: var(--t-18); }
.results__empty { max-width: 520px; margin: 12vh auto 0; display: grid; justify-items: center; gap: var(--s-4); text-align: center; }
.results__empty h1 { font: 400 var(--t-36)/1.22 var(--display-family); outline: none; text-wrap: balance; }
.results__empty p { color: var(--ink-2); font-size: var(--t-18); }

/* ---------- the privacy page (privacy.html) ---------- */
.doc { max-width: 640px; margin: 0 auto; padding: var(--s-5) var(--gutter) var(--s-8); }
.doc h1 { font: 400 var(--t-48)/1.1 var(--display-family); }
.doc h2 { margin-top: var(--s-7); font: 400 var(--t-24)/1.25 var(--display-family); }
.doc p, .doc li { max-width: 60ch; color: var(--ink-2); font-size: var(--t-18); line-height: 1.55; text-wrap: pretty; }
.doc p { margin-top: var(--s-3); }
.doc ul { margin: var(--s-3) 0 0; padding-left: 1.25em; display: grid; gap: var(--s-2); }
.doc li::marker { color: var(--ink-3); }
.doc a { color: var(--accent-2); text-underline-offset: 3px; }
.doc .doc__lede { margin-top: var(--s-4); color: var(--ink); }
.doc .btn { margin-top: var(--s-4); }
.doc .doc__status { min-height: 1.55em; color: var(--ink); font-weight: 600; }
.doc .doc__status.is-error { color: var(--error); }
.doc .doc__note { font-size: var(--t-14); color: var(--ink-3); }
.doc .doc__back { margin-top: var(--s-7); padding-top: var(--s-4); border-top: 1px solid var(--silver); font-size: var(--t-16); }

/* ---------- phone ---------- */
@media (max-width: 580px) {                         /* a card: the monogram's column gives its width back */
  .card__head { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 2px 12px; padding: 16px 16px 14px; }
  .card__mono { width: 40px; height: 40px; font-size: 17px; }
  .card__amt { font-size: 24px; }
  .card__product { display: block; margin-left: 0; font-size: 13.5px; }
  .card__ask { grid-column: 1 / 4; margin-top: 8px; }
  .card__reach, .card__chips, .card__track, .card__next { grid-column: 1 / 4; }
  .card__body { padding: 0 16px 18px; }
  .card__dismiss { margin-top: -8px; padding: 0 16px 10px; }
  .chip { white-space: normal; }
  .terms__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .changed__pair { grid-template-columns: minmax(0, 1fr); }
  .ledger__item { padding-left: 12px; }
  .ledger__fig { font-size: 22px; }
  .ledger__lab { font-size: 12.5px; }
}

@media (max-width: 560px) {
  .doc h1 { font-size: var(--t-36); }
  .doc p, .doc li { font-size: var(--t-16); }
  .stage { width: min(84vw, 42vh); }
  .tagline { font-size: var(--t-18); }
  .btn--big { width: 100%; }
  .q__title { font-size: var(--t-24); line-height: 1.25; }
  .q__help { font-size: var(--t-16); }
  .choices { grid-template-columns: minmax(0, 1fr); margin-top: var(--s-5); }
  .flow__actions { margin-top: var(--s-6); }
  .flow__actions .btn { flex: 1; }
  .popular { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bank { grid-template-columns: minmax(0, 1fr) auto; }
  .bank .seg { grid-column: 1 / -1; grid-row: 2; display: flex; }
  .bank .seg label { flex: 1; }
  .bank .seg span { text-align: center; }
  .more__grid { grid-template-columns: minmax(0, 1fr); }
  .more__grid .field:nth-child(2) { margin-top: var(--s-5); }
  .more__grid .field__label { min-height: 0; }
  .maybe__list li { grid-template-columns: minmax(0, 1fr) auto; }
  .maybe__why, .maybe__link { grid-column: 1 / -1; }
}

@media (max-height: 700px) {
  .stage { width: min(84vw, 38vh); }
  .wordmark { font-size: clamp(38px, 6.5vh, 54px); }
  .tagline { margin-top: var(--s-2); }
  .btn--big { margin-top: var(--s-4); min-height: 56px; }
}

/* ---------- the home's status line, and the saved plan's words (spec 2026-10-14 §5.4) ---------- */
.home__status { margin-top: var(--s-4); font-size: var(--t-16); font-weight: 600; color: var(--accent-2); }
.home__alt { margin-top: var(--s-3); font-size: 15px; }
body.is-intro .home__status { transform: translateY(10px); }
body.is-revealing .home__status { transition-delay: 1.08s; }

.words { margin-top: var(--s-5); padding: var(--s-5); border: 1px solid var(--accent); border-radius: var(--r-sheet); background: var(--sheet); display: grid; gap: var(--s-3); }
.words h2 { font-family: var(--display-family); font-weight: 400; font-size: var(--t-24); }
.words__list { font: 600 var(--t-24)/1.3 var(--sans); letter-spacing: 0.01em; color: var(--ink); overflow-wrap: anywhere; }
.words__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.words--pending { padding: var(--s-3) var(--s-4); background: var(--caution-wash); font-size: var(--t-14); }
.words--gone { border-color: var(--caution); background: var(--caution-wash); }
.plan-menu { margin-top: var(--s-4); font-size: var(--t-14); }
.plan-menu summary { cursor: pointer; color: var(--accent-2); font-weight: 600; width: max-content; }
.plan-menu__body { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); padding-top: var(--s-2); }
.plan-menu__confirm { flex-basis: 100%; }
.plan-menu__error { display: block; margin-top: var(--s-2); font-size: var(--t-14); color: var(--caution); }
.words-dialog { max-width: min(520px, calc(100vw - 32px)); padding: var(--s-6) var(--s-5); border: 1px solid var(--silver); border-radius: var(--r-sheet); background: var(--paper); color: var(--ink); }
.words-dialog::backdrop { background: rgba(23, 34, 31, 0.35); }
.words-dialog__form { display: grid; gap: var(--s-4); }
.words-dialog h2 { font-family: var(--display-family); font-weight: 400; font-size: var(--t-24); }
.words-dialog__inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.words-dialog__actions { display: flex; justify-content: flex-end; gap: var(--s-3); }
.feedback-dialog { width: min(520px, calc(100vw - 32px)); }
.feedback-dialog__label { font-size: var(--t-14); font-weight: 500; color: var(--ink-2); }
.feedback-dialog__text { width: 100%; min-height: 120px; padding: var(--s-3); resize: vertical; font: 400 var(--t-16)/1.45 var(--sans); }
.feedback-dialog__hint { margin-top: calc(-1 * var(--s-2)); font-size: var(--t-12); color: var(--ink-3); }
.feedback-dialog__trap { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }   /* bots fill it; people never see it */

/* ---------- the premium intro: video big and centred, then onto the stage ---------- */
.intro {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: #F8F4EC; cursor: default;
  transition: background-color 0.9s cubic-bezier(0.45, 0, 0.55, 1) 0.3s;   /* the cream lifts off mid-shrink */
}
.intro.is-handoff { background-color: transparent; pointer-events: none; }
.intro__video {
  width: min(92vmin, 960px); aspect-ratio: 1; display: block;
  transform-origin: 0 0; will-change: transform, opacity;
  opacity: 0; transition: opacity 0.6s var(--ease);   /* fades in once it's really playing */
  -webkit-mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
}
.intro.is-playing .intro__video { opacity: 1; }
/* The hand-off: the video lands on the stage (0-0.95 s) while the live stage fades in under it (0.45-0.95 s), then the
   video fades off the opaque stage (0.95-1.45 s): its last frame is the live hero, so the coin never dims. The words
   rise in one after another once the coin has landed. No linear easing anywhere. */
body.is-intro .hero > *, body.is-intro .home__legal { opacity: 0; }
body.is-intro .wordmark, body.is-intro .tagline, body.is-intro .btn--big, body.is-intro .home__legal { transform: translateY(10px); }
body.is-revealing .hero > *, body.is-revealing .home__legal {
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
body.is-revealing .hero > .stage-slot { transition: opacity 0.5s cubic-bezier(0.45, 0, 0.55, 1) 0.45s; }
body.is-revealing .wordmark { transition-delay: 0.9s; }
body.is-revealing .tagline { transition-delay: 1.02s; }
body.is-revealing .btn--big { transition-delay: 1.14s; }
body.is-revealing .home__legal { transition-delay: 1.3s; }

/* ---------- reduced motion: nothing moves that a person didn't move ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
  .card.is-entering, .card__body.is-opening { animation: none; }   /* the cards' enter and open (spec 2026-10-18 §9) */
}
@media (prefers-reduced-motion: reduce) {           /* its own rule: a browser without ::details-content drops it alone */
  .more::details-content { transition: none; }
}
