/* =====================================================================
   StampChip website (Website V1.2, 2026-10-24)
   Structure: fonts → tokens → themes → base → layout → components → pages → demo → motion
   Colour roles:  blue  = action (buttons, links, focus)
                  teal  = verified / stamped state only
                  amber = caution (data-loss warnings)
                  green/red appear only inside the app (screenshots, the demo device)
   Class names are flat BEM-style; no !important outside the reduced-motion rule.
   ===================================================================== */

/* ---------- fonts (self-hosted; the CSP allows font-src 'self' only) ---------- */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/fonts/IBMPlexSans-Variable-Latin.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/IBMPlexMono-Regular-Latin.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/IBMPlexMono-Medium-Latin.woff2') format('woff2'); }

/* ---------- tokens ---------- */
:root {
  /* type: one family, 1.25 scale, fluid at the top end */
  --font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-display: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);
  --fs-h1: clamp(2.25rem, 1.75rem + 2vw, 3rem);
  --fs-h2: clamp(1.875rem, 1.5rem + 1.5vw, 2.5rem);
  --fs-h3: 1.25rem;
  --fs-lead: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  --fs-body: 1rem;
  --fs-sm: .875rem;
  --fs-xs: .8125rem;

  /* space: 8pt grid */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --section-y: clamp(72px, 8vw, 120px);

  /* layout */
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --measure: 66ch;
  --header-h: 64px;

  /* shape: radius scales with element size */
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;

  --grad: linear-gradient(135deg, #3b82f6 0%, #14b8a6 100%);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- themes (dark is the default look) ---------- */
:root,
:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --sunken: #070707;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #ededed;
  --text-muted: #a3a3a3;      /* 7.9:1 on --bg */
  --text-subtle: #8a8a8a;     /* 5.6:1 on --bg; the smallest text never goes lower */
  --heading: #fff;
  --link: #93c5fd;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, .14);
  --verified: #2dd4bf;
  --verified-soft: rgba(45, 212, 191, .12);
  --caution: #fbbf24;
  --caution-soft: rgba(251, 191, 36, .08);
  --header-bg: rgba(10, 10, 10, .75);
  --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, .85);
  --halo: radial-gradient(50% 50% at 50% 50%, rgba(59, 130, 246, .16), rgba(20, 184, 166, .05) 50%, transparent 72%);
  --scroll-thumb: #2e2e2e;
  --scroll-thumb-hover: #444;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fafafa;
  --surface: #fff;
  --surface-2: #f4f4f5;
  --sunken: #f1f1f2;
  --border: rgba(0, 0, 0, .08);
  --border-strong: rgba(0, 0, 0, .15);
  --text: #18181b;
  --text-muted: #52525b;      /* 7.5:1 on --bg */
  --text-subtle: #6b6b73;     /* 5.0:1 on --bg */
  --heading: #09090b;
  --link: #1d4ed8;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, .08);
  --verified: #0f766e;
  --verified-soft: rgba(15, 118, 110, .08);
  --caution: #b45309;
  --caution-soft: rgba(180, 83, 9, .07);
  --header-bg: rgba(250, 250, 250, .8);
  --shadow-lg: 0 24px 48px -28px rgba(15, 23, 42, .35);
  --halo: radial-gradient(50% 50% at 50% 50%, rgba(37, 99, 235, .09), rgba(13, 148, 136, .03) 50%, transparent 72%);
  --scroll-thumb: #cfcfd4;
  --scroll-thumb-hover: #a8a8b0;
  color-scheme: light;
}
/* Without JavaScript nothing sets data-theme, so follow the OS (the <picture> sources do the same). */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #fafafa;
    --surface: #fff;
    --surface-2: #f4f4f5;
    --sunken: #f1f1f2;
    --border: rgba(0, 0, 0, .08);
    --border-strong: rgba(0, 0, 0, .15);
    --text: #18181b;
    --text-muted: #52525b;
    --text-subtle: #6b6b73;
    --heading: #09090b;
    --link: #1d4ed8;
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, .08);
    --verified: #0f766e;
    --verified-soft: rgba(15, 118, 110, .08);
    --caution: #b45309;
    --caution-soft: rgba(180, 83, 9, .07);
    --header-bg: rgba(250, 250, 250, .8);
    --shadow-lg: 0 24px 48px -28px rgba(15, 23, 42, .35);
    --halo: radial-gradient(50% 50% at 50% 50%, rgba(37, 99, 235, .09), rgba(13, 148, 136, .03) 50%, transparent 72%);
    --scroll-thumb: #cfcfd4;
    --scroll-thumb-hover: #a8a8b0;
    color-scheme: light;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
  /* themed scrollbar plus a reserved gutter so the layout never shifts */
  scrollbar-gutter: stable;
  scrollbar-color: var(--scroll-thumb) var(--bg);
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-body)/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; color: var(--heading); font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
p { text-wrap: pretty; }
/* component lists drop their bullets; prose lists (.guide-section, .prose) keep them */
.primary-nav ul, .mobile-nav__links, .trust-list, .steps, .stamp-chain ol, .plan ul,
.next-steps, .toc ol, .demo-steps, .site-footer ul { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
picture { display: block; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
em { font-style: italic; }
strong { color: var(--heading); font-weight: 600; }
code { font-family: var(--mono); font-size: .9em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 100; padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); background: var(--surface); color: var(--heading); }
.skip-link:focus { top: var(--s-3); }

/* ---------- layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section + .section { border-top: 1px solid var(--border); }

/* centred section intro: the one heading pattern used on every section */
.section-intro { max-width: 720px; margin: 0 auto var(--s-8); text-align: center; }
.section-intro h2 { font-size: var(--fs-h2); line-height: 1.15; }
.section-intro p { margin-top: var(--s-4); color: var(--text-muted); font-size: var(--fs-lead); }

/* ---------- buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 10px;
  font: 600 .9375rem/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: none; }
.button--primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -12px rgba(59, 130, 246, .7); }
.button--primary:hover { box-shadow: 0 12px 28px -12px rgba(20, 184, 166, .7); }
.button--secondary { background: var(--surface); color: var(--heading); border-color: var(--border-strong); }
.button--secondary:hover { border-color: var(--text-subtle); }
.button--small { min-height: 38px; padding: 0 16px; font-size: .875rem; border-radius: 9px; }
.button--block { width: 100%; }
.button[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.button-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); }

@media (max-width: 480px) {
  .button-row .button { flex: 1 1 100%; }
}

.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); background: var(--header-bg); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); }
.site-header__inner { display: flex; align-items: center; gap: var(--s-6); height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--heading); font-size: 1.125rem; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.brand__mark { width: 28px; height: 28px; }
.brand__stamp { color: var(--accent); }

.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; gap: var(--s-1); }
.primary-nav a { display: block; padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-muted); font-size: .9375rem; font-weight: 500; text-decoration: none; }
.primary-nav a:hover { background: var(--surface-2); color: var(--heading); }
.primary-nav a[aria-current="page"] { color: var(--heading); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

.header-actions { display: flex; align-items: center; gap: var(--s-2); }
.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--text-muted); cursor: pointer; }
.icon-button:hover { border-color: var(--border-strong); color: var(--heading); }
.theme-toggle .icon--sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon--sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon--moon { display: none; }
/* the toggles only work with JavaScript (which sets data-theme); without it the footer carries every link */
:root:not([data-theme]) .theme-toggle, :root:not([data-theme]) .menu-toggle { display: none; }
.menu-toggle { display: none; }
.menu-toggle .icon--close { display: none; }
.menu-toggle[aria-expanded="true"] .icon--close { display: block; }
.menu-toggle[aria-expanded="true"] .icon--menu { display: none; }

.mobile-nav { display: none; }

@media (max-width: 880px) {
  .primary-nav { display: none; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: inline-grid; }
  .mobile-nav:not([hidden]) {
    display: block; position: fixed; inset: var(--header-h) 0 auto; z-index: 49;
    padding: var(--s-2) var(--gutter) var(--s-6);
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  /* scrim over the page below the open menu (a click on it closes the menu) */
  .mobile-nav:not([hidden])::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 100vh; background: rgba(0, 0, 0, .55); }
  .mobile-nav__links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--heading); font-size: 1.0625rem; font-weight: 500; text-decoration: none; }
  .mobile-nav__links a[aria-current="page"] { color: var(--link); box-shadow: inset 2px 0 0 var(--accent); padding-left: var(--s-3); }
  .mobile-nav .button { margin-top: var(--s-5); }
}

