:root {
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --fs-xs: 0.8125rem; --fs-sm: 0.9375rem; --fs-base: 1.0625rem; --fs-lg: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem); --fs-xl: clamp(1.5rem, 1.3rem + 0.9vw, 2rem); --fs-xxl: clamp(2rem, 1.6rem + 2vw, 3rem); --fs-hero: clamp(2.75rem, 2rem + 3.6vw, 4.75rem);
  --lh-tight: 1.05; --lh-snug: 1.25; --lh-body: 1.6;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-pill: 999px;
  --shadow-card: 0 1px 0 rgb(var(--shadow-rgb) / .04), 0 12px 32px -12px rgb(var(--shadow-rgb) / .18); --shadow-lift: 0 2px 0 rgb(var(--shadow-rgb) / .05), 0 24px 48px -16px rgb(var(--shadow-rgb) / .28);
  --dur-instant: 100ms; --dur-fast: 180ms; --dur-icon: 160ms; --dur-base: 260ms; --dur-reveal: 520ms; --dur-stage: 600ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-in-out: cubic-bezier(.65, 0, .35, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --max: 1120px; --readable: 68ch; --gutter: clamp(16px, 4vw, 40px); --tap: 44px; --nav-h: 64px;
  --ring: color-mix(in srgb, var(--blue) 45%, transparent);
  --paper: #F6F3EC; --surface: #FFFDF8; --sunken: #EFEBE2; --ink: #17140F; --muted: #5C554C; --line: #E2DCD0; --line-strong: #CFC7B8; --red: #B8321F; --red-tint: #FBE6E1; --blue: #1F4FC4; --blue-tint: #E4EBFB; --green: #1C6E43; --green-tint: #E2F1E7; --amber: #865300; --amber-tint: #FAEBCF; --on-ink: #F6F3EC; --code: #17140F; --code-text: #EDE6D9; --code-muted: #9C9387; --code-string: #F0BE5C; --code-key: #8DB2FF; --code-accent: #FF8F7D; --shadow-rgb: 23 20 15;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #12110F; --surface: #1C1A17; --sunken: #25221E; --ink: #F3EFE7; --muted: #A79F94; --line: #2E2A25; --line-strong: #3D3832; --red: #FF7A66; --red-tint: #3A1D17; --blue: #8DB2FF; --blue-tint: #1A2440; --green: #62D69C; --green-tint: #16301F; --amber: #F0BE5C; --amber-tint: #33270F; --on-ink: #12110F; --code: #0B0A09; --code-text: #EDE6D9; --code-muted: #9C9387; --code-string: #F0BE5C; --code-key: #8DB2FF; --code-accent: #FF8F7D; --shadow-rgb: 0 0 0; color-scheme: dark; }
}
:root[data-theme="dark"] { --paper: #12110F; --surface: #1C1A17; --sunken: #25221E; --ink: #F3EFE7; --muted: #A79F94; --line: #2E2A25; --line-strong: #3D3832; --red: #FF7A66; --red-tint: #3A1D17; --blue: #8DB2FF; --blue-tint: #1A2440; --green: #62D69C; --green-tint: #16301F; --amber: #F0BE5C; --amber-tint: #33270F; --on-ink: #12110F; --code: #0B0A09; --code-text: #EDE6D9; --code-muted: #9C9387; --code-string: #F0BE5C; --code-key: #8DB2FF; --code-accent: #FF8F7D; --shadow-rgb: 0 0 0; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--fs-base)/var(--lh-body) var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
code, kbd, pre { font-family: var(--font-mono); }
:not(pre) > code { font-size: .88em; background: var(--sunken); border: 1px solid var(--line); padding: .08em .38em; border-radius: var(--r-sm); white-space: nowrap; }
kbd { font-size: .8em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 .4em; background: var(--surface); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h2 { font-size: var(--fs-xxl); line-height: var(--lh-snug); }
h3 { font-size: var(--fs-xl); line-height: var(--lh-snug); }
p { margin: 0; text-wrap: pretty; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--on-ink); padding: 10px 14px; border-radius: var(--r-md); }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }

