/* ============================================================================
   INTUITION — immersive, gap-free learning
   Color strategy: drenched dark. The surface IS the depth.
   Accent: electric blue (science/ML). Signal: amber (destination, insight).
   ============================================================================ */

:root {
  --bg: oklch(12% 0.02 260);
  --surface: oklch(17.5% 0.03 260);
  --surface-raised: oklch(21% 0.04 260);
  --line: oklch(27% 0.05 260);
  --line-strong: oklch(34% 0.07 255);
  --ink: oklch(94% 0.01 260);
  --muted: oklch(70% 0.03 260);
  --dim: oklch(55% 0.04 255);
  --blue: oklch(65% 0.19 255);
  --blue-bright: oklch(72% 0.22 255);
  --blue-soft: oklch(45% 0.13 255);
  --blue-glow: oklch(65% 0.19 255 / 0.35);
  --amber: oklch(76% 0.15 80);
  --amber-glow: oklch(76% 0.15 80 / 0.35);
  --maxw: 760px;
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.01em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-bright); }

main {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- reading progress ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--amber));
  box-shadow: 0 0 12px var(--blue-glow);
  width: 0%;
  z-index: 100;
  transition: width 0.1s linear;
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, oklch(12% 0.02 260 / 0.92), oklch(12% 0.02 260 / 0.65));
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
  position: relative;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand .dot { color: var(--blue); }
.brand::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: width 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.brand:hover::after { width: 100%; }

.site-head nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.site-head nav a:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface);
}

/* ---------- footer ---------- */
.site-foot {
  max-width: var(--maxw);
  margin: 80px auto 0;
  width: 100%;
  padding: 32px 24px 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.site-foot a { color: var(--blue); }

/* ---------- page entrance ---------- */
@view-transition { navigation: auto; }
main { animation: pageIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- hero: full viewport, cinematic ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0 40px;
  margin: 0 -24px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-field {
  position: absolute;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 55%, #000 25%, transparent 85%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 55%, #000 25%, transparent 85%);
}
.hero-field canvas { display: block; width: 100%; height: 100%; }

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  padding: 0 24px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 850;
  text-wrap: balance;
  margin-bottom: 22px;
}

.hero h1 span {
  color: var(--blue);
  text-shadow: 0 0 40px var(--blue-glow), 0 0 80px var(--blue-glow);
}

.lede {
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 56ch;
  margin: 0 auto;
  line-height: 1.7;
  text-wrap: pretty;
}

.hero-cta {
  margin-top: 36px;
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-cta .cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s, background 0.2s;
}

.hero-cta .cta-primary {
  background: var(--blue);
  color: var(--bg);
  box-shadow: 0 0 24px var(--blue-glow);
}
.hero-cta .cta-primary:hover {
  background: var(--blue-bright);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 0 36px var(--blue-glow);
}

.hero-cta .cta-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.hero-cta .cta-secondary:hover {
  background: var(--surface-raised);
  border-color: var(--blue-soft);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--dim);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: bounce 2s infinite;
}
.hero-scroll svg {
  width: 20px;
  height: 20px;
  stroke: var(--dim);
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ---------- scroll reveal ---------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--rd, 0ms);
}
.js-reveal [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
  .js-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-scroll { animation: none; }
}

/* ---------- section rhythm ---------- */
main > section {
  padding: 72px 0 24px;
}

.section-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.15;
}

.section-lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 62ch;
  line-height: 1.7;
  text-wrap: pretty;
}

/* ---------- curriculum track ---------- */
.track { margin-top: 0; }
.track-head { margin-bottom: 32px; }
.track-head h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); letter-spacing: -0.03em; font-weight: 800; }
.track-goal { color: var(--muted); font-size: 1.05rem; margin-top: 10px; max-width: 62ch; line-height: 1.65; text-wrap: pretty; }

.track-path {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.track-path::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: linear-gradient(180deg, var(--blue-soft), var(--line) 80%);
  border-radius: 2px;
}

.stone {
  display: flex;
  gap: 22px;
  padding: 16px 0;
  position: relative;
}

