/* ═══════════════════════════════════════════════════════════════════
   Glaze — landing page.

   Tokens below are lifted verbatim from the shipped app
   (apps/desktop/src/styles/tokens.css). If a value here ever
   disagrees with that file, that file wins — resync rather than
   patching a number inline.

   Only three tokens are new, and they exist because the app has no
   hero: --text-hero, --text-band and --w-prose. Everything else is
   the product's own system.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro', sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', Menlo, monospace;

  /* Type scale — whole pixels, few steps. */
  /* Only the steps this page actually renders. The app's --text-stat (44),
     --text-display (34) and --text-h (18) are omitted: there are no metric
     tiles, onboarding headlines or modal titles here, and carrying unused
     steps flattens the scale for no one's benefit. */
  --text-hero: clamp(2.5rem, 6.2vw, 4.5rem);  /* landing only: the app has no hero */
  --text-band: clamp(1.75rem, 3.4vw, 2.5rem); /* landing only: band headings */
  --text-title: 22px;
  --text-lg: 16px;
  --text-base: 14px;
  --text-sm: 13px;
  --text-xs: 12px;
  --text-mono: 12px;
  --text-mono-sm: 11px;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.55;
  --leading-relaxed: 1.7;

  --tracking-hero: -0.03em;
  --tracking-display: -0.02em;
  --tracking-title: -0.015em;
  --tracking-tight: -0.01em;

  /* Spacing — even 4px scale. */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px;

  --pad-card: 24px;
  --pad-card-lg: 28px;
  --gap-section: 20px;

  --radius-mark: 2px;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 22px;
  --radius-pill: 999px;

  --h-btn-sm: 30px;
  --h-btn: 36px;
  --h-btn-lg: 42px;
  --h-input: 40px;

  --w-content: 1080px;
  --w-prose: 68ch;   /* landing only: body measure */

  --dur-fast: 120ms;
  --dur-base: 180ms;
  --dur-slow: 240ms;
  --dur-pulse: 2600ms;

  /* The app's third ease, --ease-spring, is deliberately absent: it exists
     for the settings toggle knob, and this page has no toggle. */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* ── Dark palette. Dark is not a style choice here: the product is a
       menu-bar utility that lives on a Mac desktop all day, and the app
       itself is dark by default with no attribute set. ── */
  --accent: oklch(0.82 0.115 205);
  --accent-hover: oklch(0.87 0.105 205);
  --accent-press: oklch(0.76 0.12 205);
  --accent-weak: oklch(0.82 0.115 205 / 0.13);
  --accent-line: oklch(0.82 0.115 205 / 0.3);
  --accent-fg: oklch(0.18 0.03 205);

  --bg-sunken: oklch(0.12 0.004 250);
  --bg-app: oklch(0.145 0.004 250);
  --bg-card: oklch(0.185 0.004 250);
  --bg-raised: oklch(0.215 0.005 250);
  --bg-input: oklch(0.205 0.004 250);
  --bg-hover: oklch(0.25 0.005 250);
  --bg-active: oklch(0.285 0.006 250);
  --bg-code: oklch(0.165 0.004 250);

  --border-subtle: oklch(1 0 0 / 0.05);
  --border: oklch(1 0 0 / 0.09);
  --border-strong: oklch(1 0 0 / 0.17);

  --fg: oklch(0.97 0.004 250);
  --fg-muted: oklch(0.72 0.008 250);
  --fg-subtle: oklch(0.66 0.008 250);
  --fg-faint: oklch(0.63 0.008 250);

  --success: oklch(0.78 0.12 165);
  --success-weak: oklch(0.78 0.12 165 / 0.14);
  --warn: oklch(0.83 0.14 75);
  --warn-weak: oklch(0.83 0.14 75 / 0.13);
  --danger: oklch(0.63 0.21 25);
  --rec: oklch(0.66 0.22 25);
  --rec-weak: oklch(0.66 0.22 25 / 0.14);

  --shadow-pop: 0 18px 48px oklch(0 0 0 / 0.55);
  --shadow-hud: 0 10px 34px oklch(0 0 0 / 0.62);
}