@media (max-width: 400px) { .header-cta { display: none; } }

/* ---------- phone frame ----------
   The bezel is dark in both themes, so a dark screenshot on a light page and a
   light screenshot on a dark page are both clearly bounded as "a phone". */
.phone { width: 100%; padding: 9px; border-radius: var(--r-xl); background: #1a1a1d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 0 0 1px rgba(0, 0, 0, .3), var(--shadow-lg); }
.phone img { width: 100%; height: auto; aspect-ratio: 360 / 780; object-fit: cover; object-position: top; border-radius: 20px; background: #111; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(56px, 8vw, 104px); text-align: center; }
.hero__status { display: inline-flex; align-items: center; gap: var(--s-2); padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--text-muted); font-size: var(--fs-sm); font-weight: 500; }
.hero__status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--verified); box-shadow: 0 0 0 4px var(--verified-soft); }
.hero h1 { max-width: 15ch; margin: var(--s-5) auto 0; font-size: var(--fs-display); line-height: 1.04; letter-spacing: -.035em; }
.hero__lead { max-width: 580px; margin: var(--s-5) auto 0; color: var(--text-muted); font-size: var(--fs-lead); }
.hero .button-row { margin-top: var(--s-6); }
.hero__fineprint { margin-top: var(--s-4); color: var(--text-subtle); font-size: var(--fs-sm); }