/* ---- Airmail stripe (signature) ---- */
.airmail { height: 6px; background: repeating-linear-gradient(-45deg, var(--red) 0 14px, transparent 14px 22px, var(--blue) 22px 36px, transparent 36px 44px); }

/* ---- Header ---- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: var(--s4); height: var(--nav-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; font-size: 1.0625rem; min-height: var(--tap); }
.logo svg { width: 28px; height: 28px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: var(--s1); }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; padding: 0 12px; min-height: var(--tap); display: inline-flex; align-items: center; border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 500; }
.nav a:not(.btn):hover { background: var(--sunken); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
@media (max-width: 520px) { .nav a.btn { display: none; } .nav a:not(.btn) { padding: 0 10px; } }

/* ---- Buttons ---- */
.btn { --bg: var(--ink); --fg: var(--on-ink); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border: 1px solid transparent; border-radius: var(--r-md); background: var(--bg); color: var(--fg); font: 600 var(--fs-sm)/1 var(--font-body); text-decoration: none; cursor: pointer; transition: transform var(--dur-instant) var(--ease-out), background-color var(--dur-fast); -webkit-tap-highlight-color: transparent; }
.btn:hover { text-decoration: none; background: color-mix(in srgb, var(--bg) 88%, var(--red)); }
.btn:active { transform: scale(.97); }
.btn.ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--sunken); }
.btn.lg { min-height: 52px; padding: 0 22px; font-size: var(--fs-base); }
.btn[disabled] { cursor: progress; }

/* ---- Icon crossfade with blur (swapIcon) ---- */
.ico { position: relative; display: inline-grid; width: 20px; height: 20px; flex: none; }
.ico > svg { grid-area: 1 / 1; width: 20px; height: 20px; opacity: 0; filter: blur(4px); transform: scale(.8); transition: opacity var(--dur-icon) var(--ease-in-out), filter var(--dur-icon) var(--ease-in-out), transform var(--dur-icon) var(--ease-in-out); }
.ico > svg.on { opacity: 1; filter: blur(0); transform: none; }
.spin { animation: spin .8s linear infinite; transform-origin: 50% 50%; }
.ico > svg.spin:not(.on) { animation-play-state: paused; }
@keyframes spin { to { rotate: 360deg; } }

/* ---- Pulse to confirm (pulse) ---- */
.pulse-ring { position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; border: 2px solid var(--blue); opacity: 0; }