/* Safari below 15.4 and any other engine without oklch(). Values sampled
   from the tokens above, so the page degrades in tone, never in legibility. */
@supports not (color: oklch(0 0 0)) {
  :root {
    --accent: #5ed8ea;      --accent-hover: #7fe4f3;  --accent-press: #46c9dc;
    --accent-weak: rgba(94,216,234,.13); --accent-line: rgba(94,216,234,.3);
    --accent-fg: #06232a;
    --bg-sunken: #0b0c0e;   --bg-app: #101114;        --bg-card: #17181c;
    --bg-raised: #1c1e22;   --bg-input: #1a1c20;      --bg-hover: #222429;
    --bg-active: #292b31;   --bg-code: #141518;
    --border-subtle: rgba(255,255,255,.05);
    --border: rgba(255,255,255,.09);
    --border-strong: rgba(255,255,255,.17);
    --fg: #f4f5f7;          --fg-muted: #a6a8b0;      --fg-subtle: #94969e;
    --fg-faint: #8b8d95;
    --success: #4fc99b;     --success-weak: rgba(79,201,155,.14);
    --warn: #e0a544;        --warn-weak: rgba(224,165,68,.13);
    --danger: #d6453a;      --rec: #e24e3c;           --rec-weak: rgba(226,78,60,.14);
  }
}

/* ── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor links land below the sticky header rather than under it. */
  scroll-padding-top: 84px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg-app);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

/* ── Browser surfaces. The parts nobody draws still carry the design. ── */
::selection { background: var(--accent-weak); color: var(--fg); }
:root { scrollbar-color: var(--bg-raised) var(--bg-sunken); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-sunken); }
::-webkit-scrollbar-thumb {
  background: var(--bg-raised);
  border-radius: var(--radius-pill);
  border: 3px solid var(--bg-sunken);
}
::-webkit-scrollbar-thumb:hover { background: var(--bg-hover); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }
:focus:not(:focus-visible) { outline: none; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

/* Machine facts line up in columns. */
.num, time, kbd, code, .mono { font-variant-numeric: tabular-nums; }

.skip {
  position: absolute; left: var(--space-4); top: var(--space-4);
  transform: translateY(-200%);
  background: var(--accent); color: var(--accent-fg);
  padding: 10px 16px; border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: var(--weight-semibold);
  text-decoration: none; z-index: 100;
  transition: transform var(--dur-base) var(--ease);
}
.skip:focus { transform: translateY(0); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Layout ──────────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--w-content);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
@media (max-width: 640px) { .wrap { padding-inline: var(--space-5); } }

.prose { max-width: var(--w-prose); }

/* A band is one beat of the gesture. The rule at its top is the only
   separation between them: no cards, no shadows, no wash. */
.band {
  padding-block: clamp(64px, 11vh, 128px);
  border-top: 1px solid var(--border-subtle);
  position: relative;
}
.band--sunken { background: var(--bg-sunken); }

/* ── Type ────────────────────────────────────────────────────────── */
h1, h2, h3 { font-weight: var(--weight-semibold); text-wrap: balance; }

.hero-title {
  font-size: var(--text-hero);
  line-height: 1.02;
  letter-spacing: var(--tracking-hero);
  max-width: 20ch;
}
.band-title {
  font-size: var(--text-band);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  max-width: 26ch;
}
.card-title {
  font-size: var(--text-title);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-title);
}
.row-title { font-size: var(--text-lg); font-weight: var(--weight-medium); letter-spacing: var(--tracking-tight); }

