/* Countdat Hub - one stylesheet for marketing + docs.
   Palette: Catppuccin Latte (light) / Mocha (dark), matching the Countdat app. */

:root {
  --rosewater: #dc8a78; --pink: #ea76cb; --mauve: #8839ef; --red: #d20f39;
  --peach: #fe640b; --yellow: #df8e1d; --green: #40a02b; --teal: #179299;
  --sky: #04a5e5; --blue: #1e66f5; --lavender: #7287fd;

  --bg: #eff1f5;          /* base */
  --bg-soft: #e6e9ef;     /* mantle */
  --bg-sunk: #dce0e8;     /* crust */
  --surface: #ffffff;
  --surface-2: #f6f7fa;
  --line: #ccd0da;        /* surface0 */
  --line-strong: #bcc0cc; /* surface1 */
  --text: #4c4f69;
  --text-strong: #2b2d42;
  --muted: #6c6f85;
  --faint: #8c8fa1;
  --accent: var(--mauve);
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--mauve) 11%, transparent);
  --code-bg: #2b2d42;
  --code-text: #e6e9ef;
  --shadow: 0 1px 2px rgb(76 79 105 / .06), 0 8px 24px -12px rgb(76 79 105 / .22);
  --shadow-lg: 0 2px 4px rgb(76 79 105 / .05), 0 24px 60px -24px rgb(76 79 105 / .35);

  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1180px;
  --header-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --rosewater: #f5e0dc; --pink: #f5c2e7; --mauve: #cba6f7; --red: #f38ba8;
    --peach: #fab387; --yellow: #f9e2af; --green: #a6e3a1; --teal: #94e2d5;
    --sky: #89dceb; --blue: #89b4fa; --lavender: #b4befe;
    --bg: #1e1e2e; --bg-soft: #181825; --bg-sunk: #11111b;
    --surface: #24243a; --surface-2: #2a2a40;
    --line: #363a4f; --line-strong: #45475a;
    --text: #cdd6f4; --text-strong: #eef1ff; --muted: #a6adc8; --faint: #7f849c;
    --accent-ink: #1e1e2e;
    --accent-soft: color-mix(in srgb, var(--mauve) 16%, transparent);
    --code-bg: #11111b; --code-text: #cdd6f4;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / .3), 0 24px 60px -24px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --rosewater: #f5e0dc; --pink: #f5c2e7; --mauve: #cba6f7; --red: #f38ba8;
  --peach: #fab387; --yellow: #f9e2af; --green: #a6e3a1; --teal: #94e2d5;
  --sky: #89dceb; --blue: #89b4fa; --lavender: #b4befe;
  --bg: #1e1e2e; --bg-soft: #181825; --bg-sunk: #11111b;
  --surface: #24243a; --surface-2: #2a2a40;
  --line: #363a4f; --line-strong: #45475a;
  --text: #cdd6f4; --text-strong: #eef1ff; --muted: #a6adc8; --faint: #7f849c;
  --accent-ink: #1e1e2e;
  --accent-soft: color-mix(in srgb, var(--mauve) 16%, transparent);
  --code-bg: #11111b; --code-text: #cdd6f4;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / .3), 0 24px 60px -24px rgb(0 0 0 / .7);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--font); font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { color: var(--text-strong); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 650; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--mauve) 70%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text-strong)); }
.btn-ghost { background: var(--surface); color: var(--text-strong); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text-strong); }
.logo-mark { width: 26px; height: 31px; flex: none; }
.brand-word { font-weight: 700; font-size: 19px; letter-spacing: -.03em; }
.main-nav { display: flex; gap: 2px; margin-right: auto; }
.main-nav a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.main-nav a:hover { color: var(--text-strong); background: var(--bg-soft); }
.main-nav a[aria-current="page"] { color: var(--text-strong); background: var(--bg-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; min-width: 36px; justify-content: center;
  padding: 0 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); cursor: pointer; font: 500 14px var(--font);
}
.icon-btn:hover { color: var(--text-strong); border-color: var(--line-strong); }
.search-open { padding: 0 8px 0 11px; min-width: 190px; justify-content: flex-start; }
.search-open kbd { margin-left: auto; font-size: 12px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--faint); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
.menu-toggle { display: none; }