/* ---- Hero ---- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 88px); }
.hero-grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(420px, 500px); } .hero-copy { padding-top: 28px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 var(--fs-xs)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--red); margin-bottom: var(--s5); }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.hero h1 { font-size: var(--fs-hero); line-height: var(--lh-tight); letter-spacing: -0.03em; font-weight: 600; }
.hero h1 em { font-style: italic; color: var(--red); }
.hero .sub { font-size: var(--fs-lg); color: var(--muted); margin-top: var(--s5); max-width: 34ch; }
.hero .meta { margin-top: var(--s6); display: flex; flex-wrap: wrap; gap: 10px 20px; color: var(--muted); font-size: var(--fs-sm); }
.hero .meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero .meta svg { width: 16px; height: 16px; color: var(--green); }
@media (max-width: 959px) { .hero .meta { display: none; } }

/* ---- Checker card ---- */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.checker { overflow: hidden; transform-origin: top center; }
.checker .airmail { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.checker-body { padding: clamp(18px, 3vw, 28px); }
.checker h2 { font-size: var(--fs-xl); }
.checker .hint { color: var(--muted); font-size: var(--fs-sm); margin-top: 6px; }
.field { margin-top: var(--s5); display: flex; gap: 6px; padding: 6px; background: var(--sunken); border: 1px solid var(--line); border-radius: calc(var(--r-md) + 6px); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px var(--ring); }
.field input { flex: 1; min-width: 0; min-height: 52px; border: 0; background: transparent; color: var(--ink); font: 500 var(--fs-base) var(--font-mono); padding: 0 12px; }
.field input::placeholder { color: var(--muted); opacity: .8; }
.field input:focus { outline: none; }
.field .btn { min-height: 52px; padding: 0 20px; }
.field kbd { align-self: center; margin-right: 4px; }
@media (max-width: 519px) { .field { flex-direction: column; } .field .btn { width: 100%; } .field kbd { display: none; } }
@media (hover: none) { .field kbd { display: none; } }
.examples { margin-top: var(--s4); }
.examples-label { font-size: var(--fs-xs); color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.scroller { position: relative; margin: 8px calc(-1 * clamp(18px, 3vw, 28px)) 0; padding: 0 clamp(18px, 3vw, 28px); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 24px), transparent); }
.scroller::-webkit-scrollbar { display: none; }
.track { display: flex; gap: 8px; width: max-content; padding: 2px 0 4px; will-change: transform; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 500 var(--fs-xs) var(--font-mono); cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.chip:hover { border-color: var(--ink); }
.chip i { font-style: normal; color: var(--muted); font-family: var(--font-body); }
.ts { margin-top: var(--s4); min-height: 65px; }
.status { min-height: 1.4em; margin-top: var(--s3); font-size: var(--fs-sm); color: var(--muted); }
.status.error { color: var(--red); }

/* ---- Result (grows out of the checker card) ---- */
.result { border-top: 1px dashed var(--line-strong); padding: clamp(18px, 3vw, 28px); }
.result[hidden] { display: none; }
.verdict { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.stamp { --c: var(--muted); --t: var(--sunken); display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border: 2px solid var(--c); border-radius: var(--r-md); background: var(--t); color: var(--c); font: 700 1.125rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; rotate: -2.5deg; box-shadow: inset 0 0 0 3px var(--t), inset 0 0 0 4px color-mix(in srgb, var(--c) 40%, transparent); }
.stamp svg { width: 22px; height: 22px; }
.stamp small { display: block; font: 600 .625rem/1.2 var(--font-mono); letter-spacing: .12em; opacity: .85; margin-top: 3px; }
.stamp.allow { --c: var(--green); --t: var(--green-tint); }
.stamp.challenge { --c: var(--amber); --t: var(--amber-tint); }
.stamp.block { --c: var(--red); --t: var(--red-tint); }
.stamp.loading { --c: var(--line-strong); --t: var(--sunken); color: transparent; min-width: 150px; height: 46px; animation: shimmer 1.1s var(--ease-in-out) infinite alternate; }
@keyframes shimmer { from { opacity: .55; } to { opacity: 1; } }
.level { flex: 1; min-width: 180px; }
.level-head { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.level-head strong { color: var(--ink); }
.meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.meter span { height: 8px; border-radius: 3px; background: var(--sunken); border: 1px solid var(--line); transform-origin: left; }
.meter span.on { border-color: transparent; }
.meter.allow span.on { background: var(--green); } .meter.challenge span.on { background: var(--amber); } .meter.block span.on { background: var(--red); }
.summary { margin-top: var(--s5); font-size: var(--fs-base); font-weight: 500; }
.note { margin-top: var(--s3); font-size: var(--fs-sm); color: var(--muted); }
.note button { font: inherit; color: var(--blue); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; min-height: 0; }
.note code { white-space: normal; word-break: break-all; }
.reasons { list-style: none; margin: var(--s4) 0 0; padding: 0; }
.reasons li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.reasons li[hidden] { display: none; }
.sev { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: var(--r-pill); font: 600 .6875rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .05em; background: var(--sunken); color: var(--muted); }
.sev svg { width: 12px; height: 12px; }
.sev.high { background: var(--red-tint); color: var(--red); }
.sev.medium { background: var(--amber-tint); color: var(--amber); }
.more { margin-top: 4px; }
.more .btn { min-height: var(--tap); }
.result-foot { margin-top: var(--s5); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); color: var(--muted); }
.result-foot .mono { font-size: var(--fs-xs); }

/* ---- Sections ---- */
.section { padding: clamp(56px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { margin-top: var(--s4); color: var(--muted); font-size: var(--fs-lg); }
.kicker { font: 600 var(--fs-xs)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: var(--s4); display: block; }
.grid-3 { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.tile { background: var(--surface); padding: clamp(20px, 3vw, 28px); display: flex; flex-direction: column; gap: 10px; }
.tile h3 { font-size: 1.25rem; }
.tile p { color: var(--muted); font-size: var(--fs-sm); }
.tile .ex { margin-top: auto; padding-top: 8px; font: 500 var(--fs-xs)/1.5 var(--font-mono); color: var(--ink); }
.tile .ex s { color: var(--red); text-decoration-thickness: 1.5px; }
.tile .ex b { color: var(--green); font-weight: 600; }
.tile .num { font: 600 var(--fs-xs)/1 var(--font-mono); color: var(--red); }
.steps { display: grid; gap: var(--s5); counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding-top: var(--s5); border-top: 2px solid var(--ink); }
.step h3 { font-size: 1.375rem; margin: 10px 0 8px; }
.step p { color: var(--muted); font-size: var(--fs-sm); }
.ladder { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ladder .stamp { font-size: .75rem; padding: 6px 10px; rotate: 0deg; box-shadow: none; border-width: 1.5px; }
.ladder .stamp svg { width: 14px; height: 14px; }
.callout { margin-top: clamp(28px, 4vw, 40px); display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); font-size: var(--fs-sm); }
.callout svg { width: 22px; height: 22px; flex: none; color: var(--blue); margin-top: 1px; }
.callout strong { display: block; font-size: var(--fs-base); margin-bottom: 2px; }

/* ---- Code panels and tabs ---- */
.code-wrap { display: grid; gap: var(--s5); align-items: start; }
@media (min-width: 980px) { .code-wrap { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); } }
.panel { background: var(--code); color: var(--code-text); border-radius: var(--r-lg); overflow: hidden; border: 1px solid color-mix(in srgb, var(--code-text) 10%, transparent); box-shadow: var(--shadow-lift); }
.panel-bar { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-bottom: 1px solid color-mix(in srgb, var(--code-text) 12%, transparent); }
.tabs { flex: 1; min-width: 0; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .track { padding: 0; gap: 2px; }
.tab { min-height: var(--tap); padding: 0 14px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--code-muted); font: 500 var(--fs-xs) var(--font-mono); cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--code-text); }
.tab[aria-selected="true"] { color: var(--code-text); background: color-mix(in srgb, var(--code-text) 10%, transparent); }
.copy { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 12px; border: 1px solid color-mix(in srgb, var(--code-text) 18%, transparent); border-radius: var(--r-md); background: transparent; color: var(--code-text); font: 500 var(--fs-xs) var(--font-mono); cursor: pointer; }
.copy:hover { background: color-mix(in srgb, var(--code-text) 8%, transparent); }
.copy .ico, .copy .ico > svg { width: 16px; height: 16px; }
.panel pre { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--code-text) 25%, transparent) transparent; margin: 0; padding: 18px 20px 22px; overflow-x: auto; font-size: .8125rem; line-height: 1.7; tab-size: 2; }
.panel pre[hidden] { display: none; }
.panel .file { font: 500 var(--fs-xs) var(--font-mono); color: var(--code-muted); padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.t-c { color: var(--code-muted); font-style: italic; } .t-s { color: var(--code-string); } .t-k { color: var(--code-key); } .t-a { color: var(--code-accent); }

/* ---- Pricing ---- */
.free-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface); margin-bottom: var(--s5); }
.free-strip strong { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; }
.plans-scroller { overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; margin: 0 calc(-1 * var(--gutter)); padding: 20px var(--gutter) 16px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); }
.plans-scroller::-webkit-scrollbar { display: none; }
.plans { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 320px); gap: var(--s4); }
.plans-hint { font-size: var(--fs-xs); color: var(--muted); font-family: var(--font-mono); margin-top: 4px; }
@media (min-width: 900px) { .plans-hint { display: none; } }
@media (min-width: 900px) { .plans-scroller { overflow: visible; margin: 0; padding: 8px 0 0; } .plans { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); width: auto; } }
.plan { scroll-snap-align: start; display: flex; flex-direction: column; gap: var(--s4); padding: clamp(22px, 3vw, 32px); }
.plan.rec { border: 2px solid var(--ink); box-shadow: var(--shadow-lift); }
.plan .badge { position: absolute; top: -12px; left: 24px; background: var(--red); color: #fff; font: 700 .6875rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; padding: 6px 10px; border-radius: var(--r-pill); }
.plan h3 { font-size: 1.5rem; }
.price { display: flex; align-items: baseline; gap: 6px; }
.price b { font: 600 clamp(2.5rem, 2rem + 2vw, 3.25rem)/1 var(--font-display); letter-spacing: -0.02em; }
.price span { color: var(--muted); font-size: var(--fs-sm); }
.quota { font: 600 var(--fs-sm) var(--font-mono); }
.plan .fit { color: var(--muted); font-size: var(--fs-sm); }
.plan .btn { margin-top: auto; width: 100%; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: var(--fs-sm); }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks svg { width: 18px; height: 18px; flex: none; color: var(--green); margin-top: 2px; }
.cols-2 { display: grid; gap: var(--s6); }
@media (min-width: 860px) { .cols-2 { grid-template-columns: 1fr 1fr; } }
.fine h3 { font-size: 1.25rem; margin-bottom: 10px; }
.fine p { color: var(--muted); font-size: var(--fs-sm); }
.fine p + p { margin-top: 10px; }

/* ---- FAQ ---- */
.faq { border-top: 1px solid var(--line); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 14px 0; font: 600 1.125rem/1.35 var(--font-display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; transition: rotate var(--dur-base) var(--ease-out); }
.faq summary .plus svg { width: 14px; height: 14px; }
.faq details[open] summary .plus { rotate: 45deg; }
.faq .answer { padding: 0 0 20px; color: var(--muted); max-width: 68ch; }

/* ---- Teaser / CTA band ---- */
.band { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-lg); background: var(--ink); color: var(--on-ink); }
.band h2 { font-size: var(--fs-xl); max-width: 26ch; }
.band p { opacity: .8; margin-top: 8px; font-size: var(--fs-sm); }
.band .btn { --bg: var(--paper); --fg: var(--ink); }
.band .btn.ghost { --bg: transparent; --fg: var(--on-ink); border-color: color-mix(in srgb, var(--on-ink) 35%, transparent); }
.band .btn.ghost:hover { background: color-mix(in srgb, var(--on-ink) 10%, transparent); }
.band-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Docs ---- */
.docs { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s7); padding: clamp(32px, 5vw, 64px) 0 var(--s9); }
@media (min-width: 980px) { .docs { grid-template-columns: 220px minmax(0, 1fr); } }
.toc { display: none; }
@media (min-width: 980px) { .toc { display: block; position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; } }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 7px 14px; color: var(--muted); text-decoration: none; font-size: var(--fs-sm); margin-left: -1px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.prose { max-width: 780px; }
.prose > h1 { font-size: var(--fs-xxl); line-height: var(--lh-tight); }
.prose > .lede { margin-top: var(--s4); color: var(--muted); font-size: var(--fs-lg); }
.prose h2 { font-size: var(--fs-xl); margin: var(--s8) 0 var(--s4); padding-top: var(--s5); border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: baseline; }
.prose h2 .n { font: 600 var(--fs-xs) var(--font-mono); color: var(--red); }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 86%, var(--paper)); }
.prose p + p, .prose p + .panel, .prose .panel + p, .prose ul + p, .prose p + ul, .prose .panel + .panel { margin-top: var(--s4); }
.prose ul, .prose ol.plain { padding-left: 1.2em; margin: var(--s3) 0 0; display: grid; gap: 6px; }
.table-wrap { overflow-x: auto; margin-top: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 var(--fs-xs) var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--sunken); }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
.prose p code { white-space: normal; overflow-wrap: anywhere; }

