/* ============================================================================
   Scrutinizer — brand.css
   Hand-authored design system. No Tailwind, no Inter, no utility soup.
   Mono-forward scientific identity: Space Grotesk (display) + JetBrains Mono
   (chrome/numerics) + a refined system stack (body). Instrument-dark.

   Tokens trace to scrutinizer-brand.toml. Every text role verified ≥ 8:1 on
   --bg (#0a0a0f). The orange is "what survives in the periphery" (long
   wavelength); the teal is the in-app gaze/cursor overlay colour.
   ========================================================================== */

:root {
  /* ── surfaces ── */
  --bg:            #0a0a0f;   /* OLED near-black, matches the app */
  --bg-2:          #0f1117;   /* inner panel */
  --bg-3:          #161822;   /* raised panel / hover */
  --border:        rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);

  /* ── ink (all ≥ 8:1 on --bg) ── */
  --ink:        #e0e0ec;      /* 14.42:1 — primary */
  --ink-muted:  #b0b0c8;      /*  8.93:1 — secondary / body */
  /* --ink-dim (#8a8aa0, 6.0:1) is intentionally NOT defined: it fails 8:1.
     Decoration that needs to be faint uses rgba on --ink instead. */
  --ink-faint:  rgba(224, 224, 236, 0.30);  /* hairlines / decoration only */

  /* ── accent: long-wavelength orange = peripheral survival ── */
  --accent:      #ff9933;     /*  9.28:1 */
  --accent-ink:  #ffb366;     /* 11.19:1 — higher-contrast orange for small text */
  --accent-tint: rgba(255, 153, 51, 0.10);

  /* ── gaze teal = the in-app cursor/gaze overlay colour ── */
  --gaze:      #7dd4e4;       /* 11.67:1 */
  --gaze-tint: rgba(125, 212, 228, 0.10);

  /* ── pathway accents (used sparingly to colour the science) ── */
  --lgn-gold: #c8a050;        /*  8.1:1  — LGN / parvocellular */
  --v1-red:   #dc6450;        /*  6.0:1  — large headings only */

  /* ── type ── */
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --font-body:    ui-sans-serif, -apple-system, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;

  /* ── structure ── */
  --max:       1200px;
  --max-prose: 720px;
  --nav-h:     56px;
  --r-sm: 4px; --r-md: 6px; --r-lg: 12px;

  /* ── motion ── */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(255, 153, 51, 0.28); color: #fff; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--accent); }

img, svg { display: block; max-width: 100%; }

/* Focus ring — accent_ink, 3px, per a11y tokens. */
:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ── typography roles ────────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
/* degree marker chip that prefixes section eyebrows — the cortical motif */
.ecc {
  font-variant-numeric: tabular-nums;
  color: var(--gaze);
  border: 1px solid var(--gaze-tint);
  background: var(--gaze-tint);
  padding: 0.1em 0.5em;
  border-radius: var(--r-sm);
  letter-spacing: 0.08em;
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.08; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 600; letter-spacing: -0.025em; }
h3 { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.accent { color: var(--accent); }
.accent-ink { color: var(--accent-ink); }
.gaze { color: var(--gaze); }

.lead { font-size: 1.18rem; color: var(--ink-muted); line-height: 1.6; max-width: 46ch; }
p { color: var(--ink-muted); }
strong { color: var(--ink); font-weight: 600; }
.mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

/* ── layout primitives ───────────────────────────────────────────────── */

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

section.band { padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; }
section.band + section.band { border-top: 1px solid var(--border); }

.section-head { max-width: var(--max-prose); margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section-head h2 { margin: 0.9rem 0 0.6rem; color: var(--ink); }
.section-head .lead { color: var(--ink-muted); }

/* ── nav (shared shell) ──────────────────────────────────────────────── */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; gap: 1.5rem; width: 100%; }
.nav .brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}
.nav .brand:hover { color: var(--ink); opacity: 0.85; }
.nav .brand img { width: 22px; height: 22px; }
.nav .spacer { flex: 1; }
.nav .links { display: flex; align-items: center; gap: 0.35rem; }
.nav .links a {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.02em; color: var(--ink-muted);
  padding: 0.5rem 0.7rem; border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
}
.nav .links a:hover { color: var(--ink); background: rgba(255,255,255,0.05); }
.nav .links .sep { width: 1px; height: 18px; background: var(--border-strong); margin: 0 0.4rem; }
.nav .links a.gh { display: inline-flex; align-items: center; gap: 0.45rem; }
.nav .menu-btn { display: none; }

