/* Considered — consider.style
   Direction: Reid Miles / Blue Note session sleeve. Cropped display type,
   flat geometric shapes, confident asymmetry, one session accent per beat. */

/* ---------- fonts ---------- */
/* No 400/normal (roman, non-italic) Fraunces face: every heading on the site
   is weight 600, and the only other Fraunces use is the hero's italic — so a
   400/normal face is declared nowhere and browsers never fetch it. Don't
   reintroduce this face without an actual 400/normal use to justify it. */
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --paper: #F4EFE3;
  --paper-raised: #EAE2CF;
  --ink: #1E2A23;
  --accent: #D95B29;
  --accent-deep: #AC4114;
  --mustard: #7A5E0A;
  --sage: #9DB09A;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;

  --rule: color-mix(in srgb, var(--ink) 25%, transparent);
  --container: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* the only two muted-ink tints on the surface: body copy vs. small print */
  --ink-muted: color-mix(in srgb, var(--ink) 80%, transparent);
  --ink-faint: color-mix(in srgb, var(--ink) 70%, transparent);

  /* motion: entrances/exits get ease-out (responsive, decisive).
     Never ease-in — it reads as sluggish. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.94rem + 0.25vw, 1.125rem);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  min-height: 100dvh;
  background-image: var(--grain);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; text-wrap: balance; }

/* paper-grain: faint inline-SVG feTurbulence, low opacity */
:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.035'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  transform: translateY(calc(-100% - 1.25rem));
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  z-index: 100;
  transition: transform 0.15s ease;
}
.skip-link:focus { transform: translateY(0); }

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

/* ---------- focus ---------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
}
/* .copy sits on --accent-deep fill (1:1 against the default ring colour) and its
   offset lands on the --ink pill; --paper clears 3:1 against both surfaces. */
.copy:focus-visible {
  outline-color: var(--paper);
}

/* ---------- layout ---------- */
.wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
section { padding-block: clamp(3rem, 7vw, 6.5rem); }

/* ---------- kicker ---------- */
.kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 0.85rem;
}

/* ---------- buttons ---------- */
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1.5px;
  color: var(--accent-deep);
  transition: color 0.15s ease;
}
.btn-link:hover { color: var(--ink); }

/* ---------- install pill / copy ---------- */
.copy-pill {
  display: inline-flex;
  align-items: stretch;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: "Space Grotesk", monospace;
  max-width: 100%;
  min-width: 0;
}
.copy-pill code {
  padding: 0.9em 1.1em;
  font-size: 0.92rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 0;
}
.copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.9em 1.1em;
  background: var(--accent-deep);
  color: var(--paper);
  font-weight: 500;
  font-size: 0.85rem;
  border-left: 2px solid var(--ink);
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s var(--ease-out);
}
.copy:hover { background: var(--ink); color: var(--paper); }
.copy:active { transform: scale(0.97); }
.copy[data-copied="true"] { background: var(--sage); color: var(--ink); }
.copy[data-copy-failed="true"] { background: var(--mustard); color: var(--paper); }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  position: relative;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
  gap: 1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark-mark { flex: none; }
.wordmark-mark circle { transition: fill 0.15s ease; }
.wordmark-text { transition: color 0.15s ease; }
@media (hover: hover) and (pointer: fine) {
  .wordmark:hover .wordmark-text { color: var(--accent-deep); }
  .wordmark:hover .wordmark-mark circle { fill: var(--accent-deep); }
}
.site-nav ul { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--accent-deep); }

/* ---------- hero ---------- */
#hero {
  padding-block-start: clamp(2.5rem, 6vw, 5rem);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.7fr);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: start;
}
.hero-copy { max-width: 40rem; }
.hero-copy h1 {
  font-size: clamp(2.6rem, 4.6vw + 1rem, 5.4rem);
  /* display-size Fraunces: 1.05 (the h1-h4 default) sits close enough to
     collide descenders across the forced two-line break below; 1.1 gives
     the italic line's "g" room without loosening the block overall. */
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-kerning: normal;
  /* no max-width here: the forced <br> below already sets the composed
     break between the two sentences, so a ch-based cap would only fight it
     by wrapping mid-sentence on the wider end of the display-size range. */
}
.hero-copy h1 em {
  font-style: italic;
  font-weight: 400;
  /* italic Fraunces leans into its own kerning; the roman line's -0.02em
     reads as too tight once letterforms slant, so open it back up slightly
     for the italic pairing specifically. */
  letter-spacing: -0.006em;
  color: var(--accent-deep);
}
.hero-sub {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 0.4vw + 1rem, 1.2rem);
  max-width: 42ch;
  color: var(--ink-muted);
}
.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
}
/* height:auto is load-bearing: the svg carries width/height attrs (320/340)
   that map to real CSS width/height at UA priority. Overriding only width
   here pins height at the attr value, breaking the intrinsic 320:340 ratio
   and forcing preserveAspectRatio's default "meet" fit to render the artwork
   undersized inside the wider column instead of scaling to fill it. */
