/* ============================================================
   Hyperception — shared design system
   Dark, committed van-Gogh aesthetic. Two-organ accent motif:
   leaf-green = the hands (AgentHarness), periwinkle = the memory (Hyperception).
   Self-contained: no external fonts/CDN (NS-E8). System font stacks only.
   ============================================================ */

:root {
  /* grounds */
  --deep: #0b0f0b;          /* deepest */
  --panel: #0f140f;         /* card fill */
  --ink: #eef4e4;           /* primary text */
  --ink-soft: #b9c3ac;
  --ink-faint: #9fac92;
  --line: rgba(238,244,228,0.11);
  --line-2: rgba(238,244,228,0.06);
  --glass-2: rgba(24,32,23,0.42);

  /* two-organ accents */
  --harness: #9cc091;       /* leaf green — hands */
  --harness-bright: #b6d9aa;
  --harness-wash: rgba(156,192,145,0.12);
  --harness-line: rgba(156,192,145,0.34);
  --hyper: #9db4e0;          /* dusk periwinkle — memory */
  --hyper-bright: #bccdf2;
  --hyper-wash: rgba(157,180,224,0.12);
  --hyper-line: rgba(157,180,224,0.34);

  --danger: #d98a7a;         /* the vanilla rail fray */

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, monospace;

  --maxw: 1120px;
  --r: 16px;
  --r-sm: 11px;
  --nav-clear: 96px;  /* fixed-nav clearance: anchor scroll offset, mobile sheet top */
  --pad: clamp(14px, 2.3vw, 30px);
  --radius: clamp(18px, 2.2vw, 32px);
  --edge-shadow: inset 0 1px rgba(255,255,255,0.06), inset 0 0 0 1px rgba(238,244,228,0.05);

  /* motion vocabulary — four durations, one curve; nothing else */
  --t-press: 160ms;   /* presses, small hovers */
  --t-color: 400ms;   /* surface/color fades */
  --t-enter: 700ms;   /* reveals, entrances */
  --t-scene: 1000ms;  /* scene-level fades (hero, veil) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset / base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-clear); color-scheme: dark; }
:focus-visible { outline: 2px solid var(--harness); outline-offset: 3px; }
main:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--deep);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--harness-wash); }

/* ---------- atmosphere: the van Gogh, pre-blurred ----------
   field-blur.jpg is a tiny pre-blurred copy of the painting, upscaled by the
   browser — zero live filter cost. A live blur() here plus stacked
   backdrop-filters breaks Chromium compositing mid-scroll (text layers drop).
   The gradient darkens just enough for AA contrast; the painting stays visible. */
.atmosphere { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: var(--deep); }
.atmosphere .field {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 40%;
}
.atmosphere::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,15,11,0.52), rgba(13,18,13,0.66) 40%, rgba(11,15,11,0.6));
}
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.4; mix-blend-mode: overlay;
  background-size: 128px 128px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.6 0 0 0 0 0.5 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='128' height='128' filter='url(%23n)'/%3E%3C/svg%3E"); }
@supports (-webkit-touch-callout: none) { .grain { mix-blend-mode: normal; opacity: 0.18; } }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 44px); }
.section { padding: clamp(68px, 10vw, 148px) 0; position: relative; border-top: 1px solid var(--line-2); }
.section.tight { padding: clamp(44px, 6vw, 76px) 0; }
.sec-head { display: flex; flex-direction: column; gap: 15px; margin-bottom: clamp(30px, 4vw, 46px); max-width: 66ch; }

/* ---------- typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.012em; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.5rem); line-height: 1.02; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
h3 { font-size: 1.32rem; letter-spacing: -0.005em; }
em, .em { font-style: italic; }
p { margin: 0; }
.eyebrow { font-family: var(--mono); font-weight: 400; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin: 0; }
.eyebrow.h { color: var(--harness); }
.eyebrow.y { color: var(--hyper); }
.lede { color: var(--ink-soft); font-size: clamp(1.02rem, 1.6vw, 1.16rem); max-width: 64ch; line-height: 1.55; }
.mono { font-family: var(--mono); }
.k-h { color: var(--harness); }
.k-y { color: var(--hyper); }
.em-h { font-style: italic; color: var(--harness-bright); }
.em-y { font-style: italic; color: var(--hyper-bright); }

/* ---------- buttons / CTAs ---------- */
.btn { font: inherit; font-size: 0.95rem; font-weight: 500; cursor: pointer; border-radius: 100px;
  padding: 12px 22px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent;
  transition: transform var(--t-press) var(--ease), background var(--t-color) var(--ease), border-color var(--t-color) var(--ease), color var(--t-color) var(--ease); white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--deep); font-weight: 600; }
.btn-primary:hover { background: #fff; }
.btn-text { background: transparent; color: var(--ink-soft); padding: 6px 2px; border-radius: 6px; }
.btn-text:hover { color: var(--ink); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--harness); outline-offset: 3px; }

.card { background: rgba(16,22,16,0.5); border: 1px solid transparent; border-radius: var(--r); padding: 22px 22px;
  box-shadow: inset 0 1px rgba(255,255,255,0.07), inset 0 0 0 1px rgba(238,244,228,0.05);
  transition: background var(--t-color) var(--ease), box-shadow var(--t-color) var(--ease); }
.card:hover { background: rgba(24,32,23,0.6); box-shadow: inset 0 1px rgba(255,255,255,0.09), inset 0 0 0 1px rgba(238,244,228,0.09); }

