/* ═══════════════════════════════════════════════════════════
   THE DECISION FIELD — Rajveer Singh Pall
   Noir editorial typography over a scroll-driven WebGL universe
   ═══════════════════════════════════════════════════════════ */

:root {
  --void: #08090c;
  --void-2: #0c0e13;
  --panel: rgba(14, 17, 23, 0.82);
  --panel-h: rgba(18, 22, 31, 0.92);
  --hairline: rgba(232, 227, 216, 0.08);
  --hairline-2: rgba(232, 227, 216, 0.16);
  --ivory: #ece7db;
  --ivory-2: #c0bbaf;
  --dim: #9b978d;
  --faint: #55534c;
  --gold: #c9a25a;
  --gold-bright: #e3c07e;
  --gold-dim: rgba(201, 162, 90, 0.12);
  --ember: #8a4b4b;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  /* ── motion tokens (single source of truth, mirrored in home.css) ── */
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);   /* signature out-expo */
  --ease-io:   cubic-bezier(0.76, 0, 0.24, 1);  /* symmetric in-out */
  --dur-fast:  0.25s;
  --dur-med:   0.45s;
  --dur-slow:  0.9s;
  /* ── type scale (fluid), mirrored from home.css ── */
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.12rem, 1.02rem + 0.5vw, 1.34rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4: clamp(2.4rem, 1.7rem + 3.5vw, 4.4rem);
}

/* ── cross-document view transitions (Chromium; others fall back to JS fade) ── */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .34s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .01s; }
}
.vt-fallback body { transition: opacity .19s ease; }
.vt-fallback.vt-leaving body { opacity: 0; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
html.js { scroll-behavior: auto; }
html.no-js { scroll-behavior: smooth; }
body {
  background: var(--void);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: rgba(201, 162, 90, 0.3); }

/* ── Film grain ── */
body::after {
  content: "";
  position: fixed; inset: -50%;
  z-index: 320;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ═══ Preloader ═══ */
.loader {
  position: fixed; inset: 0;
  z-index: 400;
  background: var(--void);
  display: grid; place-items: center;
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
html.no-js .loader { display: none; }
.loader-inner { text-align: center; }
.loader-name {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.4em; text-indent: 0.4em;
  text-transform: uppercase;
  color: var(--dim);
}
.loader-count {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: clamp(64px, 10vw, 110px);
  font-weight: 500; line-height: 1;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}
.loader-bar {
  width: 180px; height: 1px;
  margin: 26px auto 0;
  background: var(--hairline);
  overflow: hidden;
}
.loader-bar span {
  display: block; width: 100%; height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
}
.loader-tag {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 9px; letter-spacing: 0.3em; text-indent: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ═══ WebGL canvas + vignette ═══ */
#field {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  display: block;
}
.vignette {
  position: fixed; inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 55%, rgba(8, 9, 12, 0.55) 100%),
    linear-gradient(rgba(8, 9, 12, 0.25), transparent 18%, transparent 82%, rgba(8, 9, 12, 0.4));
}
/* chapter-aware reading shield: darkens the content column while the
   particle field parts to the margins. Driven by body[data-chapter]. */
.shield {
  position: fixed; inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(8, 9, 12, 0.3) 10%,
    rgba(8, 9, 12, 0.8) 26%,
    rgba(8, 9, 12, 0.8) 74%,
    rgba(8, 9, 12, 0.3) 90%,
    transparent 100%);
  opacity: 0;
  transition: opacity 1s var(--ease);
}
body[data-chapter="Thesis"] .shield,
body[data-chapter="Inquiries"] .shield,
body[data-chapter="Instruments"] .shield { opacity: 1; }
body[data-chapter="Methods"] .shield { opacity: 0.85; }
body[data-chapter="Trajectory"] .shield { opacity: 0.5; }
html.no-js .shield { opacity: 1; }
main, .footer { position: relative; z-index: 2; }

/* ═══ Chrome ═══ */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 1px;
  z-index: 310;
  background: var(--gold);
  transform-origin: left;
  transform: scaleX(0);
  will-change: transform;
}
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  padding: 0 clamp(20px, 4vw, 52px);
  background: linear-gradient(rgba(8, 9, 12, 0.85), rgba(8, 9, 12, 0));
  transition: background 0.4s, box-shadow 0.4s;
}
.nav.scrolled {
  background: rgba(8, 9, 12, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--hairline);
}
.nav-brand {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ivory-2);
}
.nav-brand b { color: var(--gold); font-weight: 600; }
.nav-links { display: flex; gap: clamp(12px, 2.4vw, 30px); }
.nav-links a {
  font-family: var(--mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dim);
  padding: 6px 0;
  transition: color 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-bright); }
