/* thereisnospoon.org -- the Seamless landing page.

   Art direction: the knowledge sky. Sessions are meteors -- bright, brief,
   gone. What they learned stays as fixed stars, and every star turns out to be
   a markdown file you can open. Night (dark) is the sky; day (light) is the
   printed star atlas. Type is the console's own: Fraunces for display,
   Instrument Sans for reading, IBM Plex Mono for anything a machine wrote.

   Self-contained on purpose: no CDNs, no webfont requests, no trackers.
   Loaded only by the landing page; the docs keep static/site.css. */

/* ==========================================================================
   FONTS (self-hosted latin subsets, OFL -- see fonts/OFL-NOTICE.txt)
   ========================================================================== */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ==========================================================================
   TOKENS -- day (the atlas) first; night overrides below
   ========================================================================== */
:root {
  --bg:        #eef1f5;
  --bg-deep:   #e4e8ef;
  --paper:     #eef1f5;   /* site.js reads --paper for the browser chrome color */
  --panel:     #ffffff;
  --panel-a:   rgba(255, 255, 255, 0.66);
  --hair:      rgba(16, 28, 60, 0.11);
  --hair-2:    rgba(16, 28, 60, 0.2);
  --ink:       #0d1733;
  --text:      #2c3654;
  --muted:     #535e7e;
  --faint:     #5f6987;   /* AA 4.8:1 on --bg */
  --accent:    #b93d1c;   /* AA 4.9:1 on --bg, for the small italic labels */
  --accent-2:  #9a3115;
  --accent-ink:#ffffff;
  --accent-soft: rgba(196, 66, 31, 0.09);
  --glow:      rgba(196, 66, 31, 0.0);
  --link:      #2a43c4;
  --ok:        #0b7a5c;
  --bad:       #a6243c;
  --key:       #2a43c4;
  --mark-star: var(--accent);

  --term-bg:    #0b1020;
  --term-bg-2:  #0f1528;
  --term-line:  rgba(166, 182, 255, 0.14);
  --term-ink:   #dadded;
  --term-muted: #8a92b4;
  --term-faint: #7c84a8;   /* AA 5.1:1 on --term-bg */
  --term-live:  #5fdcbf;
  --term-key:   #a9b8ff;
  --term-str:   #f3c46b;
  --term-user:  #ffffff;
  --term-mark:  rgba(243, 196, 107, 0.22);

  --agent-a: #1f7fbf;
  --agent-b: #7a4fd6;

  /* memory kinds, as the console colors them -- printed-ink versions by day */
  --k-gotcha:     #c4421f;
  --k-constraint: #2a43c4;
  --k-convention: #b0307a;
  --k-reference:  #0b7a6a;
  --k-decision:   #6a3fc9;
  --k-runbook:    #a06a0c;
  --k-stage:      #1f7fbf;

  --sky-line:   rgba(16, 28, 60, 0.16);
  --sky-line-2: rgba(16, 28, 60, 0.30);
  --sky-label:  rgba(16, 28, 60, 0.66);
  --sky-dust:   rgba(16, 28, 60, 0.5);
  --sky-streak: #0d1733;
  --sky-link:   rgba(196, 66, 31, 0.55);
  --sky-mode:   day;

  --shadow-lg: 0 28px 70px -30px rgba(16, 28, 60, 0.35), 0 2px 8px rgba(16, 28, 60, 0.06);
  --shadow-md: 0 14px 34px -18px rgba(16, 28, 60, 0.3), 0 1px 3px rgba(16, 28, 60, 0.06);
  --grain: 0.045;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans:  "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --max: 1200px;
  --gutter: clamp(20px, 4.4vw, 56px);
  --head-h: 68px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io:  cubic-bezier(0.65, 0, 0.35, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg:        #070a13;
  --bg-deep:   #04060c;
  --paper:     #070a13;
  --panel:     #0c1120;
  --panel-a:   rgba(17, 25, 50, 0.45);
  --hair:      rgba(166, 182, 255, 0.11);
  --hair-2:    rgba(166, 182, 255, 0.2);
  --ink:       #f2f1f8;
  --text:      #c5c8dc;
  --muted:     #9196b4;
  --faint:     #7a81a3;   /* AA 5.2:1 on --bg */
  --accent:    #f3c46b;
  --accent-2:  #ffdc96;
  --accent-ink:#1b1304;
  --accent-soft: rgba(243, 196, 107, 0.11);
  --glow:      rgba(243, 196, 107, 0.35);
  --link:      #a9b8ff;
  --ok:        #5fdcbf;
  --bad:       #ff8f73;
  --key:       #a9b8ff;

  --agent-a: #6fd3ff;
  --agent-b: #c39bff;

  --k-gotcha:     #ff8f73;
  --k-constraint: #9aa8ff;
  --k-convention: #ff7fc8;
  --k-reference:  #5fdcbf;
  --k-decision:   #c39bff;
  --k-runbook:    #f3c46b;
  --k-stage:      #6fc8ff;

  --sky-line:   rgba(166, 182, 255, 0.10);
  --sky-line-2: rgba(166, 182, 255, 0.22);
  --sky-label:  rgba(196, 206, 255, 0.62);
  --sky-dust:   rgba(225, 230, 255, 0.9);
  --sky-streak: #fff6dc;
  --sky-link:   rgba(243, 196, 107, 0.4);
  --sky-mode:   night;

  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(166, 182, 255, 0.05);
  --shadow-md: 0 20px 50px -24px rgba(0, 0, 0, 0.75);
  --grain: 0.06;

  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #070a13;
    --bg-deep:   #04060c;
    --paper:     #070a13;
    --panel:     #0c1120;
    --panel-a:   rgba(17, 25, 50, 0.45);
    --hair:      rgba(166, 182, 255, 0.11);
    --hair-2:    rgba(166, 182, 255, 0.2);
    --ink:       #f2f1f8;
    --text:      #c5c8dc;
    --muted:     #9196b4;
    --faint:     #7a81a3;   /* AA 5.2:1 on --bg */
    --accent:    #f3c46b;
    --accent-2:  #ffdc96;
    --accent-ink:#1b1304;
    --accent-soft: rgba(243, 196, 107, 0.11);
    --glow:      rgba(243, 196, 107, 0.35);
    --link:      #a9b8ff;
    --ok:        #5fdcbf;
    --bad:       #ff8f73;
    --key:       #a9b8ff;

    --agent-a: #6fd3ff;
    --agent-b: #c39bff;

    --k-gotcha:     #ff8f73;
    --k-constraint: #9aa8ff;
    --k-convention: #ff7fc8;
    --k-reference:  #5fdcbf;
    --k-decision:   #c39bff;
    --k-runbook:    #f3c46b;
    --k-stage:      #6fc8ff;

    --sky-line:   rgba(166, 182, 255, 0.10);
    --sky-line-2: rgba(166, 182, 255, 0.22);
    --sky-label:  rgba(196, 206, 255, 0.62);
    --sky-dust:   rgba(225, 230, 255, 0.9);
    --sky-streak: #fff6dc;
    --sky-link:   rgba(243, 196, 107, 0.4);
    --sky-mode:   night;

    --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(166, 182, 255, 0.05);
    --shadow-md: 0 20px 50px -24px rgba(0, 0, 0, 0.75);
    --grain: 0.06;

    color-scheme: dark;
  }
}

/* ==========================================================================
   BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--head-h) + 12px);
  background: var(--bg);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* paper grain over everything that is not a window into a terminal */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .site-foot { position: relative; z-index: 1; }

/* the night continues below the hero: three drifting layers of faint dust */
.starfield {
  position: fixed;
  inset: -50vh 0 -50vh 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
  background-image:
    radial-gradient(1px 1px at 23px 41px, var(--sky-dust) 50%, transparent 51%),
    radial-gradient(1px 1px at 151px 113px, var(--sky-dust) 50%, transparent 51%),
    radial-gradient(1px 1px at 89px 197px, var(--sky-dust) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 271px 59px, var(--sky-dust) 50%, transparent 51%),
    radial-gradient(1px 1px at 331px 251px, var(--sky-dust) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 401px 157px, var(--sky-dust) 50%, transparent 51%),
    radial-gradient(1px 1px at 197px 331px, var(--sky-dust) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 463px 389px, var(--sky-dust) 50%, transparent 51%);
  background-size: 360px 360px, 520px 520px, 440px 440px, 610px 610px, 380px 380px, 700px 700px, 470px 470px, 830px 830px;
  will-change: transform;
}
.starfield.is-on { opacity: 0.32; }
:root[data-theme="light"] .starfield.is-on { opacity: 0.12; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .starfield.is-on { opacity: 0.12; }
}