.trust-list { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3) var(--s-6); margin-top: var(--s-6); color: var(--text-muted); font-size: var(--fs-sm); }
.trust-list li { display: inline-flex; align-items: center; gap: var(--s-2); }
.trust-list .icon { width: 18px; height: 18px; color: var(--verified); }

/* product visual: one phone plus the stamp chain (the signature element) */
.hero__visual { position: relative; display: grid; grid-template-columns: 1fr 290px 1fr; align-items: center; margin-top: clamp(48px, 6vw, 80px); padding-bottom: var(--s-6); }
.hero__visual::before { content: ""; position: absolute; inset: -10% 10% 0; background: var(--halo); pointer-events: none; }
.hero__visual .phone { position: relative; grid-column: 2; }
.hero__visual::after { content: ""; position: absolute; inset: auto 0 0; height: 220px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }

.stamp-chain { position: relative; z-index: 1; grid-column: 3; justify-self: start; width: min(340px, 100%); margin-left: -48px; padding: var(--s-5); border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); text-align: left; }
.stamp-chain__title { display: flex; align-items: center; gap: var(--s-2); color: var(--heading); font-size: var(--fs-sm); font-weight: 600; }
.stamp-chain__title .icon { width: 18px; height: 18px; color: var(--verified); }
.stamp-chain ol { position: relative; display: grid; gap: var(--s-4); margin-top: var(--s-4); }
.stamp-chain ol::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--verified), var(--border-strong)); }
.stamp { position: relative; padding-left: 24px; }
.stamp::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--verified); }
.stamp:first-child::before { background: var(--verified); }
.stamp__time { color: var(--heading); font: 500 .875rem/1.4 var(--mono); }
.stamp__place { color: var(--text-muted); font-size: var(--fs-xs); }
.stamp__hash { color: var(--text-subtle); font: 400 .75rem/1.5 var(--mono); }
.stamp-chain figcaption { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--fs-xs); line-height: 1.55; }

@media (max-width: 860px) {
  .hero__visual { grid-template-columns: 1fr; justify-items: center; padding-bottom: var(--s-7); }
  .hero__visual .phone { grid-column: 1; width: min(260px, 78vw); }
  .hero__visual::after { height: 120px; bottom: 140px; }
  .stamp-chain { grid-column: 1; justify-self: center; width: 100%; max-width: 380px; margin: -96px 0 0; }
}

