:root {
  --night-ink: #070b1a;
  --night-blue: #101a3a;
  --night-mid: #17234b;
  --paper: #f4f6fc;
  --paper-blue: #e9eefb;
  --paper-strong: #d9e1f3;
  --ink: #121728;
  --ink-soft: #46506c;
  --off-cyan: #5ee7ef;
  --wake-coral: #ff6b5f;
  --synapse-amber: #f6c66b;
  --rem-violet: #b893ff;
  --moss: #80d2a6;
  --warning: #ffb36a;
  --utility: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --body: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --shell: 1380px;
  --narrow: 820px;
  --topbar-h: 64px;
  --line: rgba(18, 23, 40, 0.16);
  --line-dark: rgba(226, 236, 255, 0.16);
  --shadow: 0 18px 60px rgba(7, 11, 26, 0.14);
  --hero-shift: 0;
  --focus: 0 0 0 3px rgba(94, 231, 239, 0.6), 0 0 0 6px rgba(7, 11, 26, 0.8);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--night-ink);
  color-scheme: dark light;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(7, 11, 26, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 11, 26, 0.018) 1px, transparent 1px);
  background-size: 32px 32px;
}

::selection {
  background: var(--off-cyan);
  color: var(--night-ink);
}

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

button,
input,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
summary {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: var(--wake-coral);
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--off-cyan);
  color: var(--night-ink);
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform 180ms ease;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 180;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--wake-coral), var(--synapse-amber), var(--off-cyan));
  box-shadow: 0 0 16px rgba(94, 231, 239, 0.62);
  will-change: transform;
}

.topbar {
  position: fixed;
  inset: 3px 0 auto 0;
  z-index: 150;
  min-height: var(--topbar-h);
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0 3.5vw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(7, 11, 26, 0.84);
  color: #f7f9ff;
  backdrop-filter: blur(18px) saturate(150%);
}

.brand,
.language-link,
.topnav a {
  text-decoration: none;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--utility);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-pulse {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--off-cyan);
  box-shadow: 0 0 0 5px rgba(94, 231, 239, 0.12), 0 0 18px var(--off-cyan);
}

.topnav {
  min-width: 0;
  display: flex;
  justify-content: center;
  gap: clamp(0.8rem, 2vw, 2.1rem);
  font-family: var(--utility);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.topnav a {
  color: rgba(247, 249, 255, 0.67);
  white-space: nowrap;
  transition: color 160ms ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: #fff;
}

.language-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(94, 231, 239, 0.46);
  border-radius: 999px;
  color: var(--off-cyan);
  font-family: var(--utility);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.shell {
  width: min(calc(100% - 2.5rem), var(--shell));
  margin-inline: auto;
}

.shell.narrow {
  width: min(calc(100% - 2.5rem), var(--narrow));
}

.shell.narrow-wide {
  width: min(calc(100% - 2.5rem), 1040px);
}

.section {
  position: relative;
  padding-block: clamp(5.25rem, 9vw, 10rem);
}

.section[id] {
  scroll-margin-top: calc(var(--topbar-h) + 24px);
}

.dark-section {
  background: var(--night-ink);
  color: #f6f8ff;
}

.dark-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 16%, rgba(94, 231, 239, 0.075), transparent 28rem),
    radial-gradient(circle at 84% 78%, rgba(184, 147, 255, 0.07), transparent 30rem),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: auto, auto, 54px 54px, 54px 54px;
  opacity: 0.72;
}

.dark-section > * {
  position: relative;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  align-items: end;
  gap: clamp(1.5rem, 5vw, 5rem);
  margin-bottom: clamp(2.6rem, 5vw, 5.5rem);
}

.section-heading .section-kicker {
  grid-column: 1 / -1;
  margin-bottom: -0.7rem;
}

.section-heading h2 {
  max-width: 16ch;
}

.section-heading > p:last-child {
  max-width: 54ch;
  margin: 0 0 0.4rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
}

.light-heading > p:last-child {
  color: rgba(233, 240, 255, 0.68);
}

.section-kicker,
.eyebrow {
  margin: 0 0 1rem;
  color: #55617e;
  font-family: var(--utility);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dark-section .section-kicker,
.dark-section .eyebrow {
  color: var(--off-cyan);
}

h1,
h2,
h3,
p,
dl,
dd,
dt {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.96;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(3rem, 6.2vw, 6.8rem);
}

h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.prose p {
  max-width: 68ch;
  margin-bottom: 1.45em;
}

.lead-prose {
  font-size: clamp(1.18rem, 1.7vw, 1.42rem);
  line-height: 1.65;
}

/***** Hero *****/
.hero {
  min-height: 132svh;
  padding-top: var(--topbar-h);
  overflow: clip;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: linear-gradient(transparent, rgba(7, 11, 26, 0.94));
  pointer-events: none;
}

.hero-grid {
  position: sticky;
  top: var(--topbar-h);
  min-height: calc(100svh - var(--topbar-h));
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(380px, 0.94fr);
  align-items: center;
  gap: clamp(1.4rem, 5vw, 6rem);
  padding-block: clamp(2.5rem, 6vh, 5rem) 2.2rem;
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.hero h1 {
  max-width: 11.5ch;
  margin: 0 0 1.7rem;
  font-size: clamp(4.1rem, 8.2vw, 9.3rem);
  line-height: 0.9;
}

.hero h1 span {
  display: block;
}

.hero h1 span:last-child {
  color: transparent;
  -webkit-text-stroke: clamp(1px, 0.08vw, 2px) var(--off-cyan);
  text-shadow: 0 0 calc(32px * var(--hero-shift)) rgba(94, 231, 239, 0.42);
  transform: translateX(calc(var(--hero-shift) * 0.28rem));
}

.hero-deck {
  max-width: 61ch;
  margin: 0 0 1.15rem;
  color: rgba(244, 248, 255, 0.79);
  font-size: clamp(1.04rem, 1.55vw, 1.34rem);
}

.hero-thesis {
  max-width: 47ch;
  margin: 0 0 1.6rem;
  color: #fff;
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
  font-weight: 720;
  line-height: 1.35;
}

.evidence-strip {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(241, 246, 255, 0.69);
  font-family: var(--utility);
  font-size: 0.69rem;
  line-height: 1.35;
}

.evidence-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--wake-coral);
  box-shadow: 0 0 12px var(--wake-coral);
}

.hero-visual {
  position: relative;
  width: min(100%, 660px);
  justify-self: center;
  margin: 0;
  filter: drop-shadow(0 25px 65px rgba(0, 0, 0, 0.38));
}

.hero-visual figcaption {
  position: absolute;
  inset: auto 50% 2.7% auto;
  width: max-content;
  max-width: 70%;
  transform: translateX(50%);
  color: rgba(231, 239, 255, 0.58);
  font-family: var(--utility);
  font-size: 0.66rem;
  text-align: center;
}