.nav-links a .idx { color: var(--faint); margin-right: 5px; transition: color 0.25s; }
.nav-links a:hover .idx, .nav-links a.active .idx { color: var(--gold); }

/* chapter rail (left edge) */
.chapter-rail {
  position: fixed; left: clamp(14px, 2.6vw, 34px); bottom: 42px;
  z-index: 300;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.rail-line {
  width: 1px; height: 64px;
  background: linear-gradient(transparent, var(--hairline-2));
}
.rail-label {
  font-family: var(--mono);
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--faint);
  writing-mode: vertical-rl;
  transition: color 0.4s;
}
@media (max-width: 900px) { .chapter-rail { display: none; } }

/* ═══ Prologue ═══ */
.prologue {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 120px 24px 90px;
}
.prologue-veil {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 62% 46% at 50% 47%, rgba(8, 9, 12, 0.62), rgba(8, 9, 12, 0.18) 70%, transparent);
  pointer-events: none;
}
.prologue-inner {
  position: relative;
  max-width: 1240px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.prologue-kicker {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.42em; text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}
.prologue-question {
  margin-top: 34px;
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 82px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.005em;
  color: var(--ivory);
  text-wrap: balance;
}
.prologue-question em { font-style: italic; color: var(--gold-bright); }
.prologue-byline {
  margin-top: 42px;
  display: flex; align-items: center; gap: 18px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--dim);
}
.prologue-byline .sep { width: 56px; height: 1px; background: var(--hairline-2); }
.prologue-byline b { color: var(--ivory-2); font-weight: 500; }
.prologue-scroll {
  position: absolute; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: 9px; letter-spacing: 0.34em; text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--faint);
}
.prologue-scroll::after {
  content: ""; width: 1px; height: 48px;
  background: linear-gradient(var(--hairline-2), transparent);
  animation: drip 2.6s var(--ease) infinite;
}
@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ═══ Split-text + entrance scaffolding (JS-gated; base visible) ═══ */
[data-split] .sw-mask { display: inline-block; overflow: hidden; vertical-align: bottom; }
[data-split] .sw { display: inline-block; }
html.js .anim-ready [data-split] .sw,
html.js .anim-ready .rise { will-change: transform, opacity; }