/* ---------- how it works ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.steps::before { content: ""; position: absolute; top: 20px; left: calc(100% / 6); right: calc(100% / 6); height: 2px; background: linear-gradient(90deg, var(--accent), #14b8a6); opacity: .4; }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.step__marker { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 0 0 6px var(--bg); }
.step__card { display: flex; flex: 1; flex-direction: column; width: 100%; margin-top: var(--s-5); overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.step__shot { position: relative; display: flex; justify-content: center; height: 300px; overflow: hidden; padding-top: var(--s-6); background: var(--sunken); border-bottom: 1px solid var(--border); }
.step__shot .phone { width: 210px; padding: 7px; border-radius: 26px; }
.step__shot .phone img { border-radius: 19px; }
.step__shot::after { content: ""; position: absolute; inset: auto 0 0; height: 80px; background: linear-gradient(transparent, var(--sunken)); }
.step__body { padding: var(--s-5) var(--s-5) var(--s-6); }
.step h3 { font-size: var(--fs-h3); line-height: 1.3; }
.step p { margin-top: var(--s-2); color: var(--text-muted); font-size: .9375rem; }
.section-foot { display: flex; justify-content: center; margin-top: var(--s-7); }

/* step 4: the Preparer Pack, shown as its pages (paper on the card), summary tall on the left, diary and workbook stacked on the right.
   The column ratio makes the two columns come out the same height at the container width, labels included. */
.step--wide { grid-column: 1 / -1; margin-top: var(--s-3); }
.payoff { padding: var(--s-6) var(--s-6) var(--s-5); }
.payoff__text { max-width: 720px; margin-inline: auto; }
.payoff__text p { max-width: none; }
.payoff__links { display: flex; justify-content: center; gap: var(--s-5); margin-top: var(--s-4); }
.payoff__links a { color: var(--link); font-size: .9375rem; font-weight: 500; }
.payoff__pages { display: grid; grid-template-columns: minmax(0, 1.63fr) minmax(0, 1fr); grid-template-areas: "summary diary" "summary workbook"; gap: var(--s-4); align-items: start; margin-top: var(--s-6); text-align: left; }
.payoff__page--summary { grid-area: summary; }
.payoff__page--diary { grid-area: diary; }
.payoff__page--workbook { grid-area: workbook; }
.payoff__page { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); text-decoration: none; transition: border-color .15s ease; }
.payoff__page:hover { border-color: var(--accent); }
.payoff__page:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.payoff__page img { display: block; width: 100%; height: auto; background: #fff; }
.payoff__page span { padding: 8px 12px; color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.4; }
.step .payoff__note { margin-top: var(--s-4); color: var(--text-subtle); font-size: var(--fs-sm); }

@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; gap: var(--s-7); }
  .steps::before { display: none; }
  .step--wide { margin-top: 0; }
  .payoff { padding: var(--s-5); }
  .payoff__pages { grid-template-columns: minmax(0, 1fr); grid-template-areas: "summary" "diary" "workbook"; }
}

/* ---------- Publication 529 comparison ---------- */
.ledger { max-width: 960px; margin-inline: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.ledger__head, .ledger__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); align-items: start; padding: var(--s-5) var(--s-6); }
.ledger__head { padding-block: var(--s-4); border-bottom: 1px solid var(--border); color: var(--text-subtle); font-size: var(--fs-sm); font-weight: 500; }
.ledger__head span:first-child { padding-left: calc(44px + var(--s-4)); }
.ledger__row + .ledger__row { border-top: 1px solid var(--border); }
.ledger__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--link); }
.ledger__ask { display: grid; grid-template-columns: 44px 1fr; gap: var(--s-4); align-items: center; color: var(--text-muted); }
.ledger__record { display: flex; gap: var(--s-2); color: var(--heading); font-weight: 500; }
.ledger__record .icon { width: 18px; height: 18px; margin-top: 4px; color: var(--verified); stroke-width: 2.25; }
.ledger__label { display: none; }
.section-note { max-width: 640px; margin: var(--s-6) auto 0; color: var(--text-subtle); font-size: var(--fs-sm); text-align: center; }

@media (max-width: 720px) {
  .ledger__head { display: none; }
  .ledger__row { grid-template-columns: 1fr; gap: var(--s-3); padding: var(--s-5); }
  .ledger__ask { grid-template-columns: 40px 1fr; align-items: start; }
  .ledger__ask .ledger__icon { width: 40px; height: 40px; }
  .ledger__label { display: block; color: var(--text-subtle); font-size: var(--fs-xs); font-weight: 500; }
  .ledger__record { padding-left: calc(40px + var(--s-4)); }
}