/* ============================================================
   NAV — floating glass pill, centered (the gold-standard capsule)
   ============================================================ */
.nav { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 80;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 9px 8px 18px; border-radius: 999px;
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  background: rgba(12,17,12,0.55);
  box-shadow: inset 0 1px rgba(255,255,255,0.12), inset 0 0 0 1px rgba(233,240,228,0.14), 0 6px 16px -10px rgba(0,0,0,0.65);
  font-size: 13px; letter-spacing: .01em; white-space: nowrap; max-width: calc(100vw - 20px);
  transition: transform var(--t-color) var(--ease);
  animation: navIn var(--t-enter) var(--ease) backwards; }
.nav.nav--hidden { transform: translate(-50%, calc(-100% - 22px)); }
@keyframes navIn { from { opacity: 0; transform: translate(-50%, -18px); } to { opacity: 1; transform: translate(-50%, 0); } }
.nav__brand { display: flex; align-items: center; gap: 9px; font-size: 0.92rem; font-weight: 650; color: var(--ink); margin-right: 10px; }
.nav__brand .glyph, .brand .glyph, .showwin__bar .glyph { width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: conic-gradient(from 200deg, var(--harness), var(--hyper), var(--harness)); }
.nav__links { display: flex; gap: 2px; }
.nav__links a { color: rgba(226,235,219,0.72); padding: 8px 13px; border-radius: 999px;
  transition: color var(--t-press) var(--ease), background var(--t-press) var(--ease); }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--ink); background: rgba(233,240,228,0.1); }
.nav .kbtn { font-family: var(--mono); font-size: 11px; color: rgba(226,235,219,0.6); border: 0; background: transparent;
  border-radius: 999px; padding: 8px 10px; cursor: pointer;
  transition: color var(--t-press) var(--ease), background var(--t-press) var(--ease); }
.nav .kbtn:hover { color: var(--ink); background: rgba(233,240,228,0.1); }
.nav__cta { margin-left: 8px; color: #14201a; background: rgba(238,244,228,0.92); padding: 9px 16px; border-radius: 999px;
  font-weight: 600; transition: background var(--t-color) var(--ease), transform var(--t-press) var(--ease); }
