/* ============================================================================
   THE PERFECT ORCHESTRATOR — design system
   Single stylesheet. No frameworks, no imports.
   Contract: DESIGN-BRIEF.md §3 + bus.md [W1] structural classes + LEAD UPDATE 2
   (Archivo display/body, Claude clay --accent #d97757 per orange-spec.md,
   --cyan #56d4dd, --bg-void band. Orange commands, green verifies, red refutes.)
   ========================================================================== */

/* ---- 1. Tokens (brief §1 + LEAD UPDATE 2: clay rebrand per orange-spec.md) -- */
:root {
  --bg:        #0a0e14;   /* section base — darker than GitHub dark */
  --bg-void:   #060911;   /* page body + #vibe band — the deep end */
  --bg-raised: #0f141d;   /* cards, terminal chrome */
  --bg-glass:  rgba(15,20,29,.72);

  /* hairlines: neutral slate (was green-tinted — green demoted to semantics) */
  --line:      rgba(148,158,172,.13);
  --line-hot:  rgba(148,158,172,.30);

  /* ACCENT — Claude clay. #D97757 = --swatch--clay (anthropic.com),
     --color-clay (claude.com). Verified 2026-06-06. */
  --accent:        #d97757;
  --accent-hi:     #f59575;            /* CLI "claudeShimmer" — hover/bright tier */
  --accent-deep:   #c6613f;            /* --color-clay-hover — fills, pressed, hairlines */
  --accent-rgb:    217,119,87;
  --glow-accent:    0 0 26px rgba(var(--accent-rgb), .28);
  --glow-accent-lg: 0 0 38px rgba(var(--accent-rgb), .55), 0 0 90px rgba(var(--accent-rgb), .25);

  /* legacy aliases — every existing var(--amber*) consumer converts in one move */
  --amber:     var(--accent);
  --amber-rgb: var(--accent-rgb);

  /* GREEN — demoted to terminal/verified semantics only */
  --green:      #3fb950;   /* $ prompts, caret, ✓, stat numbers */
  --green-hi:   #56d364;   /* VERIFIED / CONFIRMED verdicts */
  --green-mute: #7fa48a;   /* ambient terminal flavor (overlines) — 6.7–7.2:1, 12px-safe */
  --green-rgb:  63,185,80;

  --cyan:      #56d4dd;    /* links */
  --cyan-hi:   #7ce0e8;    /* link hover (was green-hi) */
  --cyan-rgb:  86,212,221;
  --red:       #f85149;    /* REFUTED */
  --warn:      #d29922;    /* table ~ glyphs ONLY — keeps "partial" distinct from brand */

  --ink:       #e6edf3;   /* primary text */
  --ink-mute:  #9aa4b2;   /* secondary text */
  --ink-faint: #78828f;   /* captions, meta — QA: ≥4.5:1 on all three backgrounds (was #58616e @ ~3:1) */
}

/* non-color system tokens */
:root {
  /* LEAD UPDATE 2: Space Grotesk OUT — Archivo variable (wght+wdth) in.
     Headlines ride the width axis (112%); JetBrains Mono unchanged. */
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body:    "Archivo", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius:       14px;
  --radius-sm:    10px;
  --wrap:         1140px;
  --ease-out:     cubic-bezier(.2,.7,.2,1);
  --nav-h:        64px;
}

/* conic-gradient border angle (animatable) */
@property --cc-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* ---- 2. Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-void);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.06rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

button { background: none; border: none; cursor: pointer; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-hi); }   /* links brighten in their own hue */

ul, ol { padding-left: 1.2em; }

::selection { background: rgba(var(--accent-rgb), .3); color: var(--ink); }  /* ink on 30% clay: 10.57:1 */

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

/* a11y skip link — hidden until keyboard focus */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: .7em 1.2em;
  background: var(--bg-raised);
  border: 1px solid var(--line-hot);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--ink);
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* ---- 3. Grain overlay (whole page) ------------------------------------------
   body::after carries it; .grain is the same layer if W1 ships an element. */