.lede {
  font-size: var(--text-lg);
  color: var(--fg-muted);
  line-height: var(--leading-relaxed);
  max-width: var(--w-prose);
}
.body { font-size: var(--text-base); color: var(--fg-muted); line-height: var(--leading-relaxed); max-width: var(--w-prose); }
.hint { font-size: var(--text-xs); color: var(--fg-faint); line-height: var(--leading-snug); }
.mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--fg-subtle);
}
strong { font-weight: var(--weight-semibold); color: var(--fg); }

/* ── Brand ───────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-weak);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  display: grid; place-items: center;
  flex: none;
}
.brand-name { font-size: var(--text-lg); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); }

/* ── Header ──────────────────────────────────────────────────────── */
.header {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 50;
  height: 64px;
  display: flex; align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
/* The bar only draws itself once the hero is behind you. */
.header[data-stuck='true'] {
  background: oklch(0.145 0.004 250 / 0.86);
  border-bottom-color: var(--border-subtle);
  backdrop-filter: saturate(140%) blur(12px);
}
@supports not (color: oklch(0 0 0)) {
  .header[data-stuck='true'] { background: rgba(16,17,20,.9); }
}
.header .wrap { display: flex; align-items: center; gap: var(--space-6); }
.header-nav { display: flex; align-items: center; gap: var(--space-6); margin-inline-start: auto; }
.header-nav a {
  font-size: var(--text-sm); color: var(--fg-muted); text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.header-nav a:hover { color: var(--fg); }
.header-cta {
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.header[data-stuck='true'] .header-cta { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 860px) { .header-nav a { display: none; } }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h-btn); padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: var(--weight-medium);
  color: var(--fg); background: var(--bg-raised);
  border: 1px solid var(--border);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--border-strong); color: var(--fg); }
.btn:active:not(:disabled) { background: var(--bg-active); }
.btn:disabled { opacity: .45; cursor: default; }

.btn-primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; font-weight: var(--weight-semibold); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); color: var(--accent-fg); border-color: transparent; }
.btn-primary:active:not(:disabled) { background: var(--accent-press); }

.btn-lg { height: var(--h-btn-lg); padding: 0 22px; font-size: var(--text-base); }
.btn-sm { height: var(--h-btn-sm); padding: 0 11px; font-size: var(--text-xs); }
.btn-quiet { background: transparent; border-color: var(--border); color: var(--fg-muted); }
.btn-quiet:hover:not(:disabled) { background: var(--bg-card); color: var(--fg); }

/* ── Pills, keycaps, chips ───────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: var(--weight-medium);
  background: var(--bg-raised); color: var(--fg-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill--ready { background: var(--success-weak); color: var(--success); border-color: transparent; }
.pill--rec { background: var(--rec-weak); color: var(--rec); border-color: transparent; }
.pill--work { background: var(--accent-weak); color: var(--accent); border-color: transparent; }

/* The readiness breathe and the recording pulse: the world's only two loops. */
.pill--ready .pill-dot { animation: breathe var(--dur-pulse) var(--ease) infinite; }
.pill--rec .pill-dot { animation: pulse 1300ms var(--ease) infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

kbd, .kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--bg-code); border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono); font-size: var(--text-mono-sm);
  color: var(--fg-muted);
}
code {
  font-family: var(--font-mono); font-size: var(--text-mono);
  background: var(--bg-code); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs); padding: 2px 6px; color: var(--fg-muted);
}

/* ═══════════════════════════════════════════════════════════════════
   BAND 1 — HOLD. The keycap trio is the page's dominant object; the
   headline sits above it and the action directly below, so the offer
   and the button are both in the first viewport.
   ═══════════════════════════════════════════════════════════════════ */
.hero { padding-block: 128px clamp(56px, 9vh, 96px); border-top: 0; }
@media (max-width: 640px) { .hero { padding-block: 104px 56px; } }

.hero-head { display: grid; gap: var(--space-5); }

.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-4) var(--space-5);
  margin-block-start: var(--space-8);
}
.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  font-family: var(--font-mono); font-size: var(--text-mono-sm);
  color: var(--fg-faint); letter-spacing: 0.01em;
}
.hero-meta .sep { color: var(--border-strong); }