/* ---------- privacy ---------- */
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 6vw, 96px); align-items: center; max-width: 1000px; margin-inline: auto; }
.split .phone { width: min(280px, 100%); margin-inline: auto; }
.feature-list { display: grid; gap: var(--s-5); }
.feature { display: grid; grid-template-columns: 44px 1fr; gap: var(--s-4); }
.feature h3 { font-size: 1.0625rem; line-height: 1.4; }
.feature p { margin-top: var(--s-1); color: var(--text-muted); font-size: .9375rem; }
.callout { display: flex; gap: var(--s-3); padding: 14px var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: var(--fs-sm); line-height: 1.55; }
.callout .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--text-muted); }
.callout--caution { background: var(--caution-soft); border-color: color-mix(in srgb, var(--caution) 30%, transparent); }
.callout--caution .icon { color: var(--caution); }
.callout--verified { background: var(--verified-soft); border-color: color-mix(in srgb, var(--verified) 30%, transparent); }
.callout--verified .icon { color: var(--verified); }
.callout--note .icon { color: var(--link); }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split .phone { width: 240px; }
}

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-5); max-width: 880px; margin-inline: auto; }
.plan { position: relative; display: flex; flex-direction: column; padding: var(--s-6); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.plan--featured { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; }
.plan__badge { position: absolute; top: -13px; left: var(--s-6); padding: 3px 12px; border-radius: var(--r-pill); background: var(--grad); color: #fff; font-size: var(--fs-xs); font-weight: 600; }
.plan h3 { color: var(--text-muted); font-size: 1rem; }
.plan__price { margin-top: var(--s-2); color: var(--heading); font-size: 2.25rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.plan__price--text { font-size: 1.75rem; }
.plan__desc { margin-top: var(--s-2); color: var(--text-subtle); font-size: var(--fs-sm); }
.plan ul { display: grid; flex: 1; gap: var(--s-3); margin: var(--s-5) 0 var(--s-6); }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: var(--s-3); font-size: .9375rem; }
.plan li .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--verified); stroke-width: 2.25; }

@media (max-width: 720px) { .plans { grid-template-columns: 1fr; max-width: 460px; } }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin-inline: auto; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: 20px 4px; color: var(--heading); font-size: 1.0625rem; font-weight: 600; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq__chevron { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text-muted); transition: transform .2s var(--ease); }
.faq details[open] .faq__chevron { transform: rotate(180deg); }
.faq summary:hover .faq__chevron { border-color: var(--border-strong); color: var(--heading); }
.faq__answer { padding: 0 52px 22px 4px; color: var(--text-muted); }
.faq__more { margin-top: var(--s-6); color: var(--text-subtle); text-align: center; }

/* ---------- closing call to action ---------- */
.cta-panel { position: relative; overflow: hidden; max-width: 960px; margin-inline: auto; padding: clamp(48px, 7vw, 80px) var(--gutter); border: 1px solid var(--border-strong); border-radius: var(--r-xl); background: var(--surface); text-align: center; }
.cta-panel::before { content: ""; position: absolute; inset: -40% 0 auto; height: 160%; background: var(--halo); pointer-events: none; }
.cta-panel > * { position: relative; }
.cta-panel h2 { font-size: var(--fs-h2); line-height: 1.15; }
.cta-panel p { max-width: 540px; margin: var(--s-4) auto 0; color: var(--text-muted); font-size: var(--fs-lead); }
.cta-panel .button-row { margin-top: var(--s-6); }

/* ---------- footer ---------- */
.site-footer { padding: var(--s-8) 0 var(--s-6); border-top: 1px solid var(--border); background: var(--sunken); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--s-6); }
.site-footer__about p { max-width: 300px; margin-top: var(--s-3); color: var(--text-subtle); font-size: var(--fs-sm); }
.site-footer h2 { margin-bottom: var(--s-4); color: var(--heading); font-size: var(--fs-sm); letter-spacing: 0; }
.site-footer ul { display: grid; gap: 10px; }
.site-footer a { color: var(--text-muted); font-size: var(--fs-sm); text-decoration: none; }
.site-footer a:hover { color: var(--heading); text-decoration: underline; }
.site-footer .brand { font-size: 1.125rem; }
.site-footer__legal { max-width: 860px; margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--border); color: var(--text-subtle); font-size: var(--fs-xs); line-height: 1.65; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-4); color: var(--text-subtle); font-size: var(--fs-xs); }