.hero-art { justify-self: end; align-self: center; width: 100%; height: auto; }
/* hero geometric shapes: staggered one-time entrance on load. Keyframes are
   fine here (not user-repeated), suppressed entirely by the global
   reduced-motion kill-rule below, which leaves shapes at their default
   (visible, untransformed) state. */
@keyframes shape-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-art > * { animation: shape-in 0.5s var(--ease-out) both; }
.hero-art > *:nth-child(1) { animation-delay: 0ms; }
.hero-art > *:nth-child(2) { animation-delay: 60ms; }
.hero-art > *:nth-child(3) { animation-delay: 120ms; }
.hero-art > *:nth-child(4) { animation-delay: 180ms; }
.hero-art > *:nth-child(5) { animation-delay: 240ms; }
.hero-art > *:nth-child(6) { animation-delay: 300ms; }

/* ---------- scroll reveal ---------- */
/* .reveal marks a candidate (a section wrapper via .reveal-section, or an
   inner element that gets carried along when its ancestor section reveals);
   main.js arms it (.reveal-armed) only when JS + IntersectionObserver + no
   reduced-motion are all available, so no-JS and reduced-motion users
   always see content already visible — never stuck hidden. Only
   .reveal-section elements are individually observed; everything else rides
   its ancestor section's trigger, so a grid item never fades a second time
   independently of the section it lives in — one system, one motion.
   --reveal-rise/--reveal-duration are tuned per page below (docs is a
   reference surface people re-scan, so it gets a quieter, faster version). */
:root {
  --reveal-rise: 16px;
  --reveal-duration: 0.55s;
}
.docs-page { --reveal-rise: 12px; --reveal-duration: 0.35s; }
.reveal-armed {
  opacity: 0;
  transform: translateY(var(--reveal-rise));
  transition: opacity var(--reveal-duration) var(--ease-out), transform var(--reveal-duration) var(--ease-out);
}
.reveal-armed.reveal-visible { opacity: 1; transform: translateY(0); }
.why-grid .why-item:nth-child(1) { transition-delay: 0ms; }
.why-grid .why-item:nth-child(2) { transition-delay: 80ms; }
.why-grid .why-item:nth-child(3) { transition-delay: 160ms; }
.proof-grid .proof-figure:nth-child(1) { transition-delay: 0ms; }
.proof-grid .proof-figure:nth-child(2) { transition-delay: 80ms; }
.proof-grid .proof-figure:nth-child(3) { transition-delay: 160ms; }

/* ---------- how / walkthrough ---------- */
/* :not(.doc-section) scopes these to the homepage's #how — the docs page
   reuses id="how" for its own (unrelated) section, and a bare #how selector
   was leaking this raised background and ink-colored kicker/link onto that
   doc-section too, producing an unpadded tinted block that spanned straight
   into #commands (same collision, same fix below). */
#how:not(.doc-section) { background: var(--paper-raised); }
#how:not(.doc-section) .kicker { color: var(--ink); }
#how:not(.doc-section) .btn-link { color: var(--ink); }
.walkthrough {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}
.spine { width: 100%; height: auto; }
.spine .track { fill: none; stroke: var(--rule); stroke-width: 2; stroke-dasharray: 1 7; stroke-linecap: round; }
/* progress fill: pathLength="100" normalizes the line to 100 units regardless
   of its drawn length, so main.js can set stroke-dashoffset as a plain 0-100
   percentage without measuring pixels. Offset 100 = fully retracted. */
.spine .fill { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 0.4s var(--ease-out); }
/* spine nodes ARE the stage glyphs, bare on the line — no plate/ring drawn
   around them. .node-knockout is an invisible (fill-only, no stroke, same
   color as the section background) circle painted under the glyph so the
   track/fill line breaks cleanly behind it instead of showing through the
   glyph's open strokes; it is not a visible "circle," just paint order.
   Active state is color-led per the owner's request (ink -> accent), with
   the existing scale(1.3) growth kept as the non-color-only secondary cue
   so use-of-color accessibility still holds. */
