/* AdLedger website: the "Quiet Ledger" look of the app (docs/redesign/BRIEF.md §2).
   Sage-graphite neutrals, one emerald accent that means money, ink primary buttons.
   Radius rule: 8px for controls and chips, 14px for panels, full for tags.
   Colours always come from the tokens below (never hard-coded greens), so the page follows
   light and dark mode and a future accent change in one place. */

@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --bg: oklch(0.985 0.003 165);
  --bg-subtle: oklch(0.972 0.004 165);
  --surface: oklch(1 0 0);
  --fill: oklch(0.955 0.004 165);
  --fill-hover: oklch(0.935 0.005 165);
  --border: oklch(0.922 0.004 165);
  --border-strong: oklch(0.86 0.006 165);
  --fg-faint: oklch(0.53 0.01 165);
  --fg-muted: oklch(0.47 0.012 165);
  --fg: oklch(0.2 0.012 165);
  --ink: oklch(0.2 0.012 165);
  --ink-fg: oklch(0.985 0.003 165);
  --brand: oklch(0.55 0.13 162);
  --brand-2: oklch(0.58 0.1 195);
  --brand-gradient: linear-gradient(135deg, var(--brand), var(--brand-2));
  --brand-soft: oklch(0.55 0.13 162 / 0.08);
  --brand-fg: oklch(0.42 0.1 162);
  --ring: oklch(0.55 0.13 162 / 0.5);
  --positive: oklch(0.49 0.13 155);
  --negative: oklch(0.53 0.19 27);
  --negative-soft: oklch(0.55 0.19 27 / 0.08);
  --warning-soft: oklch(0.7 0.14 70 / 0.14);
  --warning-fg: oklch(0.47 0.12 65);
  --chart-spend: oklch(0.6 0.03 250);
  --code-bg: oklch(0.2 0.012 165);
  --code-fg: oklch(0.93 0.005 165);
  --code-dim: oklch(0.68 0.01 165);
  --code-accent: oklch(0.8 0.12 162);
  --shadow-sm: 0 0 0 1px oklch(0.2 0.02 165 / 0.07), 0 1px 2px oklch(0.2 0.02 165 / 0.04);
  --shadow-md: 0 0 0 1px oklch(0.2 0.02 165 / 0.07), 0 4px 12px -2px oklch(0.2 0.02 165 / 0.07);
  --shadow-lg: 0 0 0 1px oklch(0.2 0.02 165 / 0.07), 0 8px 16px -4px oklch(0.2 0.02 165 / 0.06), 0 28px 48px -12px oklch(0.2 0.02 165 / 0.14);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --text-ui: 13px;
  --text-caption: 12px;
  --text-micro: 11px;
  --nav-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(0.165 0.004 165); --bg-subtle: oklch(0.185 0.005 165); --surface: oklch(0.195 0.005 165);
    --fill: oklch(0.225 0.005 165); --fill-hover: oklch(0.25 0.006 165);
    --border: oklch(1 0 0 / 0.08); --border-strong: oklch(1 0 0 / 0.14);
    --fg-faint: oklch(0.62 0.008 165); --fg-muted: oklch(0.72 0.008 165); --fg: oklch(0.95 0.004 165);
    --ink: oklch(0.95 0.004 165); --ink-fg: oklch(0.17 0.004 165);
    --brand: oklch(0.74 0.14 162); --brand-2: oklch(0.76 0.1 195); --brand-soft: oklch(0.74 0.14 162 / 0.1); --brand-fg: oklch(0.8 0.12 162); --ring: oklch(0.74 0.14 162 / 0.55);
    --positive: oklch(0.76 0.15 155); --negative: oklch(0.72 0.17 25); --negative-soft: oklch(0.7 0.17 25 / 0.12);
    --warning-soft: oklch(0.8 0.13 75 / 0.13); --warning-fg: oklch(0.82 0.13 75);
    --chart-spend: oklch(0.68 0.03 250);
    --code-bg: oklch(0.13 0.004 165);
    --shadow-sm: 0 0 0 1px oklch(1 0 0 / 0.08);
    --shadow-md: 0 0 0 1px oklch(1 0 0 / 0.09), 0 8px 24px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 0 0 1px oklch(1 0 0 / 0.1), 0 24px 56px oklch(0 0 0 / 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: oklch(0.165 0.004 165); --bg-subtle: oklch(0.185 0.005 165); --surface: oklch(0.195 0.005 165);
  --fill: oklch(0.225 0.005 165); --fill-hover: oklch(0.25 0.006 165);
  --border: oklch(1 0 0 / 0.08); --border-strong: oklch(1 0 0 / 0.14);
  --fg-faint: oklch(0.62 0.008 165); --fg-muted: oklch(0.72 0.008 165); --fg: oklch(0.95 0.004 165);
  --ink: oklch(0.95 0.004 165); --ink-fg: oklch(0.17 0.004 165);
  --brand: oklch(0.74 0.14 162); --brand-2: oklch(0.76 0.1 195); --brand-soft: oklch(0.74 0.14 162 / 0.1); --brand-fg: oklch(0.8 0.12 162); --ring: oklch(0.74 0.14 162 / 0.55);
  --positive: oklch(0.76 0.15 155); --negative: oklch(0.72 0.17 25); --negative-soft: oklch(0.7 0.17 25 / 0.12);
  --warning-soft: oklch(0.8 0.13 75 / 0.13); --warning-fg: oklch(0.82 0.13 75);
  --chart-spend: oklch(0.68 0.03 250);
  --code-bg: oklch(0.13 0.004 165);
  --shadow-sm: 0 0 0 1px oklch(1 0 0 / 0.08);
  --shadow-md: 0 0 0 1px oklch(1 0 0 / 0.09), 0 8px 24px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 0 0 1px oklch(1 0 0 / 0.1), 0 24px 56px oklch(0 0 0 / 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; }
a { color: var(--fg); text-decoration-color: var(--border-strong); text-underline-offset: 3px; transition: text-decoration-color 0.1s; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
code { font: 500 0.9em var(--mono); padding: 1px 5px; border-radius: 4px; background: var(--fill); color: var(--fg); overflow-wrap: anywhere; }
.wrap { --gutter: 24px; max-width: 1200px; margin: 0 auto; padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)); }
@media (max-width: 640px) { .wrap { --gutter: 16px; } }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--fg-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 40; padding: 8px 12px; border-radius: 8px; background: var(--ink); color: var(--ink-fg); text-decoration: none; }
.skip:focus { top: 12px; }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.gh { width: 16px; height: 16px; flex: none; fill: currentColor; }

