/* gliasubstrate.com — shared styles.
   Layout: one centred column (max 1120px), soft gradient ground, pill controls,
   cards only where an object needs setting off. Palette shared with quokk4.net;
   the tier colours (FACT / DERIVED / HEURISTIC) are glia's own vocabulary. */

:root {
  --bg: #15161a;
  --fg: #ecebe6;
  --muted: #bdbab2;
  --soft: #dedbd4;
  --card: rgba(34, 36, 42, 0.86);
  --card-strong: rgba(40, 42, 50, 0.96);
  --border: rgba(160, 168, 196, 0.22);
  --border-strong: rgba(160, 168, 196, 0.4);
  --lav: #b5a8e4;
  --peach: #f5b99a;
  --btn: linear-gradient(138deg, #b5a8e4 0%, #f5b99a 100%);
  --btn-fg: #1d1826;
  --fact: #6ea0e6;
  --derived: #e6a24a;
  --heur: #a39b8e;
  --ok: #4dbfb0;
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
  --radius: 20px;
  --radius-sm: 12px;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Space Grotesk", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --b-bg: #1b1c22; --b-ink: #ecebe6; --b-muted: #a3a19a; --b-card: #24262e; --b-border: rgba(160,168,196,.38); --b-band: rgba(155,143,242,.1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  position: relative;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.58;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: var(--fg); text-decoration-color: var(--lav); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--peach); }
:focus-visible { outline: 3px solid var(--lav); outline-offset: 3px; border-radius: 6px; }
img, svg { max-width: 100%; }
code, pre, .mono { font-family: var(--font-mono); font-size: 0.86em; }
code { background: var(--card-strong); border: 1px solid var(--border); border-radius: 6px; padding: 0.1em 0.4em; }
pre {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  background: var(--card-strong); border: 1px solid var(--border); border-radius: var(--radius-sm);
  line-height: 1.5;
}
pre code { background: none; border: 0; padding: 0; font-size: 0.92em; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; margin: 0; line-height: 1.12; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; max-width: 64ch; }
.muted { color: var(--muted); }
.eyebrow {
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 500;
}

.wrap { max-width: 1120px; margin: 0 auto; }

/* nav */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 22px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--font-display); font-size: 1.35rem; }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--btn); display: inline-grid; place-items: center; }
.brand .mark svg { width: 30px; height: 30px; display: block; }
.nav ul { list-style: none; display: flex; gap: 6px 22px; margin: 0; padding: 0; flex-wrap: wrap; align-items: center; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--fg); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 22px;
  border-radius: 999px; text-decoration: none; font-weight: 600; border: 1px solid transparent;
}
.btn.primary { background: var(--btn); color: var(--btn-fg); box-shadow: 0 10px 26px rgba(155, 143, 242, 0.28); }
.btn.ghost { background: var(--card); border-color: var(--border-strong); color: var(--fg); }
.btn svg { width: 18px; height: 18px; }