.nav__cta:hover { background: #fff; }
.nav__cta:active { transform: scale(.97); }
.nav__menu { display: none; color: rgba(226,235,219,0.8); padding: 8px 10px; align-items: center;
  border-radius: 999px; background: transparent; border: 0; cursor: pointer;
  transition: color var(--t-press) var(--ease), background var(--t-press) var(--ease); }
.nav__menu:hover { color: var(--ink); background: rgba(233,240,228,0.1); }
.nav__menu svg { display: block; }
@media (max-width: 800px) {
  .nav__links, .nav .kbtn { display: none; }
  .nav__menu { display: inline-flex; }
}
@media (max-width: 520px) {
  .nav__cta { display: none; }
  .nav { padding: 8px 10px 8px 16px; }
}

/* mobile sheet under the pill */
.navdrop { position: fixed; top: calc(var(--nav-clear) - 14px); left: 50%; transform: translateX(-50%); z-index: 79;
  width: min(380px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 20px;
  background: rgba(12,17,12,0.74);
  -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: inset 0 1px rgba(255,255,255,0.12), inset 0 0 0 1px rgba(238,244,228,0.1), 0 12px 26px -14px rgba(0,0,0,0.7);
  animation: navIn var(--t-color) var(--ease) both; }
.navdrop a { color: var(--ink-soft); font-size: 15px; padding: 14px 16px; border-radius: 12px;
  transition: background var(--t-press) var(--ease), color var(--t-press) var(--ease); }
.navdrop a:hover { color: var(--ink); background: rgba(233,240,228,0.08); }
.navdrop .navdrop__cta { margin-top: 6px; text-align: center; color: #14201a; background: rgba(238,244,228,0.92);
  font-weight: 600; border-radius: 12px; }
.navdrop .navdrop__cta:hover { color: #14201a; background: #fff; }

/* ⌘K command palette */
.palette { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-start; justify-content: center;
  padding-top: 14vh; }
.palette[data-open="true"] { display: flex; }
.palette-scrim { position: absolute; inset: 0; background: rgba(6,9,6,0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.palette-box { position: relative; width: min(92vw, 560px); border-radius: 15px; overflow: hidden;
  background: rgba(16,22,16,0.86); border: 1px solid var(--line); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.palette-box input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  color: var(--ink); font: inherit; font-size: 1.05rem; padding: 18px 20px; outline: none; }
.palette-list { max-height: 44vh; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 9px; cursor: pointer;
  color: var(--ink-soft); font-size: 0.94rem; }
.palette-item[aria-selected="true"], .palette-item:hover { background: rgba(238,244,228,0.06); color: var(--ink); }
.palette-item .pk { margin-left: auto; font-family: var(--mono); font-size: 0.7rem; color: var(--ink-faint); }

/* ============================================================
   HERO
   ============================================================ */
.hero-ctas { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }


/* ---------- code blocks ---------- */
.code { background: rgba(8,11,8,0.7); border: 1px solid transparent; box-shadow: var(--edge-shadow); border-radius: var(--r-sm);
  padding: 15px 16px; overflow-x: auto; position: relative; }
.code pre { margin: 0; font-family: var(--mono); font-size: 0.8rem; line-height: 1.75; color: var(--ink-soft); white-space: pre; }
.code .c { color: var(--ink-faint); }
.code .g { color: var(--harness); }
.code .b { color: var(--hyper); }

.closing-line { margin-top: 26px; font-size: 1.06rem; color: var(--ink); max-width: 74ch; }

/* ============================================================
   HANDS — layer stepper + gate chain (green)
   ============================================================ */
.organ-section.h { --accent: var(--harness); --accent-wash: var(--harness-wash); --accent-line: var(--harness-line); }
.stepper { display: grid; gap: 10px; position: relative; }
.step { text-align: left; width: 100%; font: inherit; color: inherit; cursor: pointer;
  border: 1px solid var(--line); border-radius: 13px; background: rgba(15,20,15,0.4);
  padding: 16px 18px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; transition: background .2s, border-color .2s; }
.step:hover { background: var(--accent-wash); }
.step .snum { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); border: 1px solid var(--accent-line);
  border-radius: 7px; padding: 4px 8px; white-space: nowrap; }
.step .stitle { font-family: var(--serif); font-size: 1.14rem; }
.step .scmd { font-family: var(--mono); font-size: 0.76rem; color: var(--ink-faint); margin-left: 8px; }
.step .sbody { color: var(--ink-soft); font-size: 0.9rem; margin-top: 6px; max-width: 72ch; }
.step .sbody code { font-family: var(--mono); font-size: 0.88em; color: var(--ink); }

.gatechain { list-style: none; margin: 28px 0 0; padding: 26px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.gatechain::before { content: ""; position: absolute; top: 10px; left: 2%; right: 2%; height: 1px; background: var(--accent-line); }
@media (max-width: 860px) { .gatechain { grid-template-columns: 1fr; gap: 20px; } .gatechain::before { display: none; } }
.gate { position: relative; padding-top: 8px; }
.gate .gn { display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: .08em; color: var(--accent); margin-bottom: 8px; }
.gate h3 { font-size: 1.08rem; margin: 0 0 6px; }
.gate p { color: var(--ink-soft); font-size: 0.89rem; max-width: 32ch; }
.gate .mech { display: block; margin-top: 8px; font-family: var(--mono); font-size: 0.68rem; color: var(--ink-faint); }

.footnote { margin-top: 20px; font-size: 0.9rem; color: var(--ink-faint); max-width: 74ch; }
.footnote code { font-family: var(--mono); color: var(--ink-soft); }

/* ============================================================
   MEMORY — sleep-cycle tabs + node cards + terminal (blue)
   ============================================================ */
.cycle-tabs { display: flex; flex-wrap: nowrap; gap: 4px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 94%, transparent); mask-image: linear-gradient(90deg, #000 94%, transparent); }
.cycle-tabs::-webkit-scrollbar { display: none; }
.cycle-tab { font: inherit; font-family: var(--mono); font-size: 0.78rem; letter-spacing: .03em; white-space: nowrap;
  padding: 8px 14px; border-radius: 9px; cursor: pointer; border: 0; background: transparent; color: var(--ink-faint);
  transition: color var(--t-press) var(--ease), background var(--t-color) var(--ease); }
.cycle-tab:hover { color: var(--ink); }
.cycle-tab[aria-selected="true"] { background: rgba(238,244,228,0.1); color: var(--ink); }
.cycle-panel { border: 1px solid var(--line); border-radius: 14px;
  background: rgba(15,20,15,0.4); padding: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; min-height: 150px; }
@media (max-width: 760px) { .cycle-panel { grid-template-columns: 1fr; } }
.cycle-panel .cstate { font-family: var(--mono); font-size: 0.68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--hyper); }
.cycle-panel h3 { margin: 8px 0 10px; }
.cycle-panel p { color: var(--ink-soft); font-size: 0.94rem; }
.cycle-panel p code { font-family: var(--mono); font-size: 0.88em; color: var(--ink); }

.nodes { margin-top: 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .nodes { grid-template-columns: 1fr; } }
.node b { font-family: var(--mono); font-size: 0.78rem; color: var(--hyper); }
.node p { color: var(--ink-soft); font-size: 0.88rem; margin-top: 6px; }
.node .supersede { margin-top: 10px; font-family: var(--mono); font-size: 0.74rem; line-height: 1.6; }
.node .supersede .old { color: var(--ink-faint); text-decoration: line-through; }
.node .supersede .new { color: var(--hyper); }

.terminal { background: rgba(8,11,8,0.72); border: 1px solid transparent; box-shadow: var(--edge-shadow); border-radius: var(--r-sm); overflow: hidden; }
.terminal .term-bar { display: flex; gap: 6px; padding: 10px 13px; border-bottom: 1px solid var(--line-2); }
.terminal pre { margin: 0; padding: 16px; font-family: var(--mono); font-size: 0.78rem; line-height: 1.75; color: var(--ink-soft); overflow-x: auto; white-space: pre; }
.terminal .prompt { color: var(--hyper); }
.terminal .cite { color: var(--ink-faint); }
.terminal .hit { color: var(--ink); }

/* ============================================================
   DUEL (comparison)
   ============================================================ */
.duel-prompt { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.84rem;
  color: var(--ink); background: rgba(15,20,15,0.6); border: 1px solid var(--line); border-radius: 100px; padding: 8px 16px; margin-bottom: 8px; }
.duel { overflow-x: auto; border: 1px solid transparent; box-shadow: var(--edge-shadow); border-radius: var(--r); }
.duel table { width: 100%; border-collapse: collapse; min-width: 620px; }
.duel th { font-family: var(--mono); font-size: 0.7rem; letter-spacing: .06em; text-transform: uppercase; text-align: left;
  padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.duel th.h-vanilla { color: var(--danger); }
.duel th.h-governed { color: var(--harness); }
.duel td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); font-size: 0.88rem; vertical-align: top; }
.duel td.stage { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .05em; width: 120px; }
.duel td.vanilla { color: var(--ink-soft); }
.duel td.vanilla .mk { color: var(--danger); font-family: var(--mono); font-size: 0.82em; }
.duel td.governed { color: var(--ink); }
.duel td.governed .mk { color: var(--harness); font-family: var(--mono); font-size: 0.82em; }
.duel tr.mem td { background: var(--hyper-wash); }
.duel tr.mem td.governed .mk { color: var(--hyper); }
.duel tr.mem td.stage { color: var(--hyper); }
.pullquotes { margin-top: 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; border-top: 1px solid var(--line-2); }
@media (max-width: 760px) { .pullquotes { grid-template-columns: 1fr; } }
.pq { font-family: var(--serif); font-size: 1.02rem; color: var(--ink); font-style: italic;
  padding: 15px 0 14px; border-bottom: 1px solid var(--line-2); }
.pq cite { display: block; margin-top: 7px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: .07em; text-transform: uppercase; font-style: normal; color: var(--ink-faint); }

/* ============================================================
   THE LOOP — reuses .cycle-tabs/.cycle-panel/.terminal (see MEMORY)
   ============================================================ */
.fly-close { text-align: center; margin-top: 34px; color: var(--ink); font-size: 1.05rem; }
.fly-cta { text-align: center; margin-top: 26px; }


/* ============================================================
   RECEIPTS
   ============================================================ */
.receipts { display: flex; flex-direction: column; margin-top: 8px; border-top: 1px solid var(--line-2); }
.receipt { display: grid; grid-template-columns: 118px 1fr auto; gap: 6px 18px; align-items: baseline;
  padding: 14px 2px; border-bottom: 1px solid var(--line-2); }
.receipt .rtag { font-family: var(--mono); font-size: 0.72rem; white-space: nowrap; color: var(--harness); }
.receipt .rtag.feat { color: var(--hyper); }
.receipt .rmsg { font-size: 0.9rem; color: var(--ink-soft); }
.receipt .rpr { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-faint); }
@media (max-width: 620px) {
  .receipt { grid-template-columns: 1fr auto; }
  .receipt .rtag { grid-column: 1 / -1; }
}

/* ============================================================
   INSTALL
   ============================================================ */
.install-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .install-cols { grid-template-columns: 1fr; } }
.install-col h3 { font-family: var(--mono); font-size: 0.9rem; font-weight: 600; letter-spacing: .02em; margin-bottom: 12px; }
.install-col.h h3 { color: var(--harness); }
.install-col.y h3 { color: var(--hyper); }
.install-col .note { margin-top: 12px; font-size: 0.82rem; color: var(--ink-faint); }
.install-col .note code { font-family: var(--mono); color: var(--ink-soft); }

/* ============================================================
   FAQ
   ============================================================ */
.faq { max-width: 820px; margin: 0 auto; border: 1px solid transparent; box-shadow: var(--edge-shadow); border-radius: var(--r); overflow: hidden; background: rgba(15,20,15,0.4); }
.faq-item { border-bottom: 1px solid var(--line-2); }
.faq-item:last-child { border-bottom: 0; }
.faq-q { width: 100%; text-align: left; font: inherit; font-family: var(--serif); font-size: 1.1rem; color: var(--ink);
  background: transparent; border: 0; cursor: pointer; padding: 20px 22px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq-q .chev { color: var(--ink-faint); transition: transform var(--t-color) var(--ease); flex: none; font-size: 1.2rem; }
.faq-item[data-open="true"] .chev { transform: rotate(45deg); }
.faq-a { height: 0; overflow: hidden; transition: height var(--t-color) var(--ease); }
.faq-a-inner { padding: 0 22px 20px; color: var(--ink-soft); font-size: 0.94rem; max-width: 68ch; }
.faq-a-inner code { font-family: var(--mono); font-size: 0.88em; color: var(--ink); }

/* ============================================================
   FINALE + wordmark
   ============================================================ */
.finale { text-align: center; padding-top: clamp(88px, 10vw, 132px); }
.finale h2 { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 18ch; margin: 16px auto 0; }
.finale .lede { margin: 20px auto 0; }
.finale .hero-ctas { justify-content: center; }

/* the brand set in the painting itself — van Gogh fills the letterforms */
.wordmark-mask {
  margin-top: 48px; padding: 0 1vw 16px; text-align: center; white-space: nowrap;
  font-family: var(--sans); font-weight: 800; letter-spacing: 0.005em;
  font-size: clamp(44px, 11.6vw, 176px); line-height: 0.95;
  background-image: linear-gradient(rgba(238,244,228,0.2), rgba(238,244,228,0.04)), url("/field.jpg");
  background-size: cover, cover; background-position: center, 50% 40%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
  user-select: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: 56px 0 0; margin-top: 20px; overflow: hidden; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; } }
.footer-col h4 { font-family: var(--sans); font-size: 0.7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500; margin-bottom: 14px; }
.footer-col a { display: block; color: var(--ink-soft); font-size: 0.9rem; padding: 5px 0; }
.footer-col a:hover { color: var(--ink); }
.footer-brand { font-size: 0.86rem; font-weight: 600; }
.footer-brand p { color: var(--ink-faint); font-size: 0.8rem; margin-top: 12px; max-width: 34ch; line-height: 1.5; }
.colophon { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line-2); font-size: 0.78rem; color: var(--ink-faint);
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.colophon .em { font-style: italic; }

/* ---------- scroll reveal ---------- */
.reveal { transform: translateY(16px); transition: transform var(--t-enter) var(--ease); }
.reveal.in { transform: none; }

/* ---------- utility ---------- */
.center { text-align: center; }
.mt-s { margin-top: 14px; } .mt-m { margin-top: 26px; }
.btn-text--inline { display: inline; padding: 0; }
.sec-head--follow { margin-top: clamp(44px, 6vw, 72px); }
.sec-head--minor h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.wrap--narrow { max-width: 760px; }
.wrap--narrow h1 { font-size: clamp(2rem, 5vw, 3rem); margin-top: 14px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--deep); padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 12px; top: 12px; }

/* ============================================================
   CONCEPT MOTION — subtle animations that illustrate the ideas.
   All gated by prefers-reduced-motion (the global reset zeroes them).
   ============================================================ */

/* supersede chain: the correction resolves on reveal */
@keyframes supersedeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.reveal.in .supersede .new { display: inline-block; animation: supersedeIn .5s .35s ease both; }

/* the run card — one wave, inspectable (replaces baked-in video posters) */
.runcard { margin-top: 34px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: rgba(10,14,10,0.55); }
.runcard__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 16px;
  border-bottom: 1px solid var(--line-2); font-family: var(--mono); font-size: 0.7rem; letter-spacing: .06em; color: var(--ink-faint); }