/* nav */
.nav { position: sticky; top: 0; z-index: 30; background: color-mix(in oklch, var(--bg) 84%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border); padding-top: env(safe-area-inset-top, 0px); }
.nav::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand-gradient); transform-origin: 0 50%; transform: scaleX(var(--page-progress, 0)); pointer-events: none; }
.nav > .wrap { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; letter-spacing: -0.02em; color: var(--fg); text-decoration: none; }
.brand svg { width: 24px; height: 24px; flex: none; }
.navlinks { display: flex; gap: 22px; margin-left: 12px; font-size: 14px; }
.navlinks a { position: relative; color: var(--fg-muted); text-decoration: none; transition: color 0.15s; }
.navlinks a:hover, .navlinks a[aria-current] { color: var(--fg); }
.navlinks a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: var(--brand); }
.nav-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.star { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 8px; color: var(--fg); text-decoration: none; font: 500 13.5px/1 var(--sans); box-shadow: inset 0 0 0 1px var(--border-strong); background: var(--surface); transition: background-color 0.15s; }
.star:hover { background: var(--fill); }
.star .ico { width: 14px; height: 14px; color: var(--fg-faint); }
.menu { display: none; position: relative; }
.menu > summary { list-style: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; cursor: pointer; color: var(--fg); box-shadow: inset 0 0 0 1px var(--border-strong); background: var(--surface); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary .ico { width: 18px; height: 18px; }
.menu .close { display: none; }
.menu[open] .open { display: none; }
.menu[open] .close { display: block; }
.menu-panel { position: fixed; left: 12px; right: 12px; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 8px); display: grid; gap: 2px; padding: 8px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); }
.menu-panel a:not(.btn) { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--fg); text-decoration: none; font-weight: 500; }
.menu-panel a:not(.btn):hover { background: var(--fill); }
@media (max-width: 920px) {
  .navlinks { display: none; }
  .menu { display: block; }
  .nav-end > .btn-ink { display: none; }
}
@media (max-width: 380px) { .star .lbl { display: none; } }

/* buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 8px; font: 500 14px/1 var(--sans); text-decoration: none; white-space: nowrap; border: 1px solid transparent; cursor: pointer; touch-action: manipulation; transition: background-color 0.15s, border-color 0.15s, box-shadow 0.2s, transform 0.1s var(--ease-out), translate 0.35s var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn-ink { background: var(--ink); color: var(--ink-fg); box-shadow: 0 1px 0 oklch(1 0 0 / 0.12) inset, 0 1px 2px oklch(0 0 0 / 0.12); }
.btn-ink:hover { background: color-mix(in oklch, var(--ink) 86%, var(--bg)); box-shadow: 0 1px 0 oklch(1 0 0 / 0.12) inset, 0 6px 18px -6px var(--ring); }
.btn-line { background: var(--surface); color: var(--fg); border-color: var(--border-strong); }
.btn-line:hover { background: var(--fill); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.nav .btn { height: 34px; padding: 0 14px; font-size: 13.5px; }
.nav .menu-panel .btn { margin-top: 6px; height: 44px; font-size: 15px; }

/* type */
.display { font-size: clamp(42px, 6.4vw, 76px); line-height: 1; letter-spacing: -0.045em; }
.h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.06; letter-spacing: -0.035em; }
.lede { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; color: var(--fg-muted); max-width: 34em; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 500 var(--text-caption)/1 var(--mono); color: var(--brand-fg); letter-spacing: 0.04em; text-transform: uppercase; }
.kicker::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.6; }
.grad { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.04em; }
.sec { padding-block: 112px; position: relative; }
.sec + .sec { border-top: 1px solid var(--border); }
.sec-head { max-width: 46rem; margin-bottom: 48px; display: grid; gap: 16px; }
.sec-head p { color: var(--fg-muted); font-size: 17.5px; }
.sec-head.center { margin-inline: auto; text-align: center; justify-items: center; }
@media (max-width: 760px) { .sec { padding-block: 44px; }
.sec .sec-head { margin-bottom: 32px; } .sec-head { margin-bottom: 32px; } }

/* animated gradient border (pill, cards) */
.gborder { border: 1px solid transparent; background: linear-gradient(var(--gb-bg, var(--surface)), var(--gb-bg, var(--surface))) padding-box, conic-gradient(from var(--angle), var(--border-strong) 0 55%, var(--brand) 72%, var(--brand-2) 84%, var(--border-strong) 100%) border-box; }
/* the spin repaints every frame, so it runs only with a desktop pointer (no battery drain on phones) */
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) { .gborder { animation: gb-spin 7s linear infinite; } }
@keyframes gb-spin { to { --angle: 360deg; } }

/* pointer spotlight: a soft glow that follows the cursor inside a card, and lights its edge */
[data-glow] { position: relative; isolation: isolate; }
[data-glow]::before, [data-glow]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.35s var(--ease-out); }
[data-glow]::after { z-index: -1; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklch, var(--brand) 11%, transparent), transparent 65%); }
[data-glow]::before { z-index: 1; padding: 1px; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklch, var(--brand) 70%, transparent), transparent 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
@media (hover: hover) and (pointer: fine) { [data-glow]:hover::before, [data-glow]:hover::after { opacity: 1; } }

/* hero */
.hero { position: relative; padding-block: 88px 0; text-align: center; }
.hero::before { content: ""; position: absolute; inset: -60px 0 auto; height: 720px; z-index: -1; pointer-events: none; background: radial-gradient(60% 55% at 50% 0%, var(--brand-soft), transparent 70%), radial-gradient(40% 40% at 78% 30%, color-mix(in oklch, var(--brand-2) 8%, transparent), transparent 70%); }
.hero-copy { display: grid; justify-items: center; gap: 22px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 6px; border-radius: 999px; font: 500 var(--text-ui)/1 var(--sans); color: var(--fg-muted); text-decoration: none; box-shadow: var(--shadow-sm); }
.pill b { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-fg); font: 500 var(--text-micro)/1 var(--mono); letter-spacing: 0.02em; }
.pill:hover { color: var(--fg); }
.hero .lede { margin-inline: auto; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.byline { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px; font-size: var(--text-ui); color: var(--fg-muted); }
.byline span + span::before { content: "·"; margin-right: 14px; color: var(--fg-faint); }
.byline a { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); font-weight: 500; text-decoration: none; }
.byline a:hover { text-decoration: underline; text-decoration-color: var(--border-strong); }
@media (max-width: 480px) { .cta { width: 100%; } .cta .btn { flex: 1 1 auto; } }