.grain {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ---- 4. Typography ------------------------------------------------------------ */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  text-wrap: balance;
}

/* Archivo's real width axis: slightly expanded headlines = mission-control
   character (lead cap: ≤115%). Archivo needs less negative tracking than
   Space Grotesk did. */
h1, h2 { font-stretch: 112%; }

h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 680;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 660;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}

h3 {
  font-size: 1.18rem;
  font-weight: 500;
  font-stretch: 100%;
  letter-spacing: -0.005em;
}

p { max-width: 62ch; }

p + p { margin-top: 1em; }

code, kbd, pre { font-family: var(--font-mono); }

/* lead update: eyebrow = JetBrains Mono 12px uppercase ls .12em
   (clay rebrand: muted green — terminal flavor that doesn't compete) */
.overline {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green-mute);
  margin-bottom: 1.1rem;
}

.lead {
  font-size: 1.14rem;
  color: var(--ink-mute);
  max-width: 62ch;
}

/* ---- 5. Layout primitives ------------------------------------------------------ */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.section {
  position: relative;
  background: var(--bg);          /* sections sit on --bg over the void */
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.section + .section { border-top: 1px solid var(--line); }

/* #problem two-column: left prose, right terminal */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  margin-top: 2.2rem;
}

.prose p { color: var(--ink-mute); }
.prose p strong, .prose p b { color: var(--ink); font-weight: 600; }

/* ---- 6. Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: var(--font-mono);
  font-size: .9rem;
  font-weight: 400;
  line-height: 1;
  padding: .8em 1.35em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  white-space: nowrap;
  transition: color .2s var(--ease-out), background-color .2s var(--ease-out),
              border-color .2s var(--ease-out), box-shadow .2s var(--ease-out),
              transform .2s var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }

/* primary CTA — Claude clay (always dark text on clay fills, never white) */
.btn-accent,
.btn-amber {
  border-color: rgba(var(--accent-rgb), .55);
  color: var(--accent);
}
.btn-accent:hover,
.btn-amber:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0e14;
  box-shadow: var(--glow-accent);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink-mute);
}
.btn-ghost:hover {
  border-color: var(--line-hot);
  color: var(--ink);
  background: rgba(148,158,172,.05);
}

/* ---- 7. Sticky glass nav ----------------------------------------------------------- */
#nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .35s var(--ease-out),
              border-color .35s var(--ease-out),
              backdrop-filter .35s var(--ease-out);
}
#nav.scrolled {
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}

.nav-inner,
#nav .wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .12em;
  color: var(--ink);
  white-space: nowrap;
}
.brand img { width: 28px; height: 28px; }
.brand:hover { color: var(--accent-hi); }   /* the brand hovers brand-colored */

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 1.9rem);
  list-style: none;
  padding: 0;
}
.nav-links a:not(.btn) {
  position: relative;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink-mute);
  white-space: nowrap;   /* "How it works" must never wrap to two lines */
  transition: color .2s var(--ease-out);
}
.nav-links a:not(.btn):hover { color: var(--ink); }
/* clay underline sweeps in left→right */
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 1px;
  background: var(--accent);
  transition: right .25s var(--ease-out);
}
.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn):focus-visible::after { right: 0; }

/* ---- 8. Hero -------------------------------------------------------------------------- */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--nav-h) + 3rem) 5.5rem;
  overflow: hidden;
  border-top: none;
}

/* full-bleed video wrapper */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media video,
.hero-media img,
#hero > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: hero-media-in 1.6s var(--ease-out) .25s forwards;
}
@keyframes hero-media-in { to { opacity: 1; } }

/* gradient scrim: keep text on solid ground, fade into --bg at the seam */
.hero-media::after,
#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg,
      rgba(10,14,20,.66) 0%,
      rgba(10,14,20,.42) 38%,
      rgba(10,14,20,.8) 72%,
      var(--bg) 100%),
    radial-gradient(120% 70% at 50% 110%, rgba(var(--accent-rgb),.07), transparent 60%);
}
#hero::before { z-index: 0; }          /* only the .hero-media::after sits over video */