.stone-dot {
  flex: 0 0 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  z-index: 1;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s, background 0.2s;
}

a.stone-dot {
  background: var(--surface);
  border: 2px solid var(--blue);
  color: var(--blue);
  box-shadow: 0 0 0 0 var(--blue-glow);
}
a.stone-dot:hover {
  background: var(--blue-soft);
  color: var(--ink);
  transform: scale(1.08);
  box-shadow: 0 0 22px var(--blue-glow);
  text-decoration: none;
}

.stone-planned .stone-dot {
  background: var(--bg);
  border: 2px dashed var(--line-strong);
  color: var(--dim);
}

.stone-body {
  flex: 1;
  padding-top: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color 0.2s, transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.stone:hover .stone-body {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  transform: translateX(4px);
}

.stone-live:hover .stone-body {
  box-shadow: 0 0 30px oklch(65% 0.19 255 / 0.08);
}

.stone-title {
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
a.stone-title:hover { color: var(--blue-bright); text-decoration: none; }

.stone-planned .stone-title { color: var(--muted); }

.tag {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--amber);
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid oklch(76% 0.15 80 / 0.35);
  background: oklch(76% 0.15 80 / 0.08);
}

.stone-count {
  display: block;
  color: var(--blue);
  font-size: 13px;
  font-weight: 650;
  margin-top: 6px;
  letter-spacing: 0.01em;
}

.stone-why {
  color: var(--muted);
  font-size: 15px;
  margin-top: 8px;
  line-height: 1.6;
  max-width: 60ch;
  text-wrap: pretty;
}

.stone-outline {
  color: var(--dim);
  font-size: 13px;
  margin-top: 12px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.stone-needs {
  color: var(--dim);
  font-size: 13px;
  margin-top: 10px;
}

/* ---------- pitch / trust section ---------- */
.pitch {
  margin: 48px 0 8px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.pitch::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0.7;
}
.pitch h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 12px;
  font-weight: 750;
}
.pitch p { color: var(--muted); line-height: 1.7; }
.pitch a { color: var(--blue-bright); font-weight: 600; }

/* ---------- domain page ---------- */
.domain-hero { padding-block: 48px 8px; }
.domain-hero .back {
  color: var(--dim);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.domain-hero .back:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface); text-decoration: none; }
.domain-hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -0.03em; font-weight: 850; margin-bottom: 14px; }
.domain-hero .lede { color: var(--muted); font-size: 1.08rem; max-width: 62ch; line-height: 1.7; text-wrap: pretty; }

.roadmap { list-style: none; padding: 0; margin: 32px 0; position: relative; }
.roadmap::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(180deg, var(--blue-soft), var(--line));
  border-radius: 2px;
}

.node {
  display: flex;
  gap: 18px;
  padding: 12px 0;
  position: relative;
}

.node-dot {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 2px solid var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  z-index: 1;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.node-dot:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--ink);
  transform: scale(1.06);
  box-shadow: 0 0 18px var(--blue-glow);
  text-decoration: none;
}

.node-body { flex: 1; padding-top: 4px; }
.node-title { color: var(--ink); font-size: 1.15rem; font-weight: 750; letter-spacing: -0.01em; }
.node-title:hover { color: var(--blue-bright); text-decoration: none; }
.node-teaser { color: var(--muted); font-size: 15px; margin-top: 4px; line-height: 1.55; }
.prereqs { color: var(--dim); font-size: 13px; margin-top: 6px; }

.node-dest { margin-top: 10px; }
.node-dest .node-title { color: var(--amber); font-size: 1.25rem; font-weight: 800; }
.dest-dot {
  background: linear-gradient(135deg, oklch(25% 0.05 80), oklch(20% 0.04 80));
  border-color: var(--amber);
  color: var(--amber);
  font-size: 22px;
  box-shadow: 0 0 18px var(--amber-glow);
}
.dest-dot:hover { text-decoration: none; }
.node-dest .node-teaser { color: var(--muted); max-width: 54ch; }

/* ---------- concept page ---------- */
.concept { padding-block: 40px 10px; }