.hero-visual { position: relative; margin: 56px auto 0; max-width: 1080px; }
.hero-frame { margin: 0; text-align: left; }
@media (max-width: 900px) {
  .hero { padding-top: 56px; }
  .hero-visual { margin-top: 44px; }
}

/* browser frame */
.frame { position: relative; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.frame-bar { display: flex; gap: 6px; align-items: center; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.frame-bar i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.frame-bar span { margin-left: 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 var(--text-caption) var(--mono); color: var(--fg-muted); }
.frame-bar .lock { margin-left: 10px; width: 12px; height: 12px; color: var(--fg-faint); }
.frame-bar .lock + span { margin-left: 4px; }
.frame img { display: block; width: 100%; background: var(--bg-subtle); }

/* proof strip */
.proof { position: relative; z-index: 3; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-subtle); margin-top: 96px; }
.proof ul { list-style: none; margin: 0 auto; padding-block: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.proof li { padding: 24px; display: grid; gap: 2px; }
.proof li + li { border-left: 1px solid var(--border); }
.proof li:first-child { padding-left: 0; }
.proof b { font: 600 24px/1.2 var(--mono); letter-spacing: -0.03em; }
.proof span { font-size: 13.5px; color: var(--fg-muted); }
@media (max-width: 900px) { .proof { margin-top: 56px; } }
@media (max-width: 760px) { .proof ul { grid-template-columns: 1fr 1fr; } .proof li:nth-child(3) { border-left: 0; } .proof li:nth-child(n+3) { border-top: 1px solid var(--border); } .proof li { padding: 18px 16px; } .proof li:nth-child(odd) { padding-left: 0; } }

/* product story. By default (no JS, reduced motion, phones, no WebGL) the chapters are stacked rows,
   each with its real screenshot. With .want-3d (set in <head> before first paint) a pinned WebGL stage
   (site-3d.js) takes the dashboard apart while the notes float over it. */
.story { position: relative; }
.stage { display: none; }
.tour { padding-block: 112px; margin-top: 96px; border-top: 1px solid var(--border); }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 112px; }
.chapter { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; scroll-margin-top: calc(var(--nav-h) + 24px); }
.chapter[data-side="left"] .note { order: 2; }
.note { display: grid; gap: 14px; align-content: center; max-width: 30rem; }
.note-k { display: flex; align-items: center; gap: 10px; font: 500 var(--text-caption)/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-fg); }
.note-k .n { display: grid; place-items: center; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--brand-soft); letter-spacing: 0; }
.note h3 { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.12; letter-spacing: -0.03em; }
.note p { color: var(--fg-muted); font-size: 16.5px; }
.chapter-head, .chapter-end { display: block; }
.chapter-head .note { max-width: 46rem; gap: 16px; }
.chapter-head .note p { font-size: 17.5px; }
.chapter-end .note { max-width: 44rem; margin-inline: auto; justify-items: center; text-align: center; gap: 16px; }
.chapter-end .note p { font-size: 17.5px; }
.chapter-end .cta { margin-top: 8px; }
.ch-shot { margin: 0; }
.ch-shot img { aspect-ratio: 1440 / 900; }
/* a crop of a screenshot: --x/--y/--w/--h are pixels of the 3200×2000 original.
   Phones use their own, tighter crop (--px/--py/--pw/--ph) so the text in it stays legible. */
.frame.crop { --cx: var(--x); --cy: var(--y); --cw: var(--w); --ch: var(--h); aspect-ratio: var(--cw) / var(--ch); }
.frame.crop img { width: calc(3200 / var(--cw) * 100%); max-width: none; margin-left: calc(var(--cx) / var(--cw) * -100%); margin-top: calc(var(--cy) / var(--cw) * -100%); }
.ch-shot .rows { display: none; }
@media (max-width: 900px) {
  .tour { padding-block: 72px; margin-top: 56px; }
  .chapters { gap: 72px; }
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .chapter[data-side="left"] .note { order: 0; }
  .note { max-width: none; }
}
/* phones and the static page: screenshots tilt up into place as they arrive (site.js adds .tilt-in) */
:root.tilt-in:not(.want-3d) .ch-shot { transform: perspective(1400px) rotateX(18deg) translateY(36px) scale(0.94); transform-origin: 50% 100%; opacity: 0.35; transition: transform 1.1s var(--ease-out), opacity 0.9s var(--ease-out); }
:root.tilt-in:not(.want-3d) .ch-shot.in { transform: var(--rest, none); opacity: 1; }

/* phones: each chapter is a zoomed crop on a card that rests at a slight 3D tilt, with a glass edge */
@media (max-width: 767px) {
  .tour { padding-block: 64px; margin-top: 48px; }
  .chapters { gap: 56px; }
  .chapter { gap: 20px; }
  .note { gap: 10px; }
  .chapter:not(.chapter-head, .chapter-end) .chips { display: none; } /* the zoomed screen says it */
  .ch-shot { --tilt: -4deg; --rest: perspective(1100px) rotateX(3deg) rotateY(var(--tilt)); transform: var(--rest); box-shadow: var(--shadow-lg), 0 28px 56px -30px var(--ring); }
  .chapter[data-side="left"] .ch-shot { --tilt: 4deg; }
  .ch-shot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, oklch(1 0 0 / 0.12), transparent 34%); box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.09); }
  .frame.crop { --cx: var(--px, var(--x)); --cy: var(--py, var(--y)); --cw: var(--pw, var(--w)); --ch: var(--ph, var(--h)); }
  /* the six KPI tiles, re-stacked two per row like the app's own phone layout */
  .frame.crop.kpi-rows { aspect-ratio: auto; }
  .frame.crop.kpi-rows > img { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
  .kpi-rows .rows { display: grid; }
  .kpi-rows .rows i { aspect-ratio: 870 / 300; background: url("screenshots/overview.png") no-repeat 22.75% 14.71% / calc(3200 / 870 * 100%) auto; }
  .kpi-rows .rows i:nth-child(2) { background-position-x: 60.09%; }
  .kpi-rows .rows i:nth-child(3) { background-position-x: 97.6%; }
}