.runcard__bar .ok { color: var(--harness); }
.runrows { padding: 8px 0 10px; }
.runrow { display: grid; grid-template-columns: minmax(104px, 172px) 1fr; gap: 12px; align-items: center;
  padding: 5px 16px; font-family: var(--mono); font-size: 0.73rem; color: var(--ink-soft); }
.runrow .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runrow .lane { min-width: 0; padding-left: var(--off, 0%); }
.runrow .bar { height: 20px; border-radius: 6px; width: fit-content; max-width: 100%; background: var(--harness-wash); box-shadow: inset 0 0 0 1px var(--harness-line);
  display: flex; align-items: center; padding: 0 9px; color: var(--harness-bright); font-size: 0.64rem; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runrow.human .bar { background: rgba(238,244,228,0.06); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-soft); }
.runcard__note { font-size: 0.8rem; color: var(--ink-faint); padding: 12px 16px; border-top: 1px solid var(--line-2); }
@media (max-width: 640px) {
  .runrow { grid-template-columns: 88px 1fr; font-size: 0.66rem; }
  .runrow .lane { padding-left: calc(var(--off, 0%) * 0.45); }
  .runrow .bar { padding: 0 7px; }
}

/* show window — the animation dressed as product UI: chrome bar, wave meta, viewport, caption */
.showwin { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: rgba(10,14,10,0.6); min-width: 0; }
.showwin__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 16px;
  border-bottom: 1px solid var(--line-2); font-family: var(--mono); font-size: 0.72rem; letter-spacing: .04em; color: var(--ink-soft); }