.hero-content {
  position: relative;
  z-index: 2;
}

#hero .overline { margin-bottom: 1.4rem; }

#hero h1 {
  max-width: 17ch;
  margin-bottom: 1.4rem;
}
.h1-accent {
  display: block;
  font-style: normal;
  color: var(--accent);
  text-shadow: 0 2px 24px rgba(0,0,0,.35);   /* scrim insurance over video */
}

#hero .lead { margin-bottom: 2.2rem; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* credibility chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  padding: 0;
  list-style: none;
}
.chip {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .42em 1em;
  background: rgba(15,20,29,.5);
  white-space: nowrap;
  transition: border-color .25s var(--ease-out), color .25s var(--ease-out);
}
.chip:hover { border-color: var(--line-hot); color: var(--ink); }

/* scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  z-index: 2;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .22em;
  color: var(--ink-faint);
  animation: cue-bob 2.6s ease-in-out infinite;
}
@keyframes cue-bob {
  0%, 100% { transform: translateX(-50%) translateY(0);   opacity: .65; }
  50%      { transform: translateX(-50%) translateY(6px); opacity: .25; }
}

/* typed-in overline + caret */
.typed { white-space: nowrap; }
/* the LEAD-UPDATE-3 eyebrow is 40ch — must wrap on tiny phones (360: 378>360) */
@media (max-width: 400px) {
  .typed { white-space: normal; }
}
.caret {
  display: inline-block;
  width: .6ch;
  height: 1.05em;
  vertical-align: text-bottom;
  background: var(--green);
  margin-left: .15ch;
  animation: caret-blink 1.05s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* ---- 9. .cmd-copy — install box with animated conic border --------------------------- */
.cmd-copy {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 100%;
  background: #0a0e14;
  border-radius: var(--radius-sm);
  padding: .85rem 1.1rem;
  font-family: var(--font-mono);
  font-size: .88rem;
  line-height: 1.5;
  color: var(--ink);
}
.cmd-copy::before {
  /* 1px animated ring — gradient painted ONLY in the border band via mask-exclude
     (negative-z trick can't work: negative-z children paint above parent bg) */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  /* orange-led ring with one green pulse — command box wears the command
     color; green is the live tick */
  background: conic-gradient(from var(--cc-angle),
    var(--accent), rgba(var(--accent-rgb),.28) 38%, var(--green) 52%,
    rgba(var(--accent-rgb),.28) 66%, var(--accent) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  pointer-events: none;
  animation: cc-spin 6s linear infinite;
}
@keyframes cc-spin { to { --cc-angle: 360deg; } }

.cmd-copy code,
.cmd-text {
  flex: 1;
  /* QA: never clip a command — wrap instead (clipping hid 37px of the clone URL) */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.cmd-copy code .p,
.cmd-text .p { color: var(--green); }   /* leading $ if marked up */

/* copy button (W1: .btn-copy carries [data-copy]) */
.btn-copy,
.copy-btn,
.cmd-copy [data-copy] {
  flex: none;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .05em;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .42em .85em;
  background: var(--bg-raised);
  transition: color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.btn-copy:hover,
.copy-btn:hover,
.cmd-copy [data-copy]:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

/* ---- 10. Terminal windows --------------------------------------------------------------- */
.terminal {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}

.term-head {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
}
.term-head .dot,
.term-head i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}
.term-head .dot:nth-of-type(1), .term-head i:nth-of-type(1) { background: #ff5f57; }
.term-head .dot:nth-of-type(2), .term-head i:nth-of-type(2) { background: #febc2e; }
.term-head .dot:nth-of-type(3), .term-head i:nth-of-type(3) { background: #28c840; }

.term-title {
  margin-left: .5rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--ink-faint);
}

.term-body {
  background: #0a0e14;
  padding: 1.15rem 1.25rem 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.75;
  overflow-x: auto;
  min-height: 3em;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,158,172,.35) transparent;
}

/* terminal line grammar.
   Base .t-line = output (ink-mute). W1 ships plain-text lines; modifier classes
   and spans below are available to JS/markup for color (see bus). */
.t-line { display: block; white-space: pre-wrap; color: var(--ink-mute); }
.t-line.t-cmd { color: var(--ink); }
.t-line.t-bus { color: rgba(var(--cyan-rgb), .82); }
.t-line.t-out { color: var(--ink-mute); }
.t-prompt  { color: var(--green); }
.t-confirm { color: var(--green-hi); font-weight: 700; }  /* verdicts are green/red, never brand */
.t-refute  { color: var(--red);   font-weight: 700; }
.t-ok      { color: var(--green-hi); }

/* JS-typed lines fade in */
.t-line.t-enter { animation: t-fade .4s var(--ease-out) both; }
@keyframes t-fade { from { opacity: 0; transform: translateY(4px); } }

.term-caption,
.t-caption {
  display: block;
  margin-top: .8rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .05em;
  color: var(--ink-faint);
}

/* ---- 11. #problem -------------------------------------------------------------------------- */
#problem .terminal .t-refute,
#problem .terminal .t-line.t-refuted { color: var(--red); }

/* quiet star ask — single instance, end of #start (LEAD-UPDATE-3 §1) */
.star-quiet {
  margin-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .03em;
  color: var(--ink-faint);
}
.star-quiet a { color: var(--cyan); }
.star-quiet a:hover { color: var(--cyan-hi); }

/* ---- 12. #how — steps + demo terminal + media ------------------------------------------------ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-block: 2.4rem 3rem;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.5rem;
  transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out),
              transform .25s var(--ease-out);
}
.step:hover {
  border-color: var(--line-hot);
  box-shadow: 0 10px 34px rgba(0,0,0,.45);   /* neutral lift, no green glow */
  transform: translateY(-2px);
}

.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 700;
  color: var(--accent);
  opacity: .9;
  line-height: 1;
  margin-bottom: .9rem;
}

.step h3 {
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: .6rem;
}
.step p { font-size: .95rem; color: var(--ink-mute); }
.step code {
  /* inline command chips — commands are the lead's vocabulary: clay */
  font-size: .85em;
  color: var(--accent);
  background: rgba(var(--accent-rgb), .08);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .45em;
  white-space: nowrap;
}

#demo-terminal { margin-top: 2.6rem; }

/* figure wrapper for verify-loop / explainer videos */
.media {
  margin: 2.6rem 0 0;
}
.media video,
.media img {
  width: 100%;
  aspect-ratio: 16 / 9;    /* QA: zero CLS — poster/video share the box before decode */
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.media-caption,
figcaption {
  margin-top: .7rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--ink-faint);
}

/* explainer: film-slate card, click-to-unmute */
.film-slate {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: .6rem;
  transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.film-slate:hover {
  border-color: rgba(var(--accent-rgb), .4);
  box-shadow: 0 0 36px rgba(var(--accent-rgb), .10);
}
.film-slate video {
  border: none;
  border-radius: calc(var(--radius) - 6px);
}
.film-slate .media-caption { padding: .7rem .5rem .35rem; margin-top: 0; }

/* ---- 13. #verify — stats spotlight ------------------------------------------------------------ */
#verify::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* #verify keeps the GREEN halo — verification is green's home turf */
  background: radial-gradient(46% 50% at 50% 8%, rgba(var(--green-rgb), .05), transparent 70%);
}

/* framing line above the stats — the gauntlet setup (LEAD-UPDATE-3 §2).
   Lead spec: lead-style line. */
.stats-frame {
  margin-top: 1.6rem;
  font-size: 1.14rem;
  color: var(--ink-mute);
  max-width: 62ch;
}
.stats-frame + .stats { margin-block-start: 1.8rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 1.2rem;
  margin-block: 2.6rem 2.2rem;
  padding: 0;
  list-style: none;
}

.stat {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem 1.35rem;
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  margin-top: .45rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);   /* QA: these captions carry the data — readable tier */
}

/* the dogfood confession — best trust line we own, promoted from the footer
   (LEAD-UPDATE-3 §3). Lead spec: PRESENCE — mono, clay, centered, generous
   margin. NOT footer-grey. */
.dogfood-line {
  margin-block: 2.8rem 1rem;
  margin-inline: auto;
  text-align: center;
  font-family: var(--font-mono);
  font-size: .95rem;
  letter-spacing: .03em;
  line-height: 1.65;
  color: var(--accent);   /* clay on --bg: 6.2:1 */
  max-width: none;        /* single line at desktop; wraps naturally on phones */
  text-wrap: balance;
}

/* cyan mono inline links (landscape survey, read-the-docs) */
.link-mono {
  font-family: var(--font-mono);
  font-size: .86rem;
  color: var(--cyan);
}
.link-mono:hover { color: var(--cyan-hi); }

/* ---- 14. #commands — cmd-grid ------------------------------------------------------------------- */
.cmd-grid {
  margin-top: 2.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.cmd-row {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr);
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.05rem 1.4rem;
  border-top: 1px solid var(--line);
  transition: border-color .22s var(--ease-out), background-color .22s var(--ease-out),
              transform .22s var(--ease-out);
}
.cmd-row:first-child { border-top: none; }
.cmd-row:hover {
  border-color: var(--line-hot);
  background: rgba(148,158,172,.04);
}
/* descriptions span the full row — 2-col grid with 3 children otherwise
   auto-places desc into the narrow name column (QA-verified dead space) */
.cmd-desc { grid-column: 1 / -1; }

.cmd-name {
  /* slash-commands are the lead's vocabulary — clay */
  font-family: var(--font-mono);
  font-size: .92rem;
  color: var(--accent);
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.cmd-args { color: var(--ink-mute); font-weight: 400; }
.cmd-desc {
  font-size: .95rem;
  color: var(--ink-mute);
  max-width: none;
}

/* compact variant (LEAD-UPDATE-3 §4): two-column reference card at desktop —
   name+args on one line, desc tucked under. Mobile stays the 1-col stack. */
@media (min-width: 900px) {
  .cmd-grid--compact { display: grid; grid-template-columns: 1fr 1fr; }
  .cmd-grid--compact .cmd-row {
    display: block;
    padding: 1.05rem 1.4rem 1.1rem;
  }
  /* row-major auto-placement: even children form the right column */
  .cmd-grid--compact .cmd-row:nth-child(even) { border-left: 1px solid var(--line); }
  .cmd-grid--compact .cmd-row:nth-child(2) { border-top: none; }
  .cmd-grid--compact .cmd-name { display: inline; margin-right: .55em; overflow: visible; }
  .cmd-grid--compact .cmd-args { display: inline; font-size: .8rem; }
  .cmd-grid--compact .cmd-desc { margin-top: .4rem; font-size: .9rem; }
}

/* the orch-worker footnote sits tight under the grid */
#commands .footnote { margin-top: .9rem; }

/* ---- 15. #patterns — cards ------------------------------------------------------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.2rem;
  margin-top: 2.4rem;
  padding: 0;
  list-style: none;
}

.pattern-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out),
              transform .25s var(--ease-out);
}
.pattern-card:hover {
  border-color: var(--line-hot);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transform: translateY(-3px);
}

.pattern-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .55rem;
  color: var(--ink);
}
.pattern-card p { font-size: .94rem; color: var(--ink-mute); }

/* security strip — quiet aside panel, end of #patterns (LEAD-UPDATE-3 §5) */
.security-strip {
  margin-top: 2.6rem;
  padding: 1.5rem 1.6rem 1.25rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.security-strip .overline {
  color: var(--accent);   /* BLAST RADIUS reads in clay — command voice */
  margin-bottom: .9rem;
}
.security-points {
  list-style: none;
  padding: 0;
  display: grid;
  gap: .55rem 2rem;
  font-size: .92rem;
  color: var(--ink-mute);
}
.security-points li {
  position: relative;
  padding-left: 1.15em;
}
.security-points li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--ink-faint);
}
.security-points code { font-size: .88em; color: var(--ink); }
.security-strip .footnote { margin-top: 1.1rem; }

/* wide screens: the three points read as an actual strip */
@media (min-width: 900px) {
  .security-points { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- 16. #compare — table --------------------------------------------------------------------------- */
.table-wrap {
  margin-top: 2.4rem;
  overflow-x: auto;
  max-height: 78vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,158,172,.35) transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
  /* scroll affordance: edge shadows that self-hide at the ends.
     "local" cover layers travel with the content and mask the fixed
     shadows when the matching edge is reached — pure CSS, no JS. */
  background-image:
    linear-gradient(90deg,  var(--bg) 30%, rgba(10,14,20,0)),
    linear-gradient(270deg, var(--bg) 30%, rgba(10,14,20,0)),
    radial-gradient(farthest-side at 0 50%,   rgba(0,0,0,.5), transparent),
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.5), transparent);
  background-position: left center, right center, left center, right center;
  background-size: 40px 100%, 40px 100%, 16px 100%, 16px 100%;
  background-repeat: no-repeat;
  background-attachment: local, local, scroll, scroll;
}

