/* ========================================================================
   Zero Operators — Website v2
   Tokens come from the locked brand system. Dark default, light via
   [data-theme="light"] swap. Motion is gentle and intentional.
   ======================================================================== */

:root,
[data-theme="dark"] {
  --canvas: #12110F;
  --canvas-2: #17150F;
  --canvas-3: #1C1A13;
  --rule: #2A241C;
  --rule-2: #35301F;

  --cream: #EBE3D2;
  --cream-2: #C8C0AE;
  --dim: #857D6B;
  --ghost: #4E4738;

  --coral: oklch(0.74 0.14 35);
  --coral-hover: oklch(0.78 0.14 35);
  --coral-soft: oklch(0.74 0.14 35 / 0.14);
  --coral-ring: oklch(0.74 0.14 35 / 0.32);

  --dusk: oklch(0.70 0.10 245);
  --dusk-soft: oklch(0.70 0.10 245 / 0.14);
  --dusk-ring: oklch(0.70 0.10 245 / 0.30);

  --moss: oklch(0.62 0.08 150);
  --moss-soft: oklch(0.62 0.08 150 / 0.14);
  --moss-ring: oklch(0.62 0.08 150 / 0.30);

  --btn-ink: #1A0F06;
  --shadow-card: 0 0 0 1px var(--rule), 0 20px 40px -24px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

[data-theme="light"] {
  --canvas: #F4EFE6;
  --canvas-2: #EDE6D3;
  --canvas-3: #E4DCC6;
  --rule: #D6CDB6;
  --rule-2: #C5BB9F;

  --cream: #1A1712;         /* alias: primary text */
  --cream-2: #3A342A;       /* secondary text */
  --dim: #6B6254;
  --ghost: #8A8171;

  --coral: oklch(0.58 0.16 35);
  --coral-hover: oklch(0.54 0.17 35);
  --coral-soft: oklch(0.58 0.16 35 / 0.12);
  --coral-ring: oklch(0.58 0.16 35 / 0.30);

  --dusk: oklch(0.50 0.12 245);
  --dusk-soft: oklch(0.50 0.12 245 / 0.12);
  --dusk-ring: oklch(0.50 0.12 245 / 0.28);

  --moss: oklch(0.48 0.09 150);
  --moss-soft: oklch(0.48 0.09 150 / 0.12);
  --moss-ring: oklch(0.48 0.09 150 / 0.28);

  --btn-ink: #FFF7EC;
  --shadow-card: 0 0 0 1px var(--rule), 0 16px 32px -20px rgba(26, 23, 18, 0.12);
  color-scheme: light;
}

/* Type */
:root {
  --sans: 'Geist', -apple-system, system-ui, sans-serif;
  --italic: 'Cormorant Garamond', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-bounce: cubic-bezier(0.3, 1.3, 0.5, 1);
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--canvas);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }

em, .it {
  font-family: var(--italic);
  font-style: italic;
  font-weight: 500;
  color: var(--coral);
  letter-spacing: -0.005em;
  font-size: 1.08em;
  line-height: 0.95;
  vertical-align: -0.01em;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 48px; }

/* ========================================================================
   NAV
   ======================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 16px 0;
  background: color-mix(in oklab, var(--canvas) 80%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav.is-scrolled {
  border-bottom-color: var(--rule);
  background: color-mix(in oklab, var(--canvas) 92%, transparent);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand .mark { width: 22px; height: 22px; display: block; }
.wordmark { font-weight: 500; font-size: 15px; letter-spacing: -0.01em; color: var(--cream); }
.wordmark em { font-size: 15px; color: var(--coral); }

.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-link {
  font-size: 13px; font-weight: 400; color: var(--cream-2);
  transition: color 0.15s var(--ease);
}
.nav-link:hover { color: var(--coral); }

.theme-toggle {
  width: 32px; height: 32px; border-radius: 6px;
  border: 1px solid var(--rule-2);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--cream-2);
  transition: all 0.2s var(--ease);
}
.theme-toggle:hover { border-color: var(--coral); color: var(--coral); }
.theme-icon { display: inline-block; width: 16px; height: 16px; position: relative; }
/* Moon (shown in dark) */
[data-theme="dark"] .theme-icon::before {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 70% 35%, transparent 55%, currentColor 56%);
}
/* Sun (shown in light) */
[data-theme="light"] .theme-icon::before {
  content: ""; position: absolute; inset: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow:
    0 -7px 0 -2px currentColor, 0 7px 0 -2px currentColor,
    -7px 0 0 -2px currentColor, 7px 0 0 -2px currentColor,
    -5px -5px 0 -3px currentColor, 5px -5px 0 -3px currentColor,
    -5px 5px 0 -3px currentColor, 5px 5px 0 -3px currentColor;
}

/* ========================================================================
   BUTTONS
   ======================================================================== */
.btn {
  font-family: var(--sans); font-weight: 500; font-size: 14px;
  padding: 11px 20px; border-radius: 6px;
  border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
  line-height: 1;
  transition: all 0.15s var(--ease);
}
.btn-primary {
  background: var(--coral);
  color: var(--btn-ink);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--coral-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px var(--coral-ring);
}
.btn-secondary {
  background: transparent;
  color: var(--cream);
  border-color: var(--rule-2);
}
.btn-secondary:hover {
  border-color: var(--cream);
  background: var(--canvas-3);
}
.btn-ghost-sm {
  font-family: var(--mono); font-size: 12px;
  padding: 7px 12px; border-radius: 5px;
  color: var(--cream-2);
  border: 1px solid var(--rule-2);
  letter-spacing: 0.02em;
}
.btn-ghost-sm:hover {
  border-color: var(--coral);
  color: var(--coral);
}

/* ========================================================================
   HERO
   ======================================================================== */
.hero {
  position: relative;
  padding: 160px 0 120px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 30%, var(--coral-soft), transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 80%, var(--dusk-soft), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 80px;
  align-items: center;
}

.eyebrow {
  font-family: var(--mono); font-size: 11px;
  color: var(--coral);
  letter-spacing: 0.2em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.tick { width: 18px; height: 1px; background: var(--coral); }

.author-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.18s var(--ease);
}
.author-link:hover { opacity: 0.7; }
.author-link em { font-style: normal; }

.author-secondary {
  display: block;
  opacity: 0.55;
  margin-top: 2px;
  transition: opacity 0.18s var(--ease);
}
.author-secondary:hover { opacity: 0.85; }

.display {
  font-weight: 500;
  font-size: clamp(44px, 5.8vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--cream);
  margin-bottom: 36px;
  padding-bottom: 4px;
}
.display em { letter-spacing: -0.01em; line-height: 1; display: inline-block; padding-bottom: 0.08em; }

.lede {
  font-size: 18px;
  font-weight: 300;
  color: var(--cream-2);
  line-height: 1.55;
  max-width: 480px;
  margin-bottom: 40px;
}

.ctas {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 18px;
}

.hero-aside {
  margin-bottom: 46px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
  letter-spacing: 0.04em;
}
.hero-aside a {
  color: var(--coral);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.18s var(--ease);
}
.hero-aside a:hover { opacity: 0.7; }

.hero-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  max-width: 480px;
}
.hero-meta > div { display: flex; flex-direction: column; gap: 4px; }
.hero-meta dt {
  font-family: var(--mono); font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.16em; text-transform: uppercase;
}
.hero-meta dd {
  font-weight: 500; font-size: 20px;
  color: var(--cream);
  letter-spacing: -0.01em;
}

/* Hero art */
.hero-art {
  display: flex; flex-direction: column; gap: 16px;
}
.hero-art-frame {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--canvas-2);
  box-shadow: var(--shadow-card);
}
.hero-art-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.03) saturate(0.98);
  transition: filter 0.4s var(--ease);
}
[data-theme="light"] .hero-art-frame img {
  filter: contrast(1.02) saturate(0.96) brightness(1.02);
}
.art-corner {
  position: absolute; width: 20px; height: 20px;
  border: 1.5px solid var(--coral);
  opacity: 0.75;
}
.art-corner.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.art-corner.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.art-corner.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.art-corner.br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.hero-art figcaption {
  display: flex; justify-content: flex-start; align-items: baseline; gap: 16px;
  padding-top: 12px;
}
.fc-title-lg {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--cream);
  line-height: 1.3;
}
.fc-title-lg em { color: var(--coral); font-size: 1em; }

/* Hero scroll indicator */
.hero-scroll {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.2em; text-transform: uppercase;
  z-index: 1;
}
.scroll-line {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, var(--coral), transparent);
  animation: scroll-drift 2.4s var(--ease) infinite;
}
@keyframes scroll-drift {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ========================================================================
   SECTION SCAFFOLD
   ======================================================================== */
.section {
  padding: 120px 0;
  border-top: 1px solid var(--rule);
  position: relative;
}

.section-head { margin-bottom: 64px; max-width: 820px; }
.section-num {
  font-family: var(--mono); font-size: 11px;
  color: var(--coral);
  letter-spacing: 0.22em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
}
.section-kind { color: var(--dim); margin-left: 4px; }
.section-kind::before { content: "·"; margin-right: 14px; color: var(--ghost); }
.section-title {
  font-weight: 500;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--cream);
  margin-bottom: 20px;
  text-wrap: balance;
}
.section-lede {
  font-size: 17px; font-weight: 300;
  color: var(--cream-2);
  line-height: 1.55;
  max-width: 620px;
}