h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 400; }
p { margin: 0 0 1em; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--ink);
  white-space: nowrap;
}
::selection { background: color-mix(in oklab, var(--accent) 35%, transparent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
svg { overflow: visible; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.fine { font-size: 14px; line-height: 1.6; color: var(--muted); }
.fine a { color: var(--muted); }
.fine a:hover { color: var(--ink); }

.lnk {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); text-decoration: none; font-weight: 500;
  border-bottom: 1px solid var(--hair-2);
  padding-bottom: 2px;
  transition: border-color 0.3s, color 0.3s, gap 0.3s var(--ease-out);
}
.lnk svg { width: 17px; height: 17px; flex: none; }
.lnk:hover { border-color: var(--accent); gap: 11px; color: var(--ink); }

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

/* without JS the OS switch and copy buttons cannot work, so both commands
   show, each under a plain label */
.os-cap { display: none; margin: 6px 0 6px; font-family: var(--mono); font-size: 12px; line-height: 1.4; color: var(--muted); }
:root:not(.js) .os-cap { display: block; }
:root:not(.js) .os-switch, :root:not(.js) .copy-btn, :root:not(.js) .week-bar .week-modes { display: none !important; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background-color 0.5s ease, border-color 0.5s ease, backdrop-filter 0.5s ease;
}
:root:not(.js) .site-head,
.site-head.is-solid {
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: var(--hair);
}
.head-in {
  max-width: var(--max);
  margin: 0 auto;
  height: var(--head-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 26px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
}
.brand-mark { width: 27px; height: 27px; color: var(--ink); transition: transform 0.8s var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(-24deg); }
.brand-word {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 48, "SOFT" 60;
  line-height: 1;
  padding-bottom: 2px;
}
.head-nav { display: flex; gap: 4px; margin-left: auto; }
.head-nav a {
  color: var(--muted); text-decoration: none;
  font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
  transition: color 0.25s, background-color 0.25s;
}
.head-nav a:hover { color: var(--ink); background: var(--accent-soft); }
.head-nav a.is-current { color: var(--ink); }
.head-tools { display: flex; align-items: center; gap: 6px; }
.theme-toggle, .gh-link {
  width: 38px; height: 38px; border-radius: 999px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--hair); background: transparent; color: var(--muted);
  cursor: pointer; text-decoration: none;
  transition: color 0.25s, border-color 0.25s, transform 0.5s var(--ease-out);
}
.theme-toggle svg, .gh-link svg { width: 17px; height: 17px; }
.theme-toggle:hover, .gh-link:hover { color: var(--ink); border-color: var(--hair-2); }
.theme-toggle:active { transform: rotate(40deg) scale(0.94); }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}
.head-cta {
  margin-left: 6px;
  display: inline-flex; align-items: center; height: 38px;
  padding: 0 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.head-cta:hover { color: var(--bg); transform: translateY(-1px); box-shadow: 0 8px 24px -10px var(--glow), 0 0 0 4px var(--accent-soft); }
.head-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.head-progress i {
  display: block; height: 100%; width: 100%;
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, transparent, var(--accent));
  opacity: 0.85;
}

/* phone menu: a native disclosure, hidden on wide screens */
.nav-menu { display: none; position: relative; margin-left: auto; }
.nav-menu summary {
  list-style: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-content: center; gap: 6px;
  border: 1px solid var(--hair);
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary span { display: block; width: 16px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform 0.35s var(--ease-out); }
.nav-menu[open] summary span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-menu[open] summary span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.nav-panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 220px; padding: 8px;
  display: grid;
  background: var(--panel); border: 1px solid var(--hair-2); border-radius: 16px;
  box-shadow: var(--shadow-lg);
}
.nav-panel a {
  color: var(--ink); text-decoration: none; font-weight: 500;
  padding: 11px 14px; border-radius: 10px;
}
.nav-panel a:hover { background: var(--accent-soft); }

/* ==========================================================================
   THE CHAPTER RAIL
   ========================================================================== */
.rail {
  position: fixed; left: 30px; top: 50%; z-index: 40;
  transform: translate(-8px, -50%);
  opacity: 0; pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s var(--ease-out);
  display: none;
}
.rail.is-on { opacity: 1; pointer-events: auto; transform: translate(0, -50%); }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; position: relative; z-index: 1; }
.rail a {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--muted);
}
.rail-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--bg); border: 1px solid var(--hair-2);
  transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s, transform 0.4s var(--ease-out);
}
.rail a.is-past .rail-dot { background: var(--faint); border-color: transparent; }
.rail a.is-current .rail-dot {
  background: var(--accent); border-color: transparent; transform: scale(1.25);
  box-shadow: 0 0 0 5px var(--accent-soft), 0 0 16px var(--glow);
}
.rail-label {
  font-family: var(--serif); font-size: 15px; white-space: nowrap;
  opacity: 0; transform: translateX(-6px);
  transition: opacity 0.35s, transform 0.45s var(--ease-out), color 0.3s;
}
.rail-label em { color: var(--faint); margin-right: 3px; }
.rail:hover .rail-label, .rail a:focus-visible .rail-label { opacity: 1; transform: none; }
.rail a.is-current .rail-label { color: var(--ink); }
.rail a:hover .rail-label { color: var(--ink); }
.rail-line { position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1px; background: var(--hair); }
.rail-line i {
  display: block; width: 100%; height: 100%;
  transform-origin: 50% 0; transform: scaleY(var(--fill, 0));
  background: linear-gradient(var(--faint), var(--accent));
}
@media (min-width: 1380px) { .rail { display: block; } }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--head-h) + 26px) 0 92px;
  overflow: hidden;
}
.sky {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, #000 78%, transparent);
}
.hero-grid { width: 100%; }
.hero-copy { max-width: 760px; position: relative; }
.hero-copy::before {
  /* a soft clearing in the sky so the copy never fights the stars */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -12% -18% -12% -30%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--bg) 82%, transparent), transparent);
}
.hero-pre {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px;
  font-size: 15px; font-weight: 500; color: var(--muted);
  letter-spacing: 0.005em;
}
.hero-pre svg { width: 20px; height: 20px; color: var(--muted); }
.h1 {
  font-family: var(--serif);
  font-size: clamp(48px, 6.3vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.028em;
  font-weight: 380;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  margin: 0 0 26px;
  text-wrap: balance;
}
.h1 .br { display: block; }
.h1 .br.br-wide { display: none; }
@media (min-width: 1100px) { .h1 .br.br-wide { display: block; } }
.h1 em {
  font-style: italic;
  font-weight: 360;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
  padding-right: 0.04em;
}
:root[data-theme="dark"] .h1 em { text-shadow: 0 0 42px rgba(243, 196, 107, 0.28); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .h1 em { text-shadow: 0 0 42px rgba(243, 196, 107, 0.28); }
}
.hero-sub {
  font-size: clamp(18px, 1.55vw, 21px);
  line-height: 1.6;
  color: var(--text);
  max-width: 570px;
  margin: 0 0 30px;
  text-wrap: pretty;
}
.hero-act { display: grid; justify-items: start; gap: 14px; }
.hero-links { margin: 6px 0 0; }
/* the fork for visitors who chat in the Claude app rather than code: a
   quieter second line under the developer CTA, leading to /claude-app/ */
.hero-fork { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 16px 0 0; font-size: 15.5px; color: var(--muted); }
.hero-facts {
  list-style: none; padding: 0; margin: 34px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-size: 14px; color: var(--muted);
}
.hero-facts li { display: inline-flex; align-items: center; gap: 9px; }
.hero-facts li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--glow);
}

/* the OS switch + the install pill, shared by hero, try-it, and finale */
.os-switch {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--hair); border-radius: 999px;
  background: var(--panel-a);
}
.os-switch button {
  border: 0; background: transparent; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--muted);
  padding: 6px 13px; border-radius: 999px;
  transition: color 0.25s, background-color 0.25s;
}
.os-switch button:hover { color: var(--ink); }
:root[data-os="unix"] .os-switch [data-os-pick="unix"],
:root[data-os="windows"] .os-switch [data-os-pick="windows"] {
  background: var(--ink); color: var(--bg);
}
:root[data-os="unix"] [data-os-block="windows"],
:root[data-os="windows"] [data-os-block="unix"] { display: none !important; }