@media (max-width: 880px) {
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer__about { grid-column: 1 / -1; }
}

/* =====================================================================
   inner pages
   ===================================================================== */
.page-intro { position: relative; overflow: hidden; padding: clamp(56px, 7vw, 96px) 0 var(--s-8); text-align: center; }
.page-intro::before { content: ""; position: absolute; inset: -60% 0 0; background: var(--halo); pointer-events: none; }
.page-intro .container { position: relative; }
.page-body { padding-bottom: var(--section-y); }
.page-intro h1 { font-size: var(--fs-h1); line-height: 1.1; letter-spacing: -.03em; }
.page-intro p { max-width: 620px; margin: var(--s-4) auto 0; color: var(--text-muted); font-size: var(--fs-lead); }

/* ---------- join the test / tester feedback ---------- */
.join { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: start; max-width: 1040px; margin-inline: auto; }
.join__aside h2 { font-size: 1.375rem; }
.next-steps { display: grid; gap: var(--s-5); margin-top: var(--s-5); }
.next-steps li { display: grid; grid-template-columns: 40px 1fr; gap: var(--s-3); }
.next-steps .ledger__icon { width: 40px; height: 40px; border-radius: 10px; }
.next-steps h3 { font-size: 1rem; }
.next-steps p { color: var(--text-muted); font-size: .9375rem; }
.join__aside > p { margin-top: var(--s-6); color: var(--text-subtle); font-size: var(--fs-sm); }
.join__aside > p + p { margin-top: var(--s-3); }

.form-card { display: grid; gap: var(--s-5); padding: clamp(24px, 4vw, 40px); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.field { display: grid; align-content: start; gap: var(--s-2); min-width: 0; margin: 0; padding: 0; border: 0; }
.field__label { color: var(--heading); font-size: var(--fs-sm); font-weight: 600; padding: 0; }
.field__optional { color: var(--text-subtle); font-weight: 400; }
.field__help { color: var(--text-subtle); font-size: var(--fs-xs); line-height: 1.5; }
.input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: 400 .9375rem/1.4 var(--font); }
textarea.input { min-height: 104px; padding: 12px 14px; resize: vertical; }
.input::placeholder { color: var(--text-subtle); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice-group { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span { display: block; padding: 10px 16px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); color: var(--text-muted); font-size: var(--fs-sm); font-weight: 500; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--heading); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent { display: grid; grid-template-columns: 20px 1fr; gap: var(--s-3); color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.55; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.honeypot { position: absolute; left: -10000px; }
.form-msg { padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--r-md); font-size: var(--fs-sm); line-height: 1.55; }
.form-msg--ok { background: var(--verified-soft); border-color: color-mix(in srgb, var(--verified) 30%, transparent); color: var(--heading); }
.form-msg--err { background: var(--caution-soft); border-color: color-mix(in srgb, var(--caution) 30%, transparent); color: var(--heading); }
.form-card__foot { color: var(--text-subtle); font-size: var(--fs-sm); text-align: center; }

@media (max-width: 880px) {
  .join { grid-template-columns: 1fr; }
  .join__aside { order: 2; }
}

@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- guide ---------- */
.guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; max-width: 1080px; margin-inline: auto; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); }
.toc h2 { margin-bottom: var(--s-3); color: var(--text-subtle); font-size: var(--fs-sm); font-weight: 500; letter-spacing: 0; }
.toc ol { border-left: 1px solid var(--border); }
.toc a { display: block; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 2px solid transparent; color: var(--text-muted); font-size: var(--fs-sm); text-decoration: none; }
.toc a:hover { color: var(--heading); }
.toc a[aria-current="true"] { border-left-color: var(--accent); color: var(--heading); }