.mono-inline {
  font-family: var(--mono); font-size: 0.9em;
  color: var(--dusk);
  padding: 1px 6px;
  background: var(--dusk-soft);
  border-radius: 3px;
}

/* ========================================================================
   IDEA — narrative + flow diagram
   ======================================================================== */
.idea-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.idea-copy p {
  font-size: 18px;
  font-weight: 300;
  color: var(--cream-2);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 520px;
}
.idea-copy p:first-child {
  font-size: 22px;
  color: var(--cream);
  font-weight: 400;
}
.idea-copy p:last-child { margin-bottom: 0; }

.idea-diagram {
  background: var(--canvas-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 24px;
  aspect-ratio: 5/4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flow { width: 100%; height: auto; }
.flow-label, .flow-tick {
  font-family: var(--mono); font-size: 10px;
  fill: var(--dim); letter-spacing: 0.12em;
}
.flow-tick { fill: var(--moss); font-size: 14px; letter-spacing: 0; }
.flow-sub {
  font-family: var(--mono); font-size: 9px;
  fill: var(--dim); letter-spacing: 0.18em; text-transform: uppercase;
}
.flow-caption {
  font-family: var(--italic); font-style: italic;
  font-size: 14px; fill: var(--cream-2);
}
.flow-it { fill: var(--coral); }

.flow-arrow {
  stroke: var(--rule-2);
  stroke-width: 1;
  fill: none;
  marker-end: none;
  position: relative;
}
.flow-node { transition: opacity 0.6s var(--ease); }

/* Idea diagram animation: staged reveal + animated flow line */
.idea-diagram.is-in .flow-node[data-step="1"] { animation: flow-in 0.5s var(--ease) 0.0s both; }
.idea-diagram.is-in .flow-node[data-step="2"] { animation: flow-in 0.5s var(--ease) 0.6s both; }
.idea-diagram.is-in .flow-node[data-step="3"] { animation: flow-in 0.5s var(--ease) 1.4s both; }
.idea-diagram.is-in .flow-node[data-step="4"] { animation: flow-in 0.5s var(--ease) 2.0s both; }
.idea-diagram .flow-node { opacity: 0; }
@keyframes flow-in {
  to { opacity: 1; }
}

.idea-diagram .flow-arrow {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
}
/* Fanout (6 decompose arrows) animate in staggered */
.idea-diagram.is-in .flow-arrow.flow-fan:nth-of-type(1) { animation: dash-in 0.5s var(--ease) 0.3s forwards; }
.idea-diagram.is-in .flow-arrow.flow-fan:nth-of-type(2) { animation: dash-in 0.5s var(--ease) 0.38s forwards; }
.idea-diagram.is-in .flow-arrow.flow-fan:nth-of-type(3) { animation: dash-in 0.5s var(--ease) 0.46s forwards; }
.idea-diagram.is-in .flow-arrow.flow-fan:nth-of-type(4) { animation: dash-in 0.5s var(--ease) 0.54s forwards; }
.idea-diagram.is-in .flow-arrow.flow-fan:nth-of-type(5) { animation: dash-in 0.5s var(--ease) 0.62s forwards; }
.idea-diagram.is-in .flow-arrow.flow-fan:nth-of-type(6) { animation: dash-in 0.5s var(--ease) 0.70s forwards; }
/* Remaining arrows (verify fan-in + oracle→delivery) */
.idea-diagram.is-in .flow-arrow:not(.flow-fan) { animation: dash-in 0.5s var(--ease) 1.2s forwards; }
@keyframes dash-in { to { stroke-dashoffset: 0; } }

/* Phase chips */
.phase-chip rect { transition: fill 0.3s var(--ease); }
.idea-diagram .phase-chip.is-active rect {
  filter: drop-shadow(0 0 6px var(--coral-ring));
}

.pulse-dot { transform-origin: center; transform-box: fill-box; animation: pulse-dot 2.4s var(--ease) infinite; }
@keyframes pulse-dot {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* ========================================================================
   PIPELINE
   ======================================================================== */
.section-pipeline { background: var(--canvas-2); border-top: 1px solid var(--rule); }

.pipeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 48px;
}

.phase {
  background: var(--canvas);
  padding: 28px 22px 24px;
  min-height: 260px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
  transition: background 0.3s var(--ease);
}
.phase:hover { background: var(--canvas-3); }

.phase-head {
  display: flex; justify-content: space-between; align-items: center;
}
.phase-num {
  font-family: var(--mono); font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.2em;
}
.phase-kind {
  font-family: var(--mono); font-size: 9px;
  padding: 3px 8px; border-radius: 3px;
  letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 6px;
}
.phase-auto {
  color: var(--cream-2);
  border-color: var(--rule-2);
}
.phase-human {
  color: var(--dusk);
  background: var(--dusk-soft);
  border-color: var(--dusk-ring);
}
.loop {
  font-family: var(--italic); font-style: italic;
  font-size: 11px; color: var(--coral);
  letter-spacing: 0;
  text-transform: none;
  margin-left: 2px;
}

.phase-name {
  font-weight: 500; font-size: 24px;
  color: var(--cream);
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.phase-body {
  font-size: 13px; font-weight: 300;
  color: var(--cream-2);
  line-height: 1.5;
  flex: 1;
}
.phase-tag {
  font-family: var(--mono); font-size: 9px;
  color: var(--ghost);
  letter-spacing: 0.12em;
  padding-top: 10px;
  border-top: 1px dashed var(--rule);
}

/* Active phase (phase 04) */
.phase-active {
  background: var(--canvas-3);
}
.phase-active::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--coral);
}
.phase-glow {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 40%;
  background: radial-gradient(ellipse at 50% 100%, var(--coral-soft), transparent 70%);
  pointer-events: none;
  animation: glow-breathe 3.2s var(--ease) infinite;
}
@keyframes glow-breathe {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.pipeline-note {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 20px 24px;
  background: var(--canvas);
  border: 1px solid var(--rule);
  border-radius: 8px;
  max-width: 720px;
}
.note-glyph {
  font-family: var(--mono); font-size: 20px;
  color: var(--coral);
  line-height: 1;
  animation: rotate 4s linear infinite;
  display: inline-block;
}
@keyframes rotate { to { transform: rotate(360deg); } }
.pipeline-note span:last-child {
  font-size: 14px; font-weight: 300;
  color: var(--cream-2);
  line-height: 1.55;
}

/* ========================================================================
   ORACLE & MEMORY (split)
   ======================================================================== */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.split-card {
  background: var(--canvas-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 32px 36px;
  display: flex; flex-direction: column;
  min-height: 440px;
}

.split-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.split-kind {
  font-family: var(--mono); font-size: 11px;
  color: var(--coral);
  letter-spacing: 0.2em; text-transform: uppercase;
}
.split-title {
  font-weight: 500; font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 28px;
}
.split-foot {
  font-size: 14px; font-weight: 300;
  color: var(--cream-2);
  line-height: 1.55;
  padding-top: 20px;
  margin-top: auto;
  border-top: 1px solid var(--rule);
}

/* Badges */
.badge {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em;
  padding: 5px 10px; border-radius: 3px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent;
  transition: all 0.3s var(--ease);
}
.b-coral { background: var(--coral-soft); color: var(--coral); border-color: var(--coral-ring); }
.b-dusk { background: var(--dusk-soft); color: var(--dusk); border-color: var(--dusk-ring); }
.b-moss { background: var(--moss-soft); color: var(--moss); border-color: var(--moss-ring); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Oracle card */
.metric-line {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 32px;
}
.metric-num {
  font-family: var(--sans); font-weight: 500;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}
.metric-caption {
  font-family: var(--mono); font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.16em; text-transform: uppercase;
}

.oracle-intro {
  font-size: 14px; font-weight: 300;
  color: var(--cream-2);
  line-height: 1.55;
  margin-bottom: 24px;
}
.oracle-intro em { font-size: 14px; }

.oracle-checks { display: flex; flex-direction: column; gap: 10px; }
.oracle-checks li {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--canvas);
  border: 1px solid var(--rule);
  border-radius: 6px;
  transition: all 0.3s var(--ease);
}
.check-tier {
  font-family: var(--mono); font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.18em; text-transform: uppercase;
}
.check-name { font-size: 14px; color: var(--cream); }
.check-state {
  font-family: var(--mono); font-size: 10px;
  padding: 3px 9px;
  border-radius: 3px;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: all 0.4s var(--ease);
  background: var(--canvas-3);
  color: var(--dim);
}
.check-state[data-state="pending"] { color: var(--dim); }
.check-state[data-state="pass"] {
  background: var(--moss-soft);
  color: var(--moss);
  border: 1px solid var(--moss-ring);
  padding: 2px 8px;
}

/* Memory card */
.memory-stream {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 32px;
  min-height: 232px;
  counter-reset: mem;
}
.mem-line {
  display: grid;
  grid-template-columns: 52px 88px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  background: var(--canvas);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--rule-2);
  border-radius: 4px;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), border-left-color 0.3s var(--ease);
}
.mem-line.is-in { opacity: 1; transform: translateX(0); }
.mem-stamp {
  font-family: var(--mono); font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.08em;
}
.mem-kind {
  font-family: var(--mono); font-size: 9px;
  padding: 3px 7px; border-radius: 3px;
  letter-spacing: 0.16em; text-transform: uppercase;
  text-align: center;
  border: 1px solid transparent;
}
.mem-decision { background: var(--dusk-soft); color: var(--dusk); border-color: var(--dusk-ring); }
.mem-gate { background: var(--moss-soft); color: var(--moss); border-color: var(--moss-ring); }
.mem-error { background: oklch(0.65 0.18 25 / 0.14); color: oklch(0.70 0.18 25); border-color: oklch(0.65 0.18 25 / 0.3); }
.mem-prior { background: var(--coral-soft); color: var(--coral); border-color: var(--coral-ring); }
.mem-shield { background: var(--moss-soft); color: var(--moss); border-color: var(--moss-ring); }
.mem-resume { background: var(--coral-soft); color: var(--coral); border-color: var(--coral-ring); }
.mem-text { font-size: 13px; color: var(--cream-2); }
.mem-text em { font-size: 13px; }

.mem-line[data-t="2"] { border-left-color: oklch(0.65 0.18 25 / 0.6); }
.mem-line[data-t="3"] { border-left-color: var(--coral); }
.mem-line[data-t="4"] { border-left-color: var(--coral); }

/* ========================================================================
   TMUX STAGE · authentic tmux capture look
   Real ANSI palette · tight monospace · dense text · green status bar
   ======================================================================== */
.section-team { background: var(--canvas-2); }

.tmux-stage {
  background: #181818;
  border: 1px solid #2A2A2A;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
  font-family: "JetBrains Mono", "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 11.5px;
  line-height: 1.45;
  color: #C5C8C6;
}
[data-theme="light"] .tmux-stage {
  box-shadow: 0 30px 60px -30px rgba(26, 23, 18, 0.3);
}

/* Window bar at the top — looks like the tmux window list */
.tmux-winbar {
  display: flex; align-items: center; gap: 0;
  background: #0F0F0F;
  border-bottom: 1px solid #2A2A2A;
  padding: 0 8px;
  font-size: 11px;
  color: #7A7A7A;
  overflow: hidden;
  white-space: nowrap;
  min-height: 26px;
}
.wb-session {
  color: #98C379; /* tmux green */
  padding: 5px 10px 5px 4px;
  font-weight: 500;
}
.wb-tab {
  padding: 5px 10px;
  color: #7A7A7A;
  flex-shrink: 0;
}
.wb-tab-active {
  color: #E0E0E0;
  background: #262626;
}
.wb-sep { color: #5A5A5A; margin-left: 2px; }
.wb-host {
  margin-left: auto;
  padding: 5px 10px;
  color: #5A5A5A;
  font-size: 10.5px;
  flex-shrink: 0;
}

/* Two-pane split — left lead, right stacked agents */
.tmux-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 620px;
  max-height: 680px;
}
.tmux-pane { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.tmux-pane + .tmux-pane { border-left: 1px solid #2A2A2A; }

/* Pane header — small bar above each pane / agent box */
.pane-head {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: #141414;
  border-bottom: 1px solid #2A2A2A;
  font-size: 10.5px;
  flex-shrink: 0;
}
.ph-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #E5C07B;
  box-shadow: 0 0 6px rgba(229, 192, 123, 0.5);
  animation: term-blink 1.6s steps(2) infinite;
}
.ph-dot-blue { background: #61AFEF; box-shadow: 0 0 6px rgba(97, 175, 239, 0.5); }
.ph-dot-green { background: #98C379; box-shadow: 0 0 6px rgba(152, 195, 121, 0.5); animation: none; }
.ph-dot-dim { background: #3A3A3A; box-shadow: none; animation: none; }
.ph-name {
  color: #E0E0E0;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.ph-meta {
  margin-left: auto;
  color: #5A5A5A;
  font-size: 10px;
}

/* Lead pane body (scrolling stream) */
.tmux-lead { display: flex; flex-direction: column; }
.pane-body {
  padding: 10px 14px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.pane-body::-webkit-scrollbar { width: 6px; }
.pane-body::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* Chat input docked at the bottom of the lead pane */
.pane-chat {
  border-top: 1px solid #2A2A2A;
  background: #141414;
  padding: 10px 14px 12px;
  flex-shrink: 0;
}
.chat-prompt {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 10px;
  background: #0F0F0F;
  border: 1px solid #2A2A2A;
  border-radius: 4px;
  font-size: 11.5px;
}
.chat-placeholder { color: #4A4A4A; flex: 1; }
.chat-hints {
  display: flex; gap: 8px;
  margin-top: 6px;
  font-size: 10px;
  color: #5A5A5A;
  flex-wrap: wrap;
}

/* Right pane — stacked agent boxes */
.tmux-right {
  display: flex; flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.agent-box {
  display: flex; flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  border-bottom: 1px solid #2A2A2A;
  overflow: hidden;
}
.agent-box:last-child { border-bottom: none; }
.agent-box.agent-active { flex: 1.3 1 0; }
.agent-box.agent-idle { flex: 0.55 1 0; opacity: 0.65; }
.agent-body {
  padding: 8px 14px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.agent-body::-webkit-scrollbar { width: 6px; }
.agent-body::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.agent-idle .agent-body { padding: 10px 14px; }

/* Individual lines: very tight, no animations, reads like captured text */
.tmx-line {
  padding: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.tmx-line.t-header {
  color: #E0E0E0;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px dashed #2A2A2A;
}
.tmx-line.t-out { color: #C5C8C6; }

/* ANSI-style accent colors */
.t-g, .tmx-line.t-g { color: #98C379; }       /* green */
.t-y, .tmx-line.t-y { color: #E5C07B; }       /* yellow */
.t-b, .tmx-line.t-b { color: #61AFEF; }       /* blue */
.t-r, .tmx-line.t-r { color: #E06C75; }       /* red */
.t-m, .tmx-line.t-m { color: #C678DD; }       /* magenta */
.t-p, .tmx-line.t-p { color: #D19A66; }       /* orange/purple-ish */
.t-dim { color: #5A5A5A; }

/* Highlighted label blocks like "> research-scout" and "●●● ok-engineer" */
.t-b-block {
  background: #61AFEF;
  color: #181818;
  padding: 1px 8px;
  border-radius: 2px;
  font-weight: 500;
}
.t-g-block {
  background: #98C379;
  color: #181818;
  padding: 1px 8px;
  border-radius: 2px;
  font-weight: 500;
}

/* Cursor line with caret */
.t-cursor { display: flex; align-items: baseline; gap: 8px; padding-top: 6px; }
.t-caret {
  display: inline-block;
  width: 7px; height: 13px;
  background: #C5C8C6;
  margin-left: 4px;
  animation: term-blink 1s steps(1) infinite;
}
@keyframes term-blink { 50% { opacity: 0; } }

/* Footer rows inside the lead pane (the hint lines) */
.t-footer, .t-footer2, .t-footer3 {
  margin-top: 4px;
  font-size: 10.5px;
  color: #5A5A5A;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.t-footer3 { color: #5A5A5A; }

/* Green tmux status bar at the bottom */
.tmux-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 10px;
  background: #98C379;
  color: #0F0F0F;
  font-size: 10.5px;
  font-family: inherit;
  letter-spacing: 0;
  border-top: 1px solid #2A2A2A;
}
.ts-left { display: flex; gap: 8px; }
.ts-right { display: flex; gap: 10px; align-items: center; }
.ts-dim { color: #3B5A26; }
.ts-clock { font-weight: 500; }

.tmux-caption {
  margin-top: 24px;
  font-size: 15px;
  font-weight: 300;
  color: var(--cream-2);
  line-height: 1.6;
  max-width: 820px;
}
.tmux-caption em { font-size: 15px; }

@media (max-width: 900px) {
  .tmux-split { grid-template-columns: 1fr; max-height: none; min-height: 0; }
  .tmux-pane + .tmux-pane { border-left: none; border-top: 1px solid #2A2A2A; }
  .tmux-winbar { font-size: 10px; }
  .tmux-winbar .wb-tab:nth-child(n+5) { display: none; }
}

/* ========================================================================
   HANDOFF — what you give / what you get
   ======================================================================== */
.section-handoff { background: var(--canvas-2); }

.handoff-grid {
  display: grid;
  grid-template-columns: 1fr 200px 1fr;
  gap: 0;
  align-items: stretch;
  margin-top: 8px;
}

.handoff-col {
  background: var(--canvas);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 28px 28px 32px;
  min-height: 380px;
}
.handoff-out { border-color: var(--coral-ring); }

.hc-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
  margin-bottom: 22px;
}
.hc-kind {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream);
}
.hc-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}
.handoff-out .hc-kind { color: var(--coral); }

.hc-list { display: flex; flex-direction: column; gap: 18px; }
.hc-list li {
  display: flex; flex-direction: column; gap: 4px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--rule);
}
.hc-list li:last-child { border-bottom: none; padding-bottom: 0; }
.hc-name {
  font-size: 17px;
  font-weight: 500;
  color: var(--cream);
}
.hc-note {
  font-size: 14px;
  font-weight: 300;
  color: var(--cream-2);
  line-height: 1.45;
}
.hc-note em { font-size: 1em; }

.handoff-engine {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  padding: 0 12px;
  position: relative;
}
.he-pulse {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px var(--coral-soft), 0 0 24px 4px var(--coral-ring);
  animation: he-pulse 2.4s var(--ease) infinite;
}
@keyframes he-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}
.he-label {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.he-label em { font-size: 1em; }
.he-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--dim);
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
  max-width: 180px;
}
.he-flow { width: 100%; height: 12px; opacity: 0.6; }

@media (max-width: 900px) {
  .handoff-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .handoff-engine { padding: 24px 0; min-height: 100px; }
  .he-flow { display: none; }
}

/* ========================================================================
   TEAM DIAGRAM — peer-to-peer multi-agent topology
   ======================================================================== */
.team-diagram {
  margin: 36px 0 18px;
  padding: 28px 24px;
  background: var(--canvas-3);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow-x: auto;
}
.team-svg { width: 100%; height: auto; min-width: 720px; }

.td-label {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  fill: var(--cream);
  letter-spacing: -0.01em;
}
.td-label-lg { font-size: 15px; }
.td-sub {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  fill: var(--dim);
}
.td-edge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--dim);
}
.td-edge-it {
  font-family: var(--italic);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  fill: var(--coral);
}

.td-arrow {
  stroke: var(--rule-2);
  stroke-width: 1;
  fill: none;
}
.td-claim {
  stroke: var(--dusk);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.7;
}

.td-peer path {
  stroke: var(--coral);
  stroke-width: 1.4;
  fill: none;
  marker-end: none;
}

.team-diagram-note {
  margin: 18px auto 0;
  font-size: 15px;
  font-weight: 300;
  color: var(--cream-2);
  line-height: 1.6;
  max-width: 720px;
  text-align: center;
}
.team-diagram-note em { font-size: 1em; }

.section-subhead {
  margin: 56px 0 24px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.section-subtitle {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 8px;
}
.section-subtitle em { font-size: 1em; }
.section-sublede {
  font-size: 15px;
  font-weight: 300;
  color: var(--cream-2);
  line-height: 1.55;
  max-width: 620px;
}

/* ========================================================================
   COMPARISON
   ======================================================================== */
.compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}
.col {
  background: var(--canvas-2);
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 20px;
  transition: background 0.3s var(--ease);
}
.col-feat {
  background: var(--canvas-3);
  position: relative;
}
.col-feat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--coral);
}
.col-kind {
  font-family: var(--mono); font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.2em; text-transform: uppercase;
}
.col-feat .col-kind { color: var(--coral); }
.col-name {
  font-weight: 500; font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--cream);
  line-height: 1.15;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.col-name em { font-size: 22px; }
.col-list { display: flex; flex-direction: column; gap: 18px; }
.col-list li {
  display: flex; flex-direction: column; gap: 4px;
}
.col-list li span {
  font-family: var(--mono); font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.16em; text-transform: uppercase;
}
.col-list li em {
  font-family: var(--italic); font-style: italic; font-weight: 400;
  font-size: 16px;
  color: var(--cream-2);
  letter-spacing: -0.005em;
}
.col-feat .col-list li em { color: var(--cream); }
.col-feat .col-list li em em,
.col-feat .col-list li em .nobreak { color: var(--coral); }
.nobreak { white-space: nowrap; }

/* ========================================================================
   QUICK START · TERMINAL
   ======================================================================== */
.section-start { border-top: 1px solid var(--rule); }

.terminal {
  background: #0A0907;
  border: 1px solid var(--rule-2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
  max-width: 860px;
}
[data-theme="light"] .terminal {
  box-shadow: 0 30px 60px -30px rgba(26, 23, 18, 0.3);
}

.term-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: #111;
  border-bottom: 1px solid #2A241C;
}
.dot-r, .dot-y, .dot-g {
  width: 11px; height: 11px; border-radius: 50%;
}
.dot-r { background: #FF5F57; }
.dot-y { background: #FEBC2E; }
.dot-g { background: #28C840; }
.term-title {
  font-family: var(--mono); font-size: 11px;
  color: #857D6B;
  margin-left: auto;
  margin-right: auto;
}
.copy-btn {
  font-family: var(--mono); font-size: 10px;
  padding: 5px 10px;
  color: #857D6B;
  border: 1px solid #2A241C;
  border-radius: 4px;
  letter-spacing: 0.14em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s var(--ease);
}
.copy-btn:hover { color: oklch(0.74 0.14 35); border-color: oklch(0.74 0.14 35); }
.copy-btn.copied { color: oklch(0.62 0.08 150); border-color: oklch(0.62 0.08 150); }

.term-body {
  font-family: var(--mono); font-size: 13px;
  padding: 24px 28px;
  color: #C8C0AE;
  line-height: 1.8;
  overflow-x: auto;
  white-space: pre;
}
.term-cmt { color: #4E4738; }
.term-prompt { color: oklch(0.74 0.14 35); margin-right: 4px; }
.term-cmd { color: #EBE3D2; }
.term-arg { color: oklch(0.70 0.10 245); }
.term-out-dim { color: #6B6254; display: block; }
.term-pass { color: oklch(0.62 0.08 150); }
.term-wait { color: oklch(0.78 0.13 70); }
.caret {
  display: inline-block;
  color: oklch(0.74 0.14 35);
  animation: blink 1s steps(1) infinite;
  margin-left: 2px;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ========================================================================
   FOOTER
   ======================================================================== */
.footer {
  border-top: 1px solid var(--rule);
  padding: 80px 0 40px;
  background: var(--canvas-2);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule);
}
.footer-brand {
  display: flex; gap: 16px; align-items: flex-start;
}
.mark-lg { width: 40px; height: 40px; display: block; flex-shrink: 0; }
.footer-wordmark {
  font-weight: 500; font-size: 20px;
  letter-spacing: -0.015em;
  color: var(--cream);
  margin-bottom: 4px;
}
.footer-wordmark em { font-size: 20px; }
.footer-tag {
  font-size: 14px;
  color: var(--dim);
  line-height: 1.5;
  max-width: 280px;
}
.footer-tag em { font-size: 14px; color: var(--coral); }

.footer-meta { display: flex; flex-direction: column; gap: 10px; }
.fm-row {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--rule);
}
.fm-row span {
  color: var(--dim);
  letter-spacing: 0.14em; text-transform: uppercase;
}
.fm-row strong, .fm-row a {
  font-weight: 500; color: var(--cream);
  letter-spacing: 0;
}
.fm-row a:hover { color: var(--coral); }

.footer-links {
  display: flex; flex-direction: column; gap: 8px;
  align-self: start;
}
.footer-links a {
  font-size: 13px;
  color: var(--cream-2);
  padding: 4px 0;
  transition: color 0.15s var(--ease);
}
.footer-links a:hover { color: var(--coral); }

.footer-bottom {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.16em; text-transform: uppercase;
  padding-top: 32px;
}

/* ========================================================================
   REVEAL · scroll-triggered motion
   ======================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal[data-delay] { transition-delay: calc(var(--delay, 0) * 1ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ========================================================================
   MOBILE NAV — hamburger + slide-in drawer
   ======================================================================== */
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 6px;
  border: 1px solid var(--rule-2);
  align-items: center; justify-content: center;
  flex-direction: column;
  gap: 4px;
  color: var(--cream-2);
  transition: all 0.2s var(--ease);
  flex-shrink: 0;
}
.nav-burger:hover { border-color: var(--coral); color: var(--coral); }
.burger-line {
  width: 16px; height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
  transform-origin: center;
}
.nav-burger.is-open .burger-line:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.nav-burger.is-open .burger-line:nth-child(2) { opacity: 0; }
.nav-burger.is-open .burger-line:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.mobile-drawer {
  position: fixed; inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.32s;
}
.mobile-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s linear 0s;
}
.md-scrim {
  position: absolute; inset: 0;
  background: color-mix(in oklab, var(--canvas) 70%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.mobile-drawer.is-open .md-scrim { opacity: 1; }

.md-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(86vw, 360px);
  background: var(--canvas);
  border-left: 1px solid var(--rule);
  display: flex; flex-direction: column;
  padding: 20px 22px 24px;
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
  box-shadow: -20px 0 50px -20px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
}
.mobile-drawer.is-open .md-panel { transform: translateX(0); }

.md-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 12px;
}
.md-kind {
  font-family: var(--mono); font-size: 11px;
  color: var(--coral);
  letter-spacing: 0.2em; text-transform: uppercase;
}
.md-close {
  width: 36px; height: 36px;
  border-radius: 6px;
  border: 1px solid var(--rule-2);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--cream-2);
  transition: all 0.2s var(--ease);
}
.md-close:hover { color: var(--coral); border-color: var(--coral); }

.md-links { display: flex; flex-direction: column; flex: 1; }
.md-link {
  display: flex; align-items: baseline; gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px dashed var(--rule);
  color: var(--cream);
  transition: color 0.15s var(--ease), padding-left 0.2s var(--ease);
}
.md-link:hover, .md-link:focus-visible {
  color: var(--coral);
  padding-left: 8px;
}
.md-num {
  font-family: var(--mono); font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.18em;
  min-width: 24px;
}
.md-link:hover .md-num, .md-link:focus-visible .md-num { color: var(--coral); }
.md-label {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.015em;
}

.md-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid var(--rule);
  gap: 12px;
}
.md-version {
  font-family: var(--mono); font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.16em; text-transform: uppercase;
}

/* ========================================================================
   RESPONSIVE — tablet and mobile
   ======================================================================== */

/* Tablet — ≤1024px (small laptops, large tablets) */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .nav-inner { padding: 0 32px; }
  .nav-right { gap: 18px; }
  .hero-inner { gap: 56px; }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .pipeline .phase:nth-child(-n+3) { border-bottom: 1px solid var(--rule); }
}

/* Tablet portrait — ≤900px (collapse columns, show hamburger) */
@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .nav-inner { padding: 0 24px; }

  /* Nav: hide desktop links, show burger */
  .nav-link { display: none; }
  .nav-github { display: none; }
  .nav-docs { display: none; }
  .nav-discord { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-right { gap: 10px; }

  /* Hero */
  .hero { padding: 116px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-scroll { display: none; }
  .display { font-size: clamp(38px, 9vw, 56px); margin-bottom: 28px; }
  .lede { font-size: 17px; margin-bottom: 32px; max-width: 100%; }
  .ctas { margin-bottom: 48px; }
  .hero-art-frame { aspect-ratio: 4/3; }

  /* Sections */
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .section-title { font-size: clamp(30px, 5.4vw, 44px); }
  .section-lede { font-size: 16px; }

  /* Idea */
  .idea-grid { grid-template-columns: 1fr; gap: 36px; }
  .idea-copy p { max-width: 100%; }
  .idea-copy p:first-child { font-size: 20px; }
  .idea-diagram { aspect-ratio: auto; padding: 20px 16px; }

  /* Pipeline */
  .pipeline { grid-template-columns: 1fr 1fr; }
  .phase { min-height: 220px; padding: 24px 20px; }
  .phase:nth-child(-n+4) { border-bottom: 1px solid var(--rule); }

  /* Oracle / memory */
  .split-grid { grid-template-columns: 1fr; gap: 16px; }
  .split-card { padding: 26px 24px; min-height: auto; }
  .split-title { font-size: 24px; margin-bottom: 22px; }

  /* Compare */
  .compare { grid-template-columns: 1fr; }
  .col { padding: 26px 24px; }

  /* Footer */
  .footer { padding: 64px 0 32px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; padding-bottom: 36px; }
  .footer-links { flex-direction: row; flex-wrap: wrap; gap: 16px 20px; }
  .footer-bottom { padding-top: 24px; }
}

/* Mobile — ≤640px (phones) */
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
  .nav { padding: 12px 0; }
  .wordmark, .wordmark em { font-size: 14px; }
  .brand .mark { width: 20px; height: 20px; }

  /* Hero */
  .hero { padding: 96px 0 56px; }
  .hero-inner { gap: 36px; }
  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.16em;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 10px;
    line-height: 1.5;
  }
  .display { font-size: clamp(34px, 10vw, 46px); margin-bottom: 22px; line-height: 1.05; }
  .lede { font-size: 16px; line-height: 1.55; margin-bottom: 28px; }

  /* CTAs — stack full-width */
  .ctas {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 40px;
  }
  .btn { padding: 13px 18px; font-size: 14px; justify-content: center; }
  .btn-primary, .btn-secondary { width: 100%; }

  .hero-meta {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 16px;
    padding-top: 20px;
    max-width: 100%;
  }
  .hero-meta dd { font-size: 18px; }
  .fc-title-lg { font-size: 18px; }

  /* Sections */
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .section-num {
    font-size: 10px;
    letter-spacing: 0.18em;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
  }
  .section-kind::before { margin-right: 8px; }
  .section-title { font-size: clamp(28px, 6.8vw, 36px); margin-bottom: 16px; }
  .section-lede { font-size: 15px; }

  /* Idea diagram — make SVG render fully (it has its own viewBox) */
  .idea-copy p { font-size: 16px; }
  .idea-copy p:first-child { font-size: 18px; }
  .idea-diagram { padding: 18px 12px; }

  /* Handoff — center the engine on mobile */
  .handoff-grid { gap: 14px; }
  .handoff-col { padding: 22px 20px 26px; min-height: auto; }
  .hc-name { font-size: 16px; }
  .hc-note { font-size: 13px; }
  .handoff-engine { padding: 18px 0; min-height: 80px; }

  /* Pipeline — single column on phones */
  .pipeline { grid-template-columns: 1fr; }
  .phase { min-height: auto; padding: 22px 20px; }
  .phase:not(:last-child) { border-bottom: 1px solid var(--rule); }
  .phase-name { font-size: 22px; }

  .pipeline-note {
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px;
  }

  /* Oracle / memory */
  .split-card { padding: 22px 20px; }
  .split-title { font-size: 22px; margin-bottom: 18px; }
  .oracle-checks li {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    padding: 10px 12px;
  }
  .check-tier {
    grid-column: 1 / -1;
    font-size: 8.5px;
    margin-bottom: 2px;
  }
  .check-name { font-size: 13px; grid-column: 1; }
  .check-state { grid-column: 2; grid-row: 2; }

  .memory-stream { gap: 8px; min-height: 0; }
  .mem-line {
    grid-template-columns: 50px 1fr;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    padding: 10px 12px;
  }
  .mem-stamp { grid-column: 1; grid-row: 1; font-size: 9.5px; }
  .mem-kind {
    grid-column: 2; grid-row: 1;
    justify-self: start;
    font-size: 8.5px;
    padding: 2px 6px;
  }
  .mem-text {
    grid-column: 1 / -1; grid-row: 2;
    font-size: 12.5px;
    line-height: 1.45;
  }
  .mem-text em { font-size: 12.5px; }

  /* Team diagram — let it scroll horizontally with hint */
  .team-diagram {
    margin: 28px -20px 14px;
    padding: 20px 16px;
    border-left: none;
    border-right: none;
    border-radius: 0;
    -webkit-overflow-scrolling: touch;
  }
  .team-svg { min-width: 640px; }
  .section-subhead { margin: 40px 0 20px; padding-top: 24px; }
  .section-subtitle { font-size: 22px; }
  .section-sublede { font-size: 14px; }

  /* Tmux stage — drop min-height, single col, smaller text */
  .tmux-stage { font-size: 10.5px; line-height: 1.5; }
  .tmux-split {
    grid-template-columns: 1fr;
    min-height: 0;
    max-height: none;
  }
  .tmux-pane + .tmux-pane { border-left: none; border-top: 1px solid #2A2A2A; }
  .tmux-lead .pane-body { max-height: 320px; }
  .agent-box { min-height: 110px; }
  .agent-box.agent-active { flex: none; min-height: 160px; }
  .agent-box.agent-idle { flex: none; min-height: 70px; }
  .pane-body, .agent-body { padding: 8px 12px; }
  .pane-chat { padding: 8px 12px 10px; }
  .ph-meta { display: none; }
  .pane-head { padding: 5px 10px; font-size: 10px; }
  /* Window bar — keep only first few tabs */
  .tmux-winbar { font-size: 9.5px; padding: 0 6px; min-height: 24px; }
  .tmux-winbar .wb-tab:nth-child(n+4) { display: none; }
  .tmux-winbar .wb-host { font-size: 9.5px; padding: 4px 6px; }
  .tmux-status { font-size: 9.5px; padding: 3px 8px; }
  .tmux-status .ts-dim { display: none; }
  .tmux-caption { font-size: 14px; margin-top: 18px; }
  .tmux-caption em { font-size: 14px; }

  /* Compare */
  .col { padding: 24px 22px; gap: 16px; }
  .col-name, .col-name em { font-size: 20px; }
  .col-list li em { font-size: 15px; }

  /* Quick start terminal */
  .terminal { border-radius: 8px; }
  .term-body {
    font-size: 11.5px;
    padding: 18px 16px;
    line-height: 1.7;
  }
  .term-title { font-size: 10px; }
  .copy-btn { font-size: 9px; padding: 4px 8px; }

  /* Footer */
  .footer-inner { gap: 28px; padding-bottom: 28px; }
  .footer-brand { gap: 14px; }
  .mark-lg { width: 36px; height: 36px; }
  .footer-wordmark, .footer-wordmark em { font-size: 18px; }
  .footer-tag, .footer-tag em { font-size: 13px; }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    font-size: 9.5px;
    letter-spacing: 0.12em;
  }
}

/* Small mobile — ≤400px (tight phones) */
@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .nav-inner { padding: 0 16px; }
  .display { font-size: 30px; letter-spacing: -0.02em; }
  .lede { font-size: 15px; }
  .section-title { font-size: 26px; }
  .hero-meta { grid-template-columns: 1fr 1fr; gap: 14px; }
  .hero-meta dd { font-size: 17px; }
  .col-name, .col-name em { font-size: 18px; }
  .term-body { font-size: 10.5px; padding: 14px 12px; }
  .team-diagram { margin-left: -16px; margin-right: -16px; padding: 16px 14px; }
}

/* Touch hints — make scrollable areas more obvious on touch */
@media (hover: none) and (pointer: coarse) {
  .team-diagram::after,
  .term-body::after { display: none; } /* placeholder, no-op */
  /* Make tap targets in nav comfy */
  .md-link { padding: 18px 4px; }
  .btn { min-height: 44px; }
  .theme-toggle, .nav-burger, .md-close { min-width: 40px; min-height: 40px; }
}

/* =====================================================================
   v2 additions — new opener sections (02 · 03 · 04)
   Tokens, .section, .section-head/title/lede, .reveal, .container etc
   come from the rules above — only the new visual classes live here.
   ===================================================================== */
    /* =====================================================================
       v2 additions — new opener sections (02 · 03 · 04)
       Tokens, .section, .section-head/title/lede, .reveal, .container etc
       all come from styles.css — only the new visual classes live here.
       ===================================================================== */

    .subhead {
      font-family: var(--mono); font-size: 10px; color: var(--dim);
      letter-spacing: 0.22em; text-transform: uppercase;
      margin: 0 0 18px;
      display: flex; align-items: center; gap: 12px;
    }
    .subhead::before { content: ""; width: 12px; height: 1px; background: var(--coral); }

    /* designer-note frame (kept subtle — used to mark new sections during review) */
    .v2-tag {
      display: inline-block;
      font-family: var(--mono); font-size: 9px; color: var(--coral);
      letter-spacing: 0.22em; text-transform: uppercase;
      padding: 4px 10px;
      border: 1px solid var(--coral);
      border-radius: 999px;
      margin-bottom: 18px;
    }

    /* ---------- Sculley diagram ---------- */
    .sculley-frame { background: var(--canvas-2); border: 1px solid var(--rule); border-radius: 10px; padding: 28px 28px 24px; margin-bottom: 14px; }
    .sculley { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: 88px 88px 88px; gap: 6px; margin-bottom: 18px; }
    .sk-box { background: var(--canvas); border: 1px solid var(--rule-2); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; position: relative; min-height: 0; overflow: hidden; }
    .sk-box .sk-label { font: 10px/1.2 var(--mono); color: var(--cream-2); letter-spacing: 0.16em; text-transform: uppercase; }
    .sk-stuff { display: flex; flex-direction: column; gap: 5px; }
    .sk-stuff i { display: block; height: 1px; background: var(--rule-2); }
    .sk-stuff i:nth-child(1) { width: 72%; }
    .sk-stuff i:nth-child(2) { width: 48%; }
    .sk-stuff i:nth-child(3) { width: 64%; }
    .sk-stuff i:nth-child(4) { width: 38%; }
    .sk-config   { grid-column: 1 / 3; grid-row: 1; }
    .sk-collect  { grid-column: 3 / 6; grid-row: 1; }
    .sk-verify   { grid-column: 6 / 8; grid-row: 1; }
    .sk-machine  { grid-column: 8 / 9; grid-row: 1 / 3; }
    .sk-feature  { grid-column: 1 / 4; grid-row: 2; }
    .sk-mlcode {
      grid-column: 4; grid-row: 2;
      background: var(--coral-soft); border-color: var(--coral);
      align-self: center; justify-self: center;
      width: 92px; min-height: 44px; padding: 8px 10px;
      box-shadow: 0 0 0 4px var(--canvas-2), 0 0 24px var(--coral-ring);
      z-index: 2;
    }
    .sk-mlcode .sk-label { color: var(--coral); font-weight: 500; }
    .sk-mlcode .sk-stuff i { background: oklch(0.74 0.14 35 / 0.4); }
    .sk-mlcode .sk-stuff i:nth-child(1) { width: 60%; }
    .sk-mlcode .sk-stuff i:nth-child(2) { width: 40%; }
    .sk-analysis { grid-column: 5 / 8; grid-row: 2; }
    .sk-serving  { grid-column: 1 / 5; grid-row: 3; }
    .sk-process  { grid-column: 5 / 7; grid-row: 3; }
    .sk-monitor  { grid-column: 7 / 9; grid-row: 3; }
    .sculley-cap { display: flex; justify-content: space-between; gap: 24px; font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 0.14em; text-transform: uppercase; padding-top: 14px; border-top: 1px dashed var(--rule); }
    .sculley-cap .cap-r { text-align: right; }
    .sculley-cap a { color: var(--cream-2); border-bottom: 1px solid var(--rule-2); }
    .sculley-cap a:hover { color: var(--coral); border-bottom-color: var(--coral); }
    .sculley-cap em { font-family: var(--italic); font-style: italic; color: var(--coral); font-size: 1.15em; line-height: 0.95; }

    /* ---------- 14-week timeline ---------- */
    .timeline { background: var(--canvas-2); border: 1px solid var(--rule); border-radius: 10px; padding: 28px 28px 22px; margin-bottom: 14px; }
    .tl-grid { display: grid; grid-template-columns: 124px 1fr; gap: 16px; align-items: center; }
    .tl-annot-row { display: grid; grid-template-columns: 124px 1fr; gap: 16px; margin-bottom: 4px; min-height: 36px; }
    .tl-annot-track { display: grid; grid-template-columns: repeat(10, 1fr); position: relative; align-items: end; }
    .tl-annot { grid-column: var(--col, 6) / span 1; position: relative; height: 36px; }
    .tl-annot-text { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 10px; color: var(--coral); letter-spacing: 0.06em; white-space: nowrap; }
    .tl-annot-line { position: absolute; bottom: 0; left: 50%; width: 1px; height: 12px; background: var(--coral); }
    .tl-row-label { font: 10px/1.3 var(--mono); color: var(--dim); letter-spacing: 0.18em; text-transform: uppercase; text-align: right; }
    .tl-bar { display: grid; grid-template-columns: repeat(10, 1fr); height: 44px; border-radius: 4px; overflow: hidden; border: 1px solid var(--rule); }
    .tl-seg { display: flex; align-items: center; padding: 0 12px; font: 10px/1 var(--mono); letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--canvas); position: relative; }
    .tl-seg:last-child { border-right: none; }
    .tl-seg-cool { background: var(--canvas-3); color: var(--cream-2); }
    .tl-seg-cool-2 { background: var(--canvas-3); color: var(--dim); }
    .tl-seg-coral { background: var(--coral-soft); color: var(--coral); border-right-color: oklch(0.74 0.14 35 / 0.06); }
    .tl-seg-coral.is-key { background: oklch(0.74 0.14 35 / 0.22); }
    .tl-seg-dim { background: var(--canvas-3); color: var(--ghost); }
    .tl-ticks { display: grid; grid-template-columns: repeat(10, 1fr); margin-top: 8px; border-top: 1px dashed var(--rule); padding-top: 8px; }
    .tl-tick { font: 9px/1 var(--mono); color: var(--ghost); text-align: center; letter-spacing: 0.1em; border-left: 1px solid transparent; }
    .tl-tick:nth-child(5n+1) { color: var(--dim); }
    .tl-tick.is-pivot { color: var(--coral); }
    /* — group bracket row (sits above the bar) — */
    .tl-groups-row { margin-bottom: 6px; }
    .tl-groups { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
    .tl-group { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; padding: 6px 10px 8px; border-bottom: 1px solid currentColor; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; opacity: .85; }
    .tl-group .tl-group-weeks { font-size: 9px; opacity: .7; letter-spacing: 0.14em; }
    .tl-group-cool { color: var(--cream-2); }
    .tl-group-coral { color: var(--coral); }
    .tl-group-dim { color: var(--ghost); justify-content: center; padding-left: 4px; padding-right: 4px; }

    .tl-legend { display: flex; gap: 24px; font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--rule); flex-wrap: wrap; }
    .tl-legend .lg-item { display: inline-flex; align-items: center; gap: 8px; }
    .tl-legend .lg-swatch { width: 14px; height: 8px; border-radius: 2px; border: 1px solid var(--rule-2); }
    .tl-legend .lg-swatch.cool  { background: var(--canvas-3); }
    .tl-legend .lg-swatch.coral { background: var(--coral-soft); border-color: var(--coral); }
    .tl-legend .lg-swatch.dim   { background: var(--canvas); border-color: var(--ghost); }

    /* ---------- task litany ---------- */
    .litany-frame { background: var(--canvas-2); border: 1px solid var(--rule); border-radius: 10px; padding: 24px 28px 8px; position: relative; overflow: hidden; margin-bottom: 14px; }
    .litany-label { font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
    .litany-label::before { content: ""; width: 12px; height: 1px; background: var(--coral); }
    .litany {
      font-family: var(--mono); font-size: 11.5px; line-height: 1.85;
      color: var(--dim); letter-spacing: 0.02em;
      max-height: 130px; overflow: hidden; position: relative;
      -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
      mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
      word-break: keep-all; margin-bottom: 12px;
    }
    .litany .l-sep { color: var(--ghost); margin: 0 6px; }
    .litany .l-end { color: var(--coral); margin-left: 6px; }

    /* ---------- citations ---------- */
    .cites { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; margin-top: 32px; }
    .cite { background: var(--canvas-2); padding: 22px 24px; }
    .cite .ct-quote { font-size: 14px; color: var(--cream); font-weight: 300; line-height: 1.5; margin-bottom: 14px; text-wrap: balance; }
    .cite .ct-quote .ct-num { font-family: var(--mono); font-weight: 500; font-size: 1.08em; color: var(--coral); }
    .cite .ct-source { font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 0.08em; display: flex; flex-direction: column; gap: 2px; }
    .cite .ct-source a { color: var(--cream-2); border-bottom: 1px solid var(--rule-2); }
    .cite .ct-source a:hover { color: var(--coral); border-bottom-color: var(--coral); }

    /* ---------- §03 lanes ---------- */
    .lanes-frame { background: var(--canvas-2); border: 1px solid var(--rule); border-radius: 10px; padding: 36px 32px 28px; }
    .lanes-grid { display: grid; grid-template-columns: 124px 1fr; gap: 16px; }
    .lane-row { display: contents; }
    .lane-label { font: 10px/1.3 var(--mono); color: var(--dim); letter-spacing: 0.18em; text-transform: uppercase; text-align: right; align-self: center; padding-top: 4px; }
    .lane-label em { font-size: 1.15em; line-height: 1; }
    .lane-label .lane-sub { display: block; color: var(--ghost); letter-spacing: 0.1em; margin-top: 2px; font-size: 9px; text-transform: uppercase; }
    .zo-lane { display: grid; grid-template-columns: repeat(7, 1fr); height: 56px; border-radius: 4px; overflow: hidden; background: var(--coral-soft); border: 1px solid var(--coral-ring); }
    .zo-seg { display: flex; align-items: center; padding: 0 14px; font: 11px/1 var(--mono); color: var(--coral); letter-spacing: 0.04em; border-right: 1px solid oklch(0.74 0.14 35 / 0.18); }
    .zo-seg:last-child { border-right: none; }
    .zo-seg.is-active { background: oklch(0.74 0.14 35 / 0.22); }
    .zo-seg.is-active::before { content: ""; width: 6px; height: 6px; background: var(--coral); border-radius: 50%; margin-right: 8px; box-shadow: 0 0 8px var(--coral-ring); animation: zo-pulse 2.4s var(--ease) infinite; }
    /* Weekend cell — visually distinct from work cells (no work happening). */
    .zo-seg-weekend { background: var(--canvas); color: var(--ghost); font-family: var(--italic); font-style: italic; font-size: 13px; letter-spacing: 0; justify-content: center; border-left: 1px dashed var(--rule); }
    @keyframes zo-pulse { 0%, 100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.4); } }
    .between-row { display: contents; }
    .between-spacer {}
    .between-label { font-family: var(--italic); font-style: italic; color: var(--coral); font-size: 14px; padding: 16px 0 16px 4px; display: flex; align-items: center; gap: 14px; }
    .between-label::before { content: ""; height: 1px; background: linear-gradient(90deg, var(--coral), transparent); flex: 0 0 80px; }
    .between-note { font-family: var(--sans); font-style: normal; color: var(--cream-2); font-size: 13px; font-weight: 300; margin-left: 4px; }
    .human-lane { position: relative; height: 110px; display: grid; grid-template-columns: repeat(7, 1fr); }
    .human-baseline { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: repeating-linear-gradient(90deg, var(--coral) 0 6px, transparent 6px 12px); opacity: 0.45; }
    .human-pin { grid-column: var(--col) / span 1; position: relative; }
    .pin-mark { width: 14px; height: 14px; background: var(--coral); transform: rotate(45deg); position: absolute; top: 50%; left: 50%; margin: -7px 0 0 -7px; z-index: 2; box-shadow: 0 0 0 4px var(--canvas-2), 0 0 18px var(--coral-ring); }
    .pin-mark.is-optional { background: transparent; border: 1.5px solid var(--coral); box-shadow: 0 0 0 4px var(--canvas-2); }
    .pin-label { position: absolute; bottom: calc(50% + 16px); left: 50%; transform: translateX(-50%); white-space: nowrap; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; }
    .pin-label .pl-name { font: 9.5px/1.1 var(--mono); color: var(--cream); letter-spacing: 0.16em; text-transform: uppercase; }
    .pin-label .pl-dur { font-family: var(--italic); font-style: italic; font-size: 14px; line-height: 1; color: var(--coral); }
    .pin-time { position: absolute; top: calc(50% + 16px); left: 50%; transform: translateX(-50%); font: 9px/1 var(--mono); color: var(--dim); letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; }
    .human-pin.pin-edge-l .pin-label, .human-pin.pin-edge-l .pin-time { left: 0; transform: none; align-items: flex-start; text-align: left; }
    .human-pin.pin-edge-r .pin-label, .human-pin.pin-edge-r .pin-time { left: auto; right: 0; transform: none; align-items: flex-end; text-align: right; }
    .lanes-ticks { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--rule); }
    .lanes-ticks .tl-tick { color: var(--dim); }
    .lanes-ticks .tl-tick.is-weekend { color: var(--ghost); font-family: var(--italic); font-style: italic; text-transform: lowercase; letter-spacing: 0; }
    .lanes-cap { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--rule); }
    .lanes-cap > span { font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 0.14em; text-transform: uppercase; }
    .lanes-cap .lanes-cap-headline { font-family: var(--sans); font-size: 17px; font-weight: 300; color: var(--cream); letter-spacing: 0; text-transform: none; line-height: 1.45; text-wrap: balance; }
    .lanes-cap .lanes-cap-headline em { font-family: var(--italic); font-style: italic; color: var(--coral); font-weight: 400; font-size: 1.05em; }
    .lanes-pretitle { font-family: var(--mono); font-size: 10px; color: var(--coral); letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 22px; display: flex; align-items: center; gap: 14px; }
    .lanes-pretitle::before { content: ""; width: 28px; height: 1px; background: var(--coral); }

    /* ---------- §04 founder origin ---------- */
    .origin-frame { max-width: 720px; margin: 0 auto; border-left: 1px solid var(--coral); padding: 6px 0 6px 36px; }
    .origin-frame .o-tag { font-family: var(--mono); font-size: 10px; color: var(--coral); letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 24px; display: block; }
    .origin-frame p { font-size: 18px; font-weight: 300; color: var(--cream); line-height: 1.65; margin-bottom: 22px; text-wrap: pretty; }
    .origin-frame p:last-of-type { margin-bottom: 0; }
    .origin-frame em { color: var(--coral); font-size: 1.08em; }
    .origin-attr { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: 0.16em; text-transform: uppercase; margin-top: 36px; padding-top: 22px; border-top: 1px dashed var(--rule); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
    .origin-attr .o-name { color: var(--cream); }
    .origin-attr .o-sep { color: var(--ghost); }
    .origin-attr a { color: var(--cream-2); border-bottom: 1px solid var(--rule-2); }
    .origin-attr a:hover { color: var(--coral); border-bottom-color: var(--coral); }

    /* ---------- reveal anims for new sections ---------- */
    .sculley .sk-box { opacity: 0; transform: translateY(8px); }
    .sculley.is-visible .sk-box { animation: sk-rise .7s var(--ease) forwards; }
    .sculley.is-visible .sk-box:nth-child(1) { animation-delay: 0ms; }
    .sculley.is-visible .sk-box:nth-child(2) { animation-delay: 60ms; }
    .sculley.is-visible .sk-box:nth-child(3) { animation-delay: 120ms; }
    .sculley.is-visible .sk-box:nth-child(4) { animation-delay: 180ms; }
    .sculley.is-visible .sk-box:nth-child(5) { animation-delay: 240ms; }
    .sculley.is-visible .sk-box:nth-child(6) { animation-delay: 300ms; }
    .sculley.is-visible .sk-box:nth-child(7) { animation-delay: 360ms; }
    .sculley.is-visible .sk-box:nth-child(8) { animation-delay: 420ms; }
    .sculley.is-visible .sk-box:nth-child(9) { animation-delay: 480ms; }
    .sculley.is-visible .sk-mlcode { animation: sk-rise-glow 1s var(--ease) 620ms forwards; }
    @keyframes sk-rise { to { opacity: 1; transform: translateY(0); } }
    @keyframes sk-rise-glow {
      0%   { opacity: 0; transform: translateY(0) scale(0.6);  box-shadow: 0 0 0 4px var(--canvas-2), 0 0 0 var(--coral-ring); }
      60%  { opacity: 1; transform: translateY(0) scale(1.15); box-shadow: 0 0 0 4px var(--canvas-2), 0 0 32px var(--coral-ring); }
      100% { opacity: 1; transform: translateY(0) scale(1);    box-shadow: 0 0 0 4px var(--canvas-2), 0 0 24px var(--coral-ring); }
    }
    .tl-bar { clip-path: inset(0 100% 0 0); transition: clip-path 1.4s var(--ease) .2s; }
    .tl-bar.is-visible { clip-path: inset(0 0 0 0); }
    .tl-annot { opacity: 0; transition: opacity .5s var(--ease) 1.3s; }
    .tl-annot.is-visible { opacity: 1; }
    .tl-tick.is-pivot { animation: tick-pulse 2.4s var(--ease) 1.8s infinite; }
    @keyframes tick-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
    .cite { opacity: 0; transform: translateY(10px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
    .cites.is-visible .cite { opacity: 1; transform: none; }
    .cites.is-visible .cite:nth-child(2) { transition-delay: 120ms; }
    .cites.is-visible .cite:nth-child(3) { transition-delay: 240ms; }
    .litany-frame { opacity: 0; transform: translateY(10px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
    .litany-frame.is-visible { opacity: 1; transform: none; }
    .zo-lane { clip-path: inset(0 100% 0 0); transition: clip-path 1.6s var(--ease) .2s; }
    .zo-lane.is-visible { clip-path: inset(0 0 0 0); }
    .between-label { opacity: 0; transition: opacity .7s var(--ease) 1.3s; }
    .between-label.is-visible { opacity: 1; }
    .human-baseline { clip-path: inset(0 100% 0 0); transition: clip-path 1.6s var(--ease) .4s; }
    .human-lane.is-visible .human-baseline { clip-path: inset(0 0 0 0); }
    .human-pin { opacity: 0; transform: scale(0.6); transition: opacity .5s var(--ease), transform .5s var(--ease); }
    .human-lane.is-visible .human-pin { opacity: 1; transform: scale(1); }
    .human-lane.is-visible .human-pin:nth-of-type(2) { transition-delay: 1.30s; }
    .human-lane.is-visible .human-pin:nth-of-type(3) { transition-delay: 1.50s; }
    .human-lane.is-visible .human-pin:nth-of-type(4) { transition-delay: 1.70s; }
    .human-lane.is-visible .human-pin:nth-of-type(5) { transition-delay: 1.90s; }
    .human-lane.is-visible .pin-mark { animation: pin-pulse 3.2s var(--ease) 2.4s infinite; }
    @keyframes pin-pulse {
      0%, 100% { box-shadow: 0 0 0 4px var(--canvas-2), 0 0 14px var(--coral-ring); }
      50%      { box-shadow: 0 0 0 4px var(--canvas-2), 0 0 24px var(--coral-ring); }
    }
    @media (prefers-reduced-motion: reduce) {
      .sculley .sk-box, .cite, .litany-frame, .between-label, .human-pin { opacity: 1 !important; transform: none !important; }
      .tl-bar, .zo-lane, .human-baseline { clip-path: none !important; }
    }
    @media (max-width: 880px) {
      .sculley { grid-template-rows: 72px 72px 72px; }
      .cites { grid-template-columns: 1fr; }
      .lanes-grid, .tl-grid, .tl-annot-row { grid-template-columns: 80px 1fr; }
    }
    /* Tablet / small-desktop — pin labels in §03 lanes overlap once the
       human-lane is narrower than ~900px. Drop the descriptive name
       (the pin-time below the diamond — "week 1", "week 3", etc — keeps
       the label addressable). */
    @media (max-width: 900px) {
      .pin-label .pl-name { display: none; }
      .pin-label .pl-dur { font-size: 12px; }
    }
    /* Narrow tablet / mobile — the Sculley 8-col grid and the timeline group
       brackets can't fit. Reflow Sculley to 2 columns with ML CODE spanning
       full width as the focal point; compact timeline group labels and segments. */
    @media (max-width: 720px) {
      /* ----------------------------------------------------------------
         Sculley — 2-col reflow with ML CODE pinned full-width on the top
         row as the focal block. The base rule's `width: 92px;
         justify-self: center;` left it floating awkwardly between rows;
         here we force it to span both columns and stretch.
         ---------------------------------------------------------------- */
      .sculley-frame { padding: 22px 18px 18px; }
      .sculley {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
        gap: 6px;
      }
      .sk-config, .sk-collect, .sk-verify, .sk-machine,
      .sk-feature, .sk-analysis, .sk-serving, .sk-process, .sk-monitor {
        grid-column: auto;
        grid-row: auto;
      }
      .sk-mlcode {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: stretch;
        align-self: stretch;
        width: auto;
        min-height: 56px;
        padding: 14px 16px;
      }
      .sk-box { min-height: 56px; padding: 10px 12px; }
      .sk-box .sk-label { font-size: 9px; letter-spacing: 0.1em; }
      .sk-stuff { gap: 4px; }
      .sculley-cap { flex-direction: column; gap: 6px; }
      .sculley-cap .cap-r { text-align: left; }

      /* ----------------------------------------------------------------
         §02 timeline + §03 lanes — preserve the horizontal layout on
         mobile and let the visual scroll horizontally. Matches the
         team-diagram pattern: full-bleed container + min-width on the
         inner grid so users can swipe across the week/day axis instead
         of collapsing it into a vertical list (which loses the
         "compressed timeline" semantic the visual exists to show).
         ---------------------------------------------------------------- */
      .timeline,
      .lanes-frame {
        margin-left: -20px;
        margin-right: -20px;
        padding: 22px 16px 18px;
        border-left: none;
        border-right: none;
        border-radius: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }
      /* Force inner content to keep its horizontal width so the
         container actually scrolls. Anything narrower than 640px on
         mobile makes the labels overlap. */
      .timeline .tl-annot-row,
      .timeline .tl-grid {
        min-width: 640px;
      }
      .lanes-frame .lanes-grid {
        min-width: 640px;
      }
      /* Legend + caption don't need the wide content area — let them
         flow naturally below the scrollable visual. */
      .timeline .tl-legend,
      .lanes-frame .lanes-cap {
        min-width: 0;
      }
      .tl-legend { font-size: 11px; gap: 8px 18px; }
      .lanes-cap { gap: 8px; padding-top: 14px; }
      .lanes-cap > span { font-size: 10px; }
      .lanes-cap .lanes-cap-headline { font-size: 14px; }
    }

    /* Hero headline override — keep italic em flowing inline so longer
       headlines wrap naturally instead of each em jumping to its own line. */
    .hero .display em { display: inline; }
    .hero .display { font-size: clamp(38px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.02em; }

    /* ---------- Footer thanks strip ---------- */
    .footer-thanks {
      border-top: 1px dashed var(--rule);
      padding: 44px 0 36px;
      display: grid;
      grid-template-columns: 1fr;
      gap: 22px;
    }
    /* Section title — italic Cormorant display treatment, matching the
       hero/section-title em pattern used elsewhere on the site. Honours
       contributors with display weight rather than a bureaucratic kicker. */
    .footer-thanks .ft-title {
      font-family: var(--italic); font-style: italic;
      font-size: clamp(28px, 3.6vw, 38px);
      font-weight: 400;
      color: var(--coral);
      letter-spacing: -0.005em;
      line-height: 1.1;
      margin: 0;
      text-wrap: balance;
    }
    .footer-thanks .ft-statement {
      font-family: var(--sans); font-size: 17px; font-weight: 300;
      color: var(--cream); line-height: 1.55; max-width: 720px;
      text-wrap: pretty; margin: 0;
    }
    .footer-thanks .ft-statement em {
      font-family: var(--italic); font-style: italic;
      color: var(--coral); font-size: 1.05em;
    }
    .footer-thanks .ft-names {
      display: flex; flex-wrap: wrap; gap: 0 14px; row-gap: 10px;
      margin: 6px 0 0; padding: 0; list-style: none;
      font-size: 14px; color: var(--cream-2); font-weight: 400;
    }
    .footer-thanks .ft-names li {
      display: inline-flex; align-items: center; gap: 14px;
    }
    .footer-thanks .ft-names li + li::before {
      content: "·"; color: var(--ghost); margin-right: 0;
    }
    .footer-thanks .ft-names a {
      color: var(--cream-2);
      border-bottom: 1px solid var(--rule-2);
      padding-bottom: 1px;
      transition: color .2s var(--ease), border-color .2s var(--ease);
    }
    .footer-thanks .ft-names a:hover {
      color: var(--coral); border-bottom-color: var(--coral);
    }
    @media (max-width: 720px) {
      .footer-thanks .ft-title { font-size: 26px; }
      .footer-thanks .ft-statement { font-size: 15px; }
      .footer-thanks .ft-names { font-size: 13px; }
    }
  