/* ── The stage: keycaps → waveform → the app the text lands in. ──── */
.stage {
  margin-block-start: clamp(40px, 6vh, 64px);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--pad-card-lg);
  display: grid;
  gap: var(--space-6);
  position: relative;
}
@media (max-width: 640px) { .stage { padding: var(--space-5); border-radius: var(--radius-xl); } }

.stage-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4);
}
.stage-label { font-size: var(--text-sm); color: var(--fg-subtle); }

/* The trigger is a real button: the whole keycap group is one control.
   The frame mirrors the app's own tray popover — keys, then the app's
   own caption under them. */
.chord {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-5);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  cursor: pointer; width: 100%;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.chord:hover { border-color: var(--border-strong); }
.chord[data-armed='true'] { border-color: var(--accent-line); background: var(--bg-code); }
.chord-keys { display: flex; align-items: center; gap: var(--space-3); }
.chord-caption { font-size: var(--text-sm); color: var(--fg-subtle); }

.keycap {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono); font-size: 20px; font-weight: var(--weight-medium);
  color: var(--fg-muted);
  /* Press is a real translate, not a scale: nothing in this world scales. */
  transition: transform var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.keycap[data-down='true'] {
  transform: translateY(3px);
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-fg);
}
@media (max-width: 480px) {
  .keycap { width: 46px; height: 46px; font-size: 17px; }
  .chord { padding: var(--space-6) var(--space-4); gap: var(--space-2); }
}

.chord-hint { text-align: center; margin-block-start: var(--space-4); }

/* ── Waveform. 48 bars; the brand mark's five strokes at page scale. ── */
.wave {
  --wave-h: 48px;      /* full-scale bar height */
  --wave-min: 0.0625;  /* 3px of 48px — the idle/flat signal */
  display: flex; align-items: center; justify-content: center;
  gap: 3px; height: 64px;
  /* Fades at both edges so the field reads as a continuous signal
     rather than a bar chart that stops. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.wave i {
  display: block; width: 3px;
  /* Fixed box, scaled on the compositor. Animating `height` on ~50 bars at
     60fps relayouts the flex row every frame; scaleY does not touch layout.
     --wave-h is the full-scale height, so JS sets a ratio, never a pixel. */
  height: var(--wave-h);
  transform: scaleY(var(--wave-min));
  transform-origin: center;
  /* 1px, not --radius-mark: a 2px radius on a 3px box is a circle, and
     the idle row then reads as a line of dots rather than a flat signal. */
  border-radius: 1px;
  background: var(--fg-faint);
  transition: transform 90ms linear, background var(--dur-base) var(--ease);
}
.wave[data-state='rec'] i { background: var(--rec); }
.wave[data-state='play'] i { background: var(--accent); }

/* ── The app the transcript lands in. ───────────────────────────── */
.target {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.target-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-xs); color: var(--fg-faint);
}
.target-lights { display: flex; gap: 5px; margin-inline-end: 4px; }
.target-lights i { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-active); display: block; }
.target-body {
  padding: var(--space-4);
  min-height: 92px;
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--fg);
}
.target-body .placeholder { color: var(--fg-faint); }
.caret {
  display: inline-block; width: 2px; height: 1.05em;
  background: var(--accent); vertical-align: text-bottom;
  margin-inline-start: 1px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ── Generic content grid used by the middle bands ──────────────── */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); } }

.stack { display: grid; gap: var(--space-5); }
.stack-tight { display: grid; gap: var(--space-3); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--pad-card);
}