@media (max-width: 1040px) {
  .search-open { min-width: 0; }
  .search-open .search-hint, .search-open kbd { display: none; }
}
@media (max-width: 880px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    box-shadow: var(--shadow-lg); transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
  }
  .main-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .main-nav a { padding: 13px 10px; font-size: 17px; }
  .header-inner { gap: 12px; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 480px) {
  .header-actions .btn { display: none; }
}

/* ---------- footer ---------- */
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer-inner { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 32px; grid-template-columns: 1.4fr repeat(3, 1fr); }
.footer-brand p { color: var(--muted); margin: 10px 0 0; }
.footer-col h2 { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a { color: var(--text); text-decoration: none; font-size: 15px; }
.footer-col a:hover { color: var(--accent); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
.footer-base a { color: inherit; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- marketing sections ---------- */
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-follow { padding-top: 8px; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--line); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font: 500 12.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--accent);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 44px); }
.section-head p { font-size: 18px; color: var(--muted); }

.hero { position: relative; padding: 72px 0 88px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 700px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 18% 30%, color-mix(in srgb, var(--pink) 22%, transparent), transparent 70%),
    radial-gradient(35% 45% at 82% 20%, color-mix(in srgb, var(--mauve) 20%, transparent), transparent 70%),
    radial-gradient(30% 40% at 60% 75%, color-mix(in srgb, var(--peach) 14%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6vw, 74px); letter-spacing: -.045em; line-height: .98; margin-bottom: 22px; }
.hero h1 .accent {
  background: linear-gradient(100deg, var(--mauve), var(--pink) 55%, var(--peach));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 560px; margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 30px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14.5px; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }
@media (max-width: 1080px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } .hero { padding-top: 44px; } }
/* two columns: size the headline to its column so "Tap in to data." stays on one line */
@media (min-width: 1081px) { .hero h1 { font-size: clamp(44px, calc(12vw - 68px), 74px); } }