.install-pill {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  max-width: 100%;
  padding: 9px 9px 9px 20px;
  border-radius: 14px;
  font-family: var(--mono); font-size: 15px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--hair-2);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.install-pill::after {
  /* a slow glint, like light crossing a lens */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, color-mix(in oklab, var(--accent) 22%, transparent) 50%, transparent 62%);
  transform: translateX(-120%);
  animation: glint 7s 2.4s var(--ease-io) infinite;
}
@keyframes glint { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.install-pill:hover { border-color: color-mix(in oklab, var(--accent) 60%, transparent); box-shadow: var(--shadow-md), 0 0 0 4px var(--accent-soft); }
.install-pill .p, .code .p { color: var(--accent); flex: none; user-select: none; }
.install-pill .cmd {
  min-width: 0; overflow-x: auto; white-space: nowrap;
  scrollbar-width: none;
}
.install-pill .cmd::-webkit-scrollbar, .code .cmd::-webkit-scrollbar { display: none; }
:root[data-theme="dark"] .install-pill { background: rgba(243, 196, 107, 0.05); border-color: rgba(243, 196, 107, 0.32); box-shadow: 0 0 40px -12px rgba(243, 196, 107, 0.25); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .install-pill { background: rgba(243, 196, 107, 0.05); border-color: rgba(243, 196, 107, 0.32); box-shadow: 0 0 40px -12px rgba(243, 196, 107, 0.25); }
}

.copy-btn {
  flex: none; position: relative; z-index: 1;
  border: 1px solid var(--hair-2); background: var(--bg);
  color: var(--muted); cursor: pointer;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  padding: 6px 11px; border-radius: 9px;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.copy-btn:hover { color: var(--ink); border-color: var(--accent); }
.copy-btn.ok { color: var(--ok); border-color: var(--ok); }
.copy-btn.sel { color: var(--accent); border-color: var(--accent); }

.sky-legend {
  position: absolute; right: var(--gutter); bottom: 26px; z-index: 2; margin: 0;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end;
  font-family: var(--mono); font-size: 12px; color: var(--faint);
}
.lg-star { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--glow); }
.lg-streak { width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--sky-streak)); }
.lg-item { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; margin-right: 8px; }
.lg-hint::before { content: "· "; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; z-index: 2;
  width: 22px; height: 46px; margin-left: -11px;
  display: grid; justify-items: center;
}
.scroll-cue span { position: relative; display: block; width: 1px; height: 100%; background: var(--hair-2); overflow: hidden; }
.scroll-cue span::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%;
  background: linear-gradient(transparent, var(--accent));
  animation: cue 2.4s var(--ease-io) infinite;
}
@keyframes cue { to { top: 110%; } }

.sky-tip {
  position: absolute; z-index: 5; pointer-events: none;
  min-width: 220px; max-width: 320px;
  padding: 11px 13px 12px;
  border-radius: 12px;
  background: var(--term-bg); color: var(--term-ink);
  border: 1px solid var(--term-line);
  box-shadow: var(--shadow-lg);
  font-family: var(--mono); font-size: 12px; line-height: 1.55;
  opacity: 0; transition: opacity 0.2s;
}
.sky-tip.is-on { opacity: 1; }
.sky-tip .tp-path { color: var(--term-faint); margin: 0 0 6px; word-break: break-all; }
.sky-tip .tp-kind { display: inline-block; margin: 0 0 6px; padding: 1px 7px; border-radius: 6px; font-size: 11px; color: #0b1020; }
.sky-tip .tp-desc { margin: 0; color: var(--term-ink); font-family: var(--sans); font-size: 13px; line-height: 1.45; }


/* ==========================================================================
   CHAPTERS
   ========================================================================== */
.chapter { position: relative; padding: clamp(96px, 13vh, 150px) 0 clamp(80px, 11vh, 124px); }
.chapter + .chapter::before {
  /* a hairline horizon between chapters, with one star on it */
  content: ""; position: absolute; top: 0; left: 50%; width: min(var(--max), 100% - 2 * var(--gutter)); height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--hair-2) 20%, var(--hair-2) 80%, transparent);
}
.chapter + .chapter::after {
  content: ""; position: absolute; top: -3px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px;
  border-radius: 50%; background: var(--bg); border: 1px solid var(--hair-2);
  transition: background-color 0.8s, border-color 0.8s, box-shadow 0.8s, transform 0.8s var(--ease-out);
}
/* each horizon star lights once you have crossed it */
.chapter + .chapter.is-reached::after {
  background: var(--accent); border-color: transparent; transform: scale(1.15);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 14px var(--glow);
}
.ch-head { max-width: 780px; margin: 0 0 clamp(52px, 8vh, 84px); }
.ch-head-wide { max-width: 900px; }
.ch-mark {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 22px;
  font-family: var(--serif); font-style: italic; font-size: 19px;
  color: var(--muted);
  font-variation-settings: "opsz" 24;
}
.ch-mark::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 14px var(--glow);
}
.ch-mark em { color: var(--accent); font-style: italic; }
.h2 {
  font-family: var(--serif);
  font-size: clamp(38px, 5.1vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.024em;
  font-weight: 380;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  margin: 0 0 26px;
  text-wrap: balance;
}
.h2 em { font-style: italic; color: var(--accent); }
.lede {
  font-size: clamp(18px, 1.45vw, 21px);
  line-height: 1.62;
  color: var(--text);
  max-width: 660px;
  margin: 0;
  text-wrap: pretty;
}
.lede code { font-size: 0.8em; }

/* reveal on scroll: site.js adds .in; home.js staggers siblings */
.js .rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js .rv.in { opacity: 1; transform: none; }

/* split headlines: each word rises out of its own mask */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.06em 0.12em 0; margin: 0 -0.06em -0.12em 0; }
.js [data-split] .wi {
  display: inline-block;
  transform: translateY(108%) rotate(4deg);
  transform-origin: 0 100%;
  transition: transform 1.15s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 55ms + var(--d0, 0ms));
}
.js [data-split].is-in .wi { transform: none; }

/* ==========================================================================
   I. THE FORGETTING
   ========================================================================== */
.week { margin: 0 0 clamp(90px, 12vh, 140px); }
.days {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  counter-reset: day;
}
.day {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 248px;
  padding: 18px 20px 16px;
  border: 1px solid var(--hair);
  border-radius: 16px;
  background: var(--panel-a);
  overflow: hidden;
  transition: border-color 0.6s, box-shadow 0.6s, opacity 0.6s;
}
.day::before {
  /* each session arrives as a streak */
  content: ""; position: absolute; top: 0; left: 0; height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--accent) 70%, transparent);
  transform: translateX(-100%); opacity: 0;
}
.day.is-live { border-color: var(--hair-2); box-shadow: var(--shadow-md); }
.day.is-live::before { animation: streak 1.2s var(--ease-out) forwards; }
@keyframes streak { 0% { transform: translateX(-100%); opacity: 1; } 100% { transform: translateX(100%); opacity: 0; } }
.day-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0 0 16px;
  font-family: var(--mono); font-size: 12px; color: var(--faint);
}
.day-head b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 24px; color: var(--ink); }
.day-body { flex: 1; }
.dl {
  margin: 0 0 9px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.55;
  color: var(--text);
}
.dl-prompt { color: var(--ink); }
.dl svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 6px; color: var(--ok); }
.dl-bad .bad-mark, .dl-bad .bad-mark .wd {
  text-decoration: underline wavy color-mix(in oklab, var(--bad) 85%, transparent);
  text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-skip-ink: none;
}
.caret {
  display: inline-block; width: 8px; height: 16px; vertical-align: -3px;
  background: var(--accent); animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.day-end {
  margin: 12px 0 0; padding-top: 11px;
  border-top: 1px dashed var(--hair-2);
  font-family: var(--mono); font-size: 12px; color: var(--faint);
}
/* the animated week (home.js): lines arrive, then the session ends and its
   words drift off like smoke. Without JS everything simply shows. */
.js .week.is-armed .dl, .js .week.is-armed .day-end { opacity: 0; transform: translateY(6px); transition: opacity 0.5s, transform 0.6s var(--ease-out); }
.js .week.is-armed .dl.is-on, .js .week.is-armed .day-end.is-on { opacity: 1; transform: none; }
.js .week .dl .wd {
  display: inline-block; white-space: pre;
  transition: opacity 1.3s ease, transform 1.6s var(--ease-out), filter 1.3s ease;
  transition-delay: var(--wd, 0ms);
}
.js .week .day.is-gone .dl .wd { opacity: 0.4; transform: translate(var(--dx, 0), var(--dy, -6px)) rotate(var(--dr, 0deg)); }
.js .week .day.is-gone .dl svg { opacity: 0; transition: opacity 0.8s; }
.js .week .day.is-gone { border-color: var(--hair); box-shadow: none; }
.js .week .day.is-gone .day-end { color: var(--muted); }
.week:not([data-mode="with"]) [data-for-mode="with"],
.week[data-mode="with"] [data-for-mode="without"] { display: none !important; }
.week-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 16px; }
.week-modes {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--hair); border-radius: 999px; background: var(--panel-a);
}
.week-modes button {
  border: 0; background: transparent; cursor: pointer;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  padding: 6px 14px; border-radius: 999px;
  transition: color 0.25s, background-color 0.25s, box-shadow 0.4s;
}
.week-modes button:hover { color: var(--ink); }
.week-modes button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.week-modes button.is-beckoning { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 22px var(--glow); color: var(--ink); }
.week-replay[hidden] { display: none; }
.dl-save { font-family: var(--mono); color: var(--accent); }
.dl-save::before { content: "\2726"; margin-right: 7px; }
.dl-brief {
  font-size: 12.5px; color: var(--muted);
  border-left: 2px solid color-mix(in oklab, var(--accent) 70%, transparent);
  padding: 5px 0 5px 10px; border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, var(--accent-soft), transparent 85%);
}
.dl-brief .rc { color: var(--accent); }
.dl-brief.is-landed { animation: brief-in 1.4s var(--ease-out); }
@keyframes brief-in { 0% { box-shadow: 0 0 0 0 var(--glow); } 30% { box-shadow: 0 0 28px -4px var(--glow); } 100% { box-shadow: 0 0 0 0 transparent; } }
.week { position: relative; }
.week.is-resetting .wd, .week.is-resetting .dl, .week.is-resetting .day-end, .week.is-resetting .day { transition: none !important; }
.week-star {
  position: absolute; z-index: 5; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; pointer-events: none;
  background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft), 0 0 22px var(--glow);
}
.week[data-mode="with"] .day.is-kept { border-color: color-mix(in oklab, var(--accent) 35%, var(--hair)); }
.week figcaption {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin-top: 18px; font-size: 16px; color: var(--muted);
}
.tag {
  font-family: var(--mono); font-size: 11.5px; color: var(--faint);
  padding: 3px 9px; border: 1px solid var(--hair); border-radius: 999px;
}
.week-replay {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: none; cursor: pointer; padding: 4px 0;
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
}
.week-replay svg { width: 14px; height: 14px; }
.week-replay:hover { color: var(--ink); }