/* the 3D stage */
.want-3d .stage { display: block; position: sticky; top: var(--nav-h); z-index: 0; height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h)); overflow: hidden; background: radial-gradient(60% 55% at 50% 30%, var(--brand-soft), transparent 70%), radial-gradient(40% 40% at 80% 60%, color-mix(in oklch, var(--brand-2) 7%, transparent), transparent 70%); }
.stage-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s var(--ease-out); }
.has-3d .stage-canvas { opacity: 1; }
.wire { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: 0; }
.wire-path { fill: none; stroke: var(--brand); stroke-width: 1.5; stroke-linecap: round; }
.wire-dot, .wire-end { fill: var(--brand); }
.wire-dot { stroke: var(--bg); stroke-width: 2; }
.wire-ring { fill: none; stroke: var(--brand); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) { .wire-ring { animation: wire-ring 2.2s var(--ease-out) infinite; } }
@keyframes wire-ring { from { transform: scale(0.4); opacity: 0.9; } to { transform: scale(1.8); opacity: 0; } }
.story-nav { position: absolute; left: 50%; bottom: 18px; z-index: 2; display: flex; align-items: center; gap: 14px; width: min(600px, calc(100% - 48px)); padding: 8px 10px 8px 16px; border-radius: 12px; background: color-mix(in oklch, var(--surface) 82%, transparent); backdrop-filter: saturate(1.3) blur(14px); -webkit-backdrop-filter: saturate(1.3) blur(14px); box-shadow: var(--shadow-md); transform: translate(-50%, calc((1 - var(--nav-vis, 0)) * 16px)); opacity: var(--nav-vis, 0); visibility: hidden; }
.story-nav.on { visibility: visible; }
.story-nav[hidden] { display: none; }
.story-now { flex: none; display: flex; align-items: baseline; gap: 10px; min-width: 13.5rem; font-size: var(--text-ui); font-weight: 500; white-space: nowrap; }
.story-now .num { font-size: var(--text-caption); color: var(--fg-faint); }
.segs { flex: 1; display: flex; gap: 4px; }
.segs a { flex: 1; display: flex; align-items: center; height: 24px; border-radius: 4px; }
.segs a::before { content: ""; width: 100%; height: 3px; border-radius: 3px; background: var(--border-strong); transition: background-color 0.3s; }
.segs a.done::before { background: color-mix(in srgb, var(--brand) 50%, transparent); }
.segs a[aria-current]::before { background: var(--brand-gradient); }
.segs a:hover::before { background: var(--fg-faint); }
.segs a:focus-visible { outline-offset: 1px; }

/* the hero and the notes float over the pinned stage; clicks pass through the empty space to it */
.want-3d .hero { z-index: 1; margin-top: calc(var(--nav-h) - 100vh); margin-top: calc(var(--nav-h) - 100dvh); min-height: calc(100vh - var(--nav-h)); min-height: calc(100dvh - var(--nav-h)); padding-top: clamp(36px, 6vh, 72px); pointer-events: none; }
.want-3d .hero::before, .want-3d .hero-visual { display: none; }
.want-3d .hero-copy { pointer-events: auto; }
.want-3d .tour { position: relative; z-index: 1; margin-top: 0; padding: 0; border-top: 0; pointer-events: none; }
.want-3d .chapters { gap: 0; }
.want-3d .chapter { display: block; height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h)); }
.want-3d .ch-shot { display: none; }
.want-3d .chapter .note { position: sticky; top: calc(var(--nav-h) + (100vh - var(--nav-h)) / 2); top: calc(var(--nav-h) + (100dvh - var(--nav-h)) / 2); width: min(25rem, 36vw); max-width: none; padding: 26px 26px 24px; border-radius: 18px; background: color-mix(in oklch, var(--surface) 86%, transparent); backdrop-filter: saturate(1.3) blur(16px); -webkit-backdrop-filter: saturate(1.3) blur(16px); box-shadow: var(--shadow-lg); opacity: var(--vis, 1); transform: translateY(-50%) scale(calc(0.96 + 0.04 * var(--vis, 1))); pointer-events: auto; }
.want-3d .chapter[data-side="right"] .note { margin-left: auto; }
.want-3d .chapter[data-side="left"] .note { order: 0; margin-right: auto; }
.want-3d .chapter .note h3 { font-size: clamp(22px, 2vw, 27px); }
.want-3d .chapter .note p { font-size: 15.5px; }
.want-3d .chapter-head .note, .want-3d .chapter-end .note { top: calc(var(--nav-h) + 5vh); width: auto; max-width: 46rem; margin-inline: auto; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; text-align: center; justify-items: center; transform: translateY(calc((1 - var(--vis, 1)) * -20px)); }
.want-3d .chapter-head .note p, .want-3d .chapter-end .note p { max-width: 36rem; }
.want-3d .chapter-end .note { top: calc(var(--nav-h) + 4vh); }

/* a large type moment */
.bigline { margin: 0 auto 88px; max-width: 16em; text-align: center; font-size: clamp(36px, 6.2vw, 88px); font-weight: 600; line-height: 1; letter-spacing: -0.05em; text-wrap: balance; }
@media (max-width: 760px) { .bigline { margin-bottom: 56px; } }

/* integrations logo wall */
.intg { border-top: 1px solid var(--border); }
.intg-row { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 12px 24px; padding: 13px 0; border-bottom: 1px solid var(--border); align-items: start; }
.intg-row h3 { font-size: 15px; font-weight: 500; letter-spacing: 0; }
.intg-row h3 .num { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--fg-muted); }
.logos { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.logo { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 5px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 14px; min-width: 0; transition: box-shadow 0.2s, transform 0.2s var(--ease-out); }
@media (hover: hover) { .logo:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); } }
.tile { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px oklch(0.2 0.02 165 / 0.08); }
.tile svg { width: 16px; height: 16px; }
.tile.generic { background: var(--brand-soft); box-shadow: none; color: var(--brand-fg); }
.tile.generic svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.intg-note { color: var(--fg-muted); font-size: 13px; margin-top: 16px; }
@media (max-width: 820px) { .intg-row { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
@media (max-width: 640px) {
  .intg-row { gap: 8px; padding: 12px 0; }
  .intg-row h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .intg-row h3 .num { display: inline; margin: 0; }
  .logos { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 16px; margin-inline: -16px; padding: 3px 16px 5px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 44px), transparent); }
  .logos::-webkit-scrollbar { display: none; }
  .logo { flex: none; scroll-snap-align: start; }
}