@media (max-width: 760px) {
  .nav .links { display: none; }
  .nav .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--border);
    background: transparent; color: var(--ink); border-radius: var(--r-sm);
    cursor: pointer;
  }
  .nav .links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: rgba(10,10,15,0.97); border-bottom: 1px solid var(--border);
    padding: 0.5rem clamp(1.25rem, 4vw, 2.5rem) 1rem;
  }
  .nav .links.open .sep { display: none; }
}

/* ── buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.72rem 1.15rem; border-radius: var(--r-md);
  min-height: 44px; cursor: pointer; transition: all 0.16s var(--ease);
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #160a00; }
.btn-primary:hover { background: var(--accent-ink); color: #160a00; transform: translateY(-1px); }
.btn-ghost { border-color: var(--border-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn:active { transform: translateY(0) scale(0.98); }

/* ── HERO ────────────────────────────────────────────────────────────── */

.hero { padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 6rem)); padding-bottom: clamp(3rem, 7vw, 6rem); position: relative; overflow: hidden; }

/* faint log-polar eccentricity field — the cortical motif, decorative */
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto 30%;
  width: 80vw; height: 80vw; max-width: 1100px; max-height: 1100px;
  background:
    repeating-radial-gradient(circle at center,
      transparent 0 38px,
      rgba(125, 212, 228, 0.05) 38px 39px),
    radial-gradient(circle at center, rgba(255,153,51,0.06), transparent 60%);
  pointer-events: none; z-index: 0;
  -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 72%);
          mask-image: radial-gradient(circle at center, #000 30%, transparent 72%);
}

.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; } }

.hero h1 { margin: 1.1rem 0 1.25rem; }
.hero .lead { max-width: 40ch; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.9rem; }
.hero .meta-line {
  margin-top: 1.1rem; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.04em; color: var(--ink-muted);
}
.hero .meta-line .dot { color: var(--accent); }
/* cross-platform / Figma-native alternative to the Mac download — meets the
   designer where they work and catches anyone who can't run the arm64 build */
.hero .alt-cta {
  margin-top: 0.95rem; font-family: var(--font-mono); font-size: 0.8rem;
  font-weight: 500; letter-spacing: 0.02em; color: var(--ink-muted);
}
.hero .alt-cta a { color: var(--accent-ink); font-weight: 600; }
.hero .alt-cta a:hover { color: var(--accent); }

/* heritage chip — "since 2007" */
.heritage {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-muted);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 0.32rem 0.6rem;
}
.heritage b { color: var(--gaze); font-weight: 600; }

/* ── FOVEAL STAGE — the page demonstrates its own thesis ─────────────── */