/* ═══ Shared chapter scaffold ═══ */
.chapter {
  position: relative;
  max-width: 1340px;
  margin: 0 auto;
  padding: clamp(110px, 13vw, 190px) clamp(24px, 5vw, 56px);
}
.chapter-head {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.chapter-num {
  font-family: var(--mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.chapter-title {
  font-family: var(--serif);
  font-size: clamp(40px, 5.4vw, 66px);
  font-weight: 500; line-height: 1.04;
  color: var(--ivory);
}
.chapter-sub {
  margin-left: auto;
  max-width: 320px;
  font-size: 13px; line-height: 1.8;
  color: var(--dim);
  text-align: right;
}

/* ═══ Thesis ═══ */
.thesis-text {
  max-width: 1020px;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(30px, 4.2vw, 54px);
  font-weight: 500;
  line-height: 1.4;
  text-wrap: pretty;
}
.thesis-text .w { color: #6c695f; transition: color 0.3s linear; }
.thesis-text .w.lit { color: var(--ivory); }
.thesis-text .w.gold-w.lit { color: var(--gold-bright); font-style: italic; }
.thesis-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 1020px;
  margin: clamp(56px, 7vw, 90px) auto 0;
  border-block: 1px solid var(--hairline);
  background: rgba(9, 11, 15, 0.72);
  backdrop-filter: blur(4px);
}
.tstat { padding: 30px 14px; text-align: center; }
.tstat + .tstat { border-left: 1px solid var(--hairline); }
.tstat-value {
  display: block;
  font-family: var(--serif);
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 600; line-height: 1;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}
.tstat-label {
  display: block; margin-top: 10px;
  font-family: var(--mono);
  font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--dim);
  line-height: 1.8;
}

/* ═══ Inquiries ═══ */
.case {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: clamp(18px, 3vw, 40px);
  padding: clamp(40px, 5vw, 60px) 0;
  border-top: 1px solid var(--hairline);
}
.case:last-child { border-bottom: 1px solid var(--hairline); }
.case::before {
  content: "";
  position: absolute; left: 50%; top: 0;
  transform: translateX(-50%);
  width: 100vw; height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold-dim) 50%, transparent);
  opacity: 0;
  transition: opacity 0.45s;
  pointer-events: none;
}
.case:hover::before { opacity: 0.35; }
.case-num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--faint);
  padding-top: 10px;
  transition: color 0.3s;
}
.case:hover .case-num { color: var(--gold); }
.case-num::after {
  content: "";
  display: block;
  width: 34px; height: 1px;
  margin-top: 12px;
  background: var(--hairline-2);
}
.case-venue, .instrument-venue {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  padding: 5px 12px;
  border: 1px solid rgba(201, 162, 90, 0.28);
  border-radius: 999px;
  background: rgba(10, 12, 17, 0.78);
}
.case h3 {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(27px, 3.4vw, 40px);
  font-weight: 500; line-height: 1.12;
  color: var(--ivory);
  text-wrap: pretty;
}
.case h3 a { transition: color 0.3s; }
.case h3 a:hover { color: var(--gold-bright); }
.case-subtitle {
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ivory-2);
}
.case-summary {
  margin-top: 16px;
  max-width: 720px;
  font-size: 15px; line-height: 1.85;
  color: var(--dim);
  text-shadow: 0 1px 14px rgba(8, 9, 12, 0.95), 0 0 4px rgba(8, 9, 12, 0.8);
}
.case h3, .case-subtitle, .trajectory-note, .trajectory-heading,
.chapter-sub, .thesis-text, .prologue-question {
  text-shadow: 0 1px 16px rgba(8, 9, 12, 0.9);
}
.case-metrics {
  display: flex; flex-wrap: wrap;
  margin-top: 26px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  max-width: fit-content;
  background: rgba(10, 12, 17, 0.85);
  backdrop-filter: blur(5px);
}
.cmetric { padding: 16px 26px; }
.cmetric + .cmetric { border-left: 1px solid var(--hairline); }
.cmetric strong {
  display: block;
  font-family: var(--serif);
  font-size: 26px; font-weight: 600; line-height: 1;
  color: var(--gold-bright);
}
.cmetric span {
  display: block; margin-top: 5px;
  font-family: var(--mono);
  font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--dim);
}
.case-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.case-tags span {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ivory-2);
  padding: 4px 11px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(10, 12, 17, 0.75);
}
.case-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold);
  transition: color 0.3s;
}
.case-link::after { content: "→"; transition: transform 0.3s var(--ease); }
.case-link:hover::after { transform: translateX(6px); }
.case-link:hover { color: var(--gold-bright); }

/* ═══ Architecture figures (Inquiry diagrams) ═══
   Bespoke inline-SVG method schematics. Static and fully legible with no JS
   and under prefers-reduced-motion; main.js adds restrained motion (arrows
   draw once, metric chip pops once, conclusion node breathes). */
.case-figure {
  margin: 30px 0 6px;
  max-width: 760px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: rgba(10, 12, 17, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 16px 22px 14px;
  overflow: visible;
}
.arch-themes {
  display: flex; flex-wrap: wrap; gap: 7px;
  list-style: none;
  margin-bottom: 13px;
}
.arch-themes li {
  font-family: var(--mono);
  font-size: 8.5px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold);
  padding: 3px 9px;
  border: 1px solid rgba(201, 162, 90, 0.26);
  border-radius: 999px;
  background: rgba(201, 162, 90, 0.05);
}
/* height follows each figure's own viewBox ratio (featured figures use a
   taller viewBox); figure max-width caps the size on wide monitors. */
.arch {
  width: 100%; height: auto; display: block;
  overflow: visible;
}

/* nodes */
.arch-node rect {
  fill: rgba(18, 22, 31, 0.92);
  stroke: var(--hairline-2);
  stroke-width: 1;
  transition: stroke 0.3s, fill 0.3s;
}
.arch-node text {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--ivory-2);
  letter-spacing: 0.01em;
}
.arch-node .arch-sub { fill: var(--dim); font-size: 7.6px; letter-spacing: 0; }
.arch-node .arch-lead { fill: var(--ivory); font-size: 9.5px; }
.arch-node[tabindex] { cursor: help; }
.arch-node[tabindex]:hover rect,
.arch-node[tabindex]:focus-visible rect {
  stroke: var(--gold);
  fill: rgba(28, 32, 42, 0.96);
}
.arch-node[tabindex]:focus { outline: none; }
.arch-node[tabindex]:focus-visible rect { stroke: var(--gold-bright); stroke-width: 1.5; }