.spine .node-dot {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transition: transform 0.25s var(--ease-out);
}
.spine .node-dot[data-active="true"] { transform: scale(1.3); }
.spine .node-knockout { fill: var(--paper-raised); }
.spine .node-glyph { color: var(--ink); pointer-events: none; transition: color 0.15s ease; }
.spine .node-dot[data-active="true"] .node-glyph { color: var(--accent); }
.stage-nodes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.stage-node {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.5rem 0.15rem;
  border-top: 3px solid var(--rule);
  text-align: left;
  font-size: 0.85rem;
  transition: border-color 0.15s ease, transform 0.15s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .stage-node:hover { transform: translateY(-2px); }
}
.stage-node:active { transform: translateY(0) scale(0.98); }
.stage-node .num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}
.stage-node .name { font-weight: 500; }
.stage-node[aria-current="step"] {
  border-top-width: 4px;
  border-top-color: var(--accent);
}
.stage-node[aria-current="step"] .num { font-weight: 700; }

.stage-cards { display: grid; gap: 1.5rem; }
.stage-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}
.stage-card[hidden] { display: none; }
/* stage-card entrance transform/opacity handled in main.js via WAAPI, skipped
   entirely under prefers-reduced-motion (instant swap, no motion). */
.stage-card h3 { font-size: 1.55rem; margin-bottom: 0.65rem; }
.stage-card p { max-width: 46ch; }
.artifact {
  border: 1.5px solid var(--ink);
  background: var(--paper-raised);
  font-family: "Space Grotesk", monospace;
  font-size: 0.85rem;
}
.artifact-head {
  padding: 0.55rem 0.85rem;
  border-bottom: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
}
.artifact-fields { padding: 0.75rem 0.85rem; display: grid; gap: 0.4rem; }
.artifact-fields li { display: flex; gap: 0.5em; }
.artifact-fields li::before { content: "·"; color: var(--accent-deep); }

/* ---------- why ---------- */
.why-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}
.why-item svg { width: 2.75rem; height: 2.75rem; margin-bottom: 1.1rem; transition: transform 0.2s var(--ease-out); }
.why-item h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.why-item p { max-width: 34ch; }
/* icon entrances: each glyph enacts its own failure mode rather than a
   generic pop. transform-box: fill-box gives each shape its own rotation/
   scale origin instead of the svg viewBox corner. Scoped to .reveal-armed so
   no-JS and reduced-motion readers always get the icon already at rest, and
   staggered across icons (0.1s / 0.5s / 0.85s start) so the three glyphs
   read left-to-right, each beginning as the prior settles. */
.why-item svg > * { transform-box: fill-box; transform-origin: 50% 50%; }
.why-item.reveal-armed svg > * { opacity: 0; }

/* icon 1 — structure by accident: pieces tumble in off-axis and land
   slightly misaligned, then a small corrective settle snaps them true. */
@keyframes why-tumble-a { 0% { opacity: 0; transform: translate(-7px, -11px) rotate(-14deg); } 65% { opacity: 1; transform: translate(2px, 1px) rotate(4deg); } 100% { opacity: 1; transform: translate(0, 0) rotate(0deg); } }
@keyframes why-tumble-b { 0% { opacity: 0; transform: translate(9px, -6px) rotate(11deg); } 65% { opacity: 1; transform: translate(-2px, 2px) rotate(-5deg); } 100% { opacity: 1; transform: translate(0, 0) rotate(0deg); } }
@keyframes why-tumble-c { 0% { opacity: 0; transform: translate(-5px, 8px) rotate(9deg); } 65% { opacity: 1; transform: translate(1px, -1px) rotate(-3deg); } 100% { opacity: 1; transform: translate(0, 0) rotate(0deg); } }
.why-item.reveal-armed.reveal-visible:nth-child(1) svg > *:nth-child(1) { animation: why-tumble-a 0.5s var(--ease-out) both; animation-delay: 0.1s; }
.why-item.reveal-armed.reveal-visible:nth-child(1) svg > *:nth-child(2) { animation: why-tumble-b 0.5s var(--ease-out) both; animation-delay: 0.16s; }
.why-item.reveal-armed.reveal-visible:nth-child(1) svg > *:nth-child(3) { animation: why-tumble-c 0.5s var(--ease-out) both; animation-delay: 0.22s; }

/* icon 2 — template gravity: every shape pulled toward the same point,
   identically — same duration and curve, no per-shape stagger. */