.stage {
  position: relative; aspect-ratio: 4 / 3; width: 100%;
  border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  overflow: hidden; background: #07070c; cursor: crosshair;
  box-shadow: 0 30px 80px -40px rgba(0,0,0,0.9);
  perspective: 1200px;
}
/* the "sharp" world: a dense, colourful mock interface */
.stage .world {
  position: absolute; inset: 0; display: grid;
  grid-template-columns: repeat(16, 1fr); grid-auto-rows: 1fr; gap: 4px; padding: 14px;
}
.stage .world i { border-radius: 2px; display: block; }
.stage .focus-word {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem); letter-spacing: -0.02em;
  color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.6); pointer-events: none;
}
/* the degraded periphery layer — blurred + desaturated, masked clear at fovea */
.stage .periphery {
  position: absolute; inset: 0; pointer-events: none;
  background: transparent;       /* transparent so backdrop-filter blurs the world beneath */
  backdrop-filter: blur(7px) saturate(0.18) brightness(0.82);
  -webkit-backdrop-filter: blur(7px) saturate(0.18) brightness(0.82);
  -webkit-mask-image: radial-gradient(circle var(--fov, 92px) at var(--fx, 50%) var(--fy, 50%), transparent 0%, transparent 55%, #000 100%);
          mask-image: radial-gradient(circle var(--fov, 92px) at var(--fx, 50%) var(--fy, 50%), transparent 0%, transparent 55%, #000 100%);
  transition: backdrop-filter 0.2s;
}
/* the foveal reticle that tracks the cursor (gaze-teal) */
.stage .reticle {
  position: absolute; top: 0; left: 0;
  width: calc(var(--fov, 92px) * 2); height: calc(var(--fov, 92px) * 2);
  border: 1px solid rgba(125, 212, 228, 0.55); border-radius: 50%;
  transform: translate(calc(var(--fx, 50%) - 50%), calc(var(--fy, 50%) - 50%));
  pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 0 24px rgba(125,212,228,0.18) inset;
}
.stage .reticle::after {
  content: ""; position: absolute; inset: 50% auto auto 50%;
  width: 14px; height: 14px; transform: translate(-50%,-50%);
  background:
    linear-gradient(var(--gaze),var(--gaze)) center/1px 14px no-repeat,
    linear-gradient(var(--gaze),var(--gaze)) center/14px 1px no-repeat;
  opacity: 0.7;
}
/* the live readout HUD — mono, like an instrument */
.stage .hud {
  position: absolute; left: 12px; bottom: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: flex-end;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em;
  text-transform: uppercase; pointer-events: none;
}
.stage .hud .read { color: var(--gaze); font-variant-numeric: tabular-nums; line-height: 1.7; }
.stage .hud .read b { color: var(--ink); font-weight: 600; }
.stage .hud .tag {
  color: var(--ink-muted); background: rgba(0,0,0,0.5); border: 1px solid var(--border);
  padding: 0.25rem 0.5rem; border-radius: var(--r-sm); text-align: right;
}
.stage[data-static="true"] .reticle,
.stage[data-static="true"] .hud .read { /* static split mode visual handled in JS */ }

/* ── MECHANISM (the science) — numbered editorial, not feature cards ──── */

.mechanism { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 920px) { .mechanism { grid-template-columns: 1fr; } }
.mech-list { display: flex; flex-direction: column; }
.mech {
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem;
  padding: 1.6rem 0; border-top: 1px solid var(--border);
}
.mech:first-child { border-top: none; padding-top: 0; }
.mech .idx {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  color: var(--accent); padding-top: 0.3rem; font-variant-numeric: tabular-nums;
}
.mech h3 { margin-bottom: 0.45rem; }
.mech p { font-size: 0.98rem; }
/* model — the cited equation under each mechanism (KaTeX); accent-striped, mono "where" note */
.model {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem;
  margin-top: 0.95rem; padding: 0.55rem 0.9rem;
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, var(--accent-tint), transparent 78%);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.model .katex { font-size: 1.05em; color: var(--ink); }          /* 14.42:1 on the near-black field */
.model .katex-display { margin: 0; }
.model .where {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; line-height: 1.5;
  color: var(--ink-muted); letter-spacing: 0.01em;
}
.model .where b { color: var(--accent-ink); font-weight: 600; }
.cite-dot {
  display: inline-flex; vertical-align: super; margin-left: 0.2em;
  color: var(--gaze); opacity: 0.8;
}
.cite-dot:hover { opacity: 1; }
.figure { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-2); }
.figure img { width: 100%; }
.figure figcaption { font-size: 0.82rem; color: var(--ink-muted); padding: 0.75rem 1rem; border-top: 1px solid var(--border); }
.fig-links { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.fig-links a { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500; color: var(--accent-ink); display: inline-flex; align-items: baseline; gap: 0.45rem; }
.fig-links a:hover { color: var(--accent); }

/* ── MECHANISM DEMO — linked display: hover a mechanism (or tab) to apply
   its degradation to the periphery of a shared scene. Centre stays sharp. ── */
.mech-demo { margin: 0; }
.md-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.7rem; }
.md-tab {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.03em;
  color: var(--ink-muted); background: var(--bg-2); border: 1px solid var(--border);
  padding: 0.4rem 0.72rem; border-radius: var(--r-sm); cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s; min-height: 32px;
}
.md-tab:hover { color: var(--ink); border-color: var(--border-strong); }
.md-tab.active { color: #160a00; background: var(--accent); border-color: var(--accent); font-weight: 600; }

.md-stage {
  position: relative; aspect-ratio: 5 / 4; width: 100%; overflow: hidden;
  border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: #07070c;
}
.md-scene, .md-overlay { position: absolute; inset: 0; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.md-overlay {
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 0 30%, #000 62%);
          mask-image: radial-gradient(circle at 50% 50%, transparent 0 30%, #000 62%);
  transition: filter 0.25s var(--ease);
}
.mech-demo[data-mode="cortical"]  .md-overlay { filter: blur(4px); }
.mech-demo[data-mode="chromatic"] .md-overlay { filter: grayscale(1) brightness(1.06) contrast(1.02); }
.mech-demo[data-mode="crowding"]  .md-overlay { filter: url(#crowding); }

/* the shared scene — a compact dashboard mockup (built in main.js) */
/* the shared scene — a text-forward UI card (built in main.js). Distinct from the
   hero's colour grid: text carries blur + crowding; the tag/button/chips carry the
   chromatic desaturation. Crowding on letters is the textbook demonstration. */
.s-card { display: flex; flex-direction: column; gap: 9px; height: 100%; }
.s-row { display: flex; align-items: center; gap: 8px; }
.s-tag { font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #160a00; background: var(--accent); padding: 2px 7px; border-radius: 3px; }
.s-date { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--ink-muted); margin-left: auto; }
.s-h { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.08; letter-spacing: -0.015em; color: var(--ink); }
.s-body { display: flex; flex-direction: column; gap: 5px; }
.s-body p { font-size: 12.5px; font-weight: 500; line-height: 1.4; color: var(--ink-muted); }
.s-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.s-btn { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: #160a00; background: var(--accent); padding: 6px 12px; border-radius: 5px; }
.s-chip { width: 24px; height: 24px; border-radius: 5px; flex-shrink: 0; }

.md-reticle { position: absolute; top: 50%; left: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 1px solid rgba(125, 212, 228, 0.55); border-radius: 50%; box-shadow: 0 0 20px rgba(125, 212, 228, 0.16) inset; pointer-events: none; }
.md-reticle::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 12px; height: 12px; transform: translate(-50%, -50%); background: linear-gradient(var(--gaze), var(--gaze)) center/1px 12px no-repeat, linear-gradient(var(--gaze), var(--gaze)) center/12px 1px no-repeat; opacity: 0.6; }
.md-cap { font-size: 0.9rem; font-weight: 500; color: var(--ink-muted); margin-top: 0.75rem; line-height: 1.5; min-height: 2.6em; }
.md-filters { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ── AUDIENCE — three distinct treatments, not identical cards ───────── */

.audience { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (max-width: 880px) { .audience { grid-template-columns: 1fr; } }
.use {
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.6rem; background: var(--bg-2); transition: border-color 0.18s, transform 0.18s var(--ease);
}
.use:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.use .tag { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gaze); }
.use h3 { margin: 0.7rem 0 0.6rem; }
.use p { font-size: 0.94rem; }
/* deliberate emphasis: the primary audience (Designer) gets a warm frame so the
   eye has a place to land first. Hierarchy via border + the hero's accent tag —
   NOT a stronger fill: a tint past ~6% drops the muted body text under 8:1. */
.use--lead {
  border-color: rgba(255, 153, 51, 0.5);
  background: linear-gradient(160deg, rgba(255, 153, 51, 0.06), var(--bg-2) 60%);
  box-shadow: inset 0 2px 0 var(--accent);
}
.use--lead:hover { border-color: var(--accent); transform: translateY(-2px); }
.use--lead .tag { color: var(--accent); }

/* ── PRODUCTS ────────────────────────────────────────────────────────── */

.products { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.25rem; }
@media (max-width: 880px) { .products { grid-template-columns: 1fr; } }
.product { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.8rem; background: var(--bg-2); }
.product h3 { margin-bottom: 0.5rem; }
.product .badge { display: inline-block; margin-left: 0.5rem; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: #0c1410; background: var(--gaze); padding: 0.12em 0.5em; border-radius: var(--r-sm); vertical-align: middle; }
.product p { font-size: 0.95rem; margin-bottom: 1.2rem; }
.product .row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; }
.product .ver { font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500; color: var(--ink-muted); }

/* ── FROM THE BLOG — editorial, deliberately NOT a card grid ─────────── */
.notes .fn-feature {
  display: block; border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--r-lg); background: var(--bg-2); padding: 1.6rem 1.8rem;
  transition: border-color 0.18s, transform 0.18s var(--ease);
}
.notes .fn-feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.notes .fn-kicker {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink);
}
.notes .fn-feature h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 0.5rem 0 0.65rem; color: var(--ink); }
.notes .fn-feature p { font-size: 1rem; color: var(--ink-muted); max-width: 64ch; }
.notes .fn-feature .read {
  display: inline-flex; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  color: var(--accent-ink); margin-top: 0.95rem;
}
.notes .fn-feature:hover .read { color: var(--accent); }

.notes .fn-list { margin-top: 0.5rem; }
.notes a.fn-row {
  display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1.5rem; align-items: baseline;
  padding: 1.1rem 0.2rem; border-top: 1px solid var(--border);
  transition: background 0.15s, padding 0.15s;
}
.notes a.fn-row:hover { background: rgba(255,255,255,0.03); padding-left: 0.6rem; padding-right: 0.6rem; }
.notes .fn-row h4 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.08rem;
  color: var(--ink); letter-spacing: -0.01em; line-height: 1.2;
}
.notes a.fn-row:hover h4 { color: var(--accent-ink); }
.notes .fn-row .fn-go {
  font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600;
  color: var(--accent-ink); white-space: nowrap; letter-spacing: 0.02em;
}
.notes .fn-row .fn-hook {
  grid-column: 1 / -1; font-size: 0.92rem; color: var(--ink-muted); max-width: 72ch; margin: 0;
}
.notes .fn-more { margin-top: 1.75rem; }
.notes .fn-more a {
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; color: var(--accent-ink);
}
.notes .fn-more a:hover { color: var(--accent); }
@media (max-width: 560px) {
  .notes a.fn-row { grid-template-columns: 1fr; }
  .notes .fn-row .fn-go { order: 3; }
}

/* ── LINEAGE WALL — flat fallback + 3D mount ─────────────────────────── */

#lineage-scene { position: relative; min-height: 520px; }
.lineage-threads { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; margin-top: 1.5rem; }
.lineage-threads .accent { color: var(--accent); } .lineage-threads .gaze { color: var(--gaze); }
/* flat fallback / reduced-motion: an honest receding list */
.lineage-flat { display: grid; gap: 0; margin-top: 1.5rem; }
.node {
  display: grid; grid-template-columns: 90px 1fr auto; gap: 1.1rem; align-items: baseline;
  padding: 0.85rem 0; border-top: 1px solid var(--border);
}
.node:first-child { border-top: none; }
.node .yr { font-family: var(--font-mono); font-weight: 600; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.node .what strong { color: var(--ink); }
.node .what span { color: var(--ink-muted); font-size: 0.92rem; }
.node .branch { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; }
/* Strand colour-coding: PERCEIVE = orange (foveation/simulation), TRACK = teal
   (the cursor/gaze overlay colour), FIELD = muted (the wider literature). */
.node.perceive .yr, .node.perceive .branch { color: var(--accent); }
.node.track .yr,    .node.track .branch    { color: var(--gaze); }
.node.field .branch { color: var(--ink-muted); }
.node.apex { background: linear-gradient(90deg, var(--accent-tint), transparent); border-radius: var(--r-md); padding-left: 0.6rem; }
.node.apex .yr { color: var(--accent-ink); }
.node.apex .branch { color: var(--accent-ink); }

/* ── FOOTER (shared shell) ───────────────────────────────────────────── */

.foot { border-top: 1px solid var(--border); padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.foot .brand { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.foot .brand img { width: 22px; height: 22px; }
.foot .copy { font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500; color: var(--ink-muted); margin-top: 0.3rem; }
.foot .links { display: flex; gap: 1.25rem; align-items: center; }
.foot .links a { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; color: var(--ink-muted); }
.foot .links a:hover { color: var(--ink); }

/* ── reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