/* conclusion node */
.arch-node.is-key rect {
  fill: rgba(30, 24, 13, 0.92);
  stroke: var(--gold);
  stroke-width: 1.5;
}
.arch-node.is-key text { fill: var(--gold-bright); }
.arch-node.is-key .arch-sub { fill: var(--gold); }

/* gold metric chip */
.arch-metric rect { fill: var(--gold); stroke: none; }
.arch-metric text {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  fill: #14110a;
  letter-spacing: 0.02em;
}

/* edges — fully drawn by default (no-JS / reduced-motion safe) */
.flow-arrow {
  fill: none;
  stroke: var(--hairline-2);
  stroke-width: 1.5;
  stroke-linecap: round;
}
.flow-arrow.is-faint { stroke: rgba(232, 227, 216, 0.1); stroke-dasharray: 3 4; }
.arch-web { fill: none; stroke: rgba(201, 162, 90, 0.2); stroke-width: 1; }
.arch-spoke { stroke: var(--hairline-2); stroke-width: 1; fill: none; }
.arch-diamond { fill: rgba(18, 22, 31, 0.92); stroke: var(--hairline-2); stroke-width: 1; }
.arch-diamond-label { font-family: var(--mono); font-size: 8px; fill: var(--dim); letter-spacing: 0.1em; }
.arch-dot { fill: var(--faint); }
.arch-titlebar { font-family: var(--mono); font-size: 8.5px; fill: var(--dim); letter-spacing: 0.08em; }

/* caption — reads like a paper figure */
.case-figure figcaption {
  margin-top: 13px;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.03em; line-height: 1.6;
  color: var(--faint);
  text-align: center;
}
.case-figure figcaption b { color: var(--gold); font-weight: 600; letter-spacing: 0.1em; }

/* method tooltip (one reusable node, appended to body) */
.arch-tip {
  position: fixed;
  z-index: 330;
  max-width: 244px;
  padding: 11px 14px;
  background: var(--panel-h);
  border: 1px solid rgba(201, 162, 90, 0.42);
  border-radius: 9px;
  box-shadow: 0 18px 44px -16px rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  opacity: 0; visibility: hidden;
}
.arch-tip-title {
  font-family: var(--mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 5px;
}
.arch-tip-body {
  font-family: var(--sans);
  font-size: 12px; line-height: 1.55;
  color: var(--ivory-2);
}

@media (max-width: 760px) {
  .case-figure { padding: 14px 14px 12px; max-width: none; }
  .case-figure figcaption { font-size: 10px; }
  .arch-themes li { font-size: 9px; padding: 2px 7px; }
  .arch-tip { max-width: 208px; }
}

/* diagrams inside instrument cards: tighter banner, larger relative labels
   (the cards are narrower than the Inquiry rows) */
.instrument .case-figure { margin: 2px 0 20px; max-width: none; padding: 14px 16px 12px; }
.instrument .arch-node text { font-size: 10px; }
.instrument .arch-node .arch-sub { font-size: 8.4px; }
.instrument .arch-node .arch-lead { font-size: 10.5px; }
.instrument .arch-metric text { font-size: 10.5px; }
.instrument .case-figure figcaption { font-size: 9.5px; }

/* ═══ Instruments ═══ */
.instruments-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.instrument {
  display: flex; flex-direction: column;
  background: var(--panel);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 30px 28px 32px;
  transition: border-color 0.35s, background 0.35s, box-shadow 0.45s var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}
.instrument:hover {
  border-color: var(--hairline-2);
  background: var(--panel-h);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.65);
}
.instrument-venue { align-self: flex-start; }
.instrument h3 {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: 30px; font-weight: 500; line-height: 1.1;
  color: var(--ivory);
}
.instrument .case-subtitle { font-size: 16.5px; }
.instrument .case-summary { font-size: 14px; }
.instrument .case-metrics { margin-top: 20px; }
.instrument .cmetric { padding: 12px 18px; }
.instrument .cmetric strong { font-size: 21px; }
.instrument .case-link { margin-top: auto; padding-top: 24px; }
.instrument.wide { grid-column: 1 / -1; }
@media (min-width: 1025px) {
  .instrument.wide { flex-direction: row; flex-wrap: wrap; column-gap: 40px; align-items: flex-start; }
  .instrument.wide > * { flex: 1 1 100%; }
}