.band { background: var(--bg-subtle); }

/* code blocks */
.code { position: relative; min-width: 0; }
.code pre { margin: 0; overflow-x: auto; background: var(--code-bg); color: var(--code-fg); border-radius: 10px; padding: 14px 84px 14px 16px; font: 500 12.5px/1.7 var(--mono); tab-size: 2; }
:root[data-theme="dark"] .code pre { box-shadow: inset 0 0 0 1px var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .code pre { box-shadow: inset 0 0 0 1px var(--border); } }
.code .lbl { display: block; margin-bottom: 6px; font: 500 var(--text-caption)/1.4 var(--sans); color: var(--fg-faint); }
.copy { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid oklch(1 0 0 / 0.16); background: oklch(1 0 0 / 0.04); color: var(--code-fg); font: 500 11.5px var(--sans); cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
.code .lbl ~ .copy { top: 31px; }
.copy:hover { background: oklch(1 0 0 / 0.1); }
.copy .ico { width: 13px; height: 13px; }
.copy.ok { border-color: color-mix(in oklch, var(--code-accent) 60%, transparent); color: var(--code-accent); }
@media (max-width: 520px) { .code pre { font-size: 12px; } }

/* install your way: four tabs */
.tablist[hidden] { display: none; }
.tablist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tab { display: grid; gap: 4px; align-content: start; text-align: left; padding: 16px 18px; border: 0; border-radius: 14px; background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); cursor: pointer; font: inherit; transition: box-shadow 0.2s, background-color 0.2s; }
.tab:hover { box-shadow: var(--shadow-md); }
.tab .t-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tab .t-name { font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; }
.tab .t-time { font: 500 var(--text-caption)/1 var(--mono); color: var(--fg-faint); white-space: nowrap; }
.tab .t-sub { font-size: var(--text-ui); color: var(--fg-muted); line-height: 1.45; }
.tab[aria-selected="true"] { box-shadow: inset 0 0 0 1.5px var(--brand), var(--shadow-md); background: linear-gradient(160deg, var(--brand-soft), transparent 70%), var(--surface); }
.tab[aria-selected="true"] .t-time { color: var(--brand-fg); }
.panels { display: grid; gap: 16px; }
.tablist:not([hidden]) + .panels { margin-top: 12px; }
.panel { display: grid; gap: 14px; justify-items: start; padding: 28px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.panel > h3 { font-size: 22px; letter-spacing: -0.025em; }
.panel > p { color: var(--fg-muted); font-size: 15.5px; }
.panel > .code, .panel > .deploys { width: 100%; max-width: 44rem; }
.steps-more { width: 100%; }
.steps-more > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; color: var(--fg); font-weight: 500; font-size: 14.5px; }
.steps-more > summary::-webkit-details-marker { display: none; }
.steps-more > summary::after { content: "+"; font: 400 18px/1 var(--mono); color: var(--fg-faint); transition: transform 0.2s var(--ease-out); }
.steps-more[open] > summary::after { transform: rotate(45deg); }
.steps-body { display: grid; gap: 16px; padding-top: 16px; }
.panel[hidden] { display: none; }
.panel-main { display: grid; gap: 20px; align-content: start; min-width: 0; }
.panel-head { display: grid; gap: 8px; }
.panel-head .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.panel h3 { font-size: 22px; letter-spacing: -0.025em; }
.panel-head p { color: var(--fg-muted); font-size: 15.5px; }
.nsteps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 16px; }
.nsteps > li { counter-increment: s; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; font-size: 15px; color: var(--fg-muted); }
.nsteps > li::before { content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--fill); color: var(--fg); font: 500 12px var(--mono); box-shadow: inset 0 0 0 1px var(--border); }
.nsteps > li > div { display: grid; gap: 8px; min-width: 0; padding-top: 2px; }
.nsteps strong { color: var(--fg); font-weight: 500; }
.panel-aside { display: grid; gap: 16px; align-content: start; min-width: 0; }
.expect { padding: 18px 20px; border-radius: 12px; background: var(--bg-subtle); box-shadow: inset 0 0 0 1px var(--border); display: grid; gap: 10px; }
.expect h4 { margin: 0; font: 500 var(--text-caption)/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-faint); }
.expect ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--fg-muted); }
.expect li strong { color: var(--fg); font-weight: 500; }
.deploys { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.deploy { display: grid; gap: 4px; padding: 16px; border-radius: 12px; color: var(--fg); text-decoration: none; background: var(--surface); box-shadow: var(--shadow-sm); transition: box-shadow 0.2s, transform 0.2s var(--ease-out); }
.deploy:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.deploy b { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.deploy b .ico { color: var(--brand-fg); }
.deploy span { font-size: var(--text-ui); color: var(--fg-muted); }
.sub-h { margin: 8px 0 -4px; font: 600 15px/1.3 var(--sans); color: var(--fg); }
.install-note { color: var(--fg-muted); font-size: 14px; margin-top: 20px; }
@media (max-width: 960px) { .panel { padding: 24px; } }
@media (max-width: 760px) { .tablist { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .panel { padding: 20px 16px; } .deploys { grid-template-columns: minmax(0, 1fr); } .tab { padding: 14px; } .tab .t-top { flex-direction: column; align-items: flex-start; gap: 6px; } }

/* faq */
.faq { max-width: 820px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; font-weight: 500; font-size: 17px; line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 20px/1 var(--mono); color: var(--fg-faint); transition: transform 0.2s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 0 20px; color: var(--fg-muted); font-size: 15.5px; max-width: 44em; display: grid; gap: 10px; }
.faq .a strong { color: var(--fg); font-weight: 500; }

/* creator credit */
.credit { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; padding: 24px 28px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.credit-who { display: flex; align-items: center; gap: 16px; flex: 1 1 22rem; min-width: 0; }
.avatar { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-gradient); color: var(--ink-fg); font: 600 17px/1 var(--sans); letter-spacing: -0.02em; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--border-strong); }
.credit-who p { color: var(--fg-muted); font-size: 14.5px; }
.credit-who strong { display: block; color: var(--fg); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.credit-links { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 520px) {
  .credit { padding: 20px; gap: 18px; }
  .credit-who { align-items: flex-start; gap: 14px; }
  .avatar { width: 44px; height: 44px; font-size: 15px; }
  .credit-links { display: grid; width: 100%; }
  .credit-links .btn { width: 100%; }
}

footer { border-top: 1px solid var(--border); padding-block: 36px calc(40px + env(safe-area-inset-bottom, 0px)); color: var(--fg-muted); font-size: 14px; }
footer > .wrap { display: grid; gap: 28px; }
.foot-row { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a:not(.btn) { color: var(--fg-muted); text-decoration: none; }
footer a:not(.btn):hover { color: var(--fg); }
footer .credit a:not(.btn-ink) { color: var(--fg); }

/* trust page */
.doc { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 64px; padding-block: 56px 96px; }
.toc { position: sticky; top: 92px; align-self: start; display: grid; gap: 2px; font-size: 14px; }
.toc a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--fg-muted); text-decoration: none; }
.toc a:hover { background: var(--fill-hover); color: var(--fg); }
.toc strong { font-size: 12px; font-weight: 500; color: var(--fg-faint); padding: 0 10px 6px; }
.prose { max-width: 46rem; display: grid; gap: 56px; }
.prose section { display: grid; gap: 14px; scroll-margin-top: 84px; }
.prose h2 { font-size: 24px; letter-spacing: -0.025em; line-height: 1.2; }
.prose p, .prose li { color: var(--fg-muted); font-size: 16px; }
.prose p strong, .prose li strong { color: var(--fg); font-weight: 500; }
.prose ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.say { width: 100%; border-collapse: collapse; font-size: 15px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); background: var(--surface); }
.say th, .say td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.say thead th { background: var(--bg-subtle); font-size: 13px; font-weight: 500; color: var(--fg-muted); }
.say td:first-child { color: var(--fg-muted); text-decoration: line-through; text-decoration-color: var(--negative); text-decoration-thickness: 1px; }
.say tr:last-child td { border-bottom: 0; }
.status { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.status > div { padding: 20px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); display: grid; gap: 10px; align-content: start; }
.status h3 { font-size: 15px; font-weight: 500; }
.fw-table td:first-child { white-space: nowrap; color: var(--fg); font-weight: 500; text-decoration: none; }
.checklist { list-style: none !important; padding: 0 !important; counter-reset: c; }
.checklist li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; }
.checklist li::before { counter-increment: c; content: counter(c); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--fill); color: var(--fg); font: 500 12px var(--mono); }
.doc-head { display: grid; gap: 16px; padding-top: 72px; max-width: 46rem; }
.doc-head p { font-size: 18px; color: var(--fg-muted); }
@media (max-width: 900px) { .doc { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 32px 64px; } .toc { position: static; grid-template-columns: 1fr 1fr; } .toc strong { grid-column: 1 / -1; } .toc a { padding: 8px 10px; } .doc-head { padding-top: 48px; } }
/* phones: each table row becomes a small card, so no column is squeezed to a word per line */
@media (max-width: 560px) {
  .say, .say tbody, .say tr, .say td { display: block; }
  .say thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .say tr { padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .say tr:last-child { border-bottom: 0; }
  .say tr > th, .say tr > td { padding: 0; border: 0; }
  .say td + td { margin-top: 6px; }
  .fw-table td:first-child { font-size: 15.5px; }
  .fw-table td:nth-child(n+2)::before { display: block; margin: 8px 0 2px; font: 500 var(--text-caption)/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-faint); }
  .fw-table td:nth-child(2)::before { content: "AdLedger ships"; }
  .fw-table td:nth-child(3)::before { content: "You own"; }
}
@media (max-width: 640px) { .status { grid-template-columns: minmax(0, 1fr); } .say { font-size: 14px; } .say th, .say td { padding: 10px 12px; } .fw-table td:first-child { white-space: normal; } }