#compare table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: .84rem;       /* 6 columns must fit the 1140 wrap on desktop */
}
.t-line.t-cmd::first-letter { color: var(--green); }  /* the $ prompt on typed lines */

#compare th,
#compare td {
  padding: .85rem .55rem;
  text-align: center;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}
/* long annotations ("debate-during-investigation only") may wrap —
   they alone pushed the table 21px past the 1140 wrap */
#compare tbody td { white-space: normal; line-height: 1.45; }
/* column headers may wrap — six columns must fit the wrap on desktop
   (audit: 108px min + 200px first col overflowed the 1076px wrap by 57px) */
#compare thead th {
  white-space: normal;
  min-width: 96px;
  line-height: 1.35;
}
#compare th:first-child,
#compare td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--ink-mute);
  white-space: normal;
  min-width: 170px;
}

#compare thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-raised);
  border-top: none;
  border-bottom: 1px solid var(--line-hot);
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
}

/* TPO column — clay hairline + faint clay radial glow */
.tpo-col {
  border-left: 1px solid rgba(var(--accent-rgb), .4) !important;
  border-right: 1px solid rgba(var(--accent-rgb), .4) !important;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(var(--accent-rgb), .09), rgba(var(--accent-rgb), .025) 70%);
}
#compare thead th.tpo-col {
  color: var(--accent);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(var(--accent-rgb), .12), rgba(var(--accent-rgb), .04) 70%),
    var(--bg-raised);
}