.history { margin: 0; }
.history-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 18px; font-size: 16px; color: var(--muted); }
.hist {
  list-style: none; margin: 0; padding: 8px 0;
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}
.hrow {
  display: grid; grid-template-columns: 92px minmax(0, 1.25fr) minmax(0, 1fr); gap: 6px 28px; align-items: baseline;
  padding: 14px 4px;
  border-bottom: 1px dashed var(--hair);
}
.hrow:last-child { border-bottom: 0; }
.ht { font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.hq {
  font-family: var(--serif); font-style: italic; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.3;
  color: var(--ink); font-variation-settings: "opsz" 48, "SOFT" 80;
}
.hq::before { content: "> "; font-family: var(--mono); font-style: normal; font-size: 0.7em; color: var(--accent); vertical-align: 0.12em; }
.hn { font-size: 15.5px; line-height: 1.55; color: var(--muted); }
.hrow-again .hq { color: var(--muted); }
.again {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12.5px; color: var(--accent);
}
.again::before { content: "\21BB"; font-size: 15px; }

/* ==========================================================================
   II. THE FIX -- the orbit
   ========================================================================== */
.orbit-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.orbit-fig { display: none; }
.orbit-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 64px; }
.ostep {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px; align-items: center;
}
.ostep-n { font-family: var(--mono); font-size: 12.5px; color: var(--accent); margin: 0 0 12px; letter-spacing: 0.02em; }
.ostep h3 {
  font-family: var(--serif); font-size: clamp(28px, 2.6vw, 38px); line-height: 1.08;
  letter-spacing: -0.016em; font-weight: 400; margin: 0 0 14px;
  font-variation-settings: "opsz" 96, "SOFT" 30;
}
.ostep-copy p { color: var(--text); margin: 0; }
.ostep-copy p:last-child { max-width: 440px; }

/* pinned mode (home.js, wide screens, motion allowed): the section becomes a
   tall scroll track; the figure and one step at a time stay on screen. */
.orbit.is-pinned { height: 330vh; }
.orbit.is-pinned .orbit-pin {
  position: sticky; top: 0; height: 100vh;
  display: flex; align-items: center;
}
.orbit.is-pinned .orbit-pin > .wrap { width: 100%; }
.orbit.is-pinned .orbit-grid { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 64px; align-items: center; }
.orbit.is-pinned .orbit-fig { display: block; }
.orbit.is-pinned .orbit-steps { position: relative; display: block; min-height: 560px; }
.orbit.is-pinned .ostep {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 26px;
  opacity: 0; visibility: hidden;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.8s var(--ease-out), visibility 0s 0.6s;
}
.orbit.is-pinned .ostep.is-on {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.7s ease 0.12s, transform 0.9s var(--ease-out) 0.12s, visibility 0s;
}
.orbit.is-pinned .ostep.is-past { transform: translateY(-26px); }

.orbit-svg { width: 100%; max-width: 470px; height: auto; display: block; margin: 0 auto; }
.o-ring { fill: none; stroke: var(--hair-2); stroke-width: 1; }
.o-ring-outer { stroke: var(--hair); }
.o-ring-faint { stroke: var(--hair); stroke-dasharray: 2 5; }
.o-ticks line { stroke: var(--hair-2); stroke-width: 1; }
.o-ticks line.long { stroke: var(--faint); }
.o-path { fill: none; stroke: var(--hair-2); stroke-width: 1.4; }
.o-trail {
  fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: var(--trail, 0) 100;
  transform: rotate(-90deg); transform-origin: 220px 220px;
  filter: drop-shadow(0 0 6px var(--glow));
}
.o-core-halo { fill: var(--accent-soft); }
.o-core-disc { fill: var(--panel); stroke: var(--hair-2); }
.o-core text { font-family: var(--mono); font-size: 11px; fill: var(--ink); }
.o-core .o-core-sub { fill: var(--faint); font-size: 9.5px; }
.o-node circle { fill: var(--bg); stroke: var(--hair-2); stroke-width: 1.2; transition: fill 0.5s, stroke 0.5s; }
.o-node text { font-family: var(--serif); font-style: italic; font-size: 16px; fill: var(--muted); transition: fill 0.5s; }
.o-node.is-on circle { fill: var(--accent); stroke: var(--accent); }
.o-node.is-on text { fill: var(--accent-ink); }
.o-node.is-past circle { stroke: var(--accent); }
.o-label { font-family: var(--serif); font-style: italic; font-size: 17px; fill: var(--muted); transition: fill 0.5s; }
.o-label.is-on { fill: var(--ink); }
.o-comet-head { fill: var(--accent); }
.o-comet-glow { fill: var(--accent); opacity: 0.22; }
.o-comet { transition: opacity 0.4s; }

/* ==========================================================================
   TERMINALS (shared by the orbit, the folder, and the scene player)
   ========================================================================== */