/* ── Tier rows with the app's DotMeter, not raw byte counts. ─────── */
.tiers { display: grid; gap: 1px; background: var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
.tier {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: var(--space-4);
  background: var(--bg-card); padding: var(--space-4) var(--space-5);
}
.tier-name { font-size: var(--text-base); font-weight: var(--weight-medium); }
.tier-desc { font-size: var(--text-xs); color: var(--fg-faint); margin-block-start: 2px; }
.meter { display: flex; gap: 4px; }
.meter i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bg-active); display: block;
}
.meter i[data-on='true'] { background: var(--accent); }
.meter-label { font-family: var(--font-mono); font-size: var(--text-mono-sm); color: var(--fg-faint); margin-block-end: 6px; }

/* ── Language chips ─────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ── History entry, masked exactly the way the app masks it. ─────── */
.entry {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5);
  display: grid; gap: var(--space-3);
}
.entry-head { display: flex; align-items: center; gap: var(--space-3); }
.entry-meta {
  font-family: var(--font-mono); font-size: var(--text-mono-sm);
  color: var(--fg-faint); display: flex; align-items: center; gap: 8px;
}
.entry-text { font-size: var(--text-base); color: var(--fg); line-height: var(--leading-relaxed); }
/* Never filter: blur() — it breaks WebKit's lazy rasterisation in long
   lists, which is why the app masks with a text-shadow instead. */
.entry-text[data-masked='true'] {
  color: transparent;
  text-shadow: 0 0 9px oklch(0.72 0.008 250 / 0.85);
  user-select: none;
}
@supports not (color: oklch(0 0 0)) {
  .entry-text[data-masked='true'] { text-shadow: 0 0 9px rgba(166,168,176,.85); }
}
.icon-btn {
  appearance: none; background: transparent; border: 1px solid transparent;
  color: var(--fg-subtle); width: 32px; height: 32px; padding: 0;
  display: inline-grid; place-items: center;
  border-radius: var(--radius-sm); cursor: pointer; flex: none;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.icon-btn:hover { color: var(--fg); background: var(--bg-raised); }
.icon-btn[aria-pressed='true'] { color: var(--accent); background: var(--accent-weak); }

/* ── The ledger: every claim carries its cost. ────────────────────────
   A real <table>, not a grid of divs. It is genuinely tabular — claim,
   cost, and the control that changes it — so the semantics were wrong
   before, and machines that quote comparison tables could not see one. ── */
.ledger {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.ledger thead th {
  text-align: start;
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  font-weight: var(--weight-medium);
  color: var(--fg-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-block-end: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}
.ledger tbody th,
.ledger tbody td {
  text-align: start;
  vertical-align: top;
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}
.ledger tbody th { padding-inline-end: clamp(20px, 4vw, 56px); }

.ledger-claim {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-tight);
  color: var(--fg);
}
.ledger-cost { font-size: var(--text-base); color: var(--fg-muted); line-height: var(--leading-relaxed); }
.ledger-cost b { color: var(--fg-muted); font-weight: var(--weight-semibold); }

/* What you can actually change. A quieter line under the cost it defuses —
   the app names the pane, so the page does too. */
.ledger-fix {
  margin-block-start: var(--space-3);
  font-size: var(--text-xs);
  color: var(--fg-faint);
  line-height: var(--leading-normal);
}
.ledger-fix .path {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  color: var(--fg-subtle);
  white-space: nowrap;
}
/* No switch exists for this row; say so rather than leaving a gap. */
.ledger-fix[data-fixed='none'] { font-style: italic; }

/* Narrow: the two columns stack. The header row is hidden rather than
   removed, so the table keeps its structure for a screen reader. */
@media (max-width: 760px) {
  .ledger, .ledger tbody, .ledger tr, .ledger tbody th, .ledger tbody td {
    display: block;
    width: auto;
  }
  .ledger thead {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .ledger tbody th {
    padding-block: var(--space-5) 0;
    padding-inline-end: 0;
    border-bottom: 0;
  }
  .ledger tbody td { padding-block: var(--space-2) var(--space-5); }
}

/* ── A quoted sample, marked up as one ───────────────────────────── */
.sample {
  margin: 0;
  font-size: var(--text-base);
  color: var(--fg-muted);
  line-height: var(--leading-relaxed);
  /* Not a coloured left border: this design system rules those out. The
     quotation marks in the copy already signal what it is. */
}

/* ── The network ledger: two lists, deliberately lopsided. ──────── */
.net { display: grid; grid-template-columns: 1.35fr 1fr; gap: 0; border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); overflow: hidden; }
@media (max-width: 820px) { .net { grid-template-columns: minmax(0, 1fr); } }
.net-col { padding: var(--pad-card); background: var(--bg-card); }
.net-col + .net-col { border-inline-start: 1px solid var(--border-subtle); background: var(--bg-sunken); }
@media (max-width: 820px) { .net-col + .net-col { border-inline-start: 0; border-block-start: 1px solid var(--border-subtle); } }
.net-title { display: flex; align-items: center; gap: 8px; font-size: var(--text-lg); font-weight: var(--weight-semibold); margin-block-end: var(--space-4); }
.net-list { list-style: none; padding: 0; display: grid; gap: var(--space-3); }
.net-list li { display: flex; gap: 10px; font-size: var(--text-base); color: var(--fg-muted); line-height: var(--leading-normal); }
.net-list svg { flex: none; margin-block-start: 4px; }
.net-note {
  margin-block-start: var(--space-5); padding-block-start: var(--space-4);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-base); color: var(--fg-muted);
}

/* ── Download / notify ──────────────────────────────────────────── */
.get {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-section);
  align-items: stretch;
}
@media (max-width: 820px) { .get { grid-template-columns: minmax(0, 1fr); } }
.get-card { display: grid; gap: var(--space-4); align-content: start; }