/* capability glyphs — "partial" must NOT wear the brand color */
.ok   { color: var(--green);     font-weight: 700; }
.warn { color: var(--warn);      font-weight: 700; }
.no   { color: var(--ink-faint); font-weight: 400; }

.footnote {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--ink-mute);   /* cold-review P7: fine print earns the readable tier */
}

/* cold-review P5: #verify stacks two 16:9 figures — tighten the slog */
#verify figure.media { margin-top: 2rem; }

/* cold-review P8: mobile table swipe affordance — right-edge fade */
@media (max-width: 768px) {
  .table-wrap {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2.2rem), rgba(0,0,0,.25));
            mask-image: linear-gradient(90deg, #000 calc(100% - 2.2rem), rgba(0,0,0,.25));
  }
}

/* ---- 17. #vibe — manifesto band ------------------------------------------------------------------------ */
#vibe {
  background: var(--bg-void);
  text-align: center;
  padding-block: clamp(6rem, 12vw, 10rem);
  overflow: hidden;
}
#vibe::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(50% 42% at 50% 55%, rgba(var(--accent-rgb), .06), transparent 70%);
}
#vibe .overline { margin-bottom: 2.2rem; }

.manifesto {
  display: grid;
  gap: .35em;
  justify-items: center;
}

.m-line {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4.6vw, 3.2rem);
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--ink);
  max-width: none;
  /* slide-mask ready: revealed by .in (JS) */
  clip-path: inset(0 0 110% 0);
  transform: translateY(34px);
  opacity: 0;
  transition: clip-path .7s var(--ease-out), transform .7s var(--ease-out),
              opacity .7s var(--ease-out);
}
.m-line.in,
.reveal-stagger.in > .m-line {
  /* JS marks the PARENT .reveal-stagger with .in — key off both shapes */
  clip-path: inset(-12% 0 -12% 0);
  transform: none;
  opacity: 1;
}
.manifesto .m-line:nth-child(2) { transition-delay: .12s; }
.manifesto .m-line:nth-child(3) { transition-delay: .24s; }
.manifesto .m-line:nth-child(4) { transition-delay: .4s; }