/* ═══ Methods ═══ */
.methods-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(22px, 3.4vw, 38px);
  max-width: 920px;
  margin: 0 auto;
}
.method {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 102px;
}
.method-circle {
  position: relative;
  width: 92px; height: 92px;
  border-radius: 50%;
  background: var(--panel);
  backdrop-filter: blur(6px);
  border: 1px solid var(--hairline);
  display: grid; place-items: center;
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s var(--ease);
}
.method:hover .method-circle {
  transform: translateY(-5px);
  border-color: rgba(201, 162, 90, 0.5);
  box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(201, 162, 90, 0.15);
}
.method-circle img {
  width: 40px; height: 40px;
  object-fit: contain;
  filter: saturate(0.9);
  transition: filter 0.3s, transform 0.4s var(--ease);
}
.method:hover .method-circle img { filter: saturate(1.15); transform: scale(1.08); }
.method-fallback {
  display: none;
  font-family: var(--mono);
  font-size: 17px; font-weight: 600;
  color: var(--gold);
}
.method-name {
  font-family: var(--mono);
  font-size: 9.5px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim);
  text-align: center; line-height: 1.6;
  transition: color 0.3s;
}
.method:hover .method-name { color: var(--ivory-2); }

/* ═══ Trajectory ═══ */
.trajectory { text-align: center; }
.trajectory-portrait {
  width: 118px; height: 118px;
  margin: 0 auto;
  border-radius: 50%;
  padding: 4px;
  border: 1px solid var(--hairline-2);
  position: relative;
}
.trajectory-portrait::before {
  content: "";
  position: absolute; inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 90, 0.18);
  animation: orbit-pulse 4s var(--ease) infinite;
}
@keyframes orbit-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.25; }
}
.trajectory-portrait img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(0.25);
}
.trajectory-heading {
  margin: 44px auto 0;
  max-width: 780px;
  font-family: var(--serif);
  font-size: clamp(32px, 4.8vw, 56px);
  font-weight: 500; line-height: 1.2;
  text-wrap: balance;
}
.trajectory-heading em { font-style: italic; color: var(--gold-bright); }
.trajectory-note {
  margin: 26px auto 0;
  max-width: 560px;
  font-size: 15px; line-height: 1.9;
  color: var(--dim);
}
.trajectory-ctas {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px;
  margin-top: clamp(40px, 5vw, 54px);
}
.btn-gold, .btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 34px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s, border-color 0.3s, box-shadow 0.3s var(--ease);
  border: 1px solid transparent;
  will-change: transform;
}
.btn-gold { background: var(--gold); color: #14110a; }
.btn-gold:hover {
  background: var(--gold-bright);
  box-shadow: 0 18px 40px -12px rgba(201, 162, 90, 0.45);
}
.btn-line { border-color: var(--hairline-2); color: var(--ivory-2); background: rgba(8, 9, 12, 0.4); }
.btn-line:hover { border-color: var(--gold); color: var(--gold-bright); }
.trajectory-meta {
  margin-top: clamp(48px, 6vw, 64px);
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(20px, 4vw, 44px);
  font-family: var(--mono);
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--faint);
}
.trajectory-meta a { color: var(--dim); transition: color 0.25s; }
.trajectory-meta a:hover { color: var(--gold-bright); }

/* ═══ Footer ═══ */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 34px 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  max-width: 1120px; margin: 0 auto;
  font-family: var(--mono);
  font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--faint);
}
.footer-mid { color: var(--gold); }

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
  .instruments-grid { grid-template-columns: 1fr; }
  .chapter-sub { display: none; }
}
@media (max-width: 760px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 9px; letter-spacing: 0.14em; }
  .nav-links a .idx { display: none; }
  .nav-links a:not(:nth-child(-n+4)) { display: none; }
  .case { grid-template-columns: 1fr; gap: 10px; }
  .case-num { padding-top: 0; }
  .thesis-stats { grid-template-columns: repeat(2, 1fr); }
  .tstat:nth-child(3) { border-left: 0; }
  .tstat:nth-child(n+3) { border-top: 1px solid var(--hairline); }
  .cmetric { padding: 12px 16px; }
  .cmetric strong { font-size: 20px; }
  .method { width: 86px; }
  .method-circle { width: 78px; height: 78px; }
  .method-circle img { width: 34px; height: 34px; }
}