.guide-section { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: var(--s-6); align-items: start; padding-bottom: var(--s-8); margin-bottom: var(--s-8); border-bottom: 1px solid var(--border); }
.guide-section:last-child { margin-bottom: 0; border-bottom: 0; }
.guide-section--text { grid-template-columns: minmax(0, 1fr); }
.guide-section h2 { display: flex; align-items: baseline; gap: var(--s-3); font-size: 1.625rem; line-height: 1.25; }
.guide-section__num { color: var(--text-subtle); font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.guide-section p, .guide-section li { max-width: var(--measure); color: var(--text-muted); }
.guide-section h2 + p, .guide-section h2 + ul { margin-top: var(--s-4); }
.guide-section p + p, .guide-section p + ol, .guide-section ol + p, .guide-section p + ul, .guide-section ul + p, .guide-section .callout + p { margin-top: var(--s-4); }
.guide-section ol, .guide-section ul { display: grid; gap: 10px; padding-left: 20px; }
.guide-section .callout { margin-top: var(--s-4); max-width: var(--measure); }
.guide-section .callout span { color: var(--text); }
.guide-section .phone { padding: 7px; border-radius: 26px; }
.guide-section .phone img { border-radius: 19px; }

/* Preparer Pack previews (guide, Tax time): paper pages on the surface, the landscape diary across the full width */
.pack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); margin-top: var(--s-5); }
.pack__figure--wide { grid-column: 1 / -1; }
.pack__link { display: block; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: #fff; overflow: hidden; transition: border-color .15s ease, transform .15s ease; }
.pack__link:hover { border-color: var(--accent); }
.pack__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pack__link img { display: block; width: 100%; height: auto; }
.pack figcaption { margin-top: var(--s-3); color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.6; }
.pack figcaption strong { color: var(--heading); font-weight: 600; }
.guide-section .pack__note { margin-top: var(--s-4); color: var(--text-subtle); font-size: var(--fs-sm); }

@media (max-width: 880px) {
  .guide { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; }
  .toc::-webkit-scrollbar { display: none; }
  .toc ol { display: flex; gap: var(--s-2); width: max-content; padding-right: var(--gutter); border: 0; }
  .toc a { margin: 0; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); white-space: nowrap; }
  .toc a[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
  .guide-section { grid-template-columns: minmax(0, 1fr); }
  .guide-section .phone { width: 220px; margin-inline: auto; }
}
@media (max-width: 640px) { .pack { grid-template-columns: minmax(0, 1fr); } }

/* ---------- legal / reading pages ---------- */
.prose { max-width: 680px; margin-inline: auto; }
.prose__meta { color: var(--text-subtle); font-size: var(--fs-sm); line-height: 1.6; }
.prose__summary { margin-top: var(--s-5); padding: var(--s-5); border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); }
.prose__summary p { color: var(--heading); font-weight: 500; line-height: 1.65; }
.prose h2 { margin: var(--s-7) 0 var(--s-3); font-size: 1.375rem; }
.prose p, .prose li { color: var(--text-muted); line-height: 1.75; }
.prose p + p, .prose ul { margin-top: var(--s-4); }
.prose ul { display: grid; gap: 8px; padding-left: 20px; }

/* =====================================================================
   demo page: the working demo (demo.js) renders into #demo; the layout
   around it is the mockup's (steps left, device right, stacking on mobile)
   ===================================================================== */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 6vw, 96px); align-items: start; max-width: 1000px; margin-inline: auto; }