/* short labels: chips under a note, frameworks, the how-it-works flow */
.chips { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-fg); font: 500 12.5px/1 var(--sans); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--brand) 26%, transparent); }
.flow-chips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.flow-chips li { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 14px; font-weight: 500; }
.flow-chips b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-fg); font: 500 12px/1 var(--mono); }
.flow-chips li:not(:last-child)::after { content: "→"; margin-left: 4px; color: var(--fg-faint); }

/* full-height, snapping sections on larger screens. Phones scroll freely: sections there are
   taller than the screen, and snapping would fight the thumb (and trap it on iOS Safari). */
[data-snap], .chapter { scroll-snap-align: start; }
.want-3d .chapter { scroll-snap-align: center; scroll-margin: 0; }
footer { scroll-snap-align: end; }
.sec > .wrap { width: 100%; }
.sec { padding-block: 64px; }
.statement { padding-top: 72px; }
.statement .proof { margin-top: 56px; }
@media (min-width: 768px) and (min-height: 500px) {
  html { scroll-padding-top: var(--nav-h); }
  .sec, .statement { min-height: calc(100vh - var(--nav-h)); min-height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; justify-content: center; }
  .sec { padding-block: 44px; }
  .sec .sec-head { margin-bottom: 32px; }
  /* statement: the words light up once it arrives, and the numbers sit under it */
  .statement { padding-top: 32px; height: calc(100vh - var(--nav-h)); height: calc(100svh - var(--nav-h)); min-height: 560px; }
  .statement > .wrap { flex: 1; display: grid; place-items: center; width: 100%; }
  .statement .proof { margin-top: 0; }
}
@media (min-width: 768px) and (min-height: 500px) and (hover: hover) and (pointer: fine) { html { scroll-snap-type: y mandatory; } }
@media (min-width: 768px) and (min-height: 500px) and (pointer: coarse) { html { scroll-snap-type: y proximity; } }
.lightup { max-width: 17em; margin: 0 auto; text-align: center; font-size: clamp(34px, 5.4vw, 72px); font-weight: 600; line-height: 1.05; letter-spacing: -0.045em; text-wrap: balance; }
.lightup .w { transition: color 0.6s var(--ease-out); transition-delay: calc(var(--i, 0) * 55ms); }
.lightup.dim .w { color: color-mix(in oklch, var(--fg) 16%, var(--bg)); }
.lightup.dim .grad .w { color: color-mix(in oklch, var(--fg) 16%, var(--bg)); }
.lightup .grad .w { color: transparent; }