@keyframes why-converge-a { from { opacity: 0; transform: translate(13px, -13px) scale(0.6); } to { opacity: 1; transform: translate(0, 0) scale(1); } }
@keyframes why-converge-b { from { opacity: 0; transform: translate(-15px, 9px) scale(0.6); } to { opacity: 1; transform: translate(0, 0) scale(1); } }
@keyframes why-converge-c { from { opacity: 0; transform: translate(11px, 14px) scale(0.6); } to { opacity: 1; transform: translate(0, 0) scale(1); } }
.why-item.reveal-armed.reveal-visible:nth-child(2) svg > *:nth-child(1) { animation: why-converge-a 0.5s var(--ease-out) both; animation-delay: 0.5s; }
.why-item.reveal-armed.reveal-visible:nth-child(2) svg > *:nth-child(2) { animation: why-converge-b 0.5s var(--ease-out) both; animation-delay: 0.5s; }
.why-item.reveal-armed.reveal-visible:nth-child(2) svg > *:nth-child(3) { animation: why-converge-c 0.5s var(--ease-out) both; animation-delay: 0.5s; }

/* icon 3 — self-certified quality: the triangle stamps itself in one
   confident motion; the dot inside it (the only thing that could read as a
   check mark) never moves — nothing verifies the stamp. */
@keyframes why-stamp { 0% { opacity: 0; transform: scale(1.5); } 70% { opacity: 1; transform: scale(0.94); } 100% { opacity: 1; transform: scale(1); } }
.why-item.reveal-armed.reveal-visible:nth-child(3) svg > *:nth-child(1) { animation: why-stamp 0.45s var(--ease-out) both; animation-delay: 0.85s; }
.why-item.reveal-armed.reveal-visible:nth-child(3) svg > *:nth-child(2) { opacity: 1; }

@media (hover: hover) and (pointer: fine) {
  /* the reveal-visible resting rule above is 3 classes deep; match its
     specificity here too, or hover silently loses to it once revealed. */
  .why-item:hover svg,
  .why-item.reveal-armed.reveal-visible:hover svg { transform: scale(1.08) rotate(3deg); }
}

/* ---------- commands ---------- */
/* see the #how comment above — same id-collision fix. */
#commands:not(.doc-section) { background: var(--paper-raised); }
.commands-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
}
.command-card {
  position: relative;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 1.5rem 1.35rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s var(--ease-out);
}
/* hover reads as an accent frame drawn inside the card, not a lift: a
   translateY lift detaches the card's own border from the shared grid
   lines it sits flush against, so neighbouring seams double up and jump.
   An inset box-shadow adds the accent without moving the box at all. */
@media (hover: hover) and (pointer: fine) {
  .command-card:hover { background: var(--paper); box-shadow: inset 0 0 0 2px var(--accent-deep); }
}
.command-card:active { transform: scale(0.98); }
.command-card .cmd-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
  padding-right: 1.5rem;
}
.command-card p { font-size: 0.92rem; }
/* leaves-page cue: these cards read as static tiles without it. Presentational
   only (aria-hidden, no copy change) — the accessible name still comes from
   cmd-name + description. */
.cmd-arrow {
  position: absolute;
  top: 1.4rem;
  right: 1.35rem;
  color: var(--accent-deep);
  font-weight: 500;
  transition: transform 0.15s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .command-card:hover .cmd-arrow { transform: translateX(4px); }
}

/* ---------- proof ---------- */
.proof-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.proof-figure { border-left: 3px solid var(--accent); padding-left: 1.25rem; }
.proof-figure .value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1;
  color: var(--ink);
}
/* count-up target: main.js locks min-width to the digit's resting (final)
   width before mutating textContent, so counting through fewer digits never
   shifts layout. tabular-nums keeps per-digit width constant during the count. */
.proof-figure .value .num { display: inline-block; font-variant-numeric: tabular-nums; }
.proof-figure .label { margin-top: 0.6rem; font-size: 0.95rem; max-width: 28ch; }
.proof-figure .btn-link { margin-top: 0.75rem; font-size: 0.85rem; }
.proof-note {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
  max-width: 60ch;
}

/* ---------- install ---------- */
/* install carries less visual weight than #proof/#why (a headline, one pill,
   three short host notes) so the shared section clamp reads as cramped next
   to their denser grids; scale it up to hold the same rhythm by feel. */
#install { padding-block: clamp(4rem, 9vw, 8rem); }
.install-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
#install h2 { margin-bottom: 1.75rem; }
.host-notes { display: grid; gap: 1.25rem; }
.host-notes h3 { font-size: 1rem; font-weight: 500; font-family: var(--font-body); color: var(--accent-deep); }
.host-notes p { font-size: 0.92rem; margin-top: 0.3rem; }
.install-links { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; }