.term {
  background: var(--term-bg);
  color: var(--term-ink);
  border: 1px solid var(--term-line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-width: 0;
}
.term-bar {
  margin: 0; display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--term-line);
  font-family: var(--mono); font-size: 12px; color: var(--term-muted);
  background: linear-gradient(var(--term-bg-2), var(--term-bg));
}
.term-bar::before {
  content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--term-live); box-shadow: 0 0 9px var(--term-live);
}
.term-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-body { padding: 16px 18px 18px; font-family: var(--mono); font-size: 13px; line-height: 1.62; }
.term-body p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.term-sm .term-body { font-size: 12.5px; }
.t-tool b { color: var(--term-live); font-weight: 400; margin-right: 4px; }
.t-arg { color: var(--term-str); }
.t-kv { padding-left: 16px; color: var(--term-muted); }
.t-kv .k { color: var(--term-key); margin-right: 8px; }
.t-res { padding-left: 16px; color: var(--term-live); }
.t-user { color: var(--term-user); }
.t-inject {
  border-left: 2px solid color-mix(in oklab, var(--term-str) 60%, transparent);
  padding: 8px 0 8px 12px;
  background: linear-gradient(90deg, rgba(243, 196, 107, 0.07), transparent 70%);
  color: var(--term-muted);
}
.t-tag { color: var(--term-str); }
.t-inject mark, .term mark { background: var(--term-mark); color: #fff; padding: 0 2px; border-radius: 3px; }
.t-head { color: var(--term-ink); }
.t-prop { padding: 6px 0 6px 0; border-top: 1px dashed var(--term-line); }
.t-k { display: inline-block; min-width: 54px; color: var(--term-str); }
.t-dim, .t-c { color: var(--term-faint); }
.t-p { color: var(--term-str); margin-right: 8px; }
/* column-major, the way ls lays them out */
.t-cols { column-count: 2; column-gap: 14px; color: var(--term-ink); white-space: normal !important; }
.t-cols span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-btns { display: flex; gap: 8px; margin-top: 10px !important; }
.t-btn { padding: 3px 10px; border-radius: 7px; background: var(--term-str); color: #1b1304; font-size: 11.5px; }
.t-btn-q { background: transparent; color: var(--term-muted); border: 1px solid var(--term-line); }

/* ==========================================================================
   III. THE PROOF -- the scene reel (DOM built by scenes-player.js)
   ========================================================================== */
.scenes-reel { position: relative; }
.scenes-nav {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 0 0 26px;
}
.scenes-nav:empty { display: none; }
.scene-tab {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: baseline; gap: 9px;
  padding: 10px 16px 11px;
  border: 1px solid var(--hair); border-radius: 999px;
  background: transparent; cursor: pointer;
  color: var(--muted); font-size: 15px; font-weight: 500;
  transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}
.scene-tab:hover { color: var(--ink); border-color: var(--hair-2); }
.scene-tab.active { color: var(--ink); border-color: var(--hair-2); background: var(--panel-a); }
.sr-num { font-family: var(--serif); font-style: italic; color: var(--faint); font-size: 15px; }
.scene-tab.active .sr-num { color: var(--accent); }
.sr-prog {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
}

/* the fallbacks are what crawlers and JS-off visitors read */
.scenes-nav:not(:empty) ~ .scenes-stage .scenes-fallback { display: none; }
.scenes-fallback { padding: 24px 0 8px; border-top: 1px solid var(--hair); }
.scenes-fallback + .scenes-fallback, .term-scene + .term-scene .scenes-fallback { margin-top: 18px; }
.sf-outcomes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0 10px; }
.sf-pane { padding: 16px 18px; border: 1px solid var(--hair); border-radius: 14px; background: var(--panel-a); }
.sf-pane dt { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.sf-pane dd { margin: 0; font-size: 16px; color: var(--text); }
.sf-without dt { color: var(--bad); }
.sf-with dt { color: var(--ok); }

.term-scene { display: block; }
.scenes-nav:not(:empty) ~ .scenes-stage .term-scene { display: none; }
.scenes-nav:not(:empty) ~ .scenes-stage .term-scene.on { display: block; animation: scene-in 0.7s var(--ease-out); }
@keyframes scene-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ts-head { margin: 0 0 22px; }
.ts-kicker { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--accent); margin: 0 0 6px; }
.ts-title {
  font-family: var(--serif); font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1;
  font-weight: 400; letter-spacing: -0.014em; margin: 0 0 14px;
  font-variation-settings: "opsz" 96;
}
.ts-ask {
  display: flex; gap: 12px; align-items: baseline; margin: 0;
  font-family: var(--mono); font-size: 13.5px; color: var(--ink);
  max-width: 900px;
}
.ts-ask-label {
  flex: none; font-size: 11px; color: var(--muted);
  padding: 2px 8px; border: 1px solid var(--hair-2); border-radius: 6px;
}

/* with | without: side by side on wide screens, a toggle on narrow ones */
.term-tabs { display: none; gap: 4px; padding: 3px; margin: 0 0 12px; border: 1px solid var(--hair); border-radius: 999px; width: max-content; background: var(--panel-a); }
.term-tab {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: transparent; cursor: pointer;
  padding: 7px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
}
.term-tab.active { background: var(--ink); color: var(--bg); }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.tab-without .tab-dot { background: var(--bad); opacity: 1; }
.tab-with .tab-dot { background: var(--ok); opacity: 1; }

.ts-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ts-side { min-width: 0; display: flex; flex-direction: column; gap: 12px; transition: opacity 0.6s; }
.ts-side-head {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
}
.ts-side-head::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.ts-side[data-side="without"] .ts-side-head::before { background: var(--bad); }
.ts-side[data-side="with"] .ts-side-head::before { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.ts-side.is-waiting .term-body { opacity: 0.5; }
.ts-side.is-waiting .ts-side-head { opacity: 0.75; }
.ts-side .term-body, .ts-side .ts-side-head { transition: opacity 0.6s; }
.ts-side.is-active .term { border-color: color-mix(in oklab, var(--term-str) 32%, var(--term-line)); }
.ts-side[data-side="with"].is-active .term { border-color: color-mix(in oklab, var(--term-live) 40%, var(--term-line)); }

.term-scene-term .term-body { height: 440px; overflow-y: auto; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--term-line) transparent; }
.ts-pane { display: block; }
.ts-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ts-col { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ts-split-term .term-body { height: 420px; }

.ts-outcome {
  margin: 0; min-height: 3.2em;
  font-size: 15.5px; line-height: 1.55; color: var(--text);
  padding-left: 14px; border-left: 2px solid var(--hair-2);
  transition: opacity 0.6s;
}
.ts-side[data-side="without"] .ts-outcome { border-left-color: color-mix(in oklab, var(--bad) 65%, transparent); }
.ts-side[data-side="with"] .ts-outcome { border-left-color: color-mix(in oklab, var(--ok) 65%, transparent); }
.ts-outcome.is-pending { opacity: 0.0; }
.ts-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.ts-replay {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--hair); background: transparent; color: var(--muted);
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  font-family: var(--mono); font-size: 12.5px;
}
.ts-replay:hover { color: var(--ink); border-color: var(--hair-2); }
.ts-replay svg { width: 13px; height: 13px; }

/* transcript lines */
.term-scene-term .ln, .term-scene-term .ffwd, .term-scene-term .cl-ln {
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.5s var(--ease-out);
  margin: 0 0 12px;
}
.term-scene-term .show { opacity: 1; transform: none; }
.term-scene-term .ln.idle { opacity: 1; transform: none; color: var(--term-muted); }
.ln .p { color: var(--term-str); margin-right: 2px; }
.ln.user { color: var(--term-user); }
.ln.user.typing .typed::after { content: ""; display: inline-block; width: 7px; height: 14px; margin-left: 2px; vertical-align: -2px; background: var(--term-str); animation: blink 0.9s steps(1) infinite; }
.ln.idle .caret { background: var(--term-str); height: 14px; width: 7px; }
.ln.inject {
  border-left: 2px solid color-mix(in oklab, var(--term-str) 70%, transparent);
  padding: 9px 12px; border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, rgba(243, 196, 107, 0.08), rgba(243, 196, 107, 0.015));
  color: var(--term-muted);
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px;
}
.ln.inject.pulse { animation: inject-in 1.6s var(--ease-out); }
@keyframes inject-in {
  0% { box-shadow: 0 0 0 0 rgba(243, 196, 107, 0.0); background-color: rgba(243, 196, 107, 0.16); }
  30% { box-shadow: 0 0 34px -6px rgba(243, 196, 107, 0.45); }
  100% { box-shadow: 0 0 0 0 rgba(243, 196, 107, 0); background-color: transparent; }
}
.inject-tag {
  display: block; margin: 0 0 6px;
  font-size: 10.5px; letter-spacing: 0.04em; color: var(--term-str);
}
.inject-body mark.foc { background: var(--term-mark); color: #fff; border-radius: 3px; padding: 0 2px; }
.ln.agent { color: var(--term-ink); font-family: var(--sans); font-size: 14.5px; line-height: 1.58; }
.ln.agent p { margin: 0 0 8px; }
.ln.agent h4 { font-family: var(--sans); font-size: 14.5px; font-weight: 600; color: #fff; margin: 10px 0 6px; }
.ln.agent ul, .ln.agent ol { margin: 0 0 8px; padding-left: 20px; }
.ln.agent li { margin: 0 0 4px; }
.ln.agent blockquote { margin: 0 0 8px; padding-left: 10px; border-left: 2px solid var(--term-line); color: var(--term-muted); }
.ln.agent code { background: rgba(166, 182, 255, 0.12); color: #e6e9ff; font-size: 0.86em; white-space: normal; }
.ln.agent strong { color: #fff; }
.ln.tool { color: var(--term-muted); font-size: 12.5px; }
.tool-dot { color: var(--term-live); }
.tool-label { color: var(--term-ink); }
.tool-res { display: block; margin: 3px 0 0 18px; color: var(--term-faint); }
.ln.tool-win .tool-label { color: var(--term-live); }
.ln.tool-win.show { animation: win 1.4s var(--ease-out); }
.ln.tool-bounce .tool-label, .ln.tool-bounce .tool-res { color: #ff9f86; }
.ln.tool-bounce.show { animation: bounce-x 0.6s var(--ease-out); }
@keyframes win { 0% { background: rgba(95, 220, 191, 0.25); } 100% { background: transparent; } }
@keyframes bounce-x { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.ffwd { display: flex; gap: 10px; align-items: baseline; color: var(--term-faint); font-size: 12px; font-style: italic; }
.ffwd-chip { flex: none; font-style: normal; font-size: 10.5px; color: var(--term-muted); padding: 1px 6px; border: 1px solid var(--term-line); border-radius: 5px; }
.cl-ln { font-size: 12.5px; margin: 0 0 4px !important; }
.cl-ln .p { color: var(--term-str); margin-right: 6px; }
.cl-comment .c { color: var(--term-faint); font-style: italic; }
.cl-filegrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; }
.cl-file { color: var(--term-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-file.new { color: var(--term-live); }
.cl-tag { color: var(--term-faint); }
.cl-fm .k { color: var(--term-key); }
.cl-fm .s { color: var(--term-ink); }
.cl-fm .dim { color: var(--term-faint); }
.proof-note { margin: 28px 0 0; max-width: 820px; }

/* ==========================================================================
   IV. THE FLEET -- the plan board
   ========================================================================== */
.fleet-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.fleet-grid .ch-head { margin-bottom: 0; }
.fleet-grid .h2 { font-size: clamp(36px, 4.1vw, 60px); }
.points { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 16px; }
.points li { position: relative; padding-left: 26px; color: var(--muted); font-size: 16.5px; line-height: 1.55; }
.points li::before {
  content: ""; position: absolute; left: 2px; top: 0.6em; width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid var(--accent);
}
.points b { color: var(--ink); font-weight: 600; }

.board {
  margin: 0; position: relative;
  padding: 22px 22px 18px;
  border: 1px solid var(--hair-2); border-radius: 20px;
  background: var(--panel-a);
  box-shadow: var(--shadow-lg);
}
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 16px; }
.board-head .board-count { margin-left: auto; }
.board-replay {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--hair); background: transparent; color: var(--muted); cursor: pointer;
  padding: 4px 10px; border-radius: 999px; font-family: var(--mono); font-size: 12px;
}
.board-replay[hidden] { display: none; }
.board-replay:hover { color: var(--ink); border-color: var(--hair-2); }
.board-replay svg, .week-replay svg { width: 13px; height: 13px; }
.board-title { font-family: var(--mono); font-size: 13.5px; color: var(--ink); }
.board-count { font-family: var(--mono); font-size: 12.5px; color: var(--muted); transition: color 0.4s; }
.board-count.is-done { color: var(--ok); }
.bsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bstep {
  position: relative;
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--hair); border-radius: 12px;
  background: var(--bg);
  font-size: 15px; color: var(--ink);
  transition: border-color 0.5s, box-shadow 0.5s, background-color 0.5s, color 0.5s;
}
.bn { font-family: var(--serif); font-style: italic; color: var(--faint); font-size: 16px; }
.bt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.bs svg { width: 13px; height: 13px; }
.bstep.is-done { color: var(--muted); background: transparent; }
.bstep.is-done .bs { color: var(--ok); }
.bstep.is-ready .bs { color: var(--accent); }
.bstep.is-ready { border-style: dashed; border-color: color-mix(in oklab, var(--accent) 45%, transparent); }
.bstep.is-held-a { border-style: solid; border-color: var(--agent-a); box-shadow: inset 3px 0 0 var(--agent-a), 0 0 30px -12px var(--agent-a); }
.bstep.is-held-b { border-style: solid; border-color: var(--agent-b); box-shadow: inset 3px 0 0 var(--agent-b), 0 0 30px -12px var(--agent-b); }
.bstep.is-held-a .bs { color: var(--agent-a); }
.bstep.is-held-b .bs { color: var(--agent-b); }
.bstep.is-bounce { animation: bounce-x 0.65s var(--ease-out); }
.bstep.is-bounce::after {
  content: "taken"; position: absolute; right: 12px; top: -11px;
  font-family: var(--mono); font-size: 11px; color: var(--bg); background: var(--bad);
  padding: 1px 8px; border-radius: 6px;
  animation: pop 1.3s var(--ease-out) forwards;
}
@keyframes pop { 0% { opacity: 0; transform: translateY(4px); } 15%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.agents { display: flex; gap: 10px; margin: 16px 0 0; }
.ag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  padding: 4px 11px 4px 9px; border-radius: 999px; border: 1px solid var(--hair);
}
.ag i { width: 8px; height: 8px; border-radius: 50%; }
.ag-a i { background: var(--agent-a); box-shadow: 0 0 10px var(--agent-a); }
.ag-b i { background: var(--agent-b); box-shadow: 0 0 10px var(--agent-b); }
.ag.is-busy { color: var(--ink); border-color: var(--hair-2); }
.board-log {
  margin: 14px 0 0; padding: 12px 14px; min-height: 92px;
  border-radius: 12px; background: var(--term-bg); color: var(--term-ink);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
}
.board-log p { margin: 0 0 3px; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; }
.js .board.is-armed .board-log p { opacity: 0; transform: translateX(-6px); transition: opacity 0.4s, transform 0.5s var(--ease-out); }
.js .board.is-armed .board-log p.is-on { opacity: 1; transform: none; }
.board-log .who { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-size: 11px; color: #0b1020; margin-top: 1px; }
.board-log .who.a { background: #6fd3ff; }
.board-log .who.b { background: #c39bff; }
.board-log .ok { color: var(--term-live); margin-left: 6px; }
.board-log .no { color: #ff9f86; margin-left: 6px; }
.board figcaption { margin: 14px 2px 0; font-size: 13.5px; }

/* ==========================================================================
   V. THE FOLDER
   ========================================================================== */
.folder-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 3.5vw, 48px); align-items: start; }
.file {
  margin: 0; position: relative;
  border: 1px solid var(--hair-2); border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.file-cell { position: relative; min-width: 0; }
.file-star {
  position: absolute; left: 9%; top: 52px; z-index: 2; pointer-events: none;
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--k-gotcha); box-shadow: 0 0 0 6px color-mix(in oklab, var(--k-gotcha) 18%, transparent), 0 0 28px var(--k-gotcha);
  opacity: 0;
}
.js .file-cell.is-armed .file { clip-path: circle(0% at 9% 52px); }
.js .file-cell.is-armed .file-star { opacity: 1; animation: star-wait 2.2s ease-in-out infinite; }
.js .file-cell.is-armed.in .file { clip-path: circle(160% at 9% 52px); transition: clip-path 1.5s var(--ease-io) 0.35s; }
.js .file-cell.is-armed.in .file-star { animation: star-bloom 1.1s var(--ease-out) forwards; }
@keyframes star-wait { 50% { transform: scale(1.35); } }
@keyframes star-bloom { 0% { transform: scale(1); opacity: 1; } 40% { transform: scale(2.6); opacity: 1; } 100% { transform: scale(6); opacity: 0; } }
.file-path {
  margin: 0; padding: 14px 20px;
  border-bottom: 1px solid var(--hair);
  font-family: var(--mono); font-size: 12.5px; color: var(--ink);
  overflow-wrap: anywhere;
}
.file-path span { color: var(--faint); }
.file-body { padding: 18px 22px 20px; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: var(--text); }
.fl { margin: 0; padding: 0 8px; margin-left: -8px; border-radius: 6px; transition: background-color 0.4s, color 0.4s; overflow-wrap: anywhere; }
.fl .k { color: var(--key); margin-right: 6px; }
.fl-rule { color: var(--faint); }
.fl-text { margin-top: 10px; font-family: var(--serif); font-size: 17px; line-height: 1.55; color: var(--ink); font-variation-settings: "opsz" 24; }
.fl.is-hot { background: var(--accent-soft); color: var(--ink); }
.file-notes {
  list-style: none; margin: 0; padding: 18px 22px 22px;
  border-top: 1px dashed var(--hair-2);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 26px;
  font-size: 14.5px; line-height: 1.5; color: var(--muted);
}
.file-notes li { padding-left: 12px; border-left: 1px solid var(--hair); transition: border-color 0.4s, color 0.4s; cursor: default; }
.file-notes b { display: block; margin: 0 0 3px; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink); }
.file-notes li.is-hot { border-left-color: var(--accent); color: var(--text); }

.folder-side { display: grid; gap: 18px; }
.garden {
  position: relative;
  padding: 22px 22px 20px;
  border: 1px solid var(--hair-2); border-radius: 20px;
  background: var(--panel-a);
}
.garden-kicker { margin: 0 0 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.garden-q { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.3; color: var(--ink); font-variation-settings: "opsz" 48; }
.garden-q code { font-size: 0.72em; vertical-align: 0.08em; }
.garden-stars { position: relative; height: 62px; margin: 6px 0 8px; }
.gs {
  position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%;
  background: var(--k-runbook); box-shadow: 0 0 14px var(--k-runbook);
  transition: left 1s var(--ease-out), opacity 0.8s, transform 0.8s var(--ease-out), background-color 0.6s;
}
.gs::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px solid color-mix(in oklab, var(--k-runbook) 40%, transparent); }
.gs-a { left: 36%; }
.gs-b { left: 64%; }
.garden.is-merged .gs-a, .garden.is-merged .gs-b { left: 50%; }
.garden.is-merged .gs-b { opacity: 0; transform: scale(0.4); }
.garden.is-merged .gs-a { transform: scale(1.45); }
.garden.is-dismissed .gs { background: var(--faint); box-shadow: none; }
.garden-btns { display: flex; gap: 8px; }
.g-btn {
  cursor: pointer; padding: 9px 18px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600;
  border: 1px solid var(--hair-2); background: transparent; color: var(--ink);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, opacity 0.3s;
}
.g-yes { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.g-btn:hover { border-color: var(--accent); }
.g-btn[disabled] { opacity: 0.4; cursor: default; }
.garden-out { margin: 14px 0 0; font-size: 14.5px; color: var(--muted); min-height: 3.1em; }
.garden-out button { border: 0; background: none; padding: 0; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   VI. THE CONSOLE
   ========================================================================== */
.shot-frame {
  border: 1px solid var(--hair-2); border-radius: 20px;
  background: var(--term-bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
:root[data-theme="light"] .shot-frame { background: var(--panel); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .shot-frame { background: var(--panel); } }
.shot-bar {
  margin: 0; display: flex; justify-content: center;
  padding: 10px 16px; border-bottom: 1px solid var(--hair);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.shot-bar span { padding: 3px 14px; border-radius: 999px; background: var(--accent-soft); }
.themed-dark { display: none !important; }
:root[data-theme="dark"] .themed-dark { display: block !important; }
:root[data-theme="dark"] .themed-light { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themed-dark { display: block !important; }
  :root:not([data-theme="light"]) .themed-light { display: none !important; }
}
.hotshot { margin: 0; }
.hs-wrap { position: relative; }
.hs-wrap img { width: 100%; aspect-ratio: 1440 / 900; object-fit: cover; }
.hs {
  position: absolute; z-index: 2; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 28%, transparent), 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.hs::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--accent); opacity: 0;
  animation: hs-ping 3.2s var(--ease-out) infinite;
}
.hs[data-hs="2"]::after { animation-delay: 0.6s; }
.hs[data-hs="3"]::after { animation-delay: 1.2s; }
.hs[data-hs="4"]::after { animation-delay: 1.8s; }
@keyframes hs-ping { 0% { transform: scale(1); opacity: 0.7; } 60%, 100% { transform: scale(2.1); opacity: 0; } }
.hs.is-hot { transform: scale(1.25); box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 35%, transparent), 0 0 30px var(--glow); }
.hs-notes {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 24px;
  counter-reset: hs;
}
.hs-notes li {
  position: relative; padding: 0 0 0 36px; font-size: 15px; line-height: 1.55; color: var(--muted);
  counter-increment: hs; transition: color 0.3s;
}
.hs-notes li::before {
  content: counter(hs); position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent);
  font-family: var(--serif); font-style: italic; font-size: 14px;
  transition: background-color 0.3s, color 0.3s;
}
.hs-notes b { color: var(--ink); font-weight: 600; }
.hs-notes li.is-hot { color: var(--text); }
.hs-notes li.is-hot::before { background: var(--accent); color: var(--accent-ink); }
.thumbs {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
}
.thumb a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--hair-2); box-shadow: var(--shadow-md); transition: transform 0.5s var(--ease-out), box-shadow 0.5s; cursor: zoom-in; }
.thumb a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.thumb img { width: 100%; aspect-ratio: 1440 / 900; object-fit: cover; }
.thumb p { margin: 12px 2px 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.thumb p b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.console .wrap > .fine { margin: 22px 0 0; }
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(1400px, 94vw); width: 94vw; max-height: 94vh;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(4, 6, 12, 0.82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox img { width: 100%; height: auto; max-height: 86vh; object-fit: contain; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); cursor: zoom-out; }
.lightbox p { margin: 12px 4px 0; color: #c5c8dc; font-size: 14px; text-align: center; }

/* ==========================================================================
   VII. TRY IT
   ========================================================================== */
.install-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(22px, 3vw, 40px); align-items: start; }
.qs { list-style: none; margin: 0; padding: 0 0 0 52px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.qs::before {
  content: ""; position: absolute; left: 14px; top: 16px; bottom: 40px; width: 1px;
  background: linear-gradient(var(--accent), var(--hair-2) 70%, transparent);
}
.qs-step { position: relative; padding: 0 0 38px; }
.qs-main { min-width: 0; }
.qs-main h3 {
  position: relative;
  font-family: var(--serif); font-size: 28px; line-height: 1.15; font-weight: 400; margin: 0 0 16px;
  letter-spacing: -0.012em; font-variation-settings: "opsz" 72;
}
.qs-n {
  position: absolute; left: -52px; top: 1px;
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--accent); color: var(--accent);
  font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1;
  box-shadow: 0 0 0 5px var(--bg), 0 0 18px var(--glow);
}
.qs-main h3 .opt { font-family: var(--mono); font-size: 11.5px; color: var(--faint); border: 1px solid var(--hair); border-radius: 999px; padding: 2px 8px; vertical-align: 0.35em; margin-left: 6px; }
.qs-main .os-switch { margin: 0 0 12px; }
.qs-out {
  margin: 0 0 14px; padding: 12px 16px 13px;
  border-radius: 12px; background: var(--term-bg); border: 1px solid var(--term-line);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: var(--term-ink);
}
.qs-out p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.qs-out .qs-out-h { color: var(--term-faint); margin-bottom: 4px; }
.qs-out .qs-out-gap { color: var(--term-faint); }
.qs-try {
  margin: 14px 0 0; padding: 12px 16px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid color-mix(in oklab, var(--accent) 25%, transparent);
  font-size: 15.5px; color: var(--text);
}
.qs-try b { color: var(--ink); }
.code {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 12px; padding: 10px 10px 10px 16px;
  border-radius: 12px; border: 1px solid var(--term-line);
  background: var(--term-bg); color: var(--term-ink);
  font-family: var(--mono); font-size: 13.5px;
  min-width: 0;
}
.code .p { color: var(--term-str); }
.code .cmd { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.code .copy-btn { background: transparent; border-color: var(--term-line); color: var(--term-muted); }
.code .copy-btn:hover { color: #fff; border-color: var(--term-str); }
.qs-note { margin: 0; font-size: 15.5px; color: var(--muted); }
.qs-note code { font-size: 0.82em; }
.what { margin-top: 4px; }
.what summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--muted); list-style: none; }
.what summary::-webkit-details-marker { display: none; }
.what summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.3s var(--ease-out); }
.what[open] summary::before { transform: rotate(45deg); }
.what summary:hover { color: var(--ink); }
.what p { margin: 12px 0 0; font-size: 15.5px; color: var(--muted); }
.what p code { font-size: 0.82em; white-space: normal; }

.leave {
  position: sticky; top: calc(var(--head-h) + 24px);
  padding: 28px 28px 26px;
  border-radius: 22px;
  border: 1px solid var(--hair-2);
  background:
    radial-gradient(120% 80% at 100% 0%, var(--accent-soft), transparent 60%),
    var(--panel-a);
}
.leave-kicker { margin: 0 0 6px; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--accent); }
.leave h3 { font-family: var(--serif); font-size: 30px; line-height: 1.1; font-weight: 400; margin: 0 0 18px; letter-spacing: -0.014em; font-variation-settings: "opsz" 96; }
.leave-note { margin: -4px 0 14px; font-size: 14px; color: var(--muted); }
.leave-list { list-style: none; margin: 6px 0 18px; padding: 0; display: grid; gap: 9px; font-size: 15px; color: var(--text); }
.leave-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; }
.leave-list svg { width: 16px; height: 16px; margin-top: 4px; color: var(--ok); }
.leave-keep { margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: var(--bg); border: 1px solid var(--hair); font-size: 15px; color: var(--text); }
.leave-keep code { font-size: 0.82em; }
.leave-more { margin: 0; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.faq-grid .ch-head { position: sticky; top: calc(var(--head-h) + 40px); margin-bottom: 0; }
.faq-stem {
  margin: 34px 0 4px; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--muted);
}
.faq details { border-top: 1px solid var(--hair); }
.faq details:last-child { border-bottom: 1px solid var(--hair); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 20px 48px 20px 0;
  font-family: var(--serif); font-size: clamp(20px, 1.7vw, 23px); line-height: 1.3;
  color: var(--ink); letter-spacing: -0.006em;
  font-variation-settings: "opsz" 48;
  transition: color 0.3s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 14px; height: 1.5px; background: var(--muted); border-radius: 1px;
  transition: transform 0.45s var(--ease-out), background-color 0.3s;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { color: var(--accent); }
.faq summary:hover::before, .faq summary:hover::after { background: var(--accent); }
.faq .a { padding: 0 0 24px; max-width: 660px; color: var(--text); font-size: 17px; }
.faq .a p { margin: 0; }
.faq .a code { font-size: 0.8em; white-space: normal; }
.faq details[open] .a { animation: faq-open 0.6s var(--ease-out); }
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   FINALE
   ========================================================================== */
.finale {
  position: relative; overflow: hidden;
  padding: clamp(120px, 18vh, 200px) 0 clamp(110px, 16vh, 180px);
  text-align: center;
}
.finale::before {
  content: ""; position: absolute; left: 50%; top: 12%; width: 900px; height: 900px; margin-left: -450px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
  pointer-events: none; z-index: -1;
}
.finale-in { display: grid; justify-items: center; }
.finale-mark { width: 120px; height: 120px; margin: 0 0 34px; color: var(--ink); }
.fm-ring { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 100 100; stroke-dashoffset: 0; }
.fm-cut { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 0; }
.fm-star { fill: var(--accent); filter: drop-shadow(0 0 10px var(--glow)); transform-origin: 98px 22px; }
.js .finale.is-armed .fm-ring { stroke-dashoffset: 100; }
.js .finale.is-armed .fm-cut { stroke-dashoffset: 100; }
.js .finale.is-armed .fm-star { transform: scale(0); }
.js .finale.is-armed.is-in .fm-ring { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s var(--ease-io); }
.js .finale.is-armed.is-in .fm-cut { stroke-dashoffset: 0; transition: stroke-dashoffset 0.9s var(--ease-out) 1.3s; }
.js .finale.is-armed.is-in .fm-star { transform: scale(1); transition: transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 1.9s; }
.finale-h {
  font-size: clamp(48px, 7.4vw, 112px);
  font-style: italic;
  font-weight: 360;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  margin: 0 0 28px;
}
.finale-p { max-width: 640px; margin: 0 auto 40px; font-size: clamp(18px, 1.5vw, 20px); color: var(--text); }
.finale-act { display: grid; justify-items: center; gap: 22px; }
.finale-act .os-cap { justify-self: center; }
.finale-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 30px; margin: 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-foot { border-top: 1px solid var(--hair); padding: 64px 0 56px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; }
.foot-tag { margin: 18px 0 14px; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink); }
.colophon { margin: 0; max-width: 520px; font-size: 14px; color: var(--muted); }
.colophon a { color: var(--muted); }
.forget-link { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.forget-link:hover, .colophon a:hover { color: var(--ink); }
.foot-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.foot-nav div { display: grid; gap: 8px; align-content: start; }
.foot-nav b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.foot-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.foot-nav a:hover { color: var(--ink); }

/* a copied command leaves a small burst of stars behind */
.burst { position: fixed; z-index: 80; width: 0; height: 0; pointer-events: none; }
.burst i {
  position: absolute; left: -2.5px; top: -2.5px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--glow);
  animation: burst 0.8s var(--ease-out) forwards;
}
@keyframes burst {
  0% { transform: rotate(var(--a)) translateX(0) scale(1); opacity: 1; }
  100% { transform: rotate(var(--a)) translateX(var(--r, 28px)) scale(0.2); opacity: 0; }
}

/* ==========================================================================
   THE PAGE REMEMBERS YOU (home.js): a briefing for returning visitors
   ========================================================================== */
.visit {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  width: min(380px, calc(100vw - 44px));
  padding: 16px 18px 16px;
  border-radius: 16px;
  background: var(--term-bg); color: var(--term-ink);
  border: 1px solid var(--term-line);
  box-shadow: var(--shadow-lg), 0 0 50px -20px rgba(243, 196, 107, 0.35);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  transform: translateY(24px); opacity: 0;
  transition: transform 0.8s var(--ease-out), opacity 0.6s;
}
.visit.is-on { transform: none; opacity: 1; }
.visit p { margin: 0 0 6px; }
.visit .v-tag { color: var(--term-str); font-size: 11.5px; }
.visit .v-line { color: var(--term-muted); }
.visit .v-line b { color: var(--term-ink); font-weight: 500; }
.visit-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 10px; }
.visit-btns button {
  cursor: pointer; border-radius: 9px; padding: 7px 12px;
  font-family: var(--sans); font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--term-line); background: transparent; color: var(--term-ink);
}
.visit-btns .v-go { background: var(--term-str); color: #1b1304; border-color: var(--term-str); }
.visit-btns button:hover { border-color: var(--term-str); }
.visit-x {
  position: absolute; right: 10px; top: 10px;
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--term-muted); cursor: pointer;
}
.visit-x:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.visit-x svg { width: 14px; height: 14px; }
.visit .v-fine { color: var(--term-faint); font-size: 11px; margin: 0; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1279px) { .scroll-cue { display: none; } }
@media (max-width: 1179px) {
  /* the sky gets its own band under the copy */
  .hero { min-height: auto; padding-bottom: clamp(380px, 92vw, 660px); }
  .sky { -webkit-mask-image: linear-gradient(to bottom, #000 92%, transparent); mask-image: linear-gradient(to bottom, #000 92%, transparent); }
  .sky-legend { left: 50%; right: auto; bottom: 18px; width: max-content; max-width: calc(100% - 2 * var(--gutter)); transform: translateX(-50%); justify-content: center; font-size: 10.5px; gap: 8px; }
  .lg-hint { display: none; }
  .hero-copy::before { inset: -10% -10% -10% -10%; }
}
@media (max-width: 1100px) {
  .head-nav { display: none; }
  .nav-menu { display: block; order: 3; margin-left: 2px; }
  .head-tools { margin-left: auto; }
  .head-cta { height: 34px; padding: 0 14px; font-size: 14px; }
  .install-grid { grid-template-columns: minmax(0, 1fr); }
  .leave { position: relative; top: 0; }
  .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .faq-grid .ch-head { position: relative; top: 0; margin-bottom: 20px; }
}
@media (max-width: 960px) {
  .fleet-grid, .folder-grid { grid-template-columns: minmax(0, 1fr); }
  .board, .file-cell, .folder-side { max-width: 720px; }
}
@media (max-width: 900px) {
  .days {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px;
    scroll-padding: 0 var(--gutter); scrollbar-width: none;
  }
  .days::-webkit-scrollbar { display: none; }
  .day { flex: 0 0 84%; scroll-snap-align: start; min-height: 236px; }
  .hrow { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 2px; }
  .hs-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ostep { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .ts-duo, .ts-split { grid-template-columns: minmax(0, 1fr); }
  .term-tabs { display: inline-flex; }
  .ts-duo .ts-side:not(.is-shown) { display: none; }
  .ts-side.is-waiting .term-body { opacity: 1; }
  .ts-side-head { display: none; }
  .term-scene-term .term-body { height: 400px; }
  .ts-split-term .term-body { height: 300px; }
  .sf-outcomes { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .file-notes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .chapter { padding-top: 76px; }
  .head-in { gap: 8px; }
  .head-cta { padding: 0 12px; }
  .brand-word { font-size: 21px; }
  .gh-link { display: none; }
  .hero { padding-top: calc(var(--head-h) + 28px); }
  .hero-pre { margin-bottom: 18px; }
  .install-pill { font-size: 12px; padding: 10px 10px 8px 12px; gap: 6px 9px; align-items: flex-start; text-align: left; flex-wrap: wrap; width: 100%; }
  .install-pill .cmd, .code .cmd { white-space: normal; overflow-wrap: break-word; line-height: 1.5; padding-top: 1px; }
  .install-pill .cmd { flex: 1 1 calc(100% - 24px); }
  .install-pill .copy-btn { margin-left: auto; padding: 4px 10px; }
  .code { font-size: 12.5px; }
  .install-pill .p, .code .p { padding-top: 4px; }
  .code { align-items: flex-start; }
  .hero-facts { margin-top: 30px; gap: 6px 16px; font-size: 13.5px; }
  /* phones: the numbers sit inline and the command gets the full width */
  .qs { padding-left: 0; }
  .qs::before { display: none; }
  .qs-n { position: static; display: inline-grid; vertical-align: 0.12em; margin-right: 12px; width: 26px; height: 26px; font-size: 14px; box-shadow: none; }
  /* the command gets the whole width; the copy button drops under it */
  .code { font-size: 12px; flex-wrap: wrap; row-gap: 6px; padding: 10px 10px 8px 12px; }
  .code .cmd { flex: 1 1 calc(100% - 24px); }
  .code .copy-btn { margin-left: auto; padding: 4px 10px; }
  .qs-out { font-size: 11.5px; padding: 10px 12px; }
  .qs-main h3 { font-size: 24px; }
  .hs-notes, .thumbs { grid-template-columns: minmax(0, 1fr); }
  .hs { width: 22px; height: 22px; margin: -11px 0 0 -11px; font-size: 12px; }
  .code { font-size: 13px; padding-left: 12px; }
  .leave { padding: 22px 18px 20px; }
  .board { padding: 16px 14px 14px; }
  .bstep { grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; padding: 11px 12px; font-size: 14px; }
  .bs { font-size: 11px; }
  .t-cols { column-count: 1; }
  .scene-tab { font-size: 14px; padding: 8px 13px 9px; }
  .file-body { padding: 16px 16px 18px; font-size: 12.5px; }
  .visit { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 12px 14px; }
  .visit .v-detail, .visit .v-tag, .visit .v-fine { display: none; }
  .visit-btns { margin: 8px 0 0; }
}

@media (max-width: 360px) {
  /* the install URL is 34 unbreakable characters; keep it on one line */
  .install-pill, .code { font-size: 11.5px; }
  .install-pill { padding-left: 10px; }
}

/* ==========================================================================
   REDUCED MOTION: everything arrives at once, nothing drifts
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }
  .js .rv { opacity: 1; transform: none; }
  .js [data-split] .wi { transform: none; }
  .install-pill::after, .scroll-cue span::after { display: none; }
}