.demo-steps { display: grid; }
.demo-steps li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: var(--s-4); padding-bottom: var(--s-5); }
.demo-steps li:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--border-strong); }
.demo-steps__num { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface-2); color: var(--text-muted); font-weight: 600; }
.demo-steps li[aria-current="step"] .demo-steps__num { border-color: transparent; background: var(--grad); color: #fff; }
.demo-steps h2 { margin-top: 6px; font-size: 1rem; }
.demo-steps li[aria-current="step"] h2 { color: var(--heading); }
.demo-steps p { color: var(--text-muted); font-size: .9375rem; }
.demo-note { padding: var(--s-4) 18px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.6; }
.demo-note strong { color: var(--heading); font-weight: 600; }
.demo .button-row { justify-content: flex-start; margin-top: var(--s-5); }

/* the demo device is intentionally always dark: it is the app, not the page */
.demo-device { padding: 10px; border-radius: 40px; background: #1a1a1d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), var(--shadow-lg); }
.demo-screen {
  display: grid; gap: 14px; align-content: start; min-height: 620px; padding: 22px 18px 20px; border-radius: 31px;
  background: #0b0b0d; color: #e5e5e5; font-size: .875rem; line-height: 1.45; color-scheme: dark;
  --d-line: rgba(255, 255, 255, .1); --d-line-2: rgba(255, 255, 255, .16); --d-surface: #141417; --d-ink-2: #d4d4d4; --d-ink-3: #8a8a8a;
  --d-accent: #3b82f6; --d-accent-ink: #93c5fd; --d-verified: #2dd4bf; --d-win: #4ade80; --d-loss: #f87171;
}
.demo-screen .kicker { color: #60a5fa; font-size: .75rem; font-weight: 600; }
.demo-screen .d-title { margin-top: -8px; color: #fff; font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; }
.demo-screen .d-field { display: grid; gap: 6px; }
.demo-screen label { color: #fff; font-size: .8125rem; font-weight: 600; }
.demo-screen input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--d-line-2); border-radius: 9px; background: transparent; color: #fff; font: 400 .9375rem/1.3 var(--font); color-scheme: dark; }
.demo-screen input:focus { outline: 2px solid var(--d-accent-ink); outline-offset: 1px; border-color: transparent; }
.demo-screen .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-screen .pills { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-screen .pill { appearance: none; padding: 7px 12px; border: 1px solid var(--d-line-2); border-radius: var(--r-pill); background: transparent; color: var(--d-ink-2); font: 500 .8125rem/1 var(--font); cursor: pointer; }
.demo-screen .pill[aria-pressed="true"] { border-color: var(--d-accent); background: rgba(59, 130, 246, .22); color: #fff; }
.demo-screen .pill:focus-visible { outline: 2px solid var(--d-accent-ink); outline-offset: 2px; }
.demo-screen .d-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--d-line-2); border-radius: 10px; background: transparent; color: #fff; font: 600 .9375rem/1 var(--font); cursor: pointer; }
.demo-screen .d-btn.primary { background: var(--grad); border-color: transparent; }
.demo-screen .d-btn.ghost { border-color: transparent; color: var(--d-ink-2); text-decoration: underline; text-underline-offset: 3px; }
.demo-screen .d-btn:focus-visible { outline: 2px solid var(--d-accent-ink); outline-offset: 2px; }
.demo-screen .d-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.demo-screen .ticket { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--d-line); border-left: 4px solid var(--d-accent); border-radius: 12px; background: var(--d-surface); }
.demo-screen .t-top { display: flex; justify-content: space-between; gap: 8px; color: var(--d-accent-ink); font-size: .75rem; font-weight: 600; }
.demo-screen .t-live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--d-verified); vertical-align: 1px; }
.demo-screen .t-name { color: #fff; font-size: 1.125rem; font-weight: 600; }
.demo-screen .t-sub { color: var(--d-ink-2); font-size: .8125rem; }
.demo-screen .t-money { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; color: var(--d-ink-3); font-size: .8125rem; }
.demo-screen .t-money b { color: #fff; font-size: 1.125rem; font-weight: 600; }
.demo-screen .stamps { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.demo-screen .stamps li { padding: 8px 10px; border: 1px dashed var(--d-line-2); border-radius: 8px; color: var(--d-ink-2); font: 400 .75rem/1.5 var(--mono); overflow-wrap: anywhere; }
.demo-screen .stamps li .k { color: var(--d-verified); font-weight: 500; }
.demo-screen .net { color: #fff; font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; }
.demo-screen .net.win { color: var(--d-win); }
.demo-screen .net.loss { color: var(--d-loss); }
.demo-screen .hint { color: var(--d-ink-3); font-size: .8125rem; }
.demo-screen .err { color: #fca5a5; font-size: .8125rem; }
.demo-screen .toast { justify-self: center; align-self: end; padding: 8px 14px; border-radius: 8px; background: #e5e5e5; color: #0a0a0a; font-size: .8125rem; }
.demo-screen .demo-link { color: var(--d-accent-ink); }
@keyframes stamp-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.demo-screen .stamps li.new { animation: stamp-in .35s ease-out; }

@media (max-width: 880px) {
  .demo { grid-template-columns: minmax(0, 1fr); }
  .demo-device { width: 100%; max-width: 340px; margin-inline: auto; }
}

/* ---------- motion: only what answers a user action, and none when asked ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