@media (max-width: 460px) {
  .nav-links a:not(:nth-child(-n+3)) { display: none; }
}

/* ═══ Reduced motion ═══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .thesis-text .w { color: var(--ivory) !important; }
  .thesis-text .w.gold-w { color: var(--gold-bright) !important; }
  .cursor-dot, .cursor-ring { display: none; }
  .loader { display: none; }
  /* architecture figures: force the complete static diagram */
  .flow-arrow { stroke-dashoffset: 0 !important; stroke-dasharray: none !important; }
  .flow-arrow.is-faint { stroke-dasharray: 3 4 !important; }
  .arch-metric { opacity: 1 !important; }
  .arch-node.is-key { opacity: 1 !important; }
}

/* ══════════════════════════════════════════════════════════════
   DETAIL PAGES — project-*.html
   Stars canvas shared from field.js; Playfair Display + DM fonts
   ══════════════════════════════════════════════════════════════ */

.bottom-fade {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 220px;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, transparent 100%);
  pointer-events: none;
  z-index: 5;
}

/* ── Scroll rail ── */
.scroll-rail {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.06);
  z-index: 100;
}
.scroll-rail-fill {
  position: absolute; top: 0; left: 0; right: 0;
  background: rgba(249, 246, 238, 0.45);
  height: 8%;
}

/* ── HUD clock ── */
.hud-clock {
  position: fixed; bottom: 2.25rem; left: 2rem;
  z-index: 100;
  display: flex; flex-direction: column; gap: 5px;
  font-family: 'DM Mono', 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  color: rgba(249, 246, 238, 0.35);
  pointer-events: none;
}
.hud-row { display: flex; align-items: center; gap: 7px; }
.hud-row svg { opacity: 0.4; flex-shrink: 0; }
.hud-label { color: rgba(249, 246, 238, 0.28); }
.hud-time  { color: rgba(249, 246, 238, 0.6); font-variant-numeric: tabular-nums; }

/* ── Page layout ── */
.spatial-scene { position: relative; z-index: 10; }
.thinking-scroll { /* plain flow container; window scrolls */ }
.thinking-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 7rem 2rem 5rem;
}

/* ── Back link ── */
.back-link {
  display: inline-block;
  font-family: 'DM Mono', 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(249, 246, 238, 0.38);
  text-decoration: none;
  margin-bottom: 3.5rem;
  transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.back-link:hover { color: var(--gold-bright); transform: translateX(-3px); }

/* ── Header ── */
.th-header { margin-bottom: 2rem; }
.th-badge {
  display: inline-block;
  font-family: 'DM Mono', 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.th-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  font-style: italic;
  line-height: 1.08;
  color: rgba(249, 246, 238, 0.95);
  margin: 0 0 1rem;
  letter-spacing: -0.025em;
}
.th-subtitle {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(249, 246, 238, 0.58);
  margin: 0;
  max-width: 580px;
}

/* ── Divider ── */
.th-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 2.5rem 0;
}

/* ── Metrics ── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1.5rem 1rem;
  margin-bottom: 0.5rem;
}
.metric-block { display: flex; flex-direction: column; gap: 5px; }
.metric-value {
  font-family: 'DM Mono', 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}
.metric-label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(249, 246, 238, 0.38);
}

/* ── Body sections ── */
.th-section { margin-bottom: 2.5rem; }
.th-section-title {
  font-family: 'DM Mono', 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(249, 246, 238, 0.42);
  margin: 0 0 0.8rem;
}
.th-body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.78;
  color: rgba(249, 246, 238, 0.72);
  margin: 0;
}
.th-body strong { color: rgba(249, 246, 238, 0.95); font-weight: 600; }
.th-body em     { color: rgba(249, 246, 238, 0.85); }

/* ── Method diagram ── */
.method-diagram { margin: 0.5rem 0 2.5rem; }

/* ── CTA link ── */
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Mono', 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 1px solid;
  border-radius: 3px;
  transition: opacity 0.2s ease;
}
.cta-link:hover { opacity: 0.7; }