.field { display: flex; gap: var(--space-2); }
@media (max-width: 480px) { .field { flex-wrap: wrap; } .field .btn { width: 100%; } }
.input {
  flex: 1 1 auto; min-width: 0;
  height: var(--h-input); padding: 0 14px;
  font-family: var(--font-sans); font-size: var(--text-base);
  color: var(--fg); background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input::placeholder { color: var(--fg-subtle); opacity: 1; }
.input:hover { border-color: var(--border-strong); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
/* Honeypot: reachable to a bot parsing the DOM, invisible and untabbable to a
   person. Kept out of the layout entirely so it cannot affect the field row. */
.hp {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.form-note { font-size: var(--text-xs); line-height: var(--leading-snug); min-height: 1.4em; }
.form-note[data-tone='ok'] { color: var(--success); }
.form-note[data-tone='warn'] { color: var(--warn); }
.form-note[data-tone='idle'] { color: var(--fg-faint); }

/* ── Footer ─────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding-block: var(--space-10);
  background: var(--bg-sunken);
}
.footer-in { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.footer-links a { font-size: var(--text-sm); color: var(--fg-muted); text-decoration: none; }
.footer-links a:hover { color: var(--fg); }

/* ── The one authored reveal. Visible is the base state and hiding is an
     opt-in class that only JS adds, to bands that are genuinely below the
     fold. Revealing REMOVES that class, so the computed value falls back
     to opacity 1 whether or not the transition ever runs. There is no
     state in which a stalled script or an inert transition can leave copy
     invisible — which a `[data-seen]` override could not promise. ── */
.rise { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .rise {
    transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  }
  .js .rise.rise-armed { opacity: 0; transform: translateY(12px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ── Utilities ───────────────────────────────────────────────────────
   These exist so the markup carries no style="" attributes. That is not
   tidiness for its own sake: with no inline styles and no inline script,
   the Content-Security-Policy can drop 'unsafe-inline' for both, which is
   a materially stronger policy than the page shipped with. ── */
.u-faint   { color: var(--fg-faint); }
.u-subtle  { color: var(--fg-subtle); }
.u-success { color: var(--success); }
.u-wide    { max-width: none; }
.u-mb-8    { margin-block-end: var(--space-8); }
.u-mt-2    { margin-block-start: 10px; }
.u-push    { margin-inline-start: auto; }

/* The language switch sits in the section nav but is not a section: give it a
   border so it reads as a control, and keep it visible at the width where the
   section links drop out — switching language must not need a wide window. */
.lang-switch {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px 11px;
  color: var(--fg-muted);
}
.lang-switch:hover { color: var(--fg); border-color: var(--border-strong); }
@media (max-width: 860px) {
  .header-nav a.lang-switch { display: inline-flex; }
}

/* ═══════════════════════════════════════════════════════════════════
   Layout adopted from the competitor teardown (section sequence and
   composition only — the palette, type and component character stay
   Glaze's, and the accent stays cyan rather than the lime the design
   system explicitly rejected).
   ═══════════════════════════════════════════════════════════════════ */

/* ── Hero: copy left, the live demo where a screenshot would sit ──── */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}
@media (max-width: 1000px) {
  /* Stacks copy → actions → demo, so the download button is still above
     the fold on a phone rather than pushed below a tall demo panel. */
  .hero-split { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
}
.hero-split .stage { margin-block-start: 0; }

/* ── App strip. Names, not third-party logos: nominative use of a name
      is unproblematic, redistributing someone's mark is not. ── */
.appstrip {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center;
  gap: var(--space-3) var(--space-6);
  padding-block: var(--space-6);
  border-block: 1px solid var(--border-subtle);
}
.appstrip-label {
  font-family: var(--font-mono); font-size: var(--text-mono-sm);
  color: var(--fg-faint); letter-spacing: 0.08em; text-transform: uppercase;
}
.appstrip-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--text-sm); color: var(--fg-subtle);
}
.appstrip-item svg { color: var(--fg-faint); flex: none; }

/* ── Statement band: one sentence, two tones, nothing else. ──────── */
.statement {
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  line-height: 1.25;
  letter-spacing: var(--tracking-display);
  font-weight: var(--weight-medium);
  color: var(--fg-faint);
  max-width: 24ch;
  text-wrap: balance;
}
.statement strong { color: var(--fg); font-weight: var(--weight-semibold); }

/* ── Three-up summary. One grid on the page, not the page's skeleton:
      the detail bands below it carry the actual argument. ── */
.features3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-section);
}
@media (max-width: 900px) { .features3 { grid-template-columns: minmax(0, 1fr); } }
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--pad-card);
  display: grid; gap: var(--space-3); align-content: start;
}
.feature-icon {
  width: 34px; height: 34px; border-radius: var(--radius-md);
  background: var(--accent-weak); border: 1px solid var(--accent-line);
  color: var(--accent);
  display: grid; place-items: center;
}
.feature h3 { font-size: var(--text-lg); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); }
.feature p { font-size: var(--text-sm); color: var(--fg-muted); line-height: var(--leading-relaxed); }