.showwin__bar .glyph { width: 13px !important; height: 13px !important; margin-right: 7px; vertical-align: -2px; display: inline-block; }
.showwin__status { color: var(--harness); white-space: nowrap; }
.showwin__meta { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 8px clamp(18px, 3vw, 40px);
  padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.showwin__meta > div { min-width: 0; }
.showwin__meta .m-k { display: block; font-family: var(--mono); font-size: 0.62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.showwin__meta .m-v { display: block; font-family: var(--mono); font-size: 0.76rem; color: var(--ink); margin-top: 3px; white-space: nowrap; }
.showwin video { display: block; width: 100%; height: auto; background: #0b0f0b; }
.showwin__cap { padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 0.82rem; color: var(--ink-faint); line-height: 1.55; }
.showwin__cap .k-h { color: var(--harness); }
@media (max-width: 640px) { .showwin__meta { grid-template-columns: repeat(2, auto); } .showwin__meta .m-v { white-space: normal; } }

/* concept motion clips (Remotion-rendered, embedded same-origin) */
.motion-figure { margin: 34px 0 0; border: 1px solid transparent; box-shadow: var(--edge-shadow); border-radius: var(--r); overflow: hidden; background: #0b0f0b; }
.motion-figure video { display: block; width: 100%; height: auto; }
.motion-figure figcaption { font-size: 0.8rem; color: var(--ink-faint); padding: 13px 18px; border-top: 1px solid var(--line-2); }
.motion-figure figcaption .k-h { color: var(--harness); }
.motion-figure figcaption .k-y { color: var(--hyper); }

/* ============================================================
   THE PAINTING — home hero: a sticky, framed, near-crisp van Gogh
   the content sheet slides over. Ported from the original
   agent-harness site (the gold-standard hero).
   ============================================================ */

.pane--hero {
  position: sticky; z-index: 1; min-height: 100vh; min-height: 100svh; padding: var(--pad);
  top: min(0px, calc(100vh - 100%));
  top: min(0px, calc(100svh - 100%));
}
.frame {
  position: absolute; inset: var(--pad); z-index: 1; border-radius: var(--radius);
  isolation: isolate; overflow: hidden;
  /* Safari won't clip transformed children by border-radius alone */
  clip-path: inset(0 round var(--radius));
  box-shadow: inset 0 1px rgba(255,255,255,0.14), inset 0 0 0 1px rgba(20,30,20,0.28), 0 10px 20px -16px rgba(0,0,0,0.65);
}
.pan { position: absolute; inset: 0; transform: scale(1.06); }
@media (pointer: fine) and (prefers-reduced-motion: no-preference) { .pan { will-change: transform; } }
/* the painting is a backdrop, not the subject: soften, settle, recede */
.scenery {
  width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 62%;
  filter: blur(1px) saturate(0.96) brightness(0.96);
}
/* vignette + a faint pool of light where the UI sits */
.frame::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background:
    radial-gradient(135% 115% at 50% 40%, transparent 55%, rgba(11,15,11,0.34) 100%),
    linear-gradient(rgba(11,15,11,0.16), transparent 16%, transparent 84%, rgba(11,15,11,0.2));
}
.pixelveil {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated;
  opacity: 1; transition: opacity var(--t-scene) var(--ease) .35s;
}
.pixelveil.gone { opacity: 0; }
.grain--local {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0.45; mix-blend-mode: overlay;
  background-size: 120px 120px, 84px 84px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.6 0 0 0 0 0.5 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='128' height='128' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch' seed='7'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.6 0 0 0 0 0.5 0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='128' height='128' filter='url(%23n)'/%3E%3C/svg%3E");
}
@supports (-webkit-touch-callout: none) { .grain--local { mix-blend-mode: normal; opacity: 0.3; } }

/* hero content over the painting: dark ink in a pool of light */
.heroF {
  position: relative; z-index: 10;
  min-height: calc(100vh - var(--pad)*2);
  min-height: calc(100svh - var(--pad)*2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(18px, 3vh, 30px); text-align: center;
  padding: 84px clamp(16px, 5vw, 48px) 40px;
}
.heroF::before {
  content: ""; position: absolute; left: 50%; top: 44%; transform: translate(-50%,-50%);
  width: min(860px, 96%); height: 74%; pointer-events: none; z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(240,245,230,0.42) 22%, rgba(240,245,230,0.58) 50%, rgba(240,245,230,0.42) 78%, transparent);
  filter: blur(10px);
}
.heroF__tag {
  font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: #233527; max-width: 100%; white-space: normal; line-height: 1.7;
  text-shadow: 0 1px 2px rgba(240,245,230,0.8);
}
.heroF h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 6.4vw, 78px); line-height: 1.02; letter-spacing: -0.015em;
  color: #182a1c; text-shadow: 0 1px 6px rgba(236,244,226,0.5);
  max-width: 15ch; text-wrap: balance;
}
.heroF h1 em { font-style: italic; color: #2f5233; }
.heroF__sub {
  font-family: var(--sans); font-size: clamp(14px, 1.5vw, 16px); line-height: 1.55; font-weight: 500;
  color: #14231a;
  text-shadow: 0 1px 2px rgba(240,245,230,0.9), 0 0 8px rgba(240,245,230,0.75);
  max-width: 56ch;
}
.heroF__sub b { font-weight: 650; }
/* the hero's one object: a hyp-search pill that opens the ⌘K palette */
.hero-search {
  font: inherit; font-family: var(--mono); font-size: clamp(12.5px, 1.4vw, 14px);
  display: inline-flex; align-items: center; gap: 9px;
  color: #17251c; cursor: pointer; text-align: left;
  background: rgba(255,255,255,0.52);
  border: 0; border-radius: 999px; padding: 14px 24px;
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 1px rgba(255,255,255,0.65), inset 0 0 0 1px rgba(255,255,255,0.32), 0 10px 20px -16px rgba(10,16,10,0.65);
  transition: background var(--t-color) var(--ease), transform var(--t-press) var(--ease);
  max-width: min(92vw, 560px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-search:hover { background: rgba(255,255,255,0.64); }
.hero-search:active { transform: scale(0.98); }
.hero-search .hs-prompt { color: #2f5233; font-weight: 700; }
.hero-search .hs-q { color: rgba(23,37,28,0.72); font-style: italic; }
.hs-caret { width: 7px; height: 1.05em; background: #2f5233; display: inline-block; margin-left: 1px;
  animation: caretBlink 1.1s steps(1) infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }

.heroF .hero-ctas { margin-top: 4px; justify-content: center; }

.heroF__scroll {
  position: absolute; bottom: clamp(10px, 2.5vh, 22px); left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(238,244,228,0.75); text-shadow: 0 1px 4px rgba(10,15,10,0.55);
  text-decoration: none;
}

/* light liquid-glass window, over scenery — one of the few true refractors */
.glasswin {
  isolation: isolate; width: min(640px, 100%);
  border-radius: 18px; overflow: hidden;
  -webkit-backdrop-filter: blur(18px) saturate(1.55); backdrop-filter: blur(18px) saturate(1.55);
  box-shadow:
    inset 0 1px rgba(255,255,255,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.26),
    inset 0 -1px rgba(70,96,70,0.14),
    0 10px 22px -16px rgba(10,16,10,0.65);
  text-align: left;
}
.glasswin__tabs { display: flex; gap: 3px; padding: 7px 8px 0; background: rgba(236,242,228,0.42); }
.glasswin__tab {
  font: inherit; border: 0; cursor: pointer; background: transparent;
  border-radius: 12px 12px 0 0; padding: 8px 15px; font-size: 12.5px; letter-spacing: .01em;
  font-family: var(--sans); color: rgba(20,32,26,0.78); transition: background var(--t-press) var(--ease), color var(--t-press) var(--ease);
}
.glasswin__tab:hover { color: #1a271d; background: rgba(255,255,255,0.3); }
.glasswin__tab[aria-selected="true"] {
  color: #14201a; background: rgba(255,255,255,0.64);
  margin-bottom: -1px; padding-bottom: 9px; box-shadow: inset 0 1px rgba(255,255,255,0.72);
}
.glasswin__body { background: rgba(255,255,255,0.72); padding: 12px; }
.codeblock {
  position: relative; background: #0e130e; border-radius: 12px;
  padding: 14px 44px 14px 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  box-shadow: inset 0 1px rgba(255,255,255,0.05), inset 0 0 0 1px rgba(0,0,0,0.3);
  overflow-x: auto; color: #dbe7d2; white-space: pre; text-align: left;
}
.codeblock .c { color: rgba(219,231,210,0.42); }
.codeblock .g { color: var(--harness); }
.codeblock .b { color: var(--hyper); }
.copybtn, .copy-btn {
  position: absolute; top: 8px; right: 8px; font: inherit; cursor: pointer;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(219,231,210,0.55); background: rgba(233,240,228,0.07);
  border: 1px solid rgba(233,240,228,0.14); border-radius: 7px; padding: 4px 8px;
  transition: background .18s, color .18s;
}
.copybtn:hover, .copy-btn:hover { color: #eef4e4; background: rgba(233,240,228,0.14); }
.glasswin__note { font-family: var(--sans); font-size: 12px; line-height: 1.5; color: #17251c; padding: 10px 4px 2px; }
.glasswin__note code { font-family: var(--mono); font-size: 0.92em; color: #14201a; }

/* bento — flat hairline cards, artifact + one line (the 'Recently shipped' grammar) */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .bento { grid-template-columns: 1fr; } }
.bento__card { border: 1px solid var(--line); border-radius: var(--r); background: rgba(10,14,10,0.45);
  padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bento__card.wide { grid-column: 1 / -1; }
.bento__k { font-family: var(--mono); font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.bento__k.k-h { color: var(--harness); }
.bento__k.k-y { color: var(--hyper); }
.bento__note { font-size: 0.82rem; color: var(--ink-faint); line-height: 1.55; }
.bento__note code { font-family: var(--mono); font-size: 0.92em; color: var(--ink-soft); }

/* split — the asymmetric section grid: artifact one side, a narrow rail
   (proof sentence + mono index) the other; alternate sides per chapter */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: clamp(26px, 4.5vw, 64px); align-items: center; }
.split--railleft { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); }
.rail { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.rail .index { margin-top: 6px; }
.proof { font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.45; color: var(--ink); }
.proof .subj-h { color: var(--harness); }
.proof .subj-y { color: var(--hyper); }
@media (max-width: 979px) {
  .split, .split--railleft { grid-template-columns: 1fr; }
  .split--railleft .rail { order: 2; }
}

/* vault browser — the product is files; show the files, big */
.vaultcard { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: rgba(10,14,10,0.55); min-width: 0; }
.vaultcard__bar { padding: 11px 16px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: .06em; color: var(--ink-faint); }
.vaultcard__panes { display: grid; grid-template-columns: 1fr 1.25fr; }
.vaultcard__tree { padding: 16px 18px; font-family: var(--mono); font-size: 0.76rem; line-height: 2.05; color: var(--ink-soft); white-space: pre; overflow-x: auto; }
.vaultcard__tree .dir { color: var(--ink); }
.vaultcard__tree .note { color: var(--ink-faint); }
.vaultcard__tree .hot { color: var(--hyper); }
.vaultcard__file { border-left: 1px solid var(--line-2); padding: 16px 18px; font-family: var(--mono); font-size: 0.74rem; line-height: 1.9; color: var(--ink-soft); white-space: pre; overflow-x: auto; }
.vaultcard__file .fm { color: var(--ink-faint); }
.vaultcard__file .key { color: var(--hyper); }
.vaultcard__file .val { color: var(--ink); }
.vaultcard__file .strike { text-decoration: line-through; color: var(--ink-faint); }
@media (max-width: 760px) {
  .vaultcard__panes { grid-template-columns: 1fr; }
  .vaultcard__file { border-left: 0; border-top: 1px solid var(--line-2); }
}

/* index — the bare mono list (the 'Features' grammar): label + rows, no chips, no borders */
.index { margin-top: 34px; }
.index__label { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-faint); margin-bottom: 10px; }
.index__row { display: block; font-family: var(--mono); font-size: 0.86rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-soft); padding: 5px 0; width: fit-content; }
a.index__row { transition: color var(--t-press) var(--ease); }
a.index__row:hover { color: var(--ink); }

/* the content sheet that slides over the painting */
.sheet {
  position: relative; z-index: 2; background: var(--panel);
  border-top-left-radius: var(--radius); border-top-right-radius: var(--radius);
  box-shadow: inset 0 1px rgba(238,244,228,0.06);
  overflow: hidden;
  clip-path: inset(0 round var(--radius) var(--radius) 0 0);
}
.sheet::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(11,15,11,0.5), rgba(13,18,13,0.68) 40%, rgba(11,15,11,0.56)),
    url("/field-blur.jpg");
  background-size: cover; background-position: 50% 40%;
}
.sheet::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  mix-blend-mode: overlay; opacity: 0.5;
  background-size: 120px 120px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.6 0 0 0 0 0.5 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='128' height='128' filter='url(%23n)'/%3E%3C/svg%3E");
}
@supports (-webkit-touch-callout: none) { .sheet::after { mix-blend-mode: normal; opacity: 0.22; } }
.sheet > * { position: relative; z-index: 1; }
.sheet .section:first-child { border-top: 0; }
body.has-pane .footer { position: relative; z-index: 2; background: var(--deep); margin-top: 0; }
body.has-pane { background: var(--deep); }
body.has-pane > .atmosphere, body.has-pane > .grain { display: none; }

/* short viewports: a sticky pane taller than the screen traps the CTA */
@media (max-height: 719px) { .pane--hero { position: static; } }
@media (max-width: 640px) {
  .pane--hero { padding: 0; }
  .frame { inset: 0; border-radius: 0; clip-path: none; }
  .sheet { clip-path: inset(0 round 20px 20px 0 0); }
}

/* ============================================================
   THE LEDGER — what everyone else calls memory (category contrast)
   ============================================================ */
.ledger { border-top: 1px solid var(--line); margin-top: 6px; counter-reset: lrow; }
.lrow h3::before { counter-increment: lrow; content: "0" counter(lrow); display: block;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: .1em; color: var(--ink-faint); margin-bottom: 7px; }
.lrow { display: grid; grid-template-columns: minmax(190px, 0.85fr) 1.7fr auto; gap: 10px 26px;
  padding: 24px 4px; border-bottom: 1px solid var(--line-2); align-items: baseline; }
.lrow h3 { font-size: 1.28rem; }
.lrow p { color: var(--ink-soft); font-size: 0.93rem; max-width: 58ch; }
.lrow p em { color: var(--ink); }
.lrow .mech { font-family: var(--mono); font-size: 0.71rem; color: var(--hyper); text-align: right; white-space: nowrap; align-self: center; }
@media (max-width: 800px) {
  .lrow { grid-template-columns: 1fr; gap: 8px; }
  .lrow .mech { text-align: left; }
}
.ledger-close { margin-top: 26px; font-family: var(--serif); font-size: 1.15rem; font-style: italic; color: var(--ink); max-width: 60ch; }


/* ============================================================
   3D — the graph constellation (hyperception)
   ============================================================ */
.graph3d-wrap { width: 100%; }
.graph3d-wrap canvas { display: block; width: 100%; height: auto; cursor: grab; touch-action: pan-y; }
.graphfig { margin: 30px 0 0; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden;
  background: rgba(10,14,10,0.5); box-shadow: inset 0 1px rgba(255,255,255,0.05); }
.graphfig-cap { font-size: 0.8rem; color: var(--ink-faint); padding: 12px 18px; border-top: 1px solid var(--line-2); }

/* terminal title (replaces the traffic-light dots) */
.terminal .term-t { font-family: var(--mono); font-size: 0.66rem; letter-spacing: .1em; color: var(--ink-faint); }
@media (max-width: 760px) { .terminal pre { white-space: pre-wrap; word-break: break-word; } }

/* the duel setup label — this is a worked example, say so */
.duel-setup { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.duel-setup .dslabel { font-size: 0.82rem; font-style: italic; color: var(--ink-faint); }

/* ============================================================
   INTERLUDE — a slim return to the field between sheet sections
   ============================================================ */
.interlude { position: relative; height: clamp(300px, 46vh, 470px); overflow: hidden;
  border-top: 1px solid rgba(20,30,20,0.5); border-bottom: 1px solid rgba(20,30,20,0.5); }
.interlude img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: blur(1px) saturate(0.96) brightness(0.94); }
.interlude .grain--local { z-index: 2; }
.interlude blockquote { position: relative; z-index: 3; height: 100%; margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center; padding: 0 clamp(20px, 6vw, 60px); }
.interlude blockquote::before { /* the hero's pool of light, smaller */
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(720px, 96%); height: 72%; pointer-events: none; z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(240,245,230,0.4) 24%, rgba(240,245,230,0.55) 50%, rgba(240,245,230,0.4) 76%, transparent);
  filter: blur(10px);
}
.interlude blockquote p { font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.2; color: #182a1c;
  text-shadow: 0 1px 18px rgba(236,244,226,0.5); max-width: 24ch; text-wrap: balance; }
.interlude blockquote cite { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; font-style: normal; color: rgba(24,42,28,0.72); }

/* ============================================================
   DUSK — the loop runs day and night. The interlude darkens into
   evening; the flywheel chapter sits under a periwinkle night wash.
   ============================================================ */
.interlude--dusk img { filter: blur(1px) saturate(0.88) brightness(0.62) hue-rotate(-10deg); }
.interlude--dusk blockquote::before {
  background: linear-gradient(180deg, transparent, rgba(13,18,24,0.5) 24%, rgba(13,18,24,0.62) 50%, rgba(13,18,24,0.5) 76%, transparent);
}
.interlude--dusk blockquote p { color: #e6edf6; text-shadow: 0 1px 16px rgba(8,12,18,0.65); }
.interlude--dusk blockquote cite { color: rgba(200,212,232,0.62); }

.section--night { position: relative; }
.section--night::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(13,17,28,0.4) 16%, rgba(10,13,22,0.5) 55%, rgba(13,17,28,0.28) 86%, transparent); }
.section--night .wrap { position: relative; }

/* the unnoticed defect: an empty cell says more than a sentence */
.duel td.ghost { background: repeating-linear-gradient(-45deg, transparent 0 7px, rgba(217,138,122,0.06) 7px 8px); }
.sec-head.center { margin-left: auto; margin-right: auto; align-items: center; text-align: center; }
.sec-head.center .lede { margin-left: auto; margin-right: auto; }