/* hero visual: phone tap screen + answer card */
.hero-visual { position: relative; min-height: 470px; }
.phone {
  position: absolute; left: 0; top: 10px; width: 236px; height: 460px; border-radius: 38px;
  background: var(--text-strong); padding: 10px; box-shadow: var(--shadow-lg); z-index: 2;
}
:root[data-theme="dark"] .phone { background: #313244; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .phone { background: #313244; } }
.phone-screen {
  height: 100%; border-radius: 29px; background: var(--bg); overflow: hidden;
  display: flex; flex-direction: column; padding-top: 12px;
  --ts-wall: color-mix(in srgb, var(--peach) 14%, var(--surface));
  --ts-wood: color-mix(in srgb, var(--peach) 55%, #6b3f22);
  --ts-pot: color-mix(in srgb, var(--text-strong) 82%, var(--surface));
  --ts-lid: var(--text-strong); --ts-brew: #7a4a2a;
}
.phone-notch { width: 70px; height: 6px; border-radius: 6px; background: var(--line); margin: 0 auto 10px; flex: none; }
/* tap screen, after app.countdat.com/t/: a header, the one instruction, then a scene you tap anywhere */
.ts-head { font-weight: 650; color: var(--text-strong); font-size: 14px; text-align: center; padding-bottom: 4px; }
.ts-rule { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); padding: 4px 12px 7px; border-bottom: 1px solid var(--line); }
.ts-rule-x { color: var(--faint); font-size: 13px; line-height: 1; }
.ts-zone {
  flex: 1; position: relative; display: flex; flex-direction: column; cursor: pointer;
  user-select: none; -webkit-user-select: none; touch-action: manipulation; outline-offset: -3px;
}
.ts-wall { flex: 1; position: relative; background: var(--ts-wall); display: flex; align-items: flex-end; padding-left: 30px; }
.ts-pot { width: 64px; height: 72px; color: var(--faint); transform-origin: 50% 100%; margin-bottom: -3px; }
.ts-steam { opacity: .45; }
.ts-zone.is-tapped .ts-pot { animation: ts-slosh .45s ease-out; }
.ts-zone.is-tapped .ts-steam { animation: ts-steam .6s ease-out; }
@keyframes ts-slosh { 30% { transform: rotate(-9deg); } 65% { transform: rotate(5deg); } 100% { transform: none; } }
@keyframes ts-steam { from { opacity: 1; transform: translateY(0); } to { opacity: .45; transform: translateY(-4px); } }
.ts-count { position: absolute; right: 14px; bottom: 14px; text-align: right; line-height: 1; }
.ts-count b { display: block; font: 700 44px/1 var(--font); letter-spacing: -.03em; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.ts-count span { font-size: 10.5px; color: var(--muted); }
.ts-top { flex: 0 0 112px; background: var(--ts-wood); border-top: 6px solid color-mix(in srgb, var(--ts-wood) 70%, #fff); padding: 12px 12px 48px; }
.ts-shelf { display: flex; flex-wrap: wrap; gap: 6px 9px; align-content: flex-start; }
.ts-cup { width: 16px; height: 15px; position: relative; border-radius: 2px 2px 6px 6px; background: var(--c); box-shadow: inset 0 3px 0 rgb(0 0 0 / .14); }
.ts-cup::after { content: ""; position: absolute; right: -5px; top: 3px; width: 4px; height: 6px; border: 2px solid var(--c); border-left: 0; border-radius: 0 5px 5px 0; }
.ts-cup.latte { --c: #f4ede4; } .ts-cup.flat { --c: #e7c9a2; } .ts-cup.esp { --c: #4a2c1a; }
.ts-cup.is-new { animation: ts-pop .3s ease-out; }
@keyframes ts-pop { from { transform: translateY(-10px) scale(.6); opacity: 0; } }
.ts-more { font: 600 11px/15px var(--mono); color: #fff; opacity: .9; }
.ts-fields {
  position: absolute; top: 8px; left: 8px; width: min(62%, 150px); z-index: 3; cursor: default;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 7px; box-shadow: var(--shadow);
}
.ts-lbl { display: block; font: 600 9.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 5px; }
.ts-rail { display: flex; flex-wrap: wrap; gap: 4px; }
.ts-rail button { font: 600 10.5px/1 var(--font); padding: 5px 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); cursor: pointer; }
.ts-rail button.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ts-undo {
  position: absolute; right: 8px; bottom: 8px; z-index: 4; display: inline-flex; align-items: center; gap: 5px;
  font: 600 11.5px/1 var(--font); padding: 9px 12px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow);
}
.ts-undo:disabled { opacity: .5; cursor: default; }
@media (prefers-reduced-motion: reduce) { .ts-zone.is-tapped .ts-pot, .ts-zone.is-tapped .ts-steam, .ts-cup.is-new { animation: none; } }
.answer-card {
  position: relative; margin-left: 196px; margin-top: 46px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px 22px 18px 62px; z-index: 1;
}
.answer-q { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.answer-q .dot { width: 22px; height: 22px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.answer-headline { font-size: 22px; font-weight: 650; color: var(--text-strong); letter-spacing: -.02em; line-height: 1.2; }
.answer-num { font-size: 50px; font-weight: 700; letter-spacing: -.04em; color: var(--accent); line-height: 1; margin: 12px 0 2px; }
.answer-note { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 86px; padding: 0 2px 6px; border-bottom: 1px solid var(--line); }
.bars span { flex: 1; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--mauve) 28%, transparent); height: var(--h); }
.bars span.hi { background: var(--mauve); }
.bars-x { display: flex; gap: 6px; font: 11px var(--mono); color: var(--faint); padding-top: 6px; }
.bars-x span { flex: 1; text-align: center; }
.answer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 13px; }
.answer-foot a { font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.answer-foot .meta { color: var(--faint); font-family: var(--mono); font-size: 11.5px; }
@media (max-width: 560px) {
  .hero-visual { min-height: 0; display: grid; gap: 18px; }
  .phone { position: relative; margin: 0 auto; top: 0; }
  .answer-card { margin: 0; padding-left: 22px; }
}

/* steps */
.steps-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: relative; overflow: hidden; }
.step-card::before {
  counter-increment: s; content: "0" counter(s);
  font: 500 13px/1 var(--mono); color: var(--c, var(--accent)); display: block; margin-bottom: 26px; letter-spacing: .08em;
}
.step-card h3 { font-size: 24px; }
.step-card h3 em { font-style: normal; color: var(--c, var(--accent)); }
.step-card p { color: var(--muted); margin: 0; }
.step-card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
@media (max-width: 860px) { .steps-3 { grid-template-columns: 1fr; } }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text); }

/* working (answer + SQL) */
.working-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: stretch; }
@media (max-width: 920px) { .working-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.panel-head .dots { display: inline-flex; gap: 6px; margin-right: 6px; }
.panel-head .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.panel-body { padding: 22px; }
.code {
  margin: 0; background: var(--code-bg); color: var(--code-text); font-size: 13.5px; line-height: 1.7;
  padding: 20px 22px; overflow-x: auto; border-radius: 0; tab-size: 2;
}
.code .c { color: #9399b2; }
.code .k { color: #cba6f7; }
.code .s { color: #a6e3a1; }
.code .n { color: #fab387; }
.code .f { color: #89b4fa; }
.panel-actions { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.working-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.working-points div { border-left: 2px solid var(--line); padding-left: 16px; }
.working-points strong { display: block; color: var(--text-strong); margin-bottom: 4px; }
.working-points p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .working-points { grid-template-columns: 1fr; } }

/* stat table inside answer panel */
.mini-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 14px; }
.mini-table th, .mini-table td { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.mini-table th { font-weight: 500; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.mini-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 6px; background: var(--bg-sunk); overflow: hidden; min-width: 70px; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--teal)); width: var(--w); }

/* cards grid */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .cards, .cards-2 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .cards-4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card p { color: var(--muted); margin-bottom: 0; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 13%, transparent); }
.card-link { text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.card-link:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.card .more { margin-top: auto; padding-top: 18px; font-weight: 600; color: var(--accent); font-size: 15px; }

/* use-case cards */
.case { padding: 0; overflow: hidden; }
/* line up the top/body split across a row of case cards */
@supports (grid-template-rows: subgrid) {
  .cards > .case { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
}
.case-top { padding: 24px 24px 20px; border-bottom: 1px solid var(--line); }
.case-who { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--c); margin-bottom: 12px; }
.case-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.case-q { font-size: 15px; color: var(--muted); }
.case-q::before { content: "Q "; font-family: var(--mono); color: var(--faint); }
.case-a { font-size: 19px; font-weight: 650; color: var(--text-strong); letter-spacing: -.01em; }
.case-a::before { content: "A "; font: 500 15px var(--mono); color: var(--c); }
.case-feed { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }

/* promises */
.promises { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.promise { padding: 30px; border-bottom: 1px solid var(--line); }
.promise:nth-child(odd) { border-right: 1px solid var(--line); }
.promise:nth-last-child(-n+2) { border-bottom: 0; }
.promise h3 { font-size: 20px; display: flex; align-items: center; gap: 10px; }
.promise h3 svg { color: var(--c, var(--green)); flex: none; }
.promise p { color: var(--muted); margin: 0; }
@media (max-width: 760px) {
  .promises { grid-template-columns: 1fr; }
  .promise:nth-child(odd) { border-right: 0; }
  .promise:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}
.fifth { margin-top: 18px; padding: 18px 22px; border-radius: var(--radius); background: var(--accent-soft); color: var(--text-strong); display: flex; gap: 12px; align-items: center; }

/* compare table */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { padding: 18px 22px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--surface-2); font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.compare td:first-child { color: var(--muted); width: 32%; }
.compare td:last-child { color: var(--text-strong); }
@media (max-width: 640px) {
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare td { display: block; width: 100% !important; }
  .compare td { border-bottom: 0; padding: 4px 18px; }
  .compare td:first-child { padding-top: 16px; font-size: 14px; }
  .compare td:first-child::before { content: "Instead of "; }
  .compare td:last-child { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
}

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-size: 18px; font-weight: 600; color: var(--text-strong);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 0 22px; color: var(--muted); font-size: 16.5px; max-width: 70ch; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; border-radius: 26px; padding: 64px 32px; text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--mauve) 92%, black), var(--mauve) 45%, color-mix(in srgb, var(--pink) 85%, var(--mauve)));
  color: #fff;
}
.cta-band h2 { color: #fff; font-size: clamp(32px, 5vw, 52px); letter-spacing: -.035em; }
.cta-band p { color: rgb(255 255 255 / .85); font-size: 18px; max-width: 520px; margin: 0 auto 28px; }
.cta-band .btn-primary { background: #fff; color: #5b21b6; box-shadow: none; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / .45); }
:root[data-theme="dark"] .cta-band { color: #1e1e2e; }
:root[data-theme="dark"] .cta-band h2 { color: #1e1e2e; }
:root[data-theme="dark"] .cta-band p { color: rgb(30 30 46 / .8); }
:root[data-theme="dark"] .cta-band .btn-primary { background: #1e1e2e; color: #f5e0ff; }
:root[data-theme="dark"] .cta-band .btn-ghost { color: #1e1e2e; border-color: rgb(30 30 46 / .4); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cta-band, :root:not([data-theme="light"]) .cta-band h2 { color: #1e1e2e; }
  :root:not([data-theme="light"]) .cta-band p { color: rgb(30 30 46 / .8); }
  :root:not([data-theme="light"]) .cta-band .btn-primary { background: #1e1e2e; color: #f5e0ff; }
  :root:not([data-theme="light"]) .cta-band .btn-ghost { color: #1e1e2e; border-color: rgb(30 30 46 / .4); }
}
.cta-band .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* page hero (inner marketing pages) */
.page-hero { padding: 64px 0 40px; }
.page-hero h1 { font-size: clamp(38px, 5.5vw, 60px); letter-spacing: -.04em; max-width: 860px; }
.page-hero .lede { font-size: 20px; color: var(--muted); max-width: 680px; }

/* counter diagram */
.flow { display: grid; grid-template-columns: 1fr auto 1.1fr auto 1fr; gap: 16px; align-items: center; }
.flow-col { display: grid; gap: 10px; }
.flow-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; display: flex; gap: 10px; align-items: center; }
.flow-item b { color: var(--text-strong); font-weight: 600; }
.flow-item small { color: var(--muted); display: block; font-size: 13px; }
.flow-item .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.flow-arrow { color: var(--faint); font-size: 22px; }
.flow-core { background: var(--surface); border: 2px solid var(--accent); border-radius: 18px; padding: 22px; text-align: center; box-shadow: 0 0 0 6px var(--accent-soft); }
.flow-core h3 { margin-bottom: 4px; }
.flow-core p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.rows { display: grid; gap: 5px; text-align: left; font: 12.5px/1.4 var(--mono); }
.rows span { background: var(--bg-soft); border-radius: 6px; padding: 5px 8px; color: var(--text); display: flex; justify-content: space-between; gap: 8px; }
.rows span i { font-style: normal; color: var(--faint); }
.rows span.void { text-decoration: line-through; color: var(--faint); }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr; } .flow-arrow { transform: rotate(90deg); justify-self: center; } }

/* split feature rows */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 56px 0; border-top: 1px solid var(--line); }
.feature-row:first-of-type { border-top: 0; }
.feature-row h2 { font-size: clamp(28px, 3.4vw, 36px); }
.feature-row p { color: var(--muted); font-size: 17px; }
.feature-row ul { padding-left: 0; list-style: none; display: grid; gap: 10px; margin: 18px 0 0; }
.feature-row li { display: flex; gap: 10px; color: var(--text); }
.feature-row li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: color-mix(in srgb, var(--c, var(--accent)) 16%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%238839ef' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.feature-row .visual { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.feature-row.flip .visual { order: -1; }
@media (max-width: 880px) { .feature-row { grid-template-columns: 1fr; gap: 28px; } .feature-row.flip .visual { order: 0; } }

.chat { display: grid; gap: 10px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; }
.bubble.me { justify-self: end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.bubble.it { background: var(--bg-soft); color: var(--text); border-bottom-left-radius: 4px; }
.preview-box { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.preview-box .lbl { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 8px; display: block; }
.alert-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--yellow) 16%, transparent); color: var(--text-strong); font-size: 14px; }

.history { display: grid; gap: 0; }
.history div { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; font-size: 14.5px; }
.history div:last-child { border-bottom: 0; }
.history time { font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.history b { font-variant-numeric: tabular-nums; color: var(--text-strong); font-size: 18px; }
.history .now { color: var(--accent); }
.tag { font: 500 11px/1 var(--mono); padding: 4px 7px; border-radius: 6px; background: var(--bg-soft); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tag.pub { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.contact-card h2 { font-size: 22px; }
.contact-card p { color: var(--muted); }
.contact-card .big { font-size: 20px; font-weight: 600; text-decoration: none; word-break: break-all; }
.contact-form { display: grid; gap: 16px; margin-top: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field span { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; color: var(--text-strong); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form .form-note { font-size: 14px; margin: 0; }
.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form-status { font-size: 15px; color: var(--muted); }
.form-status.ok { color: var(--green); }
.form-status.err { color: var(--red, #d20f39); }
.checklist { padding-left: 0; list-style: none; display: grid; gap: 8px; margin: 0; }
.checklist li { display: flex; gap: 10px; }
.checklist li::before { content: "\2192"; color: var(--accent); flex: none; }

/* ---------- docs ---------- */
.is-docs-home .hero { padding-bottom: 32px; text-align: center; }
.docs-search-big {
  display: flex; align-items: center; gap: 12px; max-width: 620px; margin: 28px auto 0; height: 58px; padding: 0 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  color: var(--faint); font: 17px var(--font); cursor: pointer; width: 100%; text-align: left;
}
.docs-search-big:hover { border-color: var(--line-strong); }
.docs-search-big kbd { margin-left: auto; font-size: 13px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; }
.doc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 980px) { .doc-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .doc-cards { grid-template-columns: 1fr; } }
.doc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.doc-card-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); margin-bottom: 16px; }
.doc-card h2 { font-size: 20px; margin-bottom: 6px; }
.doc-card p { color: var(--muted); font-size: 15px; }
.doc-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.doc-card li a { display: block; padding: 6px 0; text-decoration: none; color: var(--text); font-size: 15px; border-top: 1px solid var(--line); }
.doc-card li:first-child a { border-top: 0; }
.doc-card li a:hover { color: var(--accent); }
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.quick-links a { text-decoration: none; }

.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 210px; gap: 48px; padding-top: 36px; align-items: start; }
.docs-nav { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; padding-bottom: 24px; font-size: 14.5px; scrollbar-width: thin; }
.docs-nav-home { display: block; padding: 6px 10px; margin-bottom: 14px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; }
.docs-nav-group { margin-bottom: 20px; }
.docs-nav h2 { font: 600 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin: 0 0 8px 10px; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav li a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.docs-nav li a:hover, .docs-nav-home:hover { color: var(--text-strong); background: var(--bg-soft); }
.docs-nav li a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.docs-nav-toggle { display: none; }

.docs-article { min-width: 0; max-width: 760px; }
.docs-article > h1 { font-size: clamp(32px, 4.5vw, 44px); letter-spacing: -.035em; margin-top: 8px; }
.docs-article > .lede { font-size: 19px; color: var(--muted); margin-bottom: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.crumbs { font-size: 14px; color: var(--faint); display: flex; gap: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.docs-toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: 14px; }
.docs-toc h2 { font: 600 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 12px; }
.docs-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.docs-toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.docs-toc li.lvl-3 a { padding-left: 26px; font-size: 13.5px; }
.docs-toc li a:hover { color: var(--text-strong); }
.docs-toc li a.is-active { color: var(--accent); border-left-color: var(--accent); }

@media (max-width: 1180px) { .docs-layout { grid-template-columns: 220px minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 16px; }
  .docs-nav-toggle {
    display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 14px; margin-bottom: 20px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font: 500 14px var(--font); cursor: pointer; text-align: left;
  }
  .docs-nav { display: none; position: static; max-height: none; margin-bottom: 24px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .docs-nav.is-open { display: block; }
}

/* prose */
.prose { font-size: 16.5px; line-height: 1.72; }
.prose > * + * { margin-top: 0; }
.prose h2 { font-size: 26px; margin: 2.2em 0 .6em; position: relative; }
.prose h3 { font-size: 19px; margin: 1.8em 0 .5em; position: relative; }
.prose h2:first-child { margin-top: 0; }
.prose .anchor { position: absolute; left: -1.1em; width: 1em; color: var(--faint); text-decoration: none; opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--faint); }
.prose strong { color: var(--text-strong); font-weight: 600; }
.prose code { font-size: .88em; padding: .15em .4em; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text-strong); }
.prose pre { margin: 0 0 1.4em; border-radius: 12px; }
.prose pre code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font: 600 12px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.prose td:first-child { white-space: nowrap; color: var(--text-strong); font-weight: 500; }
.prose blockquote { margin: 0 0 1.2em; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose kbd { font-size: .85em; padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); }
.prose .ui { font-weight: 600; color: var(--text-strong); white-space: nowrap; }

/* numbered steps in docs */
.prose ol.steps { list-style: none; padding: 0; counter-reset: st; margin: 0 0 1.6em; }
.prose ol.steps > li { counter-increment: st; position: relative; padding: 0 0 18px 48px; margin: 0; }
.prose ol.steps > li::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 600 14px/1 var(--font);
}
.prose ol.steps > li::after { content: ""; position: absolute; left: 14.5px; top: 36px; bottom: 6px; width: 1px; background: var(--line); }
.prose ol.steps > li:last-child::after { display: none; }
.prose ol.steps > li > strong:first-child { display: block; }

/* callouts */
.note { margin: 0 0 1.4em; padding: 16px 18px 16px 50px; border-radius: 12px; position: relative; font-size: 15.5px; background: color-mix(in srgb, var(--c, var(--blue)) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c, var(--blue)) 26%, transparent); }
.note::before { content: "i"; position: absolute; left: 16px; top: 16px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--blue)); color: var(--bg); font: 700 13px/1 var(--mono); }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.note strong:first-child { color: var(--text-strong); }
.note.tip { --c: var(--green); }
.note.tip::before { content: "\2713"; }
.note.warn { --c: var(--peach); }
.note.warn::before { content: "!"; }
.note.pilot { --c: var(--mauve); }
.note.pilot::before { content: "\25D0"; font-size: 12px; }

.docs-help { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding: 18px 20px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 15px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.pager a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text-strong); font-weight: 600; background: var(--surface); }
.pager a:hover { border-color: var(--accent); }
.pager a span { display: block; font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 8px; }
.pager-next { text-align: right; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager-next { text-align: left; } }
.updated { margin-top: 24px; font-size: 13px; color: var(--faint); }

/* ---------- search modal ---------- */
.search-modal { position: fixed; inset: 0; z-index: 90; display: grid; justify-items: center; align-items: start; padding: 10vh 16px 16px; }
.search-modal[hidden] { display: none; }
.search-backdrop { position: absolute; inset: 0; background: rgb(17 17 27 / .45); backdrop-filter: blur(3px); }
.search-panel { position: relative; width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--faint); }
.search-field input { flex: 1; height: 58px; border: 0; outline: 0; background: transparent; font: 17px var(--font); color: var(--text-strong); min-width: 0; }
.search-field input::-webkit-search-cancel-button { display: none; }
.kbd-btn { font: 500 12px var(--mono); padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-soft); color: var(--muted); cursor: pointer; }
.search-results { list-style: none; margin: 0; padding: 8px; max-height: 60vh; overflow-y: auto; }
.search-results:empty { display: none; }
.search-results a { display: block; padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--text); }
.search-results a:hover, .search-results a.is-active { background: var(--accent-soft); }
.search-results .r-sec { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.search-results .r-title { display: block; font-weight: 600; color: var(--text-strong); margin: 5px 0 3px; }
.search-results .r-snip { display: block; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results mark { background: color-mix(in srgb, var(--yellow) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-empty { padding: 22px; color: var(--muted); text-align: center; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 100px 0 40px; }
.notfound .code404 { font: 700 120px/1 var(--font); letter-spacing: -.06em; background: linear-gradient(100deg, var(--mauve), var(--pink), var(--peach)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
.answer-foot { gap: 12px; }
.answer-foot a, .answer-foot .meta { white-space: nowrap; }

/* ---------- app screenshots in docs ---------- */
.shot { margin: 8px 0 1.8em; }
.shot a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #eff1f5; box-shadow: var(--shadow); transition: border-color .15s ease, box-shadow .15s ease; cursor: zoom-in; }
.shot a:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.shot figcaption b { color: var(--text-strong); font-weight: 600; }
.shot.shot-phone { max-width: 300px; }
.shot.narrow { max-width: 440px; }
.shot.crop-top a { aspect-ratio: 1936 / 896; }
.shot.crop-top img { height: 100%; object-fit: cover; object-position: top; }
.shot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; margin-bottom: 1.8em; }
.shot-row .shot { margin: 0; }
@media (max-width: 640px) { .shot-row { grid-template-columns: 1fr; } }
.prose .shot-label { display: inline-block; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 4px 7px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); vertical-align: 1px; }

/* screenshot lightbox */
.lightbox { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 24px; background: rgb(17 17 27 / .82); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(100%, 1400px); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); object-fit: contain; width: auto; height: auto; border-radius: 12px; box-shadow: var(--shadow-lg); background: #eff1f5; }
.lightbox-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .14); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.lightbox-close:hover { background: rgb(255 255 255 / .24); }