/* sections */
.section { padding-block: 72px; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: 40px; }
.section-head p { font-size: 1.12rem; color: var(--soft); text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.section > p.muted, .section > .muted { color: var(--soft); text-shadow: 0 1px 3px rgba(0,0,0,.6); }
ul.plain { text-shadow: 0 1px 3px rgba(0,0,0,.6); }
ul.plain li { color: var(--soft); }
footer { text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* hero */
.hero { padding-block: 56px 72px; overflow: clip; display: grid; gap: 40px; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: center; }
.hero-copy { display: grid; gap: 24px; }
.hero-copy p.lede { font-size: 1.22rem; color: var(--fg); font-weight: 500; }
.hero-copy p, .hero-copy h1 { text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.hero-copy h1 em { text-shadow: none; }
.section-head { text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-figure { min-width: 0; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

/* graph figures (inline svg) */
.figure {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; overflow: hidden;
}
.figure svg { width: 100%; height: auto; display: block; }
.figure .caption { font-size: 0.9rem; color: var(--muted); margin-top: 12px; }
.g-node { fill: var(--card-strong); stroke: var(--border-strong); stroke-width: 1.2; }
.g-node.seed { fill: var(--lav); stroke: var(--lav); }
.g-node.hot { stroke: var(--peach); stroke-width: 2; }
.g-kind { font: 500 10px var(--font-body); letter-spacing: 0.1em; fill: var(--muted); text-transform: uppercase; }
.g-name { font: 500 13px var(--font-mono); fill: var(--fg); }
.g-node.seed + .g-kind, .g-node.seed ~ .seed-text { fill: var(--btn-fg); }
.g-edge { fill: none; stroke-width: 1.8; stroke-linecap: round; }
.g-edge.fact { stroke: var(--fact); }
.g-edge.derived { stroke: var(--derived); stroke-dasharray: 6 5; }
.g-edge.heur { stroke: var(--heur); stroke-dasharray: 2 5; }
.g-edge.same { stroke: var(--ok); stroke-dasharray: 1 4; }
.g-label { font: 500 11px var(--font-body); fill: var(--muted); }
.g-label.fact { fill: var(--fact); } .g-label.derived { fill: var(--derived); } .g-label.heur { fill: var(--heur); } .g-label.same { fill: var(--ok); }
.g-band { fill: none; stroke: var(--border); stroke-dasharray: 4 4; }
.g-bandlabel { font: 500 10px var(--font-body); letter-spacing: 0.1em; fill: var(--muted); }

/* tiers */
.tier { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; letter-spacing: 0.08em; font-weight: 600; text-transform: uppercase; }
.tier::before { content: ""; width: 18px; height: 0; border-top: 2px solid currentColor; }
.tier.derived::before { border-top-style: dashed; }
.tier.heur::before { border-top-style: dotted; border-top-width: 3px; }
.tier.fact { color: var(--fact); } .tier.derived { color: var(--derived); } .tier.heur { color: var(--heur); }

/* cards and grids */
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.cols-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid.cols-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  display: grid; gap: 12px; align-content: start; min-width: 0;
}
.card h3 { font-size: 1.25rem; }
.card p { font-size: 1rem; color: var(--muted); }
.card pre { font-size: 0.85rem; }
.card .foot { margin-top: auto; }

/* answer tables */
.answer { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.answer .cmd { padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--card-strong); font-family: var(--font-mono); font-size: 0.86rem; overflow-x: auto; white-space: nowrap; }
.answer .cmd { display: flex; gap: 8px; align-items: baseline; }
.answer .cmd::before { content: "$"; color: var(--muted); flex: none; }
.answer .scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
tbody tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
td .mono { white-space: nowrap; }
.answer .note { padding: 12px 20px; font-size: 0.9rem; color: var(--muted); border-top: 1px solid var(--border); }

/* install tabs */
.paths { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .paths { grid-template-columns: 1fr; } }
.path { display: grid; gap: 14px; align-content: start; min-width: 0; }
.path .who { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* stat row */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); min-width: 0; }
.stat b { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.9rem; color: var(--muted); }

/* lists */
ul.plain { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--muted); }
ul.plain li::marker { color: var(--peach); }
ul.plain b { color: var(--fg); font-weight: 600; }

/* matrix (coverage) */
.matrix { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.matrix table { font-size: 0.8rem; min-width: 1100px; }
.matrix th, .matrix td { padding: 6px 8px; text-align: center; white-space: nowrap; }
.matrix th.row, .matrix td.row { text-align: left; position: sticky; left: 0; background: var(--card-strong); font-weight: 600; }
.matrix th.col { writing-mode: vertical-rl; transform: rotate(180deg); text-transform: none; letter-spacing: 0; font-size: 0.75rem; padding: 10px 4px; height: 130px; }
.cell { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: middle; }
.cell.full { background: var(--ok); }
.cell.partial { background: var(--derived); }
.cell.none { background: var(--peach); }
.cell.unknown { background: transparent; border: 1px dashed var(--border-strong); }
.cell.na { background: transparent; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.9rem; color: var(--muted); margin-top: 16px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }

/* changelog */
.release { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding-block: 32px; border-top: 1px solid var(--border); }
.release:first-of-type { border-top: 0; }
@media (max-width: 700px) { .release { grid-template-columns: 1fr; } }
.release .when { display: grid; gap: 6px; align-content: start; }
.release .when b { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; }
.release .when span { font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.release .body { display: grid; gap: 14px; min-width: 0; }
.release .body p { max-width: 70ch; }

/* footer */
footer { padding-block: 48px 64px; border-top: 1px solid var(--border); margin-top: 40px; display: grid; gap: 14px; font-size: 0.95rem; color: var(--muted); }
footer p { max-width: none; }

/* concept pages */
.concept { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; padding-block: 56px; }
.concept + .concept { border-top: 1px solid var(--border); }
.concept .text { display: grid; gap: 14px; }
.concept .text p { color: var(--muted); }
@media (max-width: 900px) { .concept { grid-template-columns: 1fr; } }

/* comparison table */
.compare td:first-child { font-weight: 600; white-space: nowrap; }
.compare tr.us td { background: rgba(155, 143, 242, 0.1); }
.compare tr.us td:first-child { color: var(--fg); }

.btn.primary { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(155, 143, 242, 0.34); }

/* ---------------------------------------------------------------- v2: more of the light palette */
.hero-copy h1 em { font-style: normal; background: linear-gradient(92deg, var(--lav), var(--peach)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: linear-gradient(138deg, rgba(155,143,242,.18), rgba(242,163,127,.18)); color: var(--fg); border: 1px solid var(--border); width: fit-content; max-width: 100%; }
.eyebrow.pill::before { content: ""; width: 14px; height: 0; border-top: 2px solid var(--lav); }
.card.accent { position: relative; background: var(--card-strong); }
.card.accent::before { content: ""; position: absolute; inset: 0; border-radius: var(--radius); padding: 1.5px; background: linear-gradient(138deg, var(--lav), var(--peach)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.hero-figure { position: relative; }
.hero-figure::before { content: ""; position: absolute; inset: -40px -30px -30px -30px; border-radius: 40px; background: radial-gradient(60% 60% at 30% 20%, rgba(155,143,242,.3), rgba(155,143,242,.12) 45%, transparent 72%), radial-gradient(50% 50% at 80% 80%, rgba(242,163,127,.3), rgba(242,163,127,.12) 45%, transparent 72%); z-index: -1; }
.section-head h2 strong { font-weight: 500; color: var(--lav); }
.band { border-radius: var(--radius); padding: clamp(24px, 4vw, 48px); background: linear-gradient(132deg, rgba(189,170,232,.22), rgba(255,202,174,.2), rgba(165,223,205,.22)); border: 1px solid var(--border); }
.vocab { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 800px) { .vocab { grid-template-columns: 1fr; } }
.vocab .card { background: var(--card-strong); }
.vocab .card b.t { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; color: var(--fg); }
.vocab .card .n { font-family: var(--font-mono); font-size: 0.8rem; color: var(--lav); }

/* ---------------------------------------------------------------- boards (the explainer canvas, scaled) */
.board { position: relative; width: 100%; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--b-bg); }
.board-stage { position: relative; transform-origin: 0 0; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; line-height: normal; }
.board-stage * { box-sizing: border-box; }
.board-section { display: grid; gap: 18px; padding-block: 40px; }
.board-section + .board-section { border-top: 1px solid var(--border); }
.board-section h2 { font-size: 1.5rem; }

/* ---------------------------------------------------------------- v3: scenes (animated infographics) */
.scene { margin: 0; display: grid; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px 14px; min-width: 0; }
.scene svg { width: 100%; height: auto; display: block; overflow: hidden; font-family: var(--font-body); border-radius: 12px; }
.scene.bare { background: transparent; border: 0; box-shadow: none; padding: 0; }
.sc-hidden { pointer-events: none; }
.sc .n rect, .sc .chip rect { fill: var(--card-strong); stroke: var(--border-strong); stroke-width: 1.2; }
.sc .n.seed rect { fill: var(--lav); stroke: var(--lav); }
.sc .n.seed text { fill: #1d1826; }
.sc .n.seed .nk { fill: #2c2337; }
.sc .n.peach rect { fill: var(--peach); stroke: var(--peach); }
.sc .n.peach text { fill: #2c2337; }
.sc .nk { font-size: 11px; letter-spacing: .1em; fill: var(--muted); text-transform: uppercase; font-weight: 500; }
.sc .nn { font-size: 14px; fill: var(--fg); font-family: var(--font-mono); }
.sc .nt { font-size: 12px; fill: var(--fg); font-weight: 500; }
.sc .lbl { font-size: 12px; fill: var(--muted); font-weight: 500; }
.sc .lbl.fact { fill: var(--fact); } .sc .lbl.derived { fill: var(--derived); } .sc .lbl.heur { fill: var(--heur); } .sc .lbl.same { fill: var(--ok); }
.sc .e { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc .e.fact { stroke: var(--fact); } .sc .e.derived { stroke: var(--derived); } .sc .e.heur { stroke: var(--heur); } .sc .e.same { stroke: var(--ok); } .sc .e.flow { stroke: var(--border-strong); stroke-width: 1.4; }
.sc .band { fill: var(--b-band); stroke: var(--border); stroke-dasharray: 4 4; }
.sc .bandlabel { font-size: 10.5px; letter-spacing: .12em; fill: var(--muted); font-weight: 500; }
.sc .chip text { font-size: 12px; fill: var(--fg); font-weight: 500; }
.sc .tierchip rect { rx: 9; ry: 9; }
.sc .tierchip.fact rect { fill: var(--fact); } .sc .tierchip.derived rect { fill: var(--derived); } .sc .tierchip.heur rect { fill: var(--heur); }
.sc .tierchip text { font-size: 9px; letter-spacing: .1em; fill: #fff; font-weight: 600; }
.sc .card rect { fill: var(--card-strong); stroke: var(--border-strong); }
.sc .card .ct { font-size: 11px; fill: var(--fg); font-family: var(--font-mono); }
.sc .card .ch { font-size: 9px; letter-spacing: .1em; fill: var(--muted); font-weight: 600; }
.sc .mono { font-family: var(--font-mono); }
.sc-dot { fill: var(--peach); stroke: rgba(242,163,127,.45); stroke-width: 5; }
.sc-dot.sc-flow { fill: var(--lav); stroke: rgba(155,143,242,.4); stroke-width: 4; opacity: .9; }
.sc .sc-glow rect:first-of-type { stroke: var(--peach); stroke-width: 3; fill: rgba(245,185,154,.14); }
.sc .bad rect { stroke: var(--peach); stroke-width: 2; }
.sc .bad .nn { fill: #c2410c; }
.scene-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scene-btn { min-width: 40px; min-height: 40px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--card-strong); color: var(--fg); font-size: 1rem; cursor: pointer; }
.scene-btn.scene-play { background: var(--btn); color: var(--btn-fg); border-color: transparent; }
.scene-dots { display: flex; gap: 6px; margin-left: 8px; }
.scene-dot { width: 22px; height: 8px; border-radius: 999px; border: 0; background: var(--border); cursor: pointer; padding: 0; transition: background .3s ease, width .3s ease; }
.scene-dot.on { background: var(--lav); }
.scene-dot[aria-selected="true"] { background: var(--peach); width: 34px; }
.scene-caption { position: relative; min-height: 3.4em; }
.scene-caption p { margin: 0; font-size: 1rem; color: var(--fg); max-width: none; }
.scene-caption p.out { position: absolute; inset: 0; }
.scene-caption .tier { vertical-align: 1px; }
.scene .steps { display: none; }

/* ---------------------------------------------------------------- v3: docs */
.docs-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.docs-nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted); font-weight: 500; font-size: .95rem; }
.docs-nav a[aria-current="page"] { background: var(--btn); color: var(--btn-fg); border-color: transparent; }
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; align-items: start; }
@media (max-width: 900px) { .docs-layout { grid-template-columns: 1fr; } }
.docs-toc { position: sticky; top: 16px; font-size: .9rem; max-height: calc(100vh - 32px); overflow: auto; scrollbar-width: thin; }
.docs-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.docs-toc > ul > li { margin-top: 10px; }
.docs-toc > ul > li > span { display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.docs-toc a { text-decoration: none; color: var(--muted); }
.docs-toc a:hover { color: var(--fg); }
@media (max-width: 900px) { .docs-toc { position: static; max-height: none; } }
.docs-body { min-width: 0; display: grid; gap: 18px; }
.docs-body h2 { font-size: 1.6rem; margin-top: 28px; }
.docs-body h3 { font-size: 1.2rem; margin-top: 18px; }
.docs-body h4 { font-size: 1.05rem; margin-top: 12px; }
.docs-body p, .docs-body li { max-width: 72ch; color: var(--fg); }
.docs-body ul, .docs-body ol { padding-left: 1.3em; display: grid; gap: 6px; margin: 0; }
.docs-body pre { font-size: .84rem; }
.docs-body table { font-size: .9rem; }
.docs-body .table-wrap, .docs-body table { display: block; overflow-x: auto; }
.docs-body blockquote { margin: 0; padding: 12px 18px; border-left: 3px solid var(--lav); background: var(--card); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.docs-body a { color: var(--fg); }
.cmd { display: grid; gap: 10px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); scroll-margin-top: 16px; }
.cmd pre { background: transparent; border: 0; padding: 0; font-size: .9rem; white-space: pre-wrap; word-break: break-word; }
.cmd p { font-size: .95rem; color: var(--muted); max-width: none; }
.api { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.api li { padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); overflow-x: auto; white-space: nowrap; font-size: .9rem; }
.api .k { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--lav); margin-right: 8px; }

/* ---------------------------------------------------------------- v3: the background graph */
.bg-graph { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; contain: strict; will-change: transform; image-rendering: auto; opacity: 1; pointer-events: none; }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, rgba(21,22,26,.26), rgba(21,22,26,.58) 60%, rgba(21,22,26,.72)); }
/* the stepper: a path of nodes, the current one filled */
.scene-steps { display: flex; align-items: center; margin-left: 10px; }
.scene-step { width: 30px; height: 26px; border: 0; background: transparent; padding: 0; cursor: pointer; display: grid; place-items: center; position: relative; }
.scene-step::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dotted var(--border-strong); }
.scene-step:first-child::before { left: 50%; } .scene-step:last-child::before { right: 50%; }
.scene-step i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--card-strong); position: relative; transition: transform .25s ease, background .25s ease, border-color .25s ease; }
.scene-step.on i { border-color: var(--lav); background: var(--lav); }
.scene-step.on::before { border-top-style: solid; border-top-color: var(--lav); }
.scene-step[aria-selected="true"] i { background: var(--peach); border-color: var(--peach); transform: scale(1.4); box-shadow: 0 0 0 6px rgba(242,163,127,.25); }
.scene-btn { border-radius: 8px; }
.scene-btn.scene-play { border-radius: 8px; }
.btn { border-radius: 10px; }
.eyebrow.pill { border-radius: 8px; }
.walk-btn { display: none; }

/* pull quotes: James's own words */
.quote { margin: 28px 0 32px; max-width: 72ch; padding: 22px 26px; border-left: 3px solid var(--peach); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.4; color: var(--fg); }
.quote footer { margin-top: 12px; font-family: var(--font-body); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0; border: 0; display: block; }
header.section .quote { margin-bottom: 28px; }

/* the note from James */
.launch { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow); }
.launch-graph { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .7; pointer-events: none; }
.launch-graph .lg-e { fill: none; stroke: var(--lav); stroke-width: 1.5; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.launch-graph .lg-e.dashed { stroke: var(--derived); stroke-dasharray: 6 5 !important; stroke-dashoffset: 0 !important; opacity: 0; transition: opacity .9s ease; }
.launch.go .lg-e { stroke-dashoffset: 0 !important; }
.launch.go .lg-e.dashed { opacity: .9; }
.launch-graph .lg-n { fill: var(--card-strong); stroke: var(--lav); stroke-width: 1.6; opacity: 0; transition: opacity .5s ease; }
.launch-graph .lg-n.seed { fill: var(--peach); stroke: var(--peach); }
.launch.go .lg-n { opacity: 1; }
.launch-body { position: relative; display: grid; gap: 20px; padding: clamp(44px, 6vw, 64px) clamp(28px, 6vw, 72px) clamp(72px, 8vw, 96px); padding-right: clamp(28px, 22vw, 300px); max-width: 980px; min-width: 0; }
.launch-body p { margin: 0; max-width: none; }
.launch-body .line { font-family: var(--font-display); font-size: clamp(1.45rem, 3vw, 2.3rem); line-height: 1.24; color: var(--fg); font-weight: 400; font-variation-settings: "opsz" 48; }
.launch-body .line em { font-style: italic; font-weight: 500; }
.launch-body .line { animation: sway-word 6.4s ease-in-out infinite; will-change: transform; }
.launch-body .l2 { animation-delay: -2.1s; } .launch-body .l3 { animation-delay: -4.2s; }
.launch-body .w { display: inline-block; }
.launch-body em .w { animation: sway-word 4.4s ease-in-out infinite; animation-delay: calc(var(--i) * -0.42s); will-change: transform; } /* a transform only: a background-position drift here repainted the gradient glyphs every refresh on the main thread */
@keyframes sway-word { 0% { transform: translate(0, 0) rotate(0) } 25% { transform: translate(1.5px, -3px) rotate(.6deg) } 50% { transform: translate(0, 1px) rotate(0) } 75% { transform: translate(-1.5px, -2px) rotate(-.6deg) } 100% { transform: translate(0, 0) rotate(0) } }
.launch-body .sig { font-family: var(--font-body); font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.count { font-variant-numeric: tabular-nums; color: var(--peach); display: inline-block; }
.count.tick { animation: tick .5s ease; }
@keyframes tick { 0% { transform: translateY(-3px); color: var(--fg); } 100% { transform: none; color: var(--peach); } }
/* the creature: the icon come alive. The seed is the body, the two ring nodes are its hands. */
.mascot { position: absolute; right: 22px; bottom: 14px; display: flex; align-items: flex-end; gap: 6px; opacity: 0; transform: translateY(16px); transition: opacity .8s ease 1.2s, transform .9s cubic-bezier(.2,.8,.2,1) 1.2s; }
.launch.go .mascot { opacity: 1; transform: none; }
.creature { width: 150px; height: 140px; overflow: visible; --ink: #1d1826; }
.creature .bob { animation: hips 3.6s ease-in-out infinite; transform-origin: 66px 122px; }
@keyframes hips { 0%, 100% { transform: translate(0, 0) rotate(0) scale(1, 1) } 25% { transform: translate(-3px, -4px) rotate(-4deg) scale(1.02, .98) } 50% { transform: translate(0, -1px) rotate(0) scale(1, 1) } 75% { transform: translate(3px, -4px) rotate(4deg) scale(1.02, .98) } }
.creature .shadow { fill: rgba(0,0,0,.35); animation: shade 2.8s ease-in-out infinite; transform-origin: 66px 132px; }
@keyframes shade { 0%, 100% { transform: scaleX(1) } 40% { transform: scaleX(.8) } 55% { transform: scaleX(1.1) } }
.creature .edge { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.creature .edge.dashed { stroke: var(--derived); stroke-width: 3; stroke-dasharray: 5 5; }
.creature .ring { fill: #fff; stroke: var(--ink); stroke-width: 3.4; }
.creature .fingers { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.creature .body { fill: var(--peach); stroke: var(--ink); stroke-width: 4; }
.creature .shoe { fill: var(--lav); stroke: var(--ink); stroke-width: 3.2; }
.creature .smile { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.creature .cheek { fill: rgba(242,120,100,.35); }
.creature .eyeball { fill: #fff; stroke: var(--ink); stroke-width: 2.6; }
.creature .lid { fill: var(--peach); stroke: var(--ink); stroke-width: 2.6; }
.creature .lash { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.creature .mark { fill: var(--ink); }
.creature .heart { fill: #f06a8a; opacity: 0; transform-box: fill-box; transform-origin: center; animation: heart 7s ease-in-out infinite; }
@keyframes heart { 0%, 60%, 100% { opacity: 0; transform: translate(0, 0) scale(.6) } 66% { opacity: 1; transform: translate(0, -6px) scale(1) } 80% { opacity: 0; transform: translate(4px, -26px) scale(1.1) } }
.creature .eye-l { animation: wink 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes wink { 0%, 58%, 68%, 100% { transform: scaleY(1) } 62% { transform: scaleY(.08) } }
.creature .pupil { fill: var(--ink); transition: transform .12s ease-out; }
.creature .glint { fill: #fff; }
.creature .eye { animation: blink 4.6s infinite; transform-origin: center; transform-box: fill-box; }
.creature .eye:nth-of-type(2) { animation-delay: .12s; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1) } 95% { transform: scaleY(.06) } }
.creature .arm-r { transform-origin: 92px 66px; animation: wave 5.5s ease-in-out infinite; }
@keyframes wave { 0%, 68%, 100% { transform: rotate(0) } 76% { transform: rotate(-26deg) } 84% { transform: rotate(8deg) } 92% { transform: rotate(-20deg) } }
.creature .arm-l { transform-origin: 92px 84px; animation: sway 2.8s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(0) } 45% { transform: rotate(-6deg) } }
.creature .brow { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; }
.creature .brow-r { transform-origin: 78px 55px; animation: brow 5.5s ease-in-out infinite; }
@keyframes brow { 0%, 68%, 100% { transform: translateY(0) rotate(0) } 78% { transform: translateY(-5px) rotate(-10deg) } }
.bubble { position: relative; max-width: 220px; padding: 12px 14px; border-radius: 14px 14px 4px 14px; background: var(--card-strong); border: 1px solid var(--border-strong); font-size: .9rem; line-height: 1.35; color: var(--fg); margin-bottom: 44px; }
.bubble::after { content: ""; position: absolute; right: -8px; bottom: 8px; width: 12px; height: 12px; background: var(--card-strong); border-right: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); transform: rotate(-45deg) skew(10deg, 10deg); }
@media (max-width: 900px) {
  .launch-body { padding-right: clamp(24px, 5vw, 56px); padding-bottom: 160px; padding-top: 48px; }
  .mascot { right: 14px; bottom: 12px; }
  .creature { width: 112px; height: 104px; }
  .bubble { max-width: 180px; font-size: .82rem; margin-bottom: 30px; }
}

/* `?quiet` (a diagnostic): the page without its own animations */
.quiet .creature *, .quiet .launch-body .line, .quiet .launch-body .w, .quiet .count { animation: none !important; }