/* ── Latest releases ─────────────────────────────────────────────── */
.releases { border-top: 1px solid var(--border-subtle); }
.release-row {
  display: grid;
  grid-template-columns: 9ch 7ch minmax(0, 1fr);
  gap: var(--space-4);
  align-items: baseline;
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-base);
}
@media (max-width: 640px) {
  .release-row { grid-template-columns: 9ch minmax(0, 1fr); }
  .release-row .release-ver { grid-column: 2; }
}
.release-date, .release-ver {
  font-family: var(--font-mono); font-size: var(--text-mono-sm);
  color: var(--fg-faint);
}
.release-ver { color: var(--accent); }
.release-text { color: var(--fg-muted); line-height: var(--leading-snug); }

/* ── FAQ. Native <details>, so it opens with no JavaScript, is
      keyboard-operable for free, and survives script-src 'self'. ── */
.faq { border-top: 1px solid var(--border-subtle); }
.faq details {
  border-bottom: 1px solid var(--border-subtle);
}
.faq summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--fg);
  cursor: pointer;
  list-style: none;
  transition: color var(--dur-fast) var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Authored marker rather than the browser's triangle, rotating on open. */
.faq summary::after {
  content: "";
  width: 10px; height: 10px; flex: none;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur-base) var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq .faq-body {
  padding-block-end: var(--space-5);
  font-size: var(--text-base);
  color: var(--fg-muted);
  line-height: var(--leading-relaxed);
  max-width: var(--w-prose);
}