/* feature modules: small UI pieces built in CSS, floating in 3D */
.mods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mod { position: relative; display: grid; gap: 4px; align-content: start; padding: 14px 14px 20px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.mod h3 { margin-top: 12px; padding-inline: 6px; font-size: 17px; letter-spacing: -0.02em; }
.mod p { padding-inline: 6px; color: var(--fg-muted); font-size: 14.5px; }
.mod-stage { display: grid; place-items: center; height: 176px; border-radius: 12px; perspective: 900px; background: radial-gradient(80% 100% at 50% 0%, var(--brand-soft), transparent 70%), var(--bg-subtle); box-shadow: inset 0 0 0 1px var(--border); }
.mod-obj { position: relative; transform-style: preserve-3d; transform: rotateX(calc(16deg + var(--rx, 0deg))) rotateY(calc(-16deg + var(--ry, 0deg))); transition: transform 0.7s var(--ease-out); }
.mod:nth-child(even) .mod-obj { transform: rotateX(calc(14deg + var(--rx, 0deg))) rotateY(calc(16deg + var(--ry, 0deg))); }
[data-mod].tracking .mod-obj { transition: transform 0.15s linear; }
@media (prefers-reduced-motion: no-preference) {
  .mod-obj { animation: mod-float 6s ease-in-out infinite; }
  .mod:nth-child(2) .mod-obj { animation-delay: -1s; }
  .mod:nth-child(3) .mod-obj { animation-delay: -2s; }
  .mod:nth-child(4) .mod-obj { animation-delay: -3s; }
  .mod:nth-child(5) .mod-obj { animation-delay: -4s; }
  .mod:nth-child(6) .mod-obj { animation-delay: -5s; }
  @keyframes mod-float { 50% { translate: 0 -7px; } }
}
.m-card { position: relative; width: 236px; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-size: 12px; transform: translateZ(18px); box-shadow: 0 0 0 1px var(--border-strong), 0 22px 40px -16px oklch(0.2 0.02 165 / 0.45); }
.m-row { display: flex; justify-content: space-between; gap: 10px; }
.m-head { margin-bottom: 8px; font-size: 13px; }
.m-money { color: var(--positive); font: 600 14px var(--mono); }
.m-line { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 6px; }
.m-line i { display: block; width: var(--w); height: 6px; border-radius: 3px; background: var(--brand-gradient); }
.m-line span:last-child { font: 500 11.5px var(--mono); }
.m-plat { font: 500 9.5px/18px var(--mono); text-align: center; border-radius: 4px; background: var(--fill); color: var(--fg-muted); }
.m-float { position: absolute; top: -18px; right: -26px; padding: 6px 11px; border-radius: 999px; background: var(--ink); color: var(--ink-fg); font: 600 12px var(--mono); white-space: nowrap; transform: translateZ(64px); box-shadow: 0 12px 30px -8px var(--ring); }
.m-float small { display: block; font: 500 10px var(--sans); opacity: 0.7; }
.m-f3 { top: auto; bottom: -26px; right: -18px; padding: 8px 14px; border-radius: 12px; font-size: 16px; }
.m-bars { display: flex; align-items: flex-end; justify-content: center; gap: 22px; width: 190px; height: 128px; padding: 14px; }
.m-bar { display: grid; justify-items: center; gap: 3px; align-self: stretch; grid-template-rows: 1fr auto auto; }
.m-bar i { align-self: end; width: 42px; height: var(--h); border-radius: 6px 6px 3px 3px; background: var(--chart-spend); box-shadow: inset 0 -12px 20px -10px oklch(0 0 0 / 0.3); }
.m-bar.is-real i { background: var(--brand-gradient); box-shadow: 0 0 24px -4px var(--ring); }
.m-bar b { font: 600 13px var(--mono); }
.m-bar span { color: var(--fg-muted); font-size: 10.5px; }
.m-f2 { background: var(--negative); color: #fff; box-shadow: 0 12px 30px -8px var(--negative-soft); }
.m-pl { display: grid; gap: 8px; font-size: 12.5px; }
.m-pl .m-row span:last-child { font-family: var(--mono); }
.m-dim { color: var(--fg-muted); }
.m-alert { display: flex; gap: 10px; align-items: flex-start; }
.m-alert b { display: block; font-size: 13px; }
.m-alert span { color: var(--fg-muted); font-size: 11px; }
.m-dot { flex: none; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--negative); box-shadow: 0 0 0 4px var(--negative-soft); }
.m-ring { position: absolute; right: -30px; bottom: -58px; display: grid; place-items: center; align-content: center; width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(closest-side, var(--surface) 76%, transparent 78%), conic-gradient(var(--brand) calc(var(--p) * 1%), var(--fill) 0); transform: translateZ(56px); box-shadow: 0 14px 30px -10px var(--ring); }
.m-ring b { font: 600 15px/1 var(--mono); }
.m-ring span { color: var(--fg-muted); font-size: 9.5px; }
.m-board { display: flex; gap: 8px; }
.m-col { display: grid; gap: 6px; align-content: start; width: 84px; min-height: 120px; padding: 7px; border-radius: 10px; background: color-mix(in oklch, var(--surface) 70%, transparent); box-shadow: 0 0 0 1px var(--border); transform: translateZ(6px); font-size: 10.5px; }
.m-col > span { color: var(--fg-muted); font-weight: 500; }
.m-deal { display: block; padding: 7px 6px; border-radius: 7px; background: var(--surface); font-style: normal; font-size: 10px; box-shadow: 0 0 0 1px var(--border-strong), 0 8px 14px -8px oklch(0 0 0 / 0.4); transform: translateZ(14px); }
.m-up { transform: translateZ(54px) translateY(-6px) rotate(-3deg); box-shadow: 0 0 0 1.5px var(--brand), 0 16px 26px -8px var(--ring); }
.m-won { box-shadow: 0 0 0 1px var(--brand), 0 8px 16px -8px var(--ring); color: var(--brand-fg); font-weight: 600; }
.m-term { width: 250px; background: var(--code-bg); color: var(--code-fg); font-size: 10.5px; }
.m-term code { display: block; padding: 3px 0; background: none; color: inherit; font: 500 10.5px/1.5 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-term b { color: var(--code-accent); font-weight: 600; }
.m-f4 { top: auto; bottom: -22px; right: -14px; }
@media (max-width: 1000px) { .mods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* phones: the modules become a swipeable row, so the section stays one screen tall */
@media (max-width: 620px) {
  .mods { display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin-inline: -16px; padding: 4px 16px 12px; scrollbar-width: none; }
  .mods::-webkit-scrollbar { display: none; }
  .mod { flex: 0 0 84%; scroll-snap-align: start; }
  .mods .reveal-pre { opacity: 1; transform: none; filter: none; }
  .mod-stage { height: 184px; }
  /* everything meant to be read is 12px or more */
  .m-card { width: 256px; }
  .m-line { grid-template-columns: 58px minmax(0, 1fr) auto; }
  .m-plat { font-size: 12px; }
  .m-line span:last-child { font-size: 12px; }
  .m-bars { width: 200px; }
  .m-bar span { font-size: 12px; }
  .m-float small { font-size: 12px; }
  .m-alert span { font-size: 12px; }
  .m-ring span { font-size: 12px; }
  .m-ring { width: 88px; height: 88px; right: -10px; }
  .m-col { width: 96px; font-size: 12px; }
  .m-deal { font-size: 12px; padding: 6px; }
  .m-term { width: 244px; }
  .m-f4 { right: -2px; }
  .m-term code { font-size: 12px; }
}

/* security: one bold visual, the frameworks as chips, four one-line controls */
.shield-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: center; }
.shield-copy { display: grid; gap: 22px; }
.shield-copy .bigline { margin: 0; max-width: none; text-align: left; font-size: clamp(36px, 4.8vw, 68px); }
.fw-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fw-chips li { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 13.5px; font-weight: 500; }
.fw-chips li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.ctl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; font-size: 15px; }
.ctl-list li { display: flex; align-items: center; gap: 10px; }
.ctl-list .ico { width: 18px; height: 18px; color: var(--brand-fg); }
.honest-line { color: var(--fg-muted); font-size: 14px; }
.honest-line a { color: var(--fg); font-weight: 500; white-space: nowrap; }
.shield3d { display: grid; place-items: center; min-height: 380px; perspective: 1100px; }
.shield3d .mod-obj { width: 300px; height: 300px; transform: rotateX(calc(12deg + var(--rx, 0deg))) rotateY(calc(-22deg + var(--ry, 0deg))); }
.s-plate { position: absolute; inset: 0; border-radius: 44px; background: radial-gradient(90% 90% at 30% 20%, var(--brand-soft), transparent 70%), var(--surface); box-shadow: 0 0 0 1px var(--border-strong), 0 40px 80px -30px oklch(0.2 0.02 165 / 0.5); }
.s-plate::before { content: ""; position: absolute; inset: 18px; border-radius: 30px; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 22px 22px; opacity: 0.7; }
.s-shield { position: absolute; inset: 52px 60px; width: auto; height: auto; transform: translateZ(70px); fill: color-mix(in oklch, var(--brand) 16%, transparent); stroke: var(--brand); stroke-width: 3.5; stroke-linejoin: round; filter: drop-shadow(0 18px 30px var(--ring)); overflow: visible; }
.s-shield rect { fill: var(--brand); stroke: none; }
.s-shield path:last-of-type { fill: none; stroke-width: 6; stroke-linecap: round; }
.s-shield circle { fill: var(--surface); stroke: none; }
.s-chip { position: absolute; padding: 7px 12px; border-radius: 999px; background: var(--ink); color: var(--ink-fg); font: 600 12.5px var(--mono); white-space: nowrap; box-shadow: 0 14px 30px -10px var(--ring); }
.s-c1 { top: 22px; left: -34px; transform: translateZ(110px); }
.s-c2 { bottom: 40px; right: -58px; transform: translateZ(130px); background: var(--brand); color: #fff; }
.s-c3 { bottom: -14px; left: 20px; transform: translateZ(90px); }
@media (prefers-reduced-motion: no-preference) { .shield3d .mod-obj { animation: mod-float 7s ease-in-out infinite; } }
@media (max-width: 900px) { .shield-grid { grid-template-columns: minmax(0, 1fr); } .shield3d { min-height: 330px; order: -1; } .ctl-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .shield3d { min-height: 280px; } .shield3d .mod-obj { width: 220px; height: 220px; } .s-shield { inset: 38px 44px; } .s-c1 { left: -6px; } .s-c2 { right: -16px; } }

/* touch screens: every tap target is at least 44px (small controls get an invisible hit area)
   and nothing meant to be read is under 12px */
@media (pointer: coarse), (max-width: 767px) {
  .brand { min-height: 44px; }
  .star, .pill { position: relative; }
  .star::after, .pill::after, .menu > summary::after, .copy::after { content: ""; position: absolute; }
  .star::after { inset: -5px -2px; }
  .pill::after { inset: -7px 0; }
  .menu > summary { position: relative; width: 42px; height: 42px; }
  .menu > summary::after { inset: -2px; }
  .copy { height: 32px; font-size: 12px; }
  .copy::after { inset: -6px -4px; }
  .pill b { font-size: 12px; }
  .steps-more > summary { min-height: 44px; }
  .credit .btn { height: 44px; }
  footer nav { gap: 0 4px; margin-inline: -10px; }
  footer nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding-inline: 10px; }
}
@media (max-width: 900px) { .toc a { display: flex; align-items: center; min-height: 44px; } }
@media (max-width: 480px) { .byline .wide-only { display: none; } }

/* reveal on scroll: content is visible by default; site.js only hides what is still below the fold */
.reveal-pre { opacity: 0; transform: translateY(28px) scale(0.975); filter: blur(6px); }
.reveal-pre[data-reveal="zoom"] { transform: scale(0.86); filter: blur(12px); }
.reveal-run { transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), filter 1s var(--ease-out); }

@media print {
  .nav, .stage, .menu, .copy { display: none !important; }
  .reveal-pre { opacity: 1; transform: none; filter: none; }
  .want-3d .chapter .note { position: static; opacity: 1; transform: none; }
  .want-3d .ch-shot { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