.concept-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.c-step {
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.concept h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -0.03em;
  font-weight: 850;
  line-height: 1.1;
  margin: 6px 0 18px;
  text-wrap: balance;
}

.c-prereqs {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.c-prereqs span { color: var(--ink); font-weight: 700; }
.c-prereqs a { color: var(--blue-bright); font-weight: 600; }

.prose {
  font-size: 18px;
  line-height: 1.8;
}

.prose > * { max-width: 65ch; }
.prose p { margin: 0 0 22px; text-wrap: pretty; }
.prose p:first-of-type { font-size: 1.1rem; color: var(--muted); }
.prose h2 {
  font-size: 1.45rem;
  margin: 44px 0 16px;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--ink);
}
.prose h3 {
  font-size: 1.2rem;
  margin: 32px 0 12px;
  letter-spacing: -0.01em;
  font-weight: 750;
  color: var(--muted);
}
.prose strong { color: var(--ink); font-weight: 700; }
.prose em { color: var(--amber); font-style: normal; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 26px; color: var(--ink); }
.prose li { margin-bottom: 10px; }
.prose blockquote {
  margin: 28px 0;
  padding: 16px 22px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue-soft);
  color: var(--muted);
  font-style: italic;
}
.prose code {
  background: var(--surface-raised);
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--blue-bright);
  border: 1px solid var(--line);
}

.prose a { color: var(--blue); font-weight: 500; }
.prose a:hover { color: var(--blue-bright); text-decoration: underline; }

/* ---------- interactive visual embeds ---------- */
.viz-embed {
  margin: 36px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  max-width: none;
}

.viz-canvas-wrap { width: 100%; line-height: 0; }
.viz-canvas-wrap canvas { display: block; width: 100%; touch-action: none; cursor: grab; }

.viz-controls {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  background: var(--surface-raised);
}

.viz-matrix { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); line-height: 1.35; }
.viz-matrix .mx { color: var(--ink); font-family: ui-monospace, monospace; }
.viz-matrix .det { margin-top: 3px; color: var(--blue); }

.viz-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.viz-buttons button {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.viz-buttons button:hover { border-color: var(--blue-soft); background: oklch(25% 0.06 255); transform: translateY(-1px); }
.viz-buttons button:active { transform: translateY(0); }

.viz-hint { color: var(--dim); font-size: 13px; margin-left: auto; }

/* ---------- resources ---------- */
.resources {
  margin: 44px 0 8px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.resources h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 14px;
  font-weight: 750;
}
.resources ul { list-style: none; padding: 0; }
.resources li { margin-bottom: 10px; }
.resources a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  padding: 6px 0;
  transition: color 0.2s, transform 0.2s;
}
.resources a:hover { color: var(--blue-bright); transform: translateX(3px); }
.resources a::before {
  content: "▶";
  color: var(--blue);
  font-size: 10px;
}