/* ── Footer ── */
.th-footer {
  font-family: 'DM Mono', 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(249, 246, 238, 0.18);
  padding-top: 3.5rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ── Bottom Right HUD ── */
.brh {
  position: fixed; bottom: 2rem; right: 2.5rem;
  z-index: 200;
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.55rem;
  font-family: 'DM Mono', 'JetBrains Mono', monospace;
  font-size: 0.63rem;
  letter-spacing: 0.09em;
  color: rgba(249, 246, 238, 0.3);
  pointer-events: none;
  user-select: none;
}
.brh-session, .brh-explore, .brh-xy {
  display: flex; align-items: center; gap: 0.55rem;
}
.brh-label { color: rgba(249,246,238,0.18); }
.brh-value { color: rgba(249,246,238,0.48); font-variant-numeric: tabular-nums; }
.brh-scroll-btn {
  pointer-events: all;
  background: none; border: none;
  cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.4s ease, transform 0.4s ease;
  margin-top: 0.2rem;
}
.brh-scroll-btn.visible { opacity: 1; transform: scale(1); }
.brh-ring {
  width: 34px; height: 34px;
  transform: rotate(-90deg);
}
.brh-ring-track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 2; }
.brh-ring-fill  {
  fill: none; stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 94.25;
  stroke-dashoffset: 94.25;
  transition: stroke-dashoffset 0.15s linear, stroke 0.6s ease;
}
.brh-arc-red    .brh-ring-fill { stroke: #f87171; }
.brh-arc-yellow .brh-ring-fill { stroke: #facc15; }
.brh-arc-blue   .brh-ring-fill { stroke: #60a5fa; }
.brh-arc-green  .brh-ring-fill { stroke: #4ade80; }

/* ── Detail page responsive ── */
@media (max-width: 768px) {
  .thinking-body { padding: 5rem 1.25rem 3.5rem; }
  .th-title { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  .th-subtitle { font-size: 0.95rem; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .hud-clock { display: none; }         /* fixed HUD collides with content on small screens (parity with homepage) */
  .brh { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .th-section { opacity: 1 !important; transform: none !important; }
}

/* ══════════════════════════════════════════════════════
   Detail-page figure language — shared across all pages
   (promoted from page-local duplicates in the 2 dense pages)
   ══════════════════════════════════════════════════════ */

.fig-box { margin: 2rem 0; padding: 1.5rem; border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; background: linear-gradient(180deg, rgba(255,255,255,0.012) 0%, transparent 100%); }
.fig-caption { font-family: 'DM Mono', monospace; font-size: 0.68rem; color: rgba(255,255,255,0.38); letter-spacing: 0.07em; text-transform: uppercase; margin-top: 0.9rem; text-align: center; }

.finding-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(245,202,64,0.2); border-radius: 8px; padding: 1.2rem 1.4rem; margin: 1rem 0; }
.finding-card .fc-num { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 700; color: #f5ca40; line-height: 1; }
.finding-card .fc-label { font-family: 'DM Mono', monospace; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); margin-top: 0.2rem; }
.finding-card .fc-body { font-family: 'DM Sans', sans-serif; font-size: 0.88rem; color: rgba(255,255,255,0.72); margin-top: 0.6rem; line-height: 1.55; }
.findings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }

.method-row { display: flex; align-items: flex-start; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.method-row:last-child { border-bottom: none; }
.method-num { font-family: 'DM Mono', monospace; font-size: 0.65rem; color: #f5ca40; letter-spacing: 0.1em; min-width: 1.8rem; padding-top: 0.15rem; }
.method-title { font-family: 'DM Mono', monospace; font-size: 0.75rem; color: rgba(255,255,255,0.8); font-weight: 500; margin-bottom: 0.25rem; }
.method-desc { font-family: 'DM Sans', sans-serif; font-size: 0.84rem; color: rgba(255,255,255,0.55); line-height: 1.5; }
.method-result { font-family: 'DM Mono', monospace; font-size: 0.7rem; color: #f5ca40; margin-top: 0.3rem; }

blockquote.pull { border-left: 2px solid #f5ca40; padding: 0.6rem 1.2rem; margin: 1.5rem 0; font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.05rem; color: rgba(255,255,255,0.75); line-height: 1.5; }

/* ── Essence strip: 10-15 second summary, every page ── */
.essence-strip { margin: 1.5rem 0 2rem; padding: 1.1rem 1.4rem; border: 1px solid rgba(249,246,238,0.08); border-radius: 10px; background: rgba(249,246,238,0.015); }
.essence-item { display: flex; align-items: baseline; gap: 0.9rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(249,246,238,0.05); }
.essence-item:last-child { border-bottom: none; }
.essence-label { flex: 0 0 6.5rem; font-family: 'DM Mono', 'JetBrains Mono', monospace; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(245,202,64,0.75); }
.essence-text { font-family: 'DM Sans', system-ui, sans-serif; font-size: 0.88rem; line-height: 1.5; color: rgba(249,246,238,0.78); }
@media (max-width: 480px) {
  .essence-item { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .essence-label { flex: none; }
}

/* ── Spec row: capability/stat chips (not a comparison) ── */
.spec-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.spec-chip { display: flex; flex-direction: column; gap: 0.3rem; padding-right: 1.5rem; border-right: 1px solid rgba(249,246,238,0.08); }
.spec-chip:last-child { border-right: none; }
.spec-chip .spec-value { font-family: 'DM Mono', 'JetBrains Mono', monospace; font-size: 1.3rem; color: #f5ca40; letter-spacing: -0.01em; }
.spec-chip .spec-label { font-family: 'DM Sans', system-ui, sans-serif; font-size: 0.7rem; color: rgba(249,246,238,0.42); }
.spec-chip.is-large .spec-value { font-size: 2.4rem; font-family: 'Playfair Display', serif; font-weight: 700; }

/* ── Result bar: div-based horizontal comparison ── */
.result-bar-row { margin-bottom: 1.1rem; }
.result-bar-row:last-child { margin-bottom: 0; }
.result-bar-label { display: flex; justify-content: space-between; font-family: 'DM Sans', system-ui, sans-serif; font-size: 0.82rem; color: rgba(249,246,238,0.65); margin-bottom: 0.35rem; }
.result-bar-value { font-family: 'DM Mono', monospace; color: rgba(249,246,238,0.85); }
.result-bar-track { height: 10px; border-radius: 5px; background: rgba(249,246,238,0.06); overflow: hidden; }
.result-bar-fill { height: 100%; border-radius: 5px; background: #f5ca40; transition: width 0.6s ease; }
.result-bar-fill.is-muted { background: repeating-linear-gradient(135deg, rgba(249,246,238,0.1) 0 6px, rgba(249,246,238,0.04) 6px 12px); }
.result-bar-row.has-threshold { position: relative; }
.result-bar-threshold { position: absolute; top: -0.3rem; bottom: -0.3rem; border-left: 1.5px dashed rgba(249,246,238,0.45); }
.result-bar-threshold-label { position: absolute; top: -1.3rem; transform: translateX(-50%); font-family: 'DM Mono', monospace; font-size: 0.62rem; color: rgba(249,246,238,0.5); white-space: nowrap; }

/* ── Fold grid: ICGDF's 0-of-12 closed-gate visual ── */
.fold-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.6rem; max-width: 420px; }
.fold-cell { aspect-ratio: 1; border: 1px solid rgba(167,139,250,0.3); border-radius: 6px; display: flex; align-items: center; justify-content: center; background: rgba(167,139,250,0.04); }
.fold-cell svg { width: 40%; height: 40%; opacity: 0.55; }

/* ── Compare pair: explicit before/after, 2 columns ── */
.compare-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.2rem; align-items: center; }
.compare-before, .compare-after { padding: 1.1rem 1.2rem; border-radius: 8px; }
.compare-before { background: rgba(249,246,238,0.025); border: 1px solid rgba(249,246,238,0.08); }
.compare-after { background: rgba(245,202,64,0.05); border: 1px solid rgba(245,202,64,0.25); }
.compare-label { font-family: 'DM Mono', monospace; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(249,246,238,0.4); margin-bottom: 0.5rem; }
.compare-stat { font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 700; color: rgba(249,246,238,0.85); line-height: 1.15; }
.compare-after .compare-stat { color: #f5ca40; }
.compare-desc { font-family: 'DM Sans', sans-serif; font-size: 0.8rem; color: rgba(249,246,238,0.55); margin-top: 0.4rem; line-height: 1.45; }
.compare-arrow { font-size: 1.3rem; color: rgba(249,246,238,0.3); }

@media (max-width: 768px) {
  .essence-label { flex: 0 0 5.5rem; font-size: 0.64rem; }
  .spec-row { gap: 1rem; }
  .spec-chip { padding-right: 1rem; }
  .fold-grid { grid-template-columns: repeat(4, 1fr); max-width: 280px; }
  .compare-pair { grid-template-columns: 1fr; }
  .compare-arrow { transform: rotate(90deg); justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .result-bar-fill { transition: none !important; }
}