/* final line: clay, larger, one-time glow pulse on reveal */
.m-accent {
  color: var(--accent);
  font-size: clamp(2.1rem, 5.6vw, 4rem);
  margin-top: .2em;
}
.m-accent.in,
.reveal-stagger.in > .m-accent {
  animation: m-glow 1.6s var(--ease-out) .55s 1 both;
}
@keyframes m-glow {
  0%   { text-shadow: 0 0 0 rgba(var(--accent-rgb), 0); }
  35%  { text-shadow: 0 0 38px rgba(var(--accent-rgb), .55), 0 0 90px rgba(var(--accent-rgb), .25); }
  100% { text-shadow: 0 0 18px rgba(var(--accent-rgb), .18); }
}

.manifesto-sub {
  margin-top: 2.4rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .08em;
  color: var(--ink-faint);
}

/* QA: the global p{max-width:62ch} left-anchors these inside the centered band */
#vibe .overline,
#vibe .manifesto-sub { max-width: none; }
#vibe .overline { text-transform: none; }   /* "$ whoami" is a real command — keep its case */

/* a11y utility — visually hidden, AT-readable */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* pause/play toggle for ambient loops (WCAG 2.2.2) */
.vid-toggle {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1;
  color: var(--ink-mute);
  background: rgba(10,14,20,.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .5em .8em;
  transition: color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.vid-toggle:hover { color: var(--ink); border-color: var(--line-hot); }
figure.media { position: relative; }

/* ---- 18. #start — quickstart ------------------------------------------------------------------------------ */
/* faint clay aura — the closing CTA glows the command color (#verify glows
   green, #vibe + #start glow clay: section-level storytelling) */
#start::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(42% 46% at 50% 0%, rgba(var(--accent-rgb), .05), transparent 70%);
}

.start-list {
  list-style: none;
  padding: 0;
  margin-top: 2.4rem;
  display: grid;
  gap: 1.3rem;
  counter-reset: qs;
  max-width: 860px;
}
.start-list > li {
  counter-increment: qs;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem;
  align-items: center;
}
.start-list > li::before {
  content: "0" counter(qs);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  opacity: .9;
}
#start .btn-ghost { margin-top: 2rem; }

/* ---- 19. #faq — accordions --------------------------------------------------------------------------------- */
.accordion {
  margin-top: 2.2rem;
  display: grid;
  gap: .8rem;
  max-width: 820px;
}

.accordion details {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .25s var(--ease-out);
}
.accordion details[open],
.accordion details:hover { border-color: var(--line-hot); }

.accordion summary {
  /* block + absolute marker — flex spreads inline children (<em>) apart */
  display: block;
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 3.2rem 1.05rem 1.3rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
}
.accordion summary em { font-style: italic; color: var(--accent); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  content: "+" / "";   /* alt-text form: visual marker, silent for AT (older engines keep plain "+") */
  position: absolute;
  right: 1.3rem;
  top: 50%;
  margin-top: -0.6em;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--ink-mute);
  transition: transform .3s var(--ease-out), color .3s var(--ease-out);
}
.accordion details[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);   /* open state answers in orange */
}