.clock-face {
  fill: rgba(9, 15, 37, 0.72);
  stroke: rgba(223, 233, 255, 0.19);
  stroke-width: 1.5;
}

.clock-tick {
  stroke: rgba(235, 241, 255, 0.25);
  stroke-width: 1.1;
}

.clock-tick.major {
  stroke: rgba(235, 241, 255, 0.65);
  stroke-width: 2;
}

.clock-number,
.pulse-label {
  fill: rgba(231, 239, 255, 0.53);
  font-family: var(--utility);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.sleep-arc,
.wake-arc {
  fill: none;
  stroke-linecap: round;
  stroke-width: 17;
}

.sleep-arc {
  stroke: var(--rem-violet);
  stroke-dasharray: 34 66;
  stroke-dashoffset: calc(var(--hero-shift) * 34);
  opacity: calc(1 - var(--hero-shift) * 0.72);
  filter: drop-shadow(0 0 10px rgba(184, 147, 255, 0.5));
}

.wake-arc {
  stroke: var(--wake-coral);
  opacity: 0.62;
}

.hand {
  stroke-linecap: round;
}

.hand-hour {
  stroke: #fff;
  stroke-width: 5;
  transform-origin: 300px 300px;
  transform: rotate(calc(var(--hero-shift) * 172deg));
}

.hand-minute {
  stroke: var(--synapse-amber);
  stroke-width: 2.5;
  transform-origin: 300px 300px;
  transform: rotate(calc(var(--hero-shift) * 560deg));
}

.hand-hub {
  fill: var(--off-cyan);
  filter: url(#cyanGlow);
}

.brain-shape {
  opacity: calc(0.13 + var(--hero-shift) * 0.87);
  transform-origin: 300px 275px;
  transform: scale(calc(0.72 + var(--hero-shift) * 0.28));
}

.brain-fill {
  fill: rgba(94, 231, 239, 0.05);
  stroke: var(--off-cyan);
  stroke-width: 2.5;
}

.brain-midline,
.brain-fold {
  fill: none;
  stroke: rgba(184, 147, 255, 0.75);
  stroke-width: 1.5;
}

.local-off-nodes circle {
  fill: var(--off-cyan);
  opacity: calc(0.12 + var(--hero-shift) * 0.78);
  filter: url(#cyanGlow);
  animation: local-node-pulse 2.4s var(--delay) ease-in-out infinite;
}

.pulse-train {
  opacity: calc(var(--hero-shift) * 0.95);
}

.pulse-train rect,
.exp-pulses rect {
  fill: var(--off-cyan);
  filter: url(#cyanGlow);
  animation: pulse-bars 1.8s calc(var(--i) * 70ms) ease-in-out infinite;
}

.hero-stats {
  position: relative;
  inset: auto;
  grid-column: 1 / -1;
  align-self: end;
  width: 100%;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid rgba(255, 255, 255, 0.13);
}

.hero-stat {
  min-width: 0;
  padding: 1.05rem clamp(0.7rem, 2vw, 1.6rem);
  border-right: 1px solid rgba(255, 255, 255, 0.13);
}

.hero-stat:first-child {
  padding-left: clamp(0.7rem, 2vw, 1.6rem);
}

.hero-stat:last-child {
  border-right: 0;
}

.hero-stat strong,
.hero-stat span {
  display: block;
}

.hero-stat strong {
  color: #fff;
  font-family: var(--utility);
  font-size: clamp(1.25rem, 2vw, 2.2rem);
  line-height: 1.1;
}

.hero-stat span {
  margin-top: 0.35rem;
  color: rgba(231, 239, 255, 0.58);
  font-size: 0.78rem;
  line-height: 1.35;
}

@keyframes local-node-pulse {
  0%, 100% { transform: scale(0.74); opacity: 0.2; }
  38% { transform: scale(1.2); opacity: 0.95; }
  62% { transform: scale(0.8); opacity: 0.28; }
}

@keyframes pulse-bars {
  0%, 100% { opacity: 0.28; transform: scaleY(0.72); transform-origin: bottom; }
  45% { opacity: 1; transform: scaleY(1.06); transform-origin: bottom; }
}

/***** Starting paper *****/
.paper-section {
  background:
    radial-gradient(circle at 85% 10%, rgba(94, 231, 239, 0.15), transparent 24rem),
    var(--paper);
}

.paper-section h2 {
  max-width: 13ch;
  margin-bottom: clamp(2rem, 4vw, 4rem);
}

.claim-limit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: clamp(2.5rem, 5vw, 4.5rem) 0 2rem;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.claim-box,
.limit-box {
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.8rem);
  background: rgba(255, 255, 255, 0.86);
}

.claim-box {
  box-shadow: inset 0 5px 0 var(--off-cyan);
}

.limit-box {
  box-shadow: inset 0 5px 0 var(--wake-coral);
}

.claim-box > span,
.limit-box > span {
  display: block;
  margin-bottom: 0.8rem;
  font-family: var(--utility);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.claim-box p,
.limit-box p {
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 700;
  line-height: 1.42;
}

.primary-link,
.source-open {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--utility);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.primary-link {
  padding: 0.75rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.primary-link:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
}

/***** State lab *****/
.state-lab-section {
  overflow: clip;
}

.state-lab-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.52fr) minmax(420px, 1.15fr) minmax(260px, 0.66fr);
  align-items: center;
  gap: clamp(1.2rem, 3vw, 3rem);
}

.state-controls {
  display: grid;
  gap: 0.7rem;
}

.state-tab {
  min-height: 94px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 0.9rem;
  width: 100%;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.state-tab:hover {
  border-color: rgba(94, 231, 239, 0.45);
  transform: translateX(4px);
}

.state-tab.is-active {
  border-color: var(--off-cyan);
  background: rgba(94, 231, 239, 0.1);
  box-shadow: inset 4px 0 0 var(--off-cyan);
}

.state-tab > span {
  grid-row: 1 / 3;
  color: var(--off-cyan);
  font-family: var(--utility);
  font-size: 0.7rem;
}

.state-tab strong,
.state-tab small {
  min-width: 0;
  display: block;
}

.state-tab strong {
  color: #fff;
  font-size: 1rem;
}

.state-tab small {
  color: rgba(235, 240, 255, 0.56);
  font-size: 0.74rem;
}

.state-visual-wrap {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(10, 16, 38, 0.62);
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.state-visual {
  width: 100%;
}

.environment-lines path,
.environment-lines circle {
  fill: none;
  stroke: rgba(230, 238, 255, 0.23);
  stroke-width: 1.5;
  transition: opacity 300ms ease;
}

.state-brain-fill {
  fill: rgba(94, 231, 239, 0.035);
  stroke: rgba(231, 240, 255, 0.72);
  stroke-width: 2.5;
}

.state-midline,
.state-fold {
  fill: none;
  stroke: rgba(184, 147, 255, 0.58);
  stroke-width: 1.5;
}

.state-nodes circle {
  fill: var(--wake-coral);
  opacity: 0.85;
  transition: fill 320ms ease, opacity 320ms ease, transform 320ms ease;
}

.state-waveform .wave {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 280ms ease;
}

.wake-wave { stroke: var(--wake-coral); }
.nrem-wave { stroke: var(--rem-violet); }
.local-wave { stroke: var(--off-cyan); }

.state-wave-label {
  fill: rgba(226, 236, 255, 0.45);
  font-family: var(--utility);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.state-lab[data-state="wake"] .wake-wave,
.state-lab[data-state="nrem"] .nrem-wave,
.state-lab[data-state="local"] .local-wave {
  opacity: 1;
}

.state-lab[data-state="nrem"] .environment-lines,
.state-lab[data-state="nrem"] .state-nodes circle {
  opacity: 0.25;
}

.state-lab[data-state="nrem"] .state-nodes circle {
  fill: var(--rem-violet);
}

.state-lab[data-state="local"] .state-nodes circle:nth-child(3n+1),
.state-lab[data-state="local"] .state-nodes circle:nth-child(3n+2) {
  fill: var(--off-cyan);
  animation: state-off 2.2s calc(var(--i) * 100ms) ease-in-out infinite;
}

.state-lab[data-state="local"] .environment-lines {
  opacity: 0.72;
}

@keyframes state-off {
  0%, 100% { opacity: 0.92; transform: scale(1); }
  46% { opacity: 0.12; transform: scale(0.68); }
  65% { opacity: 0.92; transform: scale(1.12); }
}

.state-card {
  padding: 1.5rem;
  border-top: 4px solid var(--off-cyan);
  border-radius: 4px 4px 16px 16px;
  background: rgba(255, 255, 255, 0.06);
}

.state-card h3 {
  margin-bottom: 1.2rem;
  color: #fff;
}

.state-card dl {
  margin-bottom: 1.25rem;
}

.state-card dl div {
  padding-block: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.state-card dt {
  color: var(--off-cyan);
  font-family: var(--utility);
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.state-card dd {
  margin: 0.25rem 0 0;
  color: rgba(240, 245, 255, 0.84);
  font-size: 0.88rem;
  line-height: 1.42;
}

.state-card > p {
  margin: 0;
  color: rgba(235, 241, 255, 0.63);
  font-size: 0.82rem;
}

/***** Experiment *****/
.experiment-section {
  background:
    linear-gradient(90deg, rgba(94, 231, 239, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(94, 231, 239, 0.08) 1px, transparent 1px),
    var(--paper);
  background-size: 84px 84px;
}

.experiment-layout {
  display: grid;
  grid-template-columns: minmax(390px, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 6.5rem);
}

.experiment-visual {
  position: sticky;
  top: calc(var(--topbar-h) + 30px);
  min-width: 0;
  padding: clamp(0.8rem, 2vw, 1.5rem);
  border: 1px solid rgba(18, 23, 40, 0.18);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.experiment-visual svg {
  width: 100%;
}

.exp-timeline line,
.exp-timeline circle,
.exp-cage > rect,
.exp-cage > path {
  fill: none;
  stroke: rgba(18, 23, 40, 0.25);
  stroke-width: 2;
}

.exp-timeline circle {
  fill: var(--paper);
  stroke-width: 2;
  transition: fill 200ms ease, stroke 200ms ease, transform 200ms ease;
}

.exp-timeline text,
.exp-results text {
  fill: #5c6680;
  font-family: var(--utility);
  font-size: 13px;
}

.exp-timeline circle.is-active {
  fill: var(--off-cyan);
  stroke: var(--night-ink);
  transform: scale(1.14);
  transform-origin: center;
  transform-box: fill-box;
}

.mouse ellipse,
.mouse circle {
  fill: rgba(255, 107, 95, 0.13);
  stroke: rgba(18, 23, 40, 0.72);
  stroke-width: 2.2;
}

.mouse path {
  fill: none;
  stroke: rgba(18, 23, 40, 0.72);
  stroke-width: 3;
  stroke-linecap: round;
}

.novel-objects rect,
.novel-objects circle,
.novel-objects path {
  fill: rgba(246, 198, 107, 0.24);
  stroke: rgba(108, 73, 18, 0.7);
  stroke-width: 2;
}

.probe-set path {
  stroke: var(--night-blue);
  stroke-width: 5;
}

.probe-set circle {
  fill: var(--night-blue);
}

.laser-beam path {
  fill: rgba(94, 231, 239, 0.08);
  stroke: rgba(94, 231, 239, 0.55);
  opacity: 0.2;
  transition: opacity 240ms ease;
}

.experiment-visual[data-stage="induction"] .laser-beam path,
.experiment-visual[data-stage="physiology"] .laser-beam path,
.experiment-visual[data-stage="memory"] .laser-beam path {
  opacity: 1;
  filter: url(#expGlow);
}

.exp-pulses {
  opacity: 0.14;
  transition: opacity 200ms ease;
}

.experiment-visual[data-stage="induction"] .exp-pulses,
.experiment-visual[data-stage="physiology"] .exp-pulses,
.experiment-visual[data-stage="memory"] .exp-pulses {
  opacity: 1;
}

.exp-results {
  opacity: 0.16;
  transition: opacity 240ms ease;
}

.experiment-visual[data-stage="physiology"] .exp-results,
.experiment-visual[data-stage="memory"] .exp-results {
  opacity: 1;
}

.exp-results path {
  fill: none;
  stroke: var(--night-blue);
  stroke-width: 2.5;
}

.exp-results circle {
  fill: var(--synapse-amber);
}

.exp-results rect {
  fill: rgba(128, 210, 166, 0.15);
  stroke: var(--moss);
}

.experiment-readout {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--utility);
}

.experiment-readout span {
  color: var(--ink-soft);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.experiment-readout strong {
  font-size: 0.78rem;
}

.experiment-steps {
  display: grid;
  gap: 1.2rem;
}

.experiment-step {
  min-height: 70vh;
  display: grid;
  align-content: center;
  grid-template-columns: 58px 1fr;
  gap: 0 1.1rem;
  padding: clamp(1.4rem, 3vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  opacity: 0.4;
  transform: scale(0.98);
  transition: opacity 240ms ease, transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.experiment-step.is-active {
  border-color: rgba(94, 231, 239, 0.85);
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 26px 70px rgba(7, 11, 26, 0.1), inset 0 4px 0 var(--off-cyan);
}

.experiment-index {
  grid-row: 1 / 5;
  color: var(--off-cyan);
  font-family: var(--utility);
  font-size: 0.83rem;
  font-weight: 800;
}

.experiment-step h3 {
  margin-bottom: 0.9rem;
}

.experiment-step > p {
  color: var(--ink-soft);
}

.experiment-step dl {
  margin: 1rem 0 0;
}

.experiment-step dl div {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.75rem;
  border-top: 1px solid var(--line);
}

.experiment-step dt {
  color: var(--ink-soft);
  font-family: var(--utility);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.experiment-step dd {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.control-callout {
  padding: 1.6rem;
  border-left: 5px solid var(--wake-coral);
  background: var(--night-ink);
  color: #fff;
}

.control-callout span {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--wake-coral);
  font-family: var(--utility);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.control-callout p,
.sample-note {
  margin: 0;
}

.sample-note {
  max-width: 75ch;
  margin-top: 2.2rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

/***** Jobs *****/
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.filter-button,
.preset-button,
.arsenal-tab {
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(18, 23, 40, 0.2);
  border-radius: 999px;
  background: transparent;
  font-family: var(--utility);
  font-size: 0.7rem;
  font-weight: 760;
  line-height: 1.25;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.dark-section .filter-button,
.dark-section .preset-button,
.dark-section .arsenal-tab {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(241, 246, 255, 0.7);
}

.filter-button:hover,
.preset-button:hover,
.arsenal-tab:hover {
  transform: translateY(-2px);
}

.filter-button.is-active,
.preset-button.is-active,
.arsenal-tab.is-active {
  border-color: var(--off-cyan);
  background: var(--off-cyan);
  color: var(--night-ink);
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  background: var(--line-dark);
}

.job-card {
  min-width: 0;
  min-height: 245px;
  padding: clamp(1.25rem, 2.4vw, 2rem);
  background: rgba(12, 19, 43, 0.88);
  transition: background 180ms ease, transform 180ms ease;
}

.job-card:hover {
  background: rgba(19, 30, 66, 0.98);
}

.job-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 2.2rem;
  font-family: var(--utility);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
}

.job-card-meta > span:first-child {
  color: rgba(235, 241, 255, 0.52);
}

.status {
  padding: 0.24rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.status-direct { color: var(--off-cyan); }
.status-indirect { color: var(--synapse-amber); }
.status-untested { color: rgba(235, 241, 255, 0.5); }
.status-disputed { color: var(--warning); }

.job-card h3 {
  color: #fff;
}

.job-card p {
  margin-bottom: 0;
  color: rgba(235, 241, 255, 0.63);
  font-size: 0.88rem;
}

.bottom-line {
  max-width: 65ch;
  margin: 2.5rem 0 0 auto;
  padding-left: 1.4rem;
  border-left: 4px solid var(--synapse-amber);
  color: rgba(242, 247, 255, 0.8);
  font-size: clamp(1.03rem, 1.45vw, 1.25rem);
  font-weight: 650;
}

/***** History *****/
.history-section {
  background:
    radial-gradient(circle at 12% 30%, rgba(255, 107, 95, 0.1), transparent 30rem),
    var(--paper);
}

.timeline {
  position: relative;
  max-width: 1050px;
  margin-inline: auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 182px;
  width: 1px;
  background: linear-gradient(var(--wake-coral), var(--synapse-amber), var(--off-cyan), var(--rem-violet));
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px 64px minmax(0, 1fr);
  align-items: start;
  min-width: 0;
  padding-block: 1.25rem 3.25rem;
}

.timeline-time {
  grid-column: 1;
  grid-row: 1;
}

.timeline-marker {
  grid-column: 2;
  grid-row: 1;
}

.timeline-copy {
  grid-column: 3;
  grid-row: 1;
}

.timeline-marker {
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-marker span {
  position: relative;
  z-index: 2;
  width: 14px;
  height: 14px;
  margin-top: 0.42rem;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--wake-coral);
  box-shadow: 0 0 0 1px rgba(18, 23, 40, 0.24), 0 0 16px rgba(255, 107, 95, 0.3);
}

.timeline-time {
  padding-top: 0.2rem;
  color: #67718e;
  font-family: var(--utility);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
}

.timeline-copy {
  min-width: 0;
  padding: clamp(1.3rem, 2.5vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 40px rgba(7, 11, 26, 0.06);
}

.timeline-topline,
.story-meta,
.source-card-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  font-family: var(--utility);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
}

.strategy,
.history-status,
.source-type {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--paper-blue);
}

.strategy-force { color: #a52d26; background: rgba(255, 107, 95, 0.15); }
.strategy-mask { color: #7a5710; background: rgba(246, 198, 107, 0.23); }
.strategy-recover { color: #0a676d; background: rgba(94, 231, 239, 0.18); }
.strategy-share { color: #2b6646; background: rgba(128, 210, 166, 0.2); }
.strategy-clock { color: #5c388d; background: rgba(184, 147, 255, 0.18); }
.strategy-replace { color: #075960; background: rgba(94, 231, 239, 0.18); }

.history-status {
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
}

.timeline-copy h3 {
  margin-bottom: 0.7rem;
}

.timeline-copy > p {
  color: var(--ink-soft);
}

.source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.1rem;
}

.source-chip {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.36rem 0.52rem;
  border: 1px solid rgba(18, 23, 40, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: #424c67;
  font-family: var(--utility);
  font-size: 0.61rem;
  line-height: 1.2;
  text-decoration: none;
}

.dark-section .source-chip {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(239, 245, 255, 0.69);
}

.source-chip span {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--off-cyan);
  color: var(--night-ink);
  font-size: 0.56rem;
  font-weight: 900;
}

.timeline-empty {
  padding: 2rem;
  border: 1px dashed var(--line);
  text-align: center;
}

/***** Arsenal *****/
.arsenal-section {
  overflow: clip;
}

.arsenal-tabs {
  display: flex;
  gap: 0.7rem;
  padding-bottom: 1.1rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(94, 231, 239, 0.5) transparent;
}

.arsenal-tab {
  flex: 0 0 auto;
  border-radius: 10px;
}

.arsenal-tab span {
  margin-right: 0.45rem;
}

.arsenal-panels {
  margin-top: 1.4rem;
}

.arsenal-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  overflow: hidden;
}

.arsenal-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: clamp(1.4rem, 3vw, 2.6rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.arsenal-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 12px;
  background: var(--off-cyan);
  color: var(--night-ink);
  font-family: var(--utility);
  font-weight: 900;
}

.arsenal-identity h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 3rem);
}

.arsenal-status {
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  color: rgba(240, 245, 255, 0.63);
  font-family: var(--utility);
  font-size: 0.65rem;
  text-align: center;
}

.arsenal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.arsenal-grid > div {
  min-width: 0;
  padding: clamp(1.3rem, 3vw, 2.5rem);
  border-right: 1px solid rgba(255, 255, 255, 0.11);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.arsenal-grid > div:nth-child(2n) {
  border-right: 0;
}

.arsenal-grid dt {
  margin-bottom: 0.7rem;
  color: var(--off-cyan);
  font-family: var(--utility);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.arsenal-grid dd {
  margin: 0;
  color: rgba(242, 246, 255, 0.74);
  font-size: 0.93rem;
}

.safety-note {
  max-width: 78ch;
  margin: 1.5rem 0 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--warning);
  color: rgba(241, 246, 255, 0.66);
  font-size: 0.82rem;
}

/***** Stories *****/
.stories-section {
  background:
    radial-gradient(circle at 90% 12%, rgba(246, 198, 107, 0.19), transparent 25rem),
    var(--paper);
}

.stories-section .section-heading h2 {
  max-width: 20ch;
  font-size: clamp(2.7rem, 4vw, 4.6rem);
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.story-card {
  grid-column: span 4;
  min-width: 0;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 2.7vw, 2.3rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 40px rgba(7, 11, 26, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.story-card:nth-child(1),
.story-card:nth-child(5) {
  grid-column: span 8;
}

.story-card:nth-child(1) {
  background: var(--night-ink);
  color: #fff;
}

.story-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 70px rgba(7, 11, 26, 0.12);
}

.story-meta {
  margin-bottom: 3.5rem;
  color: var(--ink-soft);
}

.story-card:first-child .story-meta,
.story-card:first-child > p {
  color: rgba(240, 245, 255, 0.64);
}

.story-meta strong {
  color: var(--wake-coral);
  font-size: clamp(1rem, 2vw, 1.65rem);
}

.story-card h3 {
  max-width: 22ch;
}

.story-card > p {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.story-card .source-chips {
  margin-top: auto;
}

.story-card:first-child .source-chip {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(240, 245, 255, 0.7);
}

/***** Myths *****/
.myths-section {
  background: #edf1fa;
}

.myth-list {
  border-top: 1px solid var(--line);
}

.myth-card {
  border-bottom: 1px solid var(--line);
}

.myth-card summary {
  min-height: 94px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  list-style: none;
}

.myth-card summary::-webkit-details-marker {
  display: none;
}

.myth-card summary::after {
  content: "+";
  grid-column: 4;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--utility);
  transition: transform 180ms ease, background 180ms ease;
}

.myth-card[open] summary::after {
  content: "−";
  background: var(--off-cyan);
  transform: rotate(180deg);
}

.myth-index {
  color: #7b86a2;
  font-family: var(--utility);
  font-size: 0.72rem;
}

.myth-claim {
  font-size: clamp(1.05rem, 1.7vw, 1.38rem);
  font-weight: 750;
  line-height: 1.35;
}

.myth-verdict {
  padding: 0.35rem 0.55rem;
  border-radius: 5px;
  background: rgba(255, 179, 106, 0.22);
  color: #76450d;
  font-family: var(--utility);
  font-size: 0.65rem;
  font-weight: 800;
  white-space: nowrap;
}

.myth-body {
  max-width: 77ch;
  padding: 0 0 2rem 70px;
}

.myth-body > p {
  color: var(--ink-soft);
}

/***** Allocation *****/
.allocation-section {
  overflow: clip;
}

.allocation-layout {
  display: grid;
  grid-template-columns: minmax(350px, 0.86fr) minmax(0, 1.14fr);
  align-items: start;
  gap: clamp(2rem, 7vw, 7rem);
}

.allocation-clock-wrap {
  position: sticky;
  top: calc(var(--topbar-h) + 28px);
  min-width: 0;
}

.allocation-clock {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-inline: auto;
  border-radius: 50%;
  background: var(--segments);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.13), 0 28px 90px rgba(0, 0, 0, 0.38);
  transition: background 260ms ease;
}

.allocation-clock::before,
.allocation-clock::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.allocation-clock::before {
  inset: 10%;
  background: var(--night-ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 0 70px rgba(94, 231, 239, 0.07);
}

.allocation-clock::after {
  inset: -16px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
}

.allocation-clock > div {
  position: relative;
  z-index: 2;
  text-align: center;
}

.allocation-clock strong,
.allocation-clock span {
  display: block;
}

.allocation-clock strong {
  font-family: var(--display);
  font-size: clamp(4.5rem, 8vw, 8.5rem);
  line-height: 0.8;
}

.allocation-clock span {
  margin-top: 0.8rem;
  color: rgba(238, 244, 255, 0.54);
  font-family: var(--utility);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.allocation-budget {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(240, 245, 255, 0.64);
  font-family: var(--utility);
  font-size: 0.72rem;
}

.allocation-budget strong {
  color: var(--off-cyan);
}

.preset-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.allocation-output {
  margin-top: 1.2rem;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.allocation-output > span {
  color: rgba(240, 245, 255, 0.52);
  font-family: var(--utility);
  font-size: 0.67rem;
}

.allocation-output p {
  margin: 0.65rem 0 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 650;
}

.allocation-controls {
  min-width: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.allocation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
  align-items: center;
  gap: 1.3rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.allocation-label label,
.allocation-label span {
  display: block;
}

.allocation-label label {
  color: #fff;
  font-weight: 760;
}

.allocation-label span {
  color: rgba(235, 241, 255, 0.55);
  font-size: 0.78rem;
}

.allocation-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 0.9rem;
}

.allocation-control output {
  color: var(--off-cyan);
  font-family: var(--utility);
  font-size: 1rem;
  font-weight: 800;
  text-align: right;
}

input[type="range"] {
  width: 100%;
  height: 34px;
  margin: 0;
  appearance: none;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--off-cyan) 0 var(--range-fill, 0%), rgba(255, 255, 255, 0.18) var(--range-fill, 0%) 100%);
}

input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--off-cyan) 0 var(--range-fill, 0%), rgba(255, 255, 255, 0.18) var(--range-fill, 0%) 100%);
}

.allocation-hint {
  min-height: 1.5em;
  margin: 0.8rem 0 0;
  color: var(--synapse-amber);
  font-size: 0.78rem;
}

.glossary-term {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
  text-underline-offset: 0.18em;
  cursor: help;
}

input[type="range"]::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -8px;
  appearance: none;
  border: 4px solid var(--night-ink);
  border-radius: 50%;
  background: var(--off-cyan);
  box-shadow: 0 0 0 1px var(--off-cyan), 0 0 16px rgba(94, 231, 239, 0.45);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 4px solid var(--night-ink);
  border-radius: 50%;
  background: var(--off-cyan);
  box-shadow: 0 0 0 1px var(--off-cyan), 0 0 16px rgba(94, 231, 239, 0.45);
}

.inequality-callout {
  display: grid;
  grid-template-columns: minmax(210px, 0.45fr) minmax(0, 1fr);
  gap: clamp(1.2rem, 4vw, 4rem);
  margin-top: clamp(3rem, 7vw, 7rem);
  padding: clamp(1.6rem, 3.8vw, 3.5rem);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  background: rgba(255, 107, 95, 0.09);
}

.inequality-callout h3 {
  color: var(--wake-coral);
}

.inequality-callout p {
  margin: 0;
  color: rgba(240, 245, 255, 0.72);
}

/***** System *****/
.system-section {
  background:
    radial-gradient(circle at 80% 30%, rgba(184, 147, 255, 0.16), transparent 28rem),
    var(--paper);
}

.system-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.74fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 6rem);
}

.system-modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.system-modules legend {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
  color: var(--ink-soft);
  font-family: var(--utility);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-module {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.85rem;
  padding: 1.05rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.system-module:hover {
  border-color: rgba(94, 231, 239, 0.72);
  transform: translateY(-2px);
}

.system-module input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.system-check {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #69748f;
  border-radius: 5px;
  background: #fff;
}

.system-check::after {
  content: "";
  width: 9px;
  height: 5px;
  border: solid var(--night-ink);
  border-width: 0 0 3px 3px;
  transform: rotate(-45deg) scale(0);
  transition: transform 150ms ease;
}

.system-module input:checked + .system-check {
  border-color: var(--off-cyan);
  background: var(--off-cyan);
}

.system-module input:checked + .system-check::after {
  transform: rotate(-45deg) scale(1);
}

.system-module:has(input:checked) {
  border-color: var(--off-cyan);
  background: rgba(94, 231, 239, 0.1);
}

.system-module-copy strong,
.system-module-copy small {
  display: block;
}

.system-module-copy strong {
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.system-module-copy small {
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.4;
}

.system-console {
  position: sticky;
  top: calc(var(--topbar-h) + 28px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--night-ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.system-brain {
  position: relative;
  min-height: 420px;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(94, 231, 239, 0.08) 0 34%, transparent 35%),
    radial-gradient(ellipse at 35% 50%, rgba(184, 147, 255, 0.08), transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, auto, 34px 34px, 34px 34px;
}

.system-brain::before {
  content: "";
  position: absolute;
  inset: 12% 12% 8%;
  border: 2px solid rgba(230, 238, 255, 0.28);
  border-radius: 47% 53% 45% 55% / 40% 39% 61% 60%;
  transform: rotate(-4deg);
  box-shadow: inset 0 0 60px rgba(94, 231, 239, 0.04);
}

.system-brain::after {
  content: "";
  position: absolute;
  top: 16%;
  bottom: 12%;
  left: 50%;
  width: 1px;
  background: rgba(184, 147, 255, 0.28);
}

.system-brain span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transform: translate(-50%, -50%);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.system-brain span.is-active {
  border-color: var(--off-cyan);
  background: var(--off-cyan);
  box-shadow: 0 0 22px rgba(94, 231, 239, 0.84);
  transform: translate(-50%, -50%) scale(1.24);
}

.system-readout {
  padding: clamp(1.4rem, 3vw, 2.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.system-readout > span,
.system-readout h3 {
  font-family: var(--utility);
}

.system-readout > span {
  color: rgba(239, 245, 255, 0.53);
  font-size: 0.67rem;
}

.system-readout h3 {
  margin: 1rem 0 0.5rem;
  color: var(--off-cyan);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.system-readout p {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 680;
  line-height: 1.4;
}

/***** Closing *****/
.closing-section {
  min-height: 95svh;
  display: grid;
  align-items: center;
  text-align: center;
}

.closing-section h2 {
  max-width: 15ch;
  margin: 0 auto clamp(2.5rem, 5vw, 5rem);
  font-size: clamp(3.5rem, 7.8vw, 8.5rem);
}

.closing-symbol {
  width: min(460px, 80vw);
  height: 74px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  margin: 0 auto 2.3rem;
}

.closing-symbol span {
  width: 10px;
  border-radius: 6px 6px 0 0;
  background: var(--off-cyan);
  box-shadow: 0 0 18px rgba(94, 231, 239, 0.45);
}

.closing-symbol span:nth-child(1) { height: 18px; }
.closing-symbol span:nth-child(2) { height: 55px; }
.closing-symbol span:nth-child(3) { height: 25px; }
.closing-symbol span:nth-child(4) { height: 68px; }
.closing-symbol span:nth-child(5) { height: 34px; }

.closing-prose {
  margin-inline: auto;
  color: rgba(238, 244, 255, 0.71);
  font-size: clamp(1.02rem, 1.4vw, 1.22rem);
  text-align: left;
}

.final-line {
  max-width: 57ch;
  margin: clamp(2.7rem, 5vw, 5rem) auto 0;
  padding-top: 1.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 750;
  line-height: 1.42;
}

/***** Sources *****/
.sources-section {
  background: #eef2fb;
}

.source-governance {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.3rem, 4vw, 4rem);
  margin-bottom: clamp(3rem, 6vw, 6rem);
  padding: clamp(1.4rem, 3vw, 2.7rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.source-governance p {
  margin: 0;
  color: var(--ink-soft);
}

.source-governance strong {
  color: var(--ink);
}

.source-group {
  margin-top: clamp(3.5rem, 7vw, 7rem);
}

.source-group-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.source-group-heading h3 {
  margin: 0;
}

.source-group-heading span {
  color: var(--ink-soft);
  font-family: var(--utility);
  font-size: 0.68rem;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.source-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.74);
  overflow-wrap: break-word;
}

.source-card:target {
  border-color: var(--off-cyan);
  box-shadow: 0 0 0 4px rgba(94, 231, 239, 0.15);
  scroll-margin-top: calc(var(--topbar-h) + 25px);
}

.source-card-top {
  margin-bottom: 1.1rem;
}

.source-type {
  color: #205a60;
  background: rgba(94, 231, 239, 0.16);
}

.source-year {
  color: var(--ink-soft);
}

.source-card h3 {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  line-height: 1.32;
}

.source-card dl {
  margin: 0 0 1.4rem;
}

.source-card dl div {
  padding-block: 0.75rem;
  border-top: 1px solid var(--line);
}

.source-card dt {
  color: #65708d;
  font-family: var(--utility);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-card dd {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.source-open {
  margin-top: auto;
  color: #185f65;
}

/***** Footer and utility *****/
.footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--night-ink);
  color: rgba(239, 245, 255, 0.68);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr) auto;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.76rem;
}

.footer-grid strong,
.footer-grid span {
  display: block;
}

.footer-grid strong {
  color: #fff;
}

.footer-grid p {
  margin: 0;
}

.footer-grid a {
  color: var(--off-cyan);
  font-family: var(--utility);
  white-space: nowrap;
}

.back-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 120;
  min-width: 48px;
  min-height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(94, 231, 239, 0.52);
  border-radius: 999px;
  background: rgba(7, 11, 26, 0.9);
  color: var(--off-cyan);
  font-family: var(--utility);
  font-size: 0.68rem;
  text-decoration: none;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.js .back-top {
  display: inline-flex;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.noscript-note {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 190;
  margin: 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--warning);
  border-radius: 10px;
  background: var(--night-ink);
  color: #fff;
  font-size: 0.8rem;
  text-align: center;
}

.error-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: var(--night-ink);
  color: #fff;
}

.error-page main {
  width: min(100% - 2rem, 720px);
  text-align: center;
}

.error-page p {
  color: var(--off-cyan);
  font-family: var(--utility);
  font-size: 1rem;
}

.error-page h1 {
  font-size: clamp(3rem, 10vw, 7rem);
}

.error-page a {
  display: inline-block;
  margin-top: 2rem;
  color: var(--off-cyan);
}

/***** Reveal enhancement *****/
.js .section-heading,
.js .story-card,
.js .job-card,
.js .timeline-item,
.js .source-card,
.js .myth-card,
.js .inequality-callout {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.js .is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/***** Responsive *****/
@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topnav {
    display: none;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 2rem;
  }

  .state-lab-grid {
    grid-template-columns: minmax(190px, 0.46fr) minmax(380px, 1fr);
  }

  .state-readouts {
    grid-column: 1 / -1;
  }

  .state-card {
    display: grid;
    grid-template-columns: 0.35fr 1fr 0.75fr;
    gap: 1.2rem;
    align-items: start;
  }

  .state-card dl,
  .state-card > p {
    margin: 0;
  }

  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --topbar-h: 58px;
  }

  body {
    font-size: 16px;
  }

  .shell,
  .shell.narrow,
  .shell.narrow-wide {
    width: min(calc(100% - 2rem), var(--shell));
  }

  .section-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-heading h2 {
    max-width: 14ch;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    position: relative;
    top: auto;
    min-height: auto;
    grid-template-columns: 1fr;
    padding-block: 5rem 2rem;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero h1 {
    max-width: 10ch;
  }

  .hero-visual {
    width: min(100%, 590px);
  }

  .hero-stats {
    position: relative;
    inset: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 2.2rem;
  }

  .hero-stat:nth-child(2) {
    border-right: 0;
  }

  .hero-stat:nth-child(-n+2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  }

  .hero-stat:nth-child(3) {
    padding-left: 0;
  }

  .state-lab-grid {
    grid-template-columns: 1fr;
  }

  .state-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .state-tab {
    min-height: 110px;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 0.25rem;
  }

  .state-tab > span {
    grid-row: auto;
  }

  .state-card {
    grid-template-columns: 1fr;
  }

  .experiment-layout,
  .allocation-layout,
  .system-layout {
    grid-template-columns: 1fr;
  }

  .experiment-visual,
  .allocation-clock-wrap,
  .system-console {
    position: relative;
    top: auto;
  }

  .experiment-step {
    min-height: auto;
    opacity: 1;
    transform: none;
  }

  .jobs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-card,
  .story-card:nth-child(1),
  .story-card:nth-child(5) {
    grid-column: auto;
  }

  .story-card {
    min-height: 330px;
  }

  .allocation-clock {
    width: min(82vw, 430px);
  }

  .system-console {
    max-width: 620px;
    width: 100%;
    margin-inline: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr auto;
  }

  .footer-grid p {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Wide, short browser windows cannot reserve space safely inside the sticky hero. */
@media (min-width: 901px) and (max-height: 760px) {
  .hero {
    min-height: auto;
  }

  .hero-grid {
    position: relative;
    top: auto;
    min-height: auto;
    align-items: start;
    padding-block: 3.5rem 2rem;
  }

  .hero-stats {
    position: relative;
    inset: auto;
    margin-bottom: 2.2rem;
  }
}

@media (max-width: 680px) {
  .topbar {
    gap: 0.5rem;
    padding-inline: 1rem;
  }

  .brand {
    font-size: 0.66rem;
  }

  .language-link {
    min-height: 38px;
    padding-inline: 0.7rem;
    font-size: 0.65rem;
  }

  h2 {
    font-size: clamp(2.7rem, 13vw, 4.7rem);
    line-height: 0.98;
  }

  .hero h1 {
    font-size: clamp(3.65rem, 16vw, 6rem);
    line-height: 0.92;
  }

  .hero-deck {
    font-size: 1rem;
  }

  .hero-thesis {
    font-size: 1.12rem;
  }

  .evidence-strip {
    border-radius: 7px;
    font-size: 0.61rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stat,
  .hero-stat:first-child,
  .hero-stat:nth-child(3) {
    padding: 0.85rem 0.35rem;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  }

  .hero-stat:last-child {
    border-bottom: 0;
  }

  .claim-limit,
  .source-governance,
  .inequality-callout {
    grid-template-columns: 1fr;
  }

  .state-controls {
    grid-template-columns: 1fr;
  }

  .state-tab {
    min-height: 82px;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .state-tab > span {
    grid-row: 1 / 3;
  }

  .experiment-visual {
    border-radius: 16px;
  }

  .experiment-step {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 1.2rem;
  }

  .experiment-step dl div {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .jobs-grid,
  .stories-grid,
  .source-grid,
  .arsenal-grid,
  .system-modules {
    grid-template-columns: 1fr;
  }

  .arsenal-grid > div {
    border-right: 0;
  }

  .arsenal-identity {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .arsenal-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .timeline::before {
    left: 18px;
  }

  .timeline-item {
    grid-template-columns: 36px minmax(0, 1fr);
    padding-block: 0.8rem 2.3rem;
  }

  .timeline-time {
    grid-column: 2;
    grid-row: 1;
    padding: 0 0 0.55rem;
    text-align: left;
  }

  .timeline-marker {
    grid-column: 1;
    grid-row: 1 / 3;
    justify-content: flex-start;
    padding-left: 11px;
  }

  .timeline-copy {
    grid-column: 2;
    grid-row: 2;
    padding: 1.1rem;
  }

  .myth-card summary {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 0.7rem;
  }

  .myth-verdict {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    white-space: normal;
  }

  .myth-card summary::after {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .myth-body {
    padding-left: 43px;
  }

  .allocation-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .allocation-clock {
    width: min(78vw, 340px);
  }

  .allocation-clock strong {
    font-size: clamp(4rem, 22vw, 6.2rem);
  }

  .system-brain {
    min-height: 340px;
  }

  .closing-section {
    text-align: left;
  }

  .closing-section h2 {
    margin-inline: 0;
  }

  .closing-symbol {
    justify-content: flex-start;
    margin-left: 0;
  }

  .final-line {
    margin-inline: 0;
  }

  .source-governance {
    gap: 1.2rem;
  }

  .source-group-heading {
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid p,
  .footer-grid a {
    grid-column: 1;
    grid-row: auto;
  }

  .back-top span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}

@media (max-width: 380px) {
  .shell,
  .shell.narrow,
  .shell.narrow-wide {
    width: min(calc(100% - 1.35rem), var(--shell));
  }

  .topbar {
    padding-inline: 0.7rem;
  }

  .brand {
    letter-spacing: 0.04em;
  }

  .hero-grid {
    padding-top: 4.1rem;
  }

  .hero h1 {
    font-size: clamp(3.25rem, 16.5vw, 5rem);
  }

  .experiment-step {
    grid-template-columns: 1fr;
  }

  .experiment-index {
    grid-row: auto;
  }

  .myth-body {
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .js .section-heading,
  .js .story-card,
  .js .job-card,
  .js .timeline-item,
  .js .source-card,
  .js .myth-card,
  .js .inequality-callout {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .topbar,
  .reading-progress,
  .back-top,
  .filter-bar,
  .arsenal-tabs,
  .preset-group,
  .noscript-note {
    display: none !important;
  }

  .section,
  .dark-section,
  .hero {
    background: #fff !important;
    color: #000 !important;
  }

  .hero,
  .closing-section {
    min-height: auto;
  }

  .hero-grid,
  .experiment-visual,
  .allocation-clock-wrap,
  .system-console {
    position: static;
  }

  .dark-section * {
    color: #000 !important;
  }

  .source-card,
  .story-card,
  .job-card,
  .timeline-copy {
    break-inside: avoid;
  }
}

/* Progressive enhancement: all substantive panels remain readable without JavaScript. */
html:not(.js) .state-readouts [hidden],
html:not(.js) .arsenal-panel[hidden] {
  display: block !important;
}

html:not(.js) .state-readouts,
html:not(.js) .arsenal-panels {
  display: grid;
  gap: 1rem;
}

.system-module:has(input:focus-visible) {
  box-shadow: var(--focus);
}

/* 2026-07-18: separate protocols, evidence matrix, compact audit trail. */
.protocol-map { margin: 3rem 0 1.25rem; border: 1px solid rgba(12,23,54,.14); border-radius: 28px; overflow: hidden; background: linear-gradient(145deg,#fff 0%,#edf3fb 100%); box-shadow: 0 24px 70px rgba(19,34,72,.1); }
.protocol-map figcaption { display: grid; justify-items: center; gap: .45rem; padding: clamp(1.4rem,4vw,2.6rem); text-align: center; color: var(--night-ink); border-bottom: 1px solid rgba(12,23,54,.12); }
.protocol-map figcaption span,.protocol-map figcaption small { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; }
.protocol-map figcaption strong { max-width: 820px; font-family: var(--font-display); font-size: clamp(1.35rem,2.6vw,2.35rem); line-height: 1.08; }
.protocol-branches { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.protocol-rail { position: relative; min-width: 0; padding: 2rem clamp(1rem,2.5vw,2rem) 2.4rem; }
.protocol-rail + .protocol-rail { border-left: 1px solid rgba(12,23,54,.12); }
.protocol-rail::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: var(--off-cyan); }
.protocol-molecular::before { background: var(--synapse-amber); }
.protocol-memory::before { background: var(--rem-violet); }
.protocol-letter { display: grid; place-items: center; width: 2.15rem; height: 2.15rem; margin-bottom: 1rem; border-radius: 50%; color: var(--night-ink); background: var(--off-cyan); font: 700 .92rem/1 var(--font-mono); }
.protocol-molecular .protocol-letter { background: var(--synapse-amber); }
.protocol-memory .protocol-letter { background: var(--rem-violet); }
.protocol-rail h3 { margin: 0 0 1.2rem; font-size: clamp(1.1rem,2vw,1.5rem); }
.protocol-rail ol { list-style: none; margin: 0; padding: 0; }
.protocol-rail li { position: relative; padding: .8rem .4rem .8rem 1.25rem; border-left: 2px solid rgba(12,23,54,.18); color: var(--muted); }
.protocol-rail li::before { content: ''; position: absolute; left: -5px; top: 1.15rem; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.protocol-details { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; align-items: stretch; }
.protocol-details .experiment-step { position: static; min-height: 100%; opacity: 1; transform: none; }
.protocol-details .control-callout { grid-column: 1 / -1; }
.matrix-scroll { overflow: auto; max-height: min(72vh,780px); border: 1px solid rgba(255,255,255,.17); border-radius: 20px; background: rgba(5,10,26,.44); scrollbar-color: var(--off-cyan) rgba(255,255,255,.08); }
.jobs-matrix-wrap { width: 100%; min-width: 0; }
.jobs-matrix { width: max(840px,100%); min-width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; color: var(--paper); }
.jobs-matrix th,.jobs-matrix td { padding: 1rem 1.1rem; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.jobs-matrix thead th { position: sticky; top: 0; z-index: 3; background: #101a3a; color: var(--off-cyan); font: 700 .72rem/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.jobs-matrix th:nth-child(1) { width: 28%; }
.jobs-matrix th:nth-child(2) { width: 17%; }
.jobs-matrix th:nth-child(3) { width: 18%; }
.jobs-matrix th:nth-child(4) { width: 37%; }
.jobs-matrix tbody th { color: #fff; font-size: .98rem; }
.jobs-matrix tbody td { color: rgba(244,246,252,.78); font-size: .9rem; line-height: 1.55; }
.jobs-matrix tbody tr[hidden] { display: none; }
.jobs-matrix tbody tr:hover th,.jobs-matrix tbody tr:hover td { background: rgba(94,231,239,.045); }
.source-group { margin: 1rem 0; border: 1px solid rgba(13,23,52,.12); border-radius: 18px; background: rgba(255,255,255,.55); }
.source-group-heading { cursor: pointer; padding: 1.2rem 1.35rem; list-style: none; }
.source-group-heading::-webkit-details-marker { display: none; }
.source-group-heading h3 { margin: 0; }
.source-group-heading::after { content: '+'; margin-left: auto; font: 700 1.2rem/1 var(--font-mono); color: #187b83; }
.source-group[open] > .source-group-heading::after { content: '−'; }
.source-group .source-grid { padding: 0 1.1rem 1.1rem; }

@media (max-width: 820px) {
  .protocol-branches,.protocol-details { grid-template-columns: 1fr; }
  .protocol-rail + .protocol-rail { border-left: 0; border-top: 1px solid rgba(12,23,54,.12); }
  .protocol-details .control-callout { grid-column: auto; }
  .matrix-scroll { max-height: none; }
}