/* ---------- docs page ---------- */
.docs-layout {
  padding-block: clamp(2.5rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
.docs-content { max-width: 62rem; }
.docs-lede { margin-top: 1rem; font-size: 1.05rem; max-width: 56ch; color: var(--ink-muted); }
.doc-section { padding-block: 2.25rem; border-top: 1px solid var(--rule); }
.doc-section:first-of-type { border-top: 0; }
.doc-section h2 { font-size: 1.65rem; margin-bottom: 1.25rem; }
.doc-section p { max-width: 60ch; }
.doc-section p + p { margin-top: 0.85rem; }
.doc-section .copy-pill { margin-block: 1.5rem; }
.doc-caution { margin-top: 1rem; font-size: 0.92rem; color: var(--ink-faint); border-left: 3px solid var(--accent); padding: 0.2rem 0 0.2rem 1rem; max-width: 58ch; }

.doc-list { margin-top: 1.25rem; display: grid; gap: 0.6rem; }
.doc-list li { position: relative; padding-left: 1.1em; max-width: 60ch; }
.doc-list li::before { content: "·"; position: absolute; left: 0; color: var(--accent-deep); }
.doc-deeper li { padding-left: 0; }
.doc-deeper li::before { content: none; }

.table-scroll { margin-top: 1.25rem; overflow-x: auto; border: 1.5px solid var(--ink); }
.doc-table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 0.92rem; }
.doc-table th, .doc-table td { padding: 0.75em 1em; text-align: left; vertical-align: top; }
.doc-table thead th { background: var(--ink); color: var(--paper); font-weight: 500; }
.doc-table tbody tr + tr { border-top: 1px solid var(--rule); }
.doc-table code { font-family: "Space Grotesk", monospace; font-size: 0.85rem; }

.doc-modes { margin-top: 1.5rem; display: grid; gap: 1.1rem; }
.doc-modes > div { display: grid; grid-template-columns: minmax(7rem, max-content) 1fr; gap: 1rem; }
.doc-modes dt { font-family: var(--font-display); font-weight: 600; color: var(--accent-deep); }
.doc-modes dd { max-width: 52ch; }

.mono-block {
  margin-top: 1.25rem;
  background: var(--paper-raised);
  border: 1.5px solid var(--ink);
  padding: 1.1rem 1.25rem;
  font-family: "Space Grotesk", monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}
.mono-block .ann { color: var(--ink-faint); }

.docs-toc {
  position: relative;
  border-top: 2px solid var(--ink);
  padding-top: 1.25rem;
}
.toc-label { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 0.75rem; }
.docs-toc ul { display: grid; gap: 0.55rem; }
.docs-toc a { font-size: 0.92rem; text-decoration: none; }
.docs-toc a:hover { color: var(--accent-deep); }
/* scrollspy: main.js sets aria-current="location" on the link matching the
   section in view. The color cue works everywhere; the sliding bar (below)
   only makes sense once the ToC has its own left border to ride, so it's
   scoped to the >=1000px sidebar layout. */
.docs-toc a[aria-current="location"] { color: var(--accent-deep); font-weight: 500; }
.toc-indicator {
  display: none;
  position: absolute;
  top: 0;
  left: -2px;
  width: 2px;
  background: var(--accent);
  opacity: 0;
  transition: transform 0.3s var(--ease-out), opacity 0.15s ease;
}

@media (min-width: 1000px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr) 14rem; gap: clamp(2rem, 5vw, 4rem); }
  .docs-toc { position: sticky; top: 2rem; align-self: start; border-top: 0; border-left: 2px solid var(--ink); padding-top: 0; padding-left: 1.5rem; }
  .toc-indicator { display: block; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 2px solid var(--ink); }
.site-footer .wrap {
  padding-block: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--accent-deep); }
.footer-tagline { color: var(--ink-faint); }
.footer-credit {
  flex-basis: 100%;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { justify-self: start; max-width: 20rem; }
  .why-grid { grid-template-columns: 1fr; }
  .commands-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install-grid { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}
@media (max-width: 760px) {
  .stage-nodes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stage-card { grid-template-columns: 1fr; }
  .site-nav ul { gap: 0.75rem; }
  /* WCAG 2.2 target-size minimum: standalone link controls get a real tap area. */
  .site-nav a,
  .footer-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding-block: 0.75rem;
  }
  .btn-link {
    padding-block: 0.75rem;
  }
  .wordmark {
    display: inline-flex;
    align-items: center;
    padding-block: 0.75rem;
  }
}
@media (max-width: 480px) {
  .commands-grid { grid-template-columns: 1fr; }
  .stage-nodes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after {
  animation: none !important;
  transition: none !important;
}