/* ---- 404 ---- */
.lost { min-height: calc(100vh - var(--nav-h) - 160px); display: grid; place-items: center; padding: var(--s8) 0; }
.envelope { position: relative; max-width: 560px; width: 100%; padding: clamp(28px, 5vw, 48px); overflow: hidden; }
.envelope .airmail { position: absolute; left: 0; right: 0; top: 0; }
.envelope .airmail.bottom { top: auto; bottom: 0; }
.envelope h1 { font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem); line-height: var(--lh-tight); margin-top: var(--s5); }
.envelope p { margin-top: var(--s4); color: var(--muted); }
.envelope .addr { font: 500 var(--fs-sm) var(--font-mono); color: var(--muted); }
.envelope .addr s { color: var(--red); }
.envelope .stamp { position: absolute; right: clamp(16px, 4vw, 32px); top: clamp(24px, 5vw, 40px); rotate: 8deg; }
.envelope .actions { margin-top: var(--s6); display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 519px) { .envelope .stamp { position: static; margin-top: 8px; rotate: -3deg; } }

/* ---- Footer ---- */
.foot { border-top: 1px solid var(--line); padding: var(--s7) 0 var(--s8); color: var(--muted); font-size: var(--fs-sm); }
.foot-grid { display: grid; gap: var(--s5); }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot h2 { font: 600 var(--fs-xs) var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink); margin-bottom: 8px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; }
.foot ul a { color: var(--muted); text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.foot ul a:hover { color: var(--ink); text-decoration: underline; }
.foot .honest { max-width: 44ch; margin-top: 10px; }

/* ---- Page heads ---- */
.section-head h1 { font-size: clamp(2.5rem, 1.8rem + 3.5vw, 4.5rem); line-height: var(--lh-tight); letter-spacing: -0.03em; }
.band + .section-head { margin-top: clamp(56px, 8vw, 96px); }
.more-link { margin-top: var(--s5); }
.fine h3 + p, .fine h3 + .ticks { margin-top: 0; }
.fine p + h3 { margin-top: var(--s6); }

/* ---- Signup (/signup) ---- */
.auth { display: grid; justify-items: center; padding-top: clamp(32px, 6vw, 88px); padding-bottom: clamp(48px, 8vw, 112px); }
.auth-card { width: 100%; max-width: 540px; overflow: hidden; }
.auth-body { padding: clamp(22px, 5vw, 40px); display: grid; gap: var(--s4); }
.auth-body .kicker { margin-bottom: 0; }
.auth-body h1 { font-size: clamp(2.125rem, 1.7rem + 2vw, 2.875rem); line-height: var(--lh-tight); letter-spacing: -0.025em; }
.auth-body .lede { color: var(--muted); font-size: var(--fs-lg); }
.btn.gh { width: 100%; min-height: 56px; margin-top: var(--s2); font-size: var(--fs-base); gap: 12px; }
.btn.gh .ico, .btn.gh .ico > svg { width: 22px; height: 22px; }
.auth-list { margin-top: var(--s2); color: var(--muted); }
.auth-list svg { color: var(--ink); }
.auth-foot { border-top: 1px dashed var(--line-strong); padding: 14px clamp(22px, 5vw, 40px) 18px; font-size: var(--fs-sm); color: var(--muted); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--sunken); font-size: var(--fs-sm); }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.notice strong { display: block; font-size: var(--fs-base); }
.notice p { color: var(--ink); margin-top: 2px; }
.notice.error { background: var(--red-tint); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.notice.error svg, .notice.error strong { color: var(--red); }
.auth-card.mock { border: 2px dashed var(--amber); }
.mock-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mock-pick { width: 100%; justify-content: flex-start; }

/* ---- Dashboard (/dashboard) ---- */
.dash { padding-top: clamp(28px, 5vw, 64px); padding-bottom: var(--s9); }
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); margin-bottom: var(--s6); }
.dash-head > div { min-width: 0; }
.dash-head form { flex: none; padding-top: 22px; }
@media (max-width: 519px) { .dash-head form .btn { padding: 0 12px; } .dash-head h1 { font-size: 1.75rem; } }
.dash-head .kicker { margin-bottom: var(--s3); }
.dash-head h1 { font-size: var(--fs-xxl); line-height: var(--lh-tight); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.dash-head p { margin-top: 6px; }
.dash > .notice { margin-bottom: var(--s5); }
.dash-grid { display: grid; gap: var(--s5); align-items: start; }
@media (min-width: 960px) { .dash-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.key-card { overflow: hidden; }
.key-body { padding: clamp(20px, 3.5vw, 32px); display: grid; gap: var(--s4); }
.key-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.key-top h2, .usage-card h2, .dash-quick h2 { font-size: var(--fs-xl); }
.tag { font-size: var(--fs-xs); color: var(--muted); }
.key-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--amber-tint); color: var(--amber); font-size: var(--fs-sm); }
.key-warn svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.key-row { display: flex; gap: 8px; align-items: stretch; padding: 6px; background: var(--sunken); border: 1px solid var(--line); border-radius: calc(var(--r-md) + 6px); }
.key-row .key { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; padding: 10px 12px; font: 500 var(--fs-sm)/1.5 var(--font-mono); color: var(--ink); background: none; border: 0; white-space: normal; word-break: break-all; }
.key-row .key.masked { color: var(--muted); letter-spacing: .02em; }
.copy-key { flex: none; }
@media (max-width: 559px) { .key-row { flex-direction: column; } .copy-key { width: 100%; } }
.key-help { font-size: var(--fs-sm); }
.rotate { border-top: 1px dashed var(--line-strong); padding-top: var(--s4); }
.rotate summary { list-style: none; width: max-content; max-width: 100%; }
.rotate summary::-webkit-details-marker { display: none; }
.rotate summary svg { width: 16px; height: 16px; }
.rotate[open] summary { background: var(--sunken); }
.rotate-panel { margin-top: var(--s4); padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--paper); display: grid; gap: 12px; font-size: var(--fs-sm); }
.rotate-actions { display: flex; flex-wrap: wrap; gap: 8px; }
html:not(.js) [data-rotate-cancel] { display: none; }
.btn .ico, .btn .ico > svg { width: 18px; height: 18px; }
.usage-card { padding: clamp(20px, 3.5vw, 32px); display: grid; gap: var(--s3); }
.usage-num { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.usage-num b { font: 600 clamp(2.25rem, 1.8rem + 1.6vw, 3rem)/1 var(--font-display); letter-spacing: -0.02em; }
.usage-num span { color: var(--muted); font: 500 var(--fs-sm) var(--font-mono); }
.usage-meter { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; }
.usage-meter span { height: 10px; border-radius: 2px; background: var(--sunken); border: 1px solid var(--line); }
.usage-meter span.on { border-color: transparent; }
.usage-meter.allow span.on { background: var(--green); } .usage-meter.challenge span.on { background: var(--amber); } .usage-meter.block span.on { background: var(--red); }
.small { font-size: var(--fs-sm); }
.note-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--blue-tint); font-size: var(--fs-sm); }
.note-box svg { width: 18px; height: 18px; flex: none; color: var(--blue); margin-top: 2px; }
.dash-quick { margin-top: clamp(40px, 6vw, 72px); }
.dash-quick .section-head { margin-bottom: var(--s5); }

/* ---- Motion: mask reveal and stage focus ---- */
.js [data-reveal]:not(.revealed) { clip-path: inset(0 100% 0 0); }
.js [data-reveal].revealed { clip-path: inset(0 0 0 0); transition: clip-path var(--dur-reveal) var(--ease-out); }
.stage-t { transition: opacity var(--dur-base) var(--ease-in-out), filter var(--dur-base) var(--ease-in-out); }
.stage-dim { opacity: .38; filter: blur(1.5px) saturate(.7); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .js [data-reveal]:not(.revealed) { clip-path: none; }
  .stage-dim { filter: none; }
  .spin { animation: none; }
  .ico > svg { transform: none; filter: none; }
  .stamp.loading { animation: none; }
}
@media (forced-colors: active) { .stamp, .sev, .chip, .btn { border: 1px solid CanvasText; } }
@media print { .top, .foot, .checker .field, .examples { display: none; } }