/* ── Closing call to action: the page's one saturated field. ─────── */
.cta-panel {
  background: var(--accent);
  color: var(--accent-fg);
  border-top: 0;
}
.cta-panel .band-title,
.cta-panel .body { color: var(--accent-fg); }
.cta-panel .body { opacity: 0.82; }
/* On the accent field the normal primary button would vanish, so it
   inverts: dark fill, accent text. */
.cta-panel .btn-primary {
  background: var(--accent-fg);
  color: var(--accent);
  border-color: transparent;
}
.cta-panel .btn-primary:hover:not(:disabled) { background: oklch(0.26 0.04 205); color: var(--accent); }
.cta-panel .btn { background: transparent; border-color: oklch(0.18 0.03 205 / 0.35); color: var(--accent-fg); }
.cta-panel .btn:hover:not(:disabled) { background: oklch(0.18 0.03 205 / 0.08); color: var(--accent-fg); }
.cta-panel .input {
  background: oklch(1 0 0 / 0.6); border-color: oklch(0.18 0.03 205 / 0.25); color: var(--accent-fg);
}
.cta-panel .input::placeholder { color: oklch(0.18 0.03 205 / 0.55); }
.cta-panel .input:focus { border-color: var(--accent-fg); box-shadow: 0 0 0 3px oklch(0.18 0.03 205 / 0.15); }
.cta-panel .hint { color: oklch(0.18 0.03 205 / 0.72); }
.cta-panel .hint a { color: var(--accent-fg); }
.cta-panel .form-note[data-tone='idle'] { color: oklch(0.18 0.03 205 / 0.7); }
.cta-panel .form-note[data-tone='ok'] { color: oklch(0.24 0.09 165); }
.cta-panel .form-note[data-tone='warn'] { color: oklch(0.32 0.13 45); }

.cta-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px); align-items: start;
}
@media (max-width: 820px) { .cta-grid { grid-template-columns: minmax(0, 1fr); } }

/* ── Footer with real columns ────────────────────────────────────── */
.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  margin-block-end: var(--space-8);
}
@media (max-width: 820px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-cols { grid-template-columns: 1fr; } }
.footer-col h4 {
  font-family: var(--font-mono); font-size: var(--text-mono-sm);
  color: var(--fg-faint); font-weight: var(--weight-medium);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-block-end: var(--space-3);
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer-col a { font-size: var(--text-sm); color: var(--fg-muted); text-decoration: none; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-block-start: var(--space-5);
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  align-items: center; justify-content: space-between;
}

/* ── Specification table ──────────────────────────────────────────────
   Two columns, row headers on the left. Values carry the mono treatment
   the design system reserves for machine facts, which is exactly what
   these are. ── */
.spec {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.spec th, .spec td {
  text-align: start;
  vertical-align: top;
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  line-height: var(--leading-normal);
}
.spec tbody tr:first-child th,
.spec tbody tr:first-child td { border-top: 1px solid var(--border-subtle); }
.spec th {
  width: 34%;
  padding-inline-end: var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--fg-subtle);
}
.spec td { font-size: var(--text-base); color: var(--fg-muted); }
.spec abbr { text-decoration: none; border-bottom: 1px dotted var(--border-strong); }

@media (max-width: 640px) {
  .spec, .spec tbody, .spec tr, .spec th, .spec td { display: block; width: auto; }
  .spec th { padding-block: var(--space-4) 0; padding-inline-end: 0; border-bottom: 0; }
  .spec tbody tr:first-child td { border-top: 0; }
  .spec td { padding-block: 2px var(--space-4); }
}