.accordion details > :not(summary) {
  padding: 0 1.3rem 1.2rem;
  font-size: .96rem;
  color: var(--ink-mute);
}

/* ---- 20. #footer ---------------------------------------------------------------------------------------------- */
#footer {
  border-top: 1px solid var(--line);
  padding-block: 2.6rem;
  font-size: .88rem;
  color: var(--ink-mute);
  background: var(--bg-void);
}

.footer-inner,
#footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

#footer .brand { font-size: .78rem; }
#footer .brand img { width: 22px; height: 22px; }

.footer-links {
  display: flex;
  gap: 1.4rem;
  font-size: .86rem;
  list-style: none;
  padding: 0;
}
.footer-links a { color: var(--ink-mute); }
.footer-links a:hover { color: var(--cyan); }

/* ---- 21. Reveal system (brief §5) -------------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.reveal-stagger.in > * {
  opacity: 1;
  transform: none;
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: .07s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .14s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .21s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .28s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .35s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .42s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: .49s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: .56s; }

/* ---- 22. Responsive ------------------------------------------------------------------------------------------------ */
/* nav tightens before it collapses: at 768–900 the full link row + GitHub
   button overflowed the wrap (audit: btn right edge at 770px on a 768 vp) */
@media (max-width: 900px) {
  .nav-inner,
  #nav .wrap { gap: 1rem; }
  .nav-links { gap: .9rem; }
  .nav-links a:not(.btn) { font-size: .84rem; }
  .brand { font-size: .74rem; letter-spacing: .09em; }
  #nav .btn { font-size: .82rem; padding: .72em 1em; }
}

