/* ==========================================================================
   Syntaxa landing — v3 design system
   Two themes from one token set: `light-dark()` resolves against
   `color-scheme`, which `data-theme` sets on <html>.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Neutrals — warm paper (light) / violet-black ink (dark) */
  --bg:            light-dark(#f6f5f1, #0b0b10);
  --bg-alt:        light-dark(#efede7, #101017);
  --surface:       light-dark(#ffffff, #15151e);
  --surface-2:     light-dark(#f4f3ef, #1c1c27);
  --surface-3:     light-dark(#ebe9e3, #242431);
  --line:          light-dark(#e3e0d8, #262634);
  --line-strong:   light-dark(#cfcbc1, #363647);
  --text:          light-dark(#3b3a46, #c8c7d6);
  --text-strong:   light-dark(#121119, #f4f3fa);
  --muted:         light-dark(#6a6876, #9190a5);

  /* Brand — iris indigo + lime highlight */
  --accent:        light-dark(#4f46e5, #a5b4fc);
  --accent-hover:  light-dark(#4338ca, #c7d2fe);
  --accent-ink:    light-dark(#ffffff, #0b0b10);
  --accent-soft:   light-dark(#ecebfd, #1d1b38);
  --accent-text:   light-dark(#4338ca, #b4bffd);
  --violet:        light-dark(#7c3aed, #c4b5fd);
  --lime:          light-dark(#d9f99d, #bef264);
  --lime-ink:      light-dark(#3f6212, #0b0b10);

  /* Semantic */
  --del-bg:        light-dark(#ffe4e6, #3a1520);
  --del-text:      light-dark(#be123c, #fda4af);
  --sapphire:      light-dark(#0e7490, #67e8f9);
  --sapphire-soft: light-dark(#e0f5f9, #0d2a31);
  --mauve-soft:    light-dark(#f1e9fe, #251a3a);
  --peach:         light-dark(#c2410c, #fdba74);
  --peach-soft:    light-dark(#fdeee4, #33200f);
  --green:         light-dark(#15803d, #86efac);
  --green-soft:    light-dark(#e3f6e8, #11281a);

  /* "Ink island" — always dark, slightly lifted in dark mode */
  --ink:           light-dark(#14131c, #15141f);
  --on-ink:        #e9e8f3;
  --on-ink-strong: #ffffff;
  --on-ink-muted:  #a3a2b8;
  --on-ink-line:   rgb(255 255 255 / .1);
  --on-ink-accent: #a5b4fc;

  --header-bg:     light-dark(rgb(246 245 241 / .78), rgb(11 11 16 / .72));
  --shadow-sm:     light-dark(0 1px 2px rgb(20 18 40 / .06), 0 1px 2px rgb(0 0 0 / .4));
  --shadow-md:     light-dark(0 12px 32px -12px rgb(20 18 40 / .18), 0 12px 32px -12px rgb(0 0 0 / .7));
  --shadow-lg:     light-dark(0 32px 80px -24px rgb(30 24 80 / .28), 0 32px 80px -24px rgb(0 0 0 / .85));

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --shell: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  interpolate-size: allow-keywords;
}
body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { color: var(--text-strong); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: color-mix(in oklab, var(--accent) 30%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
em { font-style: normal; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.1em; height: 1.1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 2000;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line); font-weight: 600;
}
.skip-link:focus { top: 16px; }

.shell { width: min(100% - 2 * var(--gutter), var(--shell)); margin-inline: auto; }

/* Theme-paired screenshots */
.shot--dark { display: none; }
:root[data-theme="dark"] .shot--light { display: none; }
:root[data-theme="dark"] .shot--dark { display: block; }
:root[data-theme="dark"] .theme-sun { display: none; }
:root:not([data-theme="dark"]) .theme-moon { display: none; }

/* Serif italic accent used in headlines */
h1 em, h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.01em;
  background: linear-gradient(100deg, var(--accent) 10%, var(--violet) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .06em;
}

/* ---------- Buttons ---------- */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h); padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; letter-spacing: -.005em; white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--sm { --h: 36px; padding: 0 14px; font-size: 14px; }
.btn--lg { --h: 52px; padding: 0 24px; font-size: 16px; }
.btn--primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 1px 0 rgb(255 255 255 / .2) inset, 0 8px 24px -8px color-mix(in oklab, var(--accent) 70%, transparent);
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--text-strong); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn--on-ink { background: var(--lime); color: #0b0b10; }
.btn--on-ink:hover { background: #d9f99d; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; transform: none; pointer-events: none; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-strong);
  transition: background-color .18s, border-color .18s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-strong); }

.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 8px; border: 0; background: none;
  color: var(--muted); font-size: 14px; font-weight: 500; border-radius: 8px;
}
.link-btn:hover { color: var(--text-strong); }
.link-btn--on-ink { color: var(--on-ink-muted); }
.link-btn--on-ink:hover { color: var(--on-ink-strong); }
.inline-link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 1000;
  padding-top: env(safe-area-inset-top);
  transition: background-color .2s, border-color .2s, backdrop-filter .2s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}
.header-inner { height: 68px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.02em; color: var(--text-strong); }
.brand img { border-radius: 9px; }
.nav { display: flex; gap: 4px; margin-inline: auto; padding: 4px; border-radius: 999px; }
.nav a {
  padding: 7px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color .15s, background-color .15s;
}
.nav a:hover { color: var(--text-strong); }
.nav a[aria-current="true"],
.nav a[aria-current="page"] { color: var(--text-strong); background: var(--surface-3); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav + .header-actions { margin-left: 0; }
.menu-btn { display: none; }
.menu-btn .icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-menu { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 8px 0 20px;
  box-shadow: var(--shadow-md);
}
.mobile-menu nav { display: grid; }
.mobile-menu a {
  padding: 14px 4px; font-size: 17px; font-weight: 600; color: var(--text-strong);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: 0; color: var(--accent-text); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: calc(128px + env(safe-area-inset-top)) 0 0; isolation: isolate; }
.hero-bg {
  position: absolute; inset: 0 0 -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 80% 20%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(40% 40% at 10% 0%, color-mix(in oklab, var(--violet) 10%, transparent), transparent 70%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(color-mix(in oklab, var(--text-strong) 14%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%);
  opacity: .5;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(32px, 5vw, 72px); align-items: center; }

.pill-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 10px; margin-bottom: 26px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 13px; font-weight: 500; color: var(--text); box-shadow: var(--shadow-sm);
}
.pill-link:hover { border-color: var(--line-strong); }
.pill-link .icon { width: 14px; height: 14px; color: var(--muted); }
.pill-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--green) 20%, transparent);
}

.hero h1 {
  font-size: clamp(2.6rem, 1.4rem + 4.4vw, 4.75rem);
  line-height: 1.02; letter-spacing: -.045em; font-weight: 650;
}
.hero h1 em { font-size: 1.06em; line-height: 1; }
.lede { margin-top: 24px; max-width: 34rem; font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.6; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; font-size: 14px; color: var(--muted); }
.hero-facts li { display: inline-flex; align-items: center; gap: 7px; }
.hero-facts .icon { color: var(--green); width: 16px; height: 16px; stroke-width: 2.5; }

/* ---------- Demo ---------- */
.demo { position: relative; }
.demo::before {
  content: ""; position: absolute; inset: 8% -4% -6% 6%; z-index: -1;
  border-radius: 40px; filter: blur(40px); opacity: .55;
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 40%, transparent), color-mix(in oklab, var(--violet) 30%, transparent));
}
.demo-tabs {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.demo-tabs button {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: none; color: var(--muted); font-size: 14px; font-weight: 600;
}
.demo-tabs button[aria-selected="true"] { background: var(--text-strong); color: var(--bg); }
.demo-tabs .icon { width: 15px; height: 15px; }

.window {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-lg);
}
.window-bar { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.window-url {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  max-width: 260px; margin-inline: auto; height: 26px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 12px; color: var(--muted); font-family: var(--font-mono);
}
.window-url .icon { width: 11px; height: 11px; }
.window-ext { border-radius: 5px; }

.compose { font-size: 15px; }
.compose-row { padding: 11px 20px; border-bottom: 1px solid var(--line); color: var(--text-strong); font-weight: 500; }
.compose-row span { color: var(--muted); font-weight: 400; margin-right: 6px; }
.compose-body { position: relative; min-height: 372px; padding: 18px 20px 16px; }
.draft { color: var(--text-strong); line-height: 1.7; }
.draft mark {
  background: color-mix(in oklab, var(--accent) 22%, transparent);
  color: inherit; border-radius: 3px; padding: 1px 0;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.draft.is-applied { animation: flash 1.2s var(--ease); border-radius: 6px; }
@keyframes flash { 0% { background: color-mix(in oklab, var(--lime) 60%, transparent); } 100% { background: transparent; } }

.toolbar {
  display: inline-flex; align-items: center; gap: 2px; margin-top: 12px; margin-left: 30%;
  padding: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md);
  animation: pop .35s var(--ease) both;
}
.toolbar[hidden] { display: none; }
.toolbar-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border: 0; border-radius: 999px; background: none; color: var(--text-strong);
}
.toolbar-btn:hover { background: var(--accent-soft); color: var(--accent-text); }
.toolbar-btn--muted { color: var(--muted); cursor: default; }
.toolbar-btn--muted:hover { background: none; color: var(--muted); }
.toolbar-btn .icon { width: 17px; height: 17px; }
.toolbar-sep { width: 1px; height: 18px; background: var(--line); margin: 0 3px; }
.toolbar.is-pulsing .toolbar-btn[data-demo-run="improve"] { animation: ring 1.8s var(--ease) 2; }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 40% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 25%, transparent); } }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.96); } to { opacity: 1; transform: none; } }

.compose-foot { display: flex; gap: 8px; padding: 12px 20px 16px; }
.fake-send, .fake-chip { display: inline-grid; place-items: center; height: 34px; padding: 0 16px; border-radius: 9px; font-size: 14px; font-weight: 600; }
.fake-send { background: var(--accent); color: var(--accent-ink); }
.fake-chip { background: var(--surface-2); color: var(--muted); }

.result {
  margin-top: 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: pop .3s var(--ease) both;
}
.result[hidden] { display: none; }
.result-head { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text-strong); }
.result-head .icon { width: 15px; height: 15px; color: var(--accent-text); }
.result-body { padding: 12px 14px; min-height: 5.5em; font-size: 15px; line-height: 1.65; color: var(--text-strong); }
@keyframes blink { 50% { opacity: 0; } }
.result.is-loading .result-head > .icon { display: none; }
.result.is-loading .result-head strong::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; border: 2px solid color-mix(in oklab, var(--accent) 25%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: spin .78s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { display: grid; gap: 8px; padding: 4px 0; }
.skeleton i { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }
.skeleton i:nth-child(1) { width: 94%; }
.skeleton i:nth-child(2) { width: 78%; }
.skeleton i:nth-child(3) { width: 52%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.result-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 12px; border-top: 1px solid var(--line); }
.r-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13.5px; font-weight: 600; color: var(--text-strong);
}
.r-btn:hover { background: var(--surface-2); }
.r-btn--primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.r-btn--primary:hover { background: var(--accent-hover); }
.r-btn .icon { width: 15px; height: 15px; }
.r-btn:disabled { opacity: .5; cursor: default; }
.r-btn[aria-disabled="true"], .r-icon[aria-disabled="true"] { cursor: default; }
.result-actions [hidden] { display: none; }
.r-sep { width: 1px; height: 18px; align-self: center; background: var(--line); margin: 0 2px; }
.r-rate { display: inline-flex; gap: 2px; margin-left: auto; }
.r-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); }
.r-icon:hover { background: var(--surface-2); color: var(--text-strong); }
.r-icon .icon { width: 15px; height: 15px; }
.r-close { margin-left: auto; display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 7px; background: none; color: var(--muted); }
.r-close:hover { background: var(--surface-2); color: var(--text-strong); }
.r-close .icon { width: 15px; height: 15px; color: inherit; }
.demo-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.demo-hint { font-size: 13.5px; color: var(--muted); }
.demo-hint b { color: var(--text-strong); font-weight: 600; }

/* ---------- Sites marquee ---------- */
.sites { margin-top: clamp(56px, 8vw, 96px); padding-bottom: 8px; }
.sites-label { text-align: center; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 18px; }
.marquee {
  display: flex; overflow: hidden; gap: 12px;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; flex: none; gap: 12px; min-width: 100%; justify-content: space-around; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track li {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(calc(-100% - 12px)); } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section-head h2 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.4rem); line-height: 1.06; letter-spacing: -.04em; font-weight: 650; }
.section-head p { margin-top: 18px; font-size: clamp(1rem, .96rem + .25vw, 1.12rem); color: var(--muted); }
.section-head--split { max-width: none; display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px 64px; align-items: end; text-align: left; }
.section-head--split p { margin-top: 0; }
.kicker {
  display: inline-block; margin-bottom: 16px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-text);
}

/* Screenshot frames (also lightbox triggers) */
.shot-frame {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2); cursor: zoom-in;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.shot-frame img { width: 100%; height: auto; }
/* Workflow steps: one fixed frame so switching tabs never changes the page height */
.steps .shot-frame { aspect-ratio: 1620 / 1060; }
.steps .shot-frame img { height: 100%; object-fit: cover; object-position: top center; }
/* Blurred inline preview (data-blur, from scripts/optimize-images.mjs) until the real image loads */
img[data-blur] { background-size: cover; background-position: center; background-repeat: no-repeat; }
img.is-sharpening { animation: sharpen .5s ease-out; }
@keyframes sharpen { from { filter: blur(12px); } to { filter: blur(0); } }
@media (prefers-reduced-motion: reduce) { img.is-sharpening { animation: none; } }
.shot-frame::after {
  content: ""; position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border-radius: 999px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a6876' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") center / 15px no-repeat;
  border: 1px solid var(--line); opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s;
}
.shot-frame:hover::after, .shot-frame:focus-visible::after { opacity: 1; transform: none; }
.shot-frame:hover { box-shadow: var(--shadow-md); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.steps-list { display: grid; gap: 8px; }
.steps-list button {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: 18px 20px; overflow: hidden; text-align: left;
  border: 1px solid transparent; border-radius: var(--r-md); background: none;
  transition: background-color .2s, border-color .2s;
}
.steps-list button:hover { background: var(--surface); }
.steps-list button[aria-selected="true"] { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); }
.step-num {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px;
  border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 13px; color: var(--muted);
}
[aria-selected="true"] .step-num { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.step-text strong { display: block; font-size: 18px; color: var(--text-strong); letter-spacing: -.01em; }
.step-text small { display: block; margin-top: 4px; font-size: 15px; color: var(--muted); line-height: 1.5; }
.step-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }
[aria-selected="true"] .step-bar { animation: step-progress var(--step-ms, 6000ms) linear forwards; }
.steps.is-paused .step-bar { animation-play-state: paused; }
@keyframes step-progress { to { width: 100%; } }
.steps-stage { padding: clamp(12px, 2vw, 20px); border-radius: var(--r-xl); background: var(--bg-alt); border: 1px solid var(--line); }
.step-panel { animation: fade .4s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 24px;
  padding: clamp(20px, 2.4vw, 28px); overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.card h3 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); line-height: 1.2; letter-spacing: -.025em; font-weight: 650; margin-top: 14px; }
.card p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.card p b { color: var(--text-strong); font-weight: 600; }
.card .shot-frame { margin-top: auto; }
.bento .card { grid-column: span 3; }
.bento .card--wide { grid-column: span 6; flex-direction: row; align-items: center; gap: clamp(24px, 4vw, 48px); }
.card--wide .card-copy { flex: 0 0 36%; }
.card--wide .shot-frame { flex: 1; margin: 0; }
.bento .card--tall { grid-column: span 3; }
.bento .card--style { grid-column: span 3; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px;
  border-radius: 999px; background: var(--surface-3); color: var(--text-strong);
  font-size: 13px; font-weight: 600;
}
.chip .icon { width: 14px; height: 14px; }
.chip--accent { background: var(--accent-soft); color: var(--accent-text); }
.chip--sapphire { background: var(--sapphire-soft); color: var(--sapphire); }
.chip--mauve { background: var(--mauve-soft); color: var(--violet); }
.chip--peach { background: var(--peach-soft); color: var(--peach); }
.chip--green { background: var(--green-soft); color: var(--green); }

.ticks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 14.5px; color: var(--text); }
.ticks li { position: relative; padding-left: 24px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.ticks--stack { flex-direction: column; gap: 12px; font-size: 15.5px; }
.ticks b { color: var(--text-strong); font-weight: 600; }

.tone-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tone-picker button {
  min-height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--text);
  transition: all .15s;
}
.tone-picker button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }

/* ---------- Learning island ---------- */
.island {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(40px, 6vw, 80px) clamp(20px, 5vw, 64px);
  border-radius: clamp(24px, 4vw, 40px);
  background: var(--ink); color: var(--on-ink);
  border: 1px solid light-dark(transparent, #2a2840);
}
.island-glow {
  position: absolute; inset: -30% -10% auto; height: 80%; z-index: -1;
  background:
    radial-gradient(40% 60% at 25% 50%, rgb(99 102 241 / .35), transparent 70%),
    radial-gradient(30% 50% at 80% 40%, rgb(190 242 100 / .12), transparent 70%);
  filter: blur(20px);
}
.section-head--on-ink h2 { color: var(--on-ink-strong); }
.section-head--on-ink h2 em { background: linear-gradient(100deg, #c7d2fe, var(--lime)); -webkit-background-clip: text; background-clip: text; }
.section-head--on-ink p { color: var(--on-ink-muted); }
.kicker--on-ink { color: var(--lime); }

.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: clamp(32px, 5vw, 56px); counter-reset: flow; }
.flow li {
  position: relative; display: grid; gap: 6px; align-content: start;
  padding: 20px; border-radius: var(--r-md);
  background: rgb(255 255 255 / .04); border: 1px solid var(--on-ink-line);
}
.flow li:not(:last-child)::after {
  content: ""; position: absolute; top: 38px; right: -12px; width: 12px; height: 1px;
  background: linear-gradient(90deg, var(--on-ink-line), var(--on-ink-accent));
}
.flow-icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 8px; border-radius: 10px; background: rgb(165 180 252 / .14); color: var(--on-ink-accent); }
.flow-icon .icon { width: 17px; height: 17px; }
.flow strong { color: var(--on-ink-strong); font-size: 16px; }
.flow small { color: var(--on-ink-muted); font-size: 14.5px; line-height: 1.5; }
.flow s, .word-pair s { color: #fda4af; text-decoration-thickness: 1.5px; }

.learn-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(20px, 3vw, 32px); align-items: start; }
.word-lab {
  padding: 24px; border-radius: var(--r-lg);
  background: rgb(255 255 255 / .05); border: 1px solid var(--on-ink-line);
}
.word-lab-head { display: flex; justify-content: space-between; align-items: center; }
.badge {
  padding: 4px 10px; border-radius: 999px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  background: rgb(165 180 252 / .16); color: var(--on-ink-accent); transition: background-color .3s, color .3s;
}
.badge.is-learned { background: var(--lime); color: #0b0b10; }
.word-lab-seen { font-family: var(--font-mono); font-size: 13px; color: var(--on-ink-muted); }
.word-pair { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-family: var(--font-mono); font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 600; }
.word-pair .icon { color: var(--on-ink-muted); }
.word-pair span { color: #86efac; }
.word-ipa { margin-top: 4px; color: var(--on-ink-muted); font-style: italic; }
.word-progress { margin-top: 22px; }
.word-progress-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--on-ink-muted); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.dots i { height: 8px; border-radius: 4px; background: rgb(255 255 255 / .1); transition: background-color .35s var(--ease); }
.dots i.on { background: var(--on-ink-accent); }
.word-lab.is-learned .dots i { background: var(--lime); }
.word-lab-actions { display: flex; align-items: center; gap: 8px; margin-top: 22px; }
.word-lab-note { margin-top: 14px; font-size: 14px; color: var(--on-ink-muted); min-height: 2.6em; }
.word-lab-note b { color: var(--on-ink-strong); }

.shot-frame--ink { border-color: var(--on-ink-line); }
.learn-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.learn-points li { padding: 16px; border-radius: var(--r-md); border: 1px solid var(--on-ink-line); }
.learn-points b { display: block; color: var(--on-ink-strong); font-size: 15px; }
.learn-points span { display: block; margin-top: 4px; font-size: 14px; color: var(--on-ink-muted); line-height: 1.5; }

/* ---------- Plans ---------- */
.plans { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.plan {
  display: flex; flex-direction: column; gap: 24px;
  padding: clamp(24px, 3vw, 36px); border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
}
.plan .btn { align-self: flex-start; }
.plan--featured {
  border-color: transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--accent), var(--violet), color-mix(in oklab, var(--lime) 70%, var(--accent))) border-box;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-md);
}
.plan-price { margin-top: 18px; display: grid; gap: 2px; }
.plan-price b { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem); letter-spacing: -.04em; color: var(--text-strong); line-height: 1.1; font-weight: 650; }
.plan-price span { color: var(--muted); font-size: 15px; }

.meter { padding: 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.meter-label { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.meter-label b { color: var(--text-strong); }
.meter-track { height: 8px; margin: 10px 0; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.meter-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--violet)); }
.meter small { font-size: 13px; color: var(--muted); }

/* ---------- Privacy ---------- */
.pipeline {
  display: grid; grid-template-columns: 1fr 72px 1fr 72px 1fr; align-items: center;
  padding: clamp(16px, 2.4vw, 24px); margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-alt);
}
.node { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.node-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.node small { display: block; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.node strong { display: block; color: var(--text-strong); font-size: 15px; line-height: 1.35; margin-top: 2px; }
.wire { position: relative; height: 2px; margin: 0 8px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 11px); }
.wire i { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 20%, transparent); animation: travel 2.6s var(--ease) infinite; }
.wire + .node + .wire i { animation-delay: 1.3s; }
@keyframes travel { from { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { left: calc(100% - 8px); opacity: 0; } }

.ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ledger-col { padding: clamp(22px, 2.6vw, 30px); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.ledger-col h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; letter-spacing: -.015em; margin-bottom: 18px; }
.ledger-col h3 .icon { width: 20px; height: 20px; }
.ledger-col li { padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.ledger-col li b { display: block; color: var(--text-strong); font-weight: 600; }
.ledger-col li span { display: block; color: var(--muted); font-size: 14px; }
.ledger-col--never h3 .icon { color: var(--del-text); }
.ledger-col--never li { color: var(--text-strong); text-decoration: line-through; text-decoration-color: color-mix(in oklab, var(--del-text) 55%, transparent); text-decoration-thickness: 1.5px; }
.ledger-col--kept h3 .icon { color: var(--green); }
.ledger-col--guard h3 .icon { color: var(--accent-text); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; color: var(--text-strong); }

/* ---------- Control ---------- */
.control-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.shot-frame--phone { max-width: 300px; margin-inline: auto; border-radius: 20px; }
.shot-frame--crop { aspect-ratio: 720 / 780; }
.shot-frame--crop img { height: 100%; object-fit: cover; object-position: top; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-grid .section-head { text-align: left; margin: 0; position: sticky; top: 110px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 600; color: var(--text-strong); letter-spacing: -.01em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line);
  background: linear-gradient(currentColor, currentColor) center / 11px 1.5px no-repeat,
              linear-gradient(currentColor, currentColor) center / 1.5px 11px no-repeat;
  color: var(--muted); transition: transform .25s var(--ease), background-color .2s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); background-color: var(--surface-3); }
.faq-list summary:hover { color: var(--accent-text); }
.faq-list details::details-content { block-size: 0; overflow: clip; transition: block-size .3s var(--ease), content-visibility .3s allow-discrete; }
.faq-list details[open]::details-content { block-size: auto; }
.faq-body { padding: 0 48px 22px 0; color: var(--muted); font-size: 16px; }
.faq-body b { color: var(--text-strong); }

/* ---------- Final CTA ---------- */
.final { padding: 0 0 clamp(64px, 9vw, 112px); }
.final-card {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: clamp(48px, 8vw, 104px) clamp(20px, 4vw, 48px);
  border-radius: clamp(24px, 4vw, 40px); border: 1px solid var(--line);
  background: var(--surface);
}
.final-glow {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(50% 70% at 50% 110%, color-mix(in oklab, var(--accent) 30%, transparent), transparent 70%),
    radial-gradient(30% 40% at 85% 0%, color-mix(in oklab, var(--lime) 30%, transparent), transparent 70%);
}
.final-card img { margin: 0 auto 28px; border-radius: 14px; box-shadow: var(--shadow-md); }
.final-card h2 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4rem); line-height: 1.04; letter-spacing: -.045em; font-weight: 650; }
.final-card > p { margin-top: 18px; color: var(--muted); font-size: 18px; }
.final-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.final-note { margin: 16px auto 0; max-width: 28rem; font-size: 14px; color: var(--muted); }
.final-actions .btn[hidden] { display: none; }
.final-stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.store-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-strong); font-size: 14px; font-weight: 550;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.store-chip .icon { width: 16px; height: 16px; }
.store-chip[href]:hover { border-color: var(--line-strong); background: var(--surface-2); }
.store-chip[aria-disabled="true"] { color: var(--muted); cursor: default; }
.store-chip small { font-size: 12px; font-weight: 500; color: var(--muted); }
.final-stores-note { margin: 12px auto 0; max-width: 30rem; font-size: 13px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-brand p { margin-top: 12px; max-width: 18rem; color: var(--muted); font-size: 15px; }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col h3 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.footer-col a { font-size: 15px; color: var(--text); }
.footer-col a:hover { color: var(--accent-text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-bottom a { color: var(--text-strong); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 900;
  display: none; padding: 8px; border-radius: 999px;
  background: var(--header-bg); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: transform .3s var(--ease), opacity .3s;
}
.sticky-cta .btn { width: 100%; }
.sticky-cta.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }

.mobile-only { display: none !important; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: min(96vw, 1400px); max-width: none; max-height: 92vh; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.lightbox[open] { animation: pop .25s var(--ease); }
.lightbox::backdrop { background: rgb(10 10 16 / .72); backdrop-filter: blur(6px); }
.lightbox img { width: 100%; max-height: 92vh; object-fit: contain; }
.lightbox-close { position: absolute; top: 12px; right: 12px; z-index: 1; }

/* ---------- Theme switch transition ---------- */
/* Only while the theme switches (script.js adds .vt-theme). */
:root.vt-theme::view-transition-old(root), :root.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root.vt-theme::view-transition-new(root) { animation: reveal-theme .55s var(--ease); }
@keyframes reveal-theme {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0%)); }
  to { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 0%)); }
}

/* ---------- Scroll reveal (progressive) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
    @keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .nav + .header-actions { margin-left: auto; }
  .menu-btn { display: inline-grid; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 680px; }
  .demo { max-width: 640px; }
  .steps { grid-template-columns: 1fr; }
  .steps-list { grid-template-columns: repeat(3, 1fr); }
  .steps-list button { grid-template-columns: 1fr; gap: 10px; }
  .control-grid { grid-template-columns: 1fr 1fr; }
  .control-grid .card--sites { grid-column: span 2; }
  .ledger { grid-template-columns: 1fr 1fr; }
  .ledger-col--guard { grid-column: span 2; }
  .learn-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .section-head--split { grid-template-columns: 1fr; text-align: left; }
  .bento { grid-template-columns: 1fr; }
  .bento .card, .bento .card--wide, .bento .card--tall, .bento .card--style { grid-column: auto; }
  .bento .card--wide { flex-direction: column; align-items: stretch; }
  .card--wide .card-copy { flex: none; }
  .plans { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; gap: 0; justify-items: stretch; }
  .wire { width: 2px; height: 28px; margin: 4px auto; background: repeating-linear-gradient(180deg, var(--line-strong) 0 6px, transparent 6px 11px); }
  .wire i { left: -3px; animation-name: travel-v; }
  @keyframes travel-v { from { top: 0; opacity: 0; } 15%, 85% { opacity: 1; } to { top: calc(100% - 8px); opacity: 0; } }
  .flow { grid-template-columns: 1fr; }
  .flow li:not(:last-child)::after { top: auto; bottom: -12px; right: auto; left: 37px; width: 1px; height: 12px; background: var(--on-ink-line); }
  .learn-points { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .faq-grid .section-head { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 720px) {
  .header-cta { display: none; }
  .sticky-cta { display: flex; }
  .footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .hero { padding-top: calc(104px + env(safe-area-inset-top)); }
  .hero-actions .btn { flex: 1 1 100%; }
  .steps-list { grid-template-columns: 1fr; }
  .steps-list button { grid-template-columns: auto 1fr; padding: 14px 16px; }
  .steps-list button:not([aria-selected="true"]) small { display: none; }
  .control-grid { grid-template-columns: 1fr; }
  .control-grid .card--sites { grid-column: auto; }
  .ledger { grid-template-columns: 1fr; }
  .ledger-col--guard { grid-column: auto; }
  .result { box-shadow: var(--shadow-md); }
  .compose-body { min-height: 0; padding-inline: 14px; }
  .toolbar { margin-left: 0; }
  .final-actions .btn { flex: 1 1 100%; }
  .faq-body { padding-right: 0; }
}

@media (max-width: 400px) {
  .hide-xs { display: none; }
  .demo-tabs { display: flex; }
  .demo-tabs button { flex: 1; justify-content: center; }
}

/* Touch devices can't install desktop extensions: swap the CTA for "send to my computer" */
@media (pointer: coarse) and (max-width: 900px) {
  .mobile-only { display: inline-flex !important; }
  p.mobile-only { display: block !important; }
  .desktop-only { display: none !important; }
  /* …except Firefox for Android, which installs extensions (set by script.js once its store link exists) */
  [data-mobile-install] .btn.desktop-only { display: inline-flex !important; }
  [data-mobile-install] .mobile-only { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .marquee { mask-image: none; }
  .marquee-track { flex-wrap: wrap; justify-content: center; min-width: 0; flex: 1; animation: none; }
  .marquee-track[aria-hidden="true"] { display: none; }
  .wire i { display: none; }
  [aria-selected="true"] .step-bar { animation: none; width: 100%; }
}

/* Anchor targets get focus (tabindex=-1) after an in-page jump; no ring on the section itself */
section[tabindex="-1"]:focus { outline: none; }
.not-found p { margin-top: 20px; }

/* ---------- Legal pages (privacy) ---------- */
.legal { max-width: 800px; padding: calc(120px + env(safe-area-inset-top)) 0 clamp(64px, 8vw, 104px); }
.legal h1 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4rem); line-height: 1.04; letter-spacing: -.04em; font-weight: 650; }
.legal .updated { margin-top: 14px; margin-bottom: 28px; color: var(--muted); font-size: 1rem; }
.legal .summary { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 26px; }
.legal .glance { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.legal .glance section { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 26px; }
.legal .glance h3 { font-size: 1.05rem; margin-bottom: 12px; }
.legal .glance ul { list-style: none; padding: 0; margin: 0; }
.legal .glance li { position: relative; padding-left: 26px; margin: 12px 0; }
.legal .glance li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.legal .glance .yes li::before { content: "\2713"; color: var(--accent-text); }
.legal .glance .no li::before { content: "\2715"; color: var(--muted); }
.legal .glance li span { display: block; color: var(--muted); font-size: .95rem; }
.legal-body { margin-top: 24px; }
.legal-body h2 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); letter-spacing: -.02em; font-weight: 650; margin: 44px 0 12px; }
.legal-body p, .legal-body ul { margin-top: 12px; }
.legal-body ul { padding-left: 22px; list-style: disc; }
.legal-body li::marker { color: var(--muted); }
.legal-body li { margin: 6px 0; }
.legal-body strong { color: var(--text-strong); font-weight: 600; }
.legal-body a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.legal-body code { font-family: var(--font-mono); font-size: .9em; }
@media (max-width: 640px) { .legal .glance { grid-template-columns: 1fr; } }

@media print {
  .site-header, .sticky-cta, .demo, .sites { display: none; }
}
.footer-col a[hidden], .inline-link[hidden] { display: none; }