/* ---------- concept navigation ---------- */
.c-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 56px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.c-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.c-nav a:hover {
  border-color: var(--blue-soft);
  background: var(--surface-raised);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px oklch(12% 0.02 260 / 0.4);
  text-decoration: none;
}
.c-nav a span { color: var(--dim); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.c-nav a strong { color: var(--blue); font-weight: 700; font-size: 1.05rem; }
.c-nav .next { text-align: right; margin-left: auto; align-items: flex-end; }

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

/* ---------- mobile ---------- */
@media (max-width: 520px) {
  body { font-size: 16px; }
  .prose { font-size: 17px; }
  .hero { min-height: 90vh; min-height: 90dvh; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
  .hero-cta { flex-direction: column; width: 100%; }
  .hero-cta .cta { width: 100%; justify-content: center; }
  .stone { gap: 14px; }
  .stone-body { padding: 14px 16px; }
  .c-nav { flex-direction: column; }
}

/* ============================================================================
   FULL-BLEED + SPLIT LAYOUT
   The site used to be a 760px column marooned in dead space on desktop.
   Now: pages span the viewport, and concept pages pin the visual beside the
   prose so it is always on screen while you read.
   ============================================================================ */

:root { --read: 660px; --wide: 1560px; --gut: clamp(20px, 5vw, 72px); }

/* main no longer constrains; each section owns its own rhythm */
main { max-width: none; padding: 0; }
.head-inner {
  max-width: var(--wide); margin: 0 auto; width: 100%;
  display: flex; justify-content: space-between; align-items: baseline;
}
.site-head { max-width: none; padding: 18px var(--gut); }
.site-foot { max-width: none; padding: 32px var(--gut) 56px; }
.site-foot p { max-width: var(--wide); margin: 0 auto; }

/* sections: full width, content centred inside */
main > section { padding-left: var(--gut); padding-right: var(--gut); }
main > section > *:not(.hero-field):not(.hero-scroll) { max-width: var(--wide); margin-left: auto; margin-right: auto; }

/* hero truly edge to edge */
.hero { margin: 0 calc(var(--gut) * -1); padding-left: var(--gut); padding-right: var(--gut); }
.hero-field { inset: -10% -5%; }

/* ambient field behind every page */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000, transparent 75%);
}
.ambient canvas { display: block; width: 100%; height: 100%; }
.hero ~ * .ambient { display: none; }

/* ---------- concept: split stage ---------- */
.concept { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gut); position: relative; }
.c-read { max-width: var(--read); }
.c-read .prose p { max-width: 62ch; }

@media (min-width: 1000px) {
  .concept.has-stage {
    display: grid;
    grid-template-columns: minmax(0, var(--read)) minmax(0, 1fr);
    gap: clamp(32px, 4vw, 72px);
    align-items: start;
    padding-left: calc(var(--gut) + 56px);
  }
  .c-read { grid-column: 1; padding: 34px 0 10px; }
  .c-stage { grid-column: 2; position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 116px); display: flex; align-items: center; }
  .c-stage-inner { width: 100%; }
  .c-stage .viz-embed { margin: 0; }
  /* the pinned visual gets room to breathe */
  .c-stage .viz-canvas-wrap canvas { min-height: 46vh; }
}

/* mobile / tablet: the visual leads, prose follows */
@media (max-width: 999px) {
  .concept.has-stage { display: flex; flex-direction: column; }
  .concept.has-stage .c-stage { order: -1; margin: 18px 0 4px; }
  .concept { padding-top: 26px; }
}

/* ---------- step rail ---------- */
.c-rail { position: fixed; left: 14px; top: 50%; transform: translateY(-50%); list-style: none; padding: 0; margin: 0; display: none; flex-direction: column; gap: 9px; z-index: 40; }
@media (min-width: 1000px) { .c-rail { display: flex; } }
.c-rail a { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; transition: all .2s cubic-bezier(.2,.8,.2,1); }
.c-rail a:hover { border-color: var(--blue-soft); color: var(--ink); }
.c-rail .done a { border-color: var(--blue-soft); color: var(--blue-soft); }
.c-rail .at a { border-color: var(--blue); color: var(--bg); background: var(--blue); box-shadow: 0 0 16px var(--blue-glow); transform: scale(1.12); }

/* track/domain pages: keep the reading rhythm centred but let the page breathe */
.track-head, .track-path, .pitch > *, .domain-hero, .roadmap,