@media (max-width: 980px) {
  .steps { grid-template-columns: 1fr; max-width: 680px; }
  /* mid widths: lay each step horizontally — number beside text — so the
     single column doesn't leave a dead right half (audit: 768) */
  .step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1.4rem;
    align-items: start;
    padding-block: 1.35rem;
  }
  .step-num { grid-row: 1 / 3; margin-bottom: 0; line-height: 1.15; }
  .step h3 { margin-bottom: .45rem; }

  .split { grid-template-columns: 1fr; }
  .split .terminal { order: 2; }

  .cmd-row { grid-template-columns: 1fr; gap: .3rem; }
}

/* below the tightened-nav floor the link row can't fit — brand + GitHub only */
@media (max-width: 767px) {
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }

  .section { padding-block: clamp(3.6rem, 12vw, 5rem); }

  /* nav wordmark goes too — logo mark only (scoped to #nav: the footer
     .brand span carries the MIT copyright and must stay visible) */
  #nav .brand span { display: none; }

  /* phones: step number back on top — the side-by-side grid gets cramped */
  .step { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .step-num { grid-row: auto; margin-bottom: .9rem; }

  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { justify-content: center; }
  .cmd-copy { flex-direction: column; align-items: stretch; gap: .7rem; }
  .cmd-copy code, .cmd-text { white-space: pre-wrap; overflow-wrap: anywhere; }
  .btn-copy, .copy-btn, .cmd-copy [data-copy] { align-self: flex-end; }

  .start-list > li { grid-template-columns: 1fr; gap: .4rem; }

  .term-body { font-size: .8rem; padding: .95rem 1rem 1.1rem; }

  .footer-inner,
  #footer .wrap { flex-direction: column; text-align: center; }
  #footer .brand { flex-direction: column; gap: .55rem; }
}

/* landscape phones / short laptops: the 100svh hero + 112px top padding
   left no fold for content — compact the whole hero stack */
@media (max-height: 520px) {
  #hero {
    min-height: 0;
    padding-block: calc(var(--nav-h) + 1.8rem) 3.2rem;
  }
  #hero h1 { font-size: clamp(1.9rem, 8.5vh, 2.7rem); margin-bottom: 1rem; }
  #hero .overline { margin-bottom: .9rem; }
  #hero .lead { margin-bottom: 1.5rem; }
  .cta-row { margin-bottom: 1.4rem; }
  .scroll-cue { display: none; }
}

/* ---- 23. Reduced motion ---------------------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  .reveal-stagger > *,
  .m-line {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .cmd-copy::before { animation: none; }
  .caret { animation: none; opacity: 1; }
  .scroll-cue { animation: none; }
  .hero-media video, #hero > video { opacity: 1; animation: none; }
}