/* ---------- acts: chapters within a domain ---------- */
.act { max-width: 860px; margin-left: auto; margin-right: auto; padding-top: 34px; padding-bottom: 6px; }
.act-head { display: flex; align-items: baseline; gap: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.act-num { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.act-name { font-size: clamp(1.15rem, 2.6vw, 1.5rem); font-weight: 800; letter-spacing: -0.02em; }
.act .roadmap::before { top: 18px; bottom: 18px; }
.dest { max-width: 860px; margin-left: auto; margin-right: auto; padding-top: 40px; padding-bottom: 10px; }
.dest .section-title { color: var(--amber); }
/* 3D canvases get more height: depth needs room */
.viz-3d canvas { cursor: grab; }
.viz-3d canvas:active { cursor: grabbing; }

/* ---------- narrator ---------- */
.narrator { margin-top: 12px; }
.narr-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  border-radius: 999px; padding: 9px 17px; font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s;
}
.narr-btn:hover { border-color: var(--blue); background: var(--surface-raised); }
.narrator.on .narr-btn { border-color: var(--blue); box-shadow: 0 0 18px var(--blue-glow); }
.narr-icon { color: var(--blue); font-size: 12px; }
.narr-caption {
  margin-top: 10px; color: var(--ink); font-size: 15px; line-height: 1.6;
  min-height: 0; max-width: 60ch; opacity: 0; transform: translateY(-3px);
  transition: opacity .3s ease, transform .3s ease;
}
.narrator.on .narr-caption {
  opacity: 1; transform: none;
  border-left: 2px solid var(--blue); padding-left: 12px;
}

/* ============================================================================
   THE JOURNEY: the world shifts colour as you travel through the acts.
   Act I cool blue (objects at rest) -> II cyan (motion) -> III violet
   (structure) -> IV amber (arrival). Readability is untouched: only accents,
   glow and the ambient field move.
   ============================================================================ */
:root { --field-hue: 255; }

[data-act="1"] { --accent: oklch(65% 0.19 255); --accent-glow: oklch(65% 0.19 255 / .35); --field-hue: 255; }
[data-act="2"] { --accent: oklch(72% 0.16 214); --accent-glow: oklch(72% 0.16 214 / .35); --field-hue: 214; }
[data-act="3"] { --accent: oklch(68% 0.18 300); --accent-glow: oklch(68% 0.18 300 / .35); --field-hue: 300; }
[data-act="4"] { --accent: oklch(76% 0.15 80);  --accent-glow: oklch(76% 0.15 80 / .35);  --field-hue: 80;  }

/* concept pages inherit their act's colour */
.concept[data-act] .c-step,
.concept[data-act] .back { color: var(--accent); }
.concept[data-act] .c-prereqs span { color: var(--accent); }
.concept[data-act] .prose h2 { color: var(--accent); }
.concept[data-act] .c-rail .at a { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 18px var(--accent-glow); }
.concept[data-act] .narr-icon { color: var(--accent); }
.concept[data-act] .narrator.on .narr-caption { border-left-color: var(--accent); }

/* ---------- atmosphere: depth at the edges of the world ---------- */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, transparent 40%, oklch(8% 0.02 260 / .55) 100%),
    radial-gradient(ellipse 90% 60% at 50% 110%, oklch(8% 0.02 260 / .5), transparent 60%);
}
main, .site-head, .site-foot, .c-rail, .reading-progress { position: relative; z-index: 2; }

/* ---------- cinematic act cards ---------- */
.act-card {
  display: flex; align-items: center; gap: clamp(16px, 3vw, 30px);
  padding-block: 26px 18px; border-bottom: 1px solid var(--line); margin-bottom: 10px;
}
.act-numeral {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 700; line-height: .85;
  letter-spacing: 0.02em; color: var(--accent); opacity: .28;
  min-width: 1.6em; text-align: center;
  transition: opacity .5s ease, text-shadow .5s ease;
}
.act:hover .act-numeral { opacity: .62; text-shadow: 0 0 26px var(--accent-glow); }
.act-titles { display: flex; flex-direction: column; gap: 3px; }
.act-label { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.act-name { font-size: clamp(1.3rem, 3.2vw, 1.9rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.act-count { font-size: 13px; color: var(--muted); }
.act[data-act] .node-dot { border-color: var(--accent); color: var(--accent); }
.act[data-act] .roadmap::before { background: linear-gradient(var(--accent), transparent); opacity: .45; }

/* ---------- arrival: a page settles into place ---------- */
.concept h1 { animation: settle .7s cubic-bezier(.16,1,.3,1) both; }
.concept .c-step { animation: settle .7s cubic-bezier(.16,1,.3,1) .06s both; }
@keyframes settle {
  from { opacity: 0; transform: translateY(12px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .concept h1, .concept .c-step { animation: none; }
  .act-numeral { transition: none; }
}
