:root {
  --ink: #07100d;
  --paper: #f4f7f2;
  --paper-2: #e8eee9;
  --night: #05080d;
  --night-2: #0a1117;
  --panel: rgba(17, 28, 31, .72);
  --line: rgba(191, 255, 213, .22);
  --line-strong: rgba(191, 255, 213, .48);
  --mint: #8fffc0;
  --lime: #b9ff57;
  --acid: #d9ff63;
  --cyan: #69ddf4;
  --yellow: #ffe76a;
  --coral: #ff776e;
  --muted: #9daaa5;
  --max: 1240px;
  --portal-progress: 0;
  --radius: 28px;
  --shadow: 0 26px 80px rgba(0, 0, 0, .28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--night);
}

body {
  margin: 0;
  overflow-x: hidden;
  color: #ecf7f0;
  background: var(--night);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

button,
a,
[tabindex] {
  outline-offset: 4px;
}

:focus-visible {
  outline: 2px solid var(--yellow);
}

::selection {
  color: #04100a;
  background: var(--mint);
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform .2s ease;
}

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

#ambientCanvas {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .46;
}

.reading-progress {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, .04);
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--yellow), var(--mint), var(--cyan));
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.topbar {
  position: fixed;
  z-index: 110;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(calc(100% - 32px), 1120px);
  min-height: 58px;
  padding: 7px 8px 7px 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: rgba(5, 9, 13, .74);
  box-shadow: 0 12px 48px rgba(0, 0, 0, .26);
  backdrop-filter: blur(18px) saturate(130%);
  transform: translate(-50%, -130%);
  opacity: 0;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .35s ease;
}

.topbar.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.wordmark,
.footer-mark {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.05em;
}

.wordmark span,
.footer-mark span {
  color: var(--mint);
}

.topbar nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 34px);
}

.topbar nav a {
  color: #bdc8c2;
  font-size: 13px;
  font-weight: 600;
  transition: color .2s ease;
}

.topbar nav a:hover {
  color: #fff;
}

.topbar-paper {
  padding: 10px 16px;
  color: var(--ink);
  background: var(--mint);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

main,
footer {
  position: relative;
  z-index: 1;
}

main > section {
  scroll-margin-top: 82px;
}

.portal {
  position: relative;
  height: 260vh;
  min-height: 1500px;
  color: #eff9f3;
  background:
    radial-gradient(circle at 50% 24%, rgba(105, 221, 244, .08), transparent 38%),
    radial-gradient(circle at 14% 54%, rgba(185, 255, 87, .06), transparent 28%),
    #05080d;
}

.portal-sticky {
  position: sticky;
  top: 0;
  display: grid;
  place-items: center;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
  isolation: isolate;
}

.portal-sticky::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(168, 255, 204, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 255, 204, .025) 1px, transparent 1px);
  background-size: 52px 52px;
  content: "";
  mask-image: radial-gradient(circle at center, #000, transparent 78%);
}

.portal-aura {
  position: absolute;
  z-index: -1;
  width: min(1000px, 88vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 180deg, rgba(105, 221, 244, .14), rgba(143, 255, 192, .04), rgba(255, 231, 106, .08), rgba(255, 119, 110, .08), rgba(105, 221, 244, .14));
  filter: blur(72px);
  opacity: calc(.22 + var(--portal-progress) * .56);
  transform: scale(calc(.82 + var(--portal-progress) * .34)) rotate(calc(var(--portal-progress) * 32deg));
}

.portal-paper-meta {
  position: absolute;
  z-index: 5;
  top: clamp(70px, 7.5vh, 92px);
  left: 50%;
  width: min(1220px, 92vw);
  color: rgba(239, 249, 243, calc(1 - var(--portal-progress) * 2.2));
  text-align: center;
  transform: translateX(-50%) translateY(calc(var(--portal-progress) * -44px));
  opacity: clamp(0, calc(1 - var(--portal-progress) * 2.2), 1);
  pointer-events: none;
}

.portal-kicker {
  margin: 0 0 12px;
  color: #b7d4c2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.portal-paper-meta h1 {
  max-width: 1140px;
  margin: 0 auto;
  color: #f8fffa;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(23px, 2.55vw, 38px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.portal-paper-meta h1 span {
  color: var(--mint);
  font-weight: 700;
  white-space: nowrap;
}

.portal-authors {
  margin: 15px auto 0;
  color: #e8f5ec;
  font-size: clamp(11px, 1.15vw, 14px);
  font-weight: 650;
  line-height: 1.5;
}

.portal-authors sup,
.portal-affiliations sup {
  color: var(--yellow);
  font-size: .72em;
  font-weight: 800;
}

.portal-affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  max-width: 1160px;
  margin: 7px auto 0;
  color: #9fb3a7;
  font-size: clamp(8px, .78vw, 10px);
  line-height: 1.35;
}

.glasses-stage {
  position: absolute;
  z-index: 2;
  top: 62%;
  left: 50%;
  display: grid;
  grid-template-columns: minmax(300px, 480px) 58px minmax(300px, 480px);
  align-items: center;
  width: min(1020px, 88vw);
  transform: translate(-50%, -50%) scale(calc(.64 + var(--portal-progress) * .88));
  transform-origin: center center;
  will-change: transform, opacity;
}

.lens {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 6px solid rgba(183, 255, 212, .94);
  border-radius: 50%;
  background: #0b1517;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .08),
    inset 0 -40px 80px rgba(4, 8, 10, .5),
    0 0 50px rgba(143, 255, 192, .16);
}

.lens-left {
  border-color: rgba(105, 221, 244, .96);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .08),
    inset 0 -40px 80px rgba(4, 8, 10, .5),
    0 0 54px rgba(105, 221, 244, .2);
}

.lens-right {
  border-color: rgba(183, 255, 184, .96);
}

.lens::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .16), transparent 26%, transparent 72%, rgba(105, 221, 244, .12)),
    linear-gradient(0deg, rgba(4, 9, 12, .5), transparent 50%);
  content: "";
  pointer-events: none;
}

.lens-media {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.05) contrast(1.03) brightness(.72);
  transform: scale(calc(1.12 - var(--portal-progress) * .08));
  transition: filter .4s ease;
}

.lens-media-left {
  background-image:
    linear-gradient(90deg, rgba(5, 12, 15, .1), rgba(5, 12, 15, .42)),
    url("figure1-left.jpg");
}

.lens-right {
  background-image:
    linear-gradient(135deg, rgba(6, 19, 18, .45), rgba(5, 9, 14, .9)),
    url("figure1-right.jpg");
  background-position: center;
  background-size: cover;
}

.lens-right::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: rgba(3, 10, 12, .46);
  content: "";
}

.bridge {
  position: relative;
  z-index: 4;
  height: 58px;
  margin: 0 -7px;
  border-top: 7px solid rgba(183, 255, 212, .92);
  border-radius: 50% 50% 0 0;
  transform: translateY(16px);
}

.bridge::after {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 24px var(--yellow);
  content: "";
  transform: translateX(-50%);
}

.glasses-arm {
  position: absolute;
  z-index: -1;
  top: 34%;
  width: 18vw;
  height: 8px;
  background: linear-gradient(90deg, transparent, rgba(183, 255, 212, .76));
}

.arm-left {
  right: 100%;
}

.arm-right {
  left: 100%;
  transform: scaleX(-1);
}

.lens-hud {
  position: absolute;
  z-index: 3;
  top: 20px;
  right: 24px;
  left: 24px;
  display: flex;
  justify-content: space-between;
  color: rgba(232, 255, 239, .92);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(8px, 1vw, 12px);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hud-rec,
.hud-mode {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hud-rec i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 12px var(--coral);
}

.object-target {
  position: absolute;
  z-index: 3;
  width: 72px;
  height: 52px;
  border: 1px solid var(--mint);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(143, 255, 192, .18), inset 0 0 14px rgba(143, 255, 192, .08);
}

.object-target::before,
.object-target::after {
  position: absolute;
  width: 11px;
  height: 11px;
  border-color: var(--yellow);
  content: "";
}

.object-target::before {
  top: -3px;
  left: -3px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.object-target::after {
  right: -3px;
  bottom: -3px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.object-target span {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 5px;
  padding: 2px 7px;
  color: #082014;
  background: var(--mint);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.target-bag {
  top: 44%;
  left: 36%;
}

.target-table {
  right: 16%;
  bottom: 22%;
  width: 98px;
  border-color: var(--cyan);
}

.target-table span {
  background: var(--cyan);
}

.lens-caption {
  position: absolute;
  z-index: 4;
  right: 10%;
  bottom: 25px;
  left: 20%;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(15px, 1.7vw, 23px);
  font-weight: 600;
  line-height: 1.15;
  text-shadow: 0 2px 18px #000;
}

.lens-caption small {
  display: block;
  margin-bottom: 6px;
  color: var(--yellow);
  font-family: Inter, sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.lens-grid {
  position: absolute;
  z-index: 1;
  inset: 0;
  background-image:
    linear-gradient(rgba(143, 255, 192, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 255, 192, .07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 45%, #000, transparent 82%);
}

.mini-graph {
  position: absolute;
  z-index: 2;
  inset: 12% 10% 18%;
}

.graph-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 54px;
  aspect-ratio: 1;
  border: 3px solid rgba(255, 255, 255, .82);
  border-radius: 50%;
  box-shadow: 0 0 22px currentColor;
}

.graph-node b {
  position: absolute;
  top: calc(100% + 6px);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-shadow: 0 2px 6px #000;
}

.graph-node.dynamic {
  color: var(--coral);
  background: var(--coral);
}

.graph-node.anchor {
  color: var(--lime);
  background: var(--lime);
}

.graph-node.evidence {
  color: var(--cyan);
  background: var(--cyan);
}

.n-bag { top: 49%; left: 12%; }
.n-table { top: 40%; left: 60%; width: 62px; }
.n-fridge { top: 68%; left: 78%; width: 38px; }
.n-veg { top: 14%; left: 77%; width: 36px; }

.edge {
  position: absolute;
  z-index: -1;
  height: 2px;
  background: rgba(205, 234, 216, .7);
  transform-origin: left center;
}

.e1 { top: 62%; left: 23%; width: 42%; transform: rotate(-7deg); }
.e2 { top: 52%; left: 67%; width: 26%; transform: rotate(-51deg); }
.e3 { top: 56%; left: 67%; width: 24%; transform: rotate(37deg); }
.e4 { top: 29%; left: 30%; width: 40%; transform: rotate(23deg); opacity: .35; }

.distance-label {
  position: absolute;
  top: 51%;
  left: 38%;
  padding: 4px 9px;
  color: #07100d;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 6px;
  background: var(--yellow);
  font-size: 10px;
  font-weight: 800;
}

.portal-copy {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: min(900px, 86vw);
  text-align: center;
  transform: translate(-50%, calc(-50% + (1 - var(--portal-progress)) * 130px)) scale(calc(.86 + var(--portal-progress) * .14));
  opacity: clamp(0, calc((var(--portal-progress) - .32) * 2.6), 1);
  pointer-events: none;
}

.portal-label {
  margin: 0 0 4px;
  color: var(--mint);
  font-size: clamp(11px, 1.4vw, 15px);
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.portal-mark {
  margin: 0;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(76px, 16vw, 210px);
  font-weight: 700;
  letter-spacing: -.09em;
  line-height: .82;
  text-shadow: 0 0 70px rgba(143, 255, 192, .2);
}

.portal-subtitle {
  width: min(680px, 100%);
  margin: 24px auto 0;
  color: #d8e5dc;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(17px, 2.4vw, 30px);
  line-height: 1.25;
}

.portal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  pointer-events: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #06100b;
  border-color: var(--mint);
  background: var(--mint);
}

.button-primary:hover {
  background: #bdffd6;
}

.button-ghost {
  color: #e8f3ec;
  background: rgba(10, 18, 20, .66);
  backdrop-filter: blur(12px);
}

.button-ghost:hover {
  border-color: rgba(255, 255, 255, .4);
  background: rgba(18, 29, 31, .82);
}

.button-muted {
  color: #829089;
  cursor: default;
}

.button-muted:hover {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(10, 18, 20, .66);
  transform: none;
}

.enter-cue {
  position: absolute;
  z-index: 6;
  bottom: max(34px, env(safe-area-inset-bottom));
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 0;
  color: rgba(224, 238, 229, calc(1 - var(--portal-progress) * 1.45));
  border: 0;
  background: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  transform: translateX(-50%);
  cursor: pointer;
}

.enter-cue i {
  display: block;
  width: 22px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
}

.enter-cue i::after {
  display: block;
  width: 3px;
  height: 7px;
  margin: 7px auto;
  border-radius: 3px;
  background: var(--mint);
  animation: scrollCue 1.8s ease infinite;
  content: "";
}

@keyframes scrollCue {
  0%, 100% { transform: translateY(0); opacity: .3; }
  50% { transform: translateY(12px); opacity: 1; }
}

.chapter {
  position: relative;
  padding: clamp(100px, 13vw, 180px) max(24px, calc((100vw - var(--max)) / 2));
}

.chapter-light {
  color: var(--ink);
  background: var(--paper);
}

.chapter-dark,
.graph-chapter,
.results-chapter,
.demo-chapter,
.paper-chapter,
.query-chapter {
  background: var(--night);
}

.chapter-dark {
  background:
    radial-gradient(circle at 80% 38%, rgba(143, 255, 192, .08), transparent 30%),
    linear-gradient(180deg, #07100e, #05080d);
}

.chapter-index {
  position: absolute;
  top: 42px;
  left: max(24px, calc((100vw - var(--max)) / 2));
  display: flex;
  align-items: center;
  gap: 12px;
  color: currentColor;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  opacity: .45;
}

.chapter-index::before {
  width: 36px;
  height: 1px;
  background: currentColor;
  content: "";
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(430px, 1.08fr);
  align-items: center;
  gap: clamp(56px, 8vw, 110px);
}

.chapter-copy h2,
.section-heading h2,
.paper-copy h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(42px, 6vw, 82px);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: 1.02;
}

.chapter-copy h2 em {
  color: #257651;
  font-style: normal;
}

.eyebrow {
  margin: 0 0 20px;
  color: #2a7c59;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.chapter-dark .eyebrow,
.graph-chapter .eyebrow,
.results-chapter .eyebrow,
.demo-chapter .eyebrow,
.paper-chapter .eyebrow,
.query-chapter .eyebrow {
  color: var(--mint);
}

.lede {
  margin-top: 32px;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.52;
}

.chapter-copy > p:last-child {
  color: #50605a;
}

.memory-gap-visual {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  border: 1px solid rgba(6, 34, 21, .14);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(19, 84, 56, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 84, 56, .04) 1px, transparent 1px),
    #e9efea;
  background-size: 32px 32px;
  box-shadow: 0 24px 70px rgba(23, 58, 41, .1);
}

.caption-cloud {
  position: absolute;
  inset: 0;
  filter: blur(calc(var(--reveal-progress, .6) * 2px));
  opacity: .28;
}

.caption-cloud span {
  position: absolute;
  top: var(--y);
  left: var(--x);
  padding: 6px 10px;
  border: 1px solid rgba(8, 36, 23, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .55);
  color: #75827c;
  font-size: 12px;
  animation: captionDrift 5s ease-in-out var(--d) infinite alternate;
}

@keyframes captionDrift {
  to { transform: translate(12px, -8px); opacity: .35; }
}

.identity-spine {
  position: absolute;
  top: 55px;
  bottom: 78px;
  left: 50%;
  display: grid;
  grid-template-columns: 98px 170px;
  grid-template-rows: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 0 24px;
  transform: translateX(-45%);
}

.spine-time {
  grid-column: 1;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 7px;
  color: #596861;
}

.spine-time span {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.spine-time b {
  font-size: 11px;
}

.spine-state {
  grid-column: 2;
  display: grid;
  grid-template-columns: 18px 1fr;
  padding: 18px 20px;
  border: 1px solid rgba(10, 54, 33, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .75);
  box-shadow: 0 12px 34px rgba(30, 72, 50, .08);
}

.spine-state .dot {
  grid-row: span 2;
  align-self: center;
}

.spine-state strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
}

.spine-state small {
  color: #567064;
}

.spine-line {
  grid-column: 2;
  justify-self: start;
  width: 2px;
  height: calc(100% - 8px);
  margin-left: 28px;
  background: linear-gradient(var(--coral), var(--yellow), #38ad75);
}

.memory-principle {
  position: absolute;
  right: 26px;
  bottom: 24px;
  left: 26px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.memory-principle span {
  flex: 1;
  padding: 8px;
  color: #245b43;
  border: 1px solid rgba(30, 93, 64, .16);
  border-radius: 999px;
  background: rgba(143, 255, 192, .24);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.metric-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(70px, 8vw, 110px);
  border-top: 1px solid rgba(10, 41, 26, .15);
  border-bottom: 1px solid rgba(10, 41, 26, .15);
}

.metric-ribbon > div {
  padding: 28px clamp(10px, 2.5vw, 30px);
  border-left: 1px solid rgba(10, 41, 26, .15);
}

.metric-ribbon > div:first-child {
  border-left: 0;
}

.metric-ribbon strong,
.scope-strip strong {
  display: block;
  color: #176843;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -.04em;
}

.metric-ribbon span,
.scope-strip span {
  display: block;
  color: #66736d;
  font-size: 11px;
  line-height: 1.4;
}

.protocol-note,
.figure-note,
.case-note {
  margin: 18px 0 0;
  color: #66736d;
  font-size: 11px;
}

.section-heading {
  max-width: 760px;
}

.section-heading.wide {
  max-width: 980px;
}

.section-heading > p:last-child {
  max-width: 720px;
  margin-top: 24px;
  color: #9daba4;
  font-size: 18px;
}

.pipeline-shell {
  margin-top: 76px;
}

.pipeline-rail {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(12, 20, 22, .72);
  backdrop-filter: blur(12px);
}

.pipeline-tab {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}

.pipeline-tab:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .04);
}

.pipeline-tab.active {
  border-color: rgba(143, 255, 192, .42);
  background: linear-gradient(135deg, rgba(143, 255, 192, .17), rgba(105, 221, 244, .05));
}

.pipeline-tab b {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  color: #06100a;
  border-radius: 50%;
  background: #fff;
  font-size: 11px;
}

.pipeline-tab.active b {
  background: var(--mint);
}

.pipeline-tab span {
  color: #a8b4ae;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.pipeline-tab.active span {
  color: #effaf3;
}

.pipeline-stage {
  display: grid;
  grid-template-columns: minmax(260px, .7fr) minmax(420px, 1.3fr);
  min-height: 460px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 78% 35%, rgba(143, 255, 192, .1), transparent 32%),
    rgba(8, 15, 18, .88);
  box-shadow: var(--shadow);
}

.stage-copy {
  padding: clamp(34px, 5vw, 64px);
  border-right: 1px solid var(--line);
}

.stage-number {
  color: var(--mint);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.stage-kicker {
  margin: 44px 0 9px;
  color: #89978f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.stage-copy h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(34px, 4vw, 56px);
  letter-spacing: -.05em;
  line-height: 1;
}

.stage-copy > p:last-of-type {
  margin-top: 20px;
  color: #b6c2bc;
}

.stage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.stage-tags span {
  padding: 7px 10px;
  color: #dff7e8;
  border: 1px solid rgba(143, 255, 192, .28);
  border-radius: 8px;
  background: rgba(143, 255, 192, .07);
  font-size: 10px;
  font-weight: 700;
}

.stage-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 460px;
  padding: clamp(24px, 4vw, 54px);
  overflow: hidden;
}

.stage-visual::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(143, 255, 192, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 255, 192, .035) 1px, transparent 1px);
  background-size: 30px 30px;
  content: "";
  mask-image: radial-gradient(circle, #000 15%, transparent 76%);
}

.episode-flow,
.mask-flow,
.stage-memory,
.stage-query {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
}

.video-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 38px;
}

.video-frame {
  position: relative;
  aspect-ratio: 1.3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(105, 221, 244, .3), rgba(255, 231, 106, .13));
}

.video-frame::after {
  position: absolute;
  right: 18%;
  bottom: 13%;
  width: 35%;
  height: 36%;
  border: 1px solid var(--yellow);
  content: "";
}

.episode-window,
.memory-entry {
  padding: 20px;
  border: 1px solid rgba(143, 255, 192, .35);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(143, 255, 192, .12), rgba(105, 221, 244, .04));
}

.episode-window small,
.memory-entry small {
  color: var(--mint);
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.episode-window strong {
  display: block;
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 27px;
}

.episode-prompt {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.episode-prompt span,
.mask-label {
  padding: 5px 9px;
  color: var(--ink);
  border-radius: 7px;
  background: var(--yellow);
  font-size: 10px;
  font-weight: 800;
}

.mask-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.mask-object {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
}

.mask-object i {
  width: 46%;
  aspect-ratio: 1;
  border: 3px solid currentColor;
  border-radius: 44% 48% 32% 38%;
  background: color-mix(in srgb, currentColor 20%, transparent);
}

.mask-object b {
  margin-top: -14px;
  font-size: 10px;
}

.mask-object:nth-child(1) { color: var(--coral); }
.mask-object:nth-child(2) { color: var(--lime); }
.mask-object:nth-child(3) { color: var(--yellow); }
.mask-object:nth-child(4) { color: var(--mint); }
.mask-object:nth-child(5) { color: var(--cyan); }

.propagation-line {
  position: relative;
  height: 2px;
  margin: 46px 10% 0;
  background: linear-gradient(90deg, var(--coral), var(--lime), var(--yellow), var(--mint), var(--cyan));
}

.propagation-line::after {
  position: absolute;
  top: -5px;
  right: 0;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--cyan);
  content: "";
}

.pipeline-graph {
  position: relative;
  z-index: 1;
  width: min(100%, 600px);
  height: 320px;
}

.pipeline-graph .pnode {
  position: absolute;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 4px solid rgba(255, 255, 255, .82);
  border-radius: 50%;
  color: #07100d;
  font-size: 11px;
  font-weight: 800;
}

.pipeline-graph .pnode.bag { top: 130px; left: 8%; background: var(--coral); }
.pipeline-graph .pnode.table { top: 106px; left: 60%; width: 88px; height: 88px; background: var(--lime); }
.pipeline-graph .pnode.fridge { top: 226px; left: 82%; width: 55px; height: 55px; background: var(--yellow); }
.pipeline-graph .pnode.veg { top: 26px; left: 82%; width: 55px; height: 55px; background: var(--mint); }

.pedge {
  position: absolute;
  height: 2px;
  background: rgba(218, 239, 225, .72);
  transform-origin: left center;
}

.pedge.one { top: 167px; left: 19%; width: 44%; transform: rotate(-5deg); }
.pedge.two { top: 138px; left: 72%; width: 21%; transform: rotate(-46deg); }
.pedge.three { top: 166px; left: 72%; width: 24%; transform: rotate(37deg); }

.pipeline-distance {
  position: absolute;
  z-index: 2;
  top: 142px;
  left: 39%;
  padding: 6px 12px;
  color: var(--ink);
  border-radius: 7px;
  background: var(--yellow);
  font-size: 11px;
  font-weight: 900;
}

.stage-memory {
  display: grid;
  gap: 12px;
}

.memory-transition {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 22px;
  border: 1px solid rgba(255, 231, 106, .35);
  border-radius: 18px;
  background: rgba(255, 231, 106, .07);
}

.memory-transition span {
  padding: 10px 14px;
  color: var(--ink);
  border-radius: 10px;
  background: var(--yellow);
  font-weight: 800;
}

.memory-entry {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px 14px;
}

.memory-entry b {
  color: var(--mint);
  font-size: 11px;
}

.memory-entry span {
  color: #e6f0e9;
  font-size: 13px;
}

.stage-query {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.stage-query .qbox {
  min-height: 130px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 16px;
  background: rgba(255, 255, 255, .05);
}

.stage-query .qbox strong {
  display: block;
  margin-bottom: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  line-height: 1.2;
}

.stage-query .qbox small {
  color: #9baba2;
}

.stage-query .qbox.answer {
  color: var(--ink);
  border-color: var(--mint);
  background: var(--mint);
}

.relative-callout {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 900px;
  min-height: 160px;
  margin: 80px auto 0;
  padding: 34px clamp(28px, 5vw, 60px) 34px 150px;
  overflow: hidden;
  border: 1px solid rgba(143, 255, 192, .25);
  border-radius: 999px;
  background: rgba(143, 255, 192, .06);
}

.relative-callout p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #afbbb5;
}

.relative-callout strong {
  color: var(--mint);
}

.callout-orbit {
  position: absolute;
  left: 38px;
  width: 78px;
  aspect-ratio: 1;
  border: 1px solid var(--mint);
  border-radius: 50%;
}

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

.callout-orbit::before {
  inset: 25px;
  background: var(--coral);
  box-shadow: 0 0 20px var(--coral);
}

.callout-orbit::after {
  top: 7px;
  left: 50%;
  width: 9px;
  height: 9px;
  background: var(--yellow);
  box-shadow: 0 0 14px var(--yellow);
  transform: translateX(-50%);
  transform-origin: 4px 32px;
  animation: orbit 5s linear infinite;
}

@keyframes orbit {
  to { transform: translateX(-50%) rotate(360deg); }
}

.graph-chapter {
  background:
    radial-gradient(circle at 52% 45%, rgba(105, 221, 244, .08), transparent 37%),
    #05080d;
}

.graph-console {
  margin-top: 72px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(8, 15, 18, .9);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .38);
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  color: #b6c3bc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 14px var(--mint);
}

.console-legend {
  display: flex;
  gap: 18px;
}

.console-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot.dynamic { background: var(--coral); }
.dot.anchor { background: var(--lime); }
.dot.evidence { background: var(--cyan); }

.graph-layout {
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(420px, 1.5fr) minmax(230px, .8fr);
  min-height: 560px;
}

.scene-readout,
.memory-document {
  padding: clamp(28px, 4vw, 48px);
  background: rgba(255, 255, 255, .018);
}

.scene-readout {
  border-right: 1px solid var(--line);
}

.scene-time {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.scene-time span {
  color: var(--mint);
  font-family: "Space Grotesk", sans-serif;
  font-size: 34px;
  font-weight: 700;
}

.scene-time strong {
  color: #9dafb8;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
}

.scene-space {
  margin: 28px 0 3px;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}

.scene-activity {
  margin: 0;
  color: #8fa099;
  font-size: 12px;
}

.scene-fields {
  margin-top: 38px;
}

.scene-fields div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.scene-fields dt {
  color: #708078;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.scene-fields dd {
  margin: 0;
  color: #dfe9e3;
  font-size: 12px;
}

.canvas-frame {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(143, 255, 192, .08), transparent 45%),
    linear-gradient(rgba(143, 255, 192, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 255, 192, .025) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  cursor: grab;
  touch-action: none;
}

.canvas-frame:active {
  cursor: grabbing;
}

#graphCanvas:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: -5px;
}

#graphCanvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
}

.canvas-hint {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 6px 9px;
  color: #6e7d76;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 7px;
  background: rgba(5, 9, 12, .62);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.memory-document {
  border-left: 1px solid var(--line);
}

.doc-head {
  display: flex;
  justify-content: space-between;
  color: #718079;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.doc-head span {
  color: var(--mint);
}

.memory-document h3 {
  margin: 28px 0;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 25px;
  letter-spacing: -.03em;
  line-height: 1.15;
}

.doc-section {
  margin-top: 24px;
}

.doc-section small {
  color: #6f7e77;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.doc-section p {
  margin: 6px 0 0;
  color: #c5d2cb;
  font-size: 12px;
}

.doc-tokens {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 34px;
  margin-top: 38px;
}

.doc-tokens i {
  width: 4px;
  height: var(--h);
  border-radius: 3px;
  background: linear-gradient(var(--yellow), var(--mint));
  opacity: .72;
}

.time-control {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 34px clamp(20px, 7vw, 100px) 26px;
  border-top: 1px solid var(--line);
}

.time-track {
  position: absolute;
  top: 49px;
  right: calc(clamp(20px, 7vw, 100px) + 16.66%);
  left: calc(clamp(20px, 7vw, 100px) + 16.66%);
  height: 2px;
  background: rgba(255, 255, 255, .13);
}

.time-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--yellow), var(--lime));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .45s ease;
}

.time-stop {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.time-stop::before {
  width: 22px;
  height: 22px;
  margin-bottom: 8px;
  border: 5px solid #0b1214;
  border-radius: 50%;
  background: #40504a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
  content: "";
  transition: background .25s ease, box-shadow .25s ease;
}

.time-stop.active::before {
  background: var(--coral);
  box-shadow: 0 0 0 1px var(--coral), 0 0 20px rgba(255, 119, 110, .55);
}

.time-stop:nth-of-type(2).active::before { background: var(--yellow); box-shadow: 0 0 0 1px var(--yellow), 0 0 20px rgba(255, 231, 106, .45); }
.time-stop:nth-of-type(3).active::before { background: var(--lime); box-shadow: 0 0 0 1px var(--lime), 0 0 20px rgba(185, 255, 87, .45); }

.time-stop b {
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
}

.time-stop span {
  color: var(--mint);
  font-size: 11px;
  font-weight: 700;
}

.time-stop small {
  color: #72817a;
  font-size: 9px;
}

.query-chapter {
  background:
    linear-gradient(180deg, #05080d, #08100f),
    #05080d;
}

.query-grid {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  align-items: center;
  gap: clamp(50px, 8vw, 110px);
}

.query-types {
  display: flex;
  gap: 8px;
  margin-top: 38px;
}

.query-type,
.result-tab,
.case-filter {
  min-height: 44px;
  padding: 9px 13px;
  color: #9caaa3;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.query-type small {
  display: block;
  margin-top: -2px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .04em;
  opacity: .68;
}

.query-type:hover,
.result-tab:hover,
.case-filter:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .3);
}

.query-type.active,
.result-tab.active,
.case-filter.active {
  color: var(--ink);
  border-color: var(--mint);
  background: var(--mint);
}

.retrieval-terminal {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #081013;
  box-shadow: var(--shadow);
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.terminal-top > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #50605a;
}

.terminal-top > span:first-child { background: var(--coral); }
.terminal-top > span:nth-child(2) { background: var(--yellow); }
.terminal-top > span:nth-child(3) { background: var(--mint); }

.terminal-top b {
  margin-left: auto;
  color: #7f8f87;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.terminal-question {
  padding: 34px clamp(24px, 5vw, 54px);
  border-bottom: 1px solid var(--line);
}

.terminal-question small {
  color: var(--mint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.terminal-question p {
  margin: 7px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1.25;
}

.terminal-flow {
  display: grid;
  grid-template-columns: 1fr 42px 1fr 42px 1fr;
  align-items: center;
  gap: 7px;
  padding: 38px 24px;
}

.flow-node {
  min-height: 148px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 16px;
  background: rgba(255, 255, 255, .03);
  transition: border-color .35s ease, background .35s ease, transform .35s ease;
}

.flow-node.active,
.retrieval-terminal.running .flow-node {
  border-color: rgba(105, 221, 244, .45);
  background: rgba(105, 221, 244, .07);
}

.retrieval-terminal.running .flow-node:nth-of-type(3) { transition-delay: .35s; }
.retrieval-terminal.running .answer-node { transition-delay: .7s; border-color: rgba(143, 255, 192, .55); background: rgba(143, 255, 192, .12); }

.flow-node b {
  display: block;
  color: var(--mint);
  font-size: 10px;
}

.flow-node span {
  display: block;
  margin-top: 16px;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.flow-node small {
  display: block;
  margin-top: 8px;
  color: #829089;
  font-size: 10px;
  line-height: 1.4;
}

.flow-link {
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, .15);
}

.flow-link i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--mint));
  transform: translateX(-100%);
}

.retrieval-terminal.running .flow-link i {
  animation: flowSweep .8s ease forwards;
}

.retrieval-terminal.running .flow-link:nth-of-type(4) i {
  animation-delay: .4s;
}

@keyframes flowSweep { to { transform: translateX(0); } }

.run-query {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 48px);
  min-height: 48px;
  margin: 0 24px 24px;
  padding: 0 18px;
  color: var(--ink);
  border: 0;
  border-radius: 12px;
  background: var(--mint);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.run-query i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

.results-chapter {
  background:
    radial-gradient(circle at 7% 45%, rgba(255, 231, 106, .07), transparent 28%),
    var(--night-2);
}

.result-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 68px;
}

.result-highlight-grid article {
  position: relative;
  min-height: 260px;
  padding: clamp(28px, 4vw, 46px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .025);
}

.result-highlight-grid article::after {
  position: absolute;
  right: -45px;
  bottom: -72px;
  width: 180px;
  aspect-ratio: 1;
  border: 1px solid rgba(143, 255, 192, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(143, 255, 192, .025), 0 0 0 50px rgba(143, 255, 192, .015);
  content: "";
}

.result-highlight-grid small {
  color: #76857e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.result-highlight-grid strong {
  display: block;
  margin: 18px 0 4px;
  color: var(--mint);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(50px, 7vw, 82px);
  letter-spacing: -.07em;
  line-height: 1;
}

.result-highlight-grid article:nth-child(2) strong { color: var(--yellow); }
.result-highlight-grid article:nth-child(3) strong { color: var(--cyan); }

.result-highlight-grid p {
  margin: 0;
  color: #fff;
  font-weight: 700;
}

.result-highlight-grid span {
  display: block;
  margin-top: 12px;
  color: #7f8e86;
  font-size: 11px;
}

.results-console {
  margin-top: 18px;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .025);
}

.result-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chart {
  display: grid;
  gap: 24px;
  margin-top: 42px;
}

.chart-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 20px;
}

.chart-label strong {
  display: block;
  color: #eef5f0;
  font-size: 12px;
}

.chart-label small {
  color: #77867e;
  font-size: 9px;
}

.bar-pair {
  display: grid;
  gap: 7px;
}

.bar-line {
  display: grid;
  grid-template-columns: 42px 1fr 45px;
  align-items: center;
  gap: 10px;
}

.bar-line > span {
  color: #718078;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
}

.bar-track i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #45a778, var(--mint));
  transform: scaleX(0);
  transform-origin: left;
  animation: chartGrow .8s cubic-bezier(.2, .8, .2, 1) forwards;
}

.bar-line.when .bar-track i {
  background: linear-gradient(90deg, #e6bd3a, var(--yellow));
}

.bar-line b {
  color: #dce8e1;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  text-align: right;
}

@keyframes chartGrow { to { transform: scaleX(1); } }

.chart-note {
  margin: 36px 0 0;
  color: #7d8b84;
  font-size: 10px;
}

.scope-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--line);
}

.scope-strip > div {
  padding: 24px;
  background: #0c1417;
}

.scope-strip strong {
  color: var(--mint);
  font-size: 28px;
}

.scope-strip span {
  color: #738179;
}

.demo-chapter {
  background:
    radial-gradient(circle at 80% 26%, rgba(255, 119, 110, .07), transparent 26%),
    #05080d;
}

.demo-theater {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr);
  gap: 14px;
  margin-top: 70px;
}

.video-shell,
.case-inspector {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #0a1114;
}

.video-shell {
  align-self: start;
}

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  color: #84938b;
  font-size: 10px;
}

.case-inspector {
  padding: clamp(26px, 4vw, 40px);
}

.inspector-head {
  display: flex;
  justify-content: space-between;
  color: var(--mint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}

.case-inspector h3 {
  margin: 24px 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -.04em;
  line-height: 1.18;
}

.answer-chip {
  padding: 16px;
  color: var(--ink);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--yellow), var(--mint));
}

.answer-chip small {
  display: block;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
}

.answer-chip strong {
  display: block;
  margin-top: 5px;
  line-height: 1.28;
}

.case-inspector dl {
  margin-top: 24px;
}

.case-inspector dl > div {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.case-inspector dt {
  color: #718078;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.case-inspector dd {
  margin: 0;
  color: #c6d2cb;
  font-size: 11px;
}

.prediction-list {
  display: grid;
  gap: 6px;
  margin-top: 22px;
}

.prediction-list div {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .035);
  font-size: 9px;
}

.prediction-list b {
  color: #87968e;
}

.prediction-list span {
  color: #cbd6d0;
}

.case-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.case-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: rgba(255, 255, 255, .025);
  text-align: left;
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}

.case-card:hover,
.case-card.active {
  border-color: rgba(143, 255, 192, .48);
  background: rgba(143, 255, 192, .055);
  transform: translateY(-4px);
}

.case-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  object-fit: cover;
}

.case-card-copy {
  padding: 13px;
}

.case-card small {
  color: var(--mint);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.case-card strong {
  display: -webkit-box;
  min-height: 36px;
  margin-top: 6px;
  overflow: hidden;
  color: #dbe6df;
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.case-card span {
  display: block;
  margin-top: 10px;
  color: #68776f;
  font-size: 10px;
}

.case-note {
  color: #748179;
}

.paper-chapter {
  background:
    radial-gradient(circle at 15% 34%, rgba(143, 255, 192, .09), transparent 32%),
    linear-gradient(180deg, #05080d, #07100e);
}

.paper-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: start;
  gap: clamp(50px, 8vw, 110px);
}

.paper-copy > p:not(.eyebrow) {
  max-width: 680px;
  margin-top: 28px;
  color: #9caaa3;
  font-size: 18px;
}

.paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.authors-block {
  max-width: 720px;
  margin-top: 54px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.authors-block p {
  margin: 0;
  color: #e8f2ec;
  font-size: 13px;
  line-height: 1.8;
}

.authors-block sup {
  color: var(--yellow);
  font-size: .72em;
  font-weight: 800;
}

.authors-block small {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  color: #718079;
  line-height: 1.6;
}

.scope-card {
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid rgba(255, 231, 106, .3);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 231, 106, .09), rgba(143, 255, 192, .035));
}

.scope-label {
  color: var(--yellow);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.scope-card h3 {
  margin: 18px 0 20px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 27px;
  line-height: 1.2;
}

.scope-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.scope-card li {
  position: relative;
  padding: 12px 0 12px 22px;
  color: #a7b4ad;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 12px;
}

.scope-card li::before {
  position: absolute;
  top: 20px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  content: "";
}

.citation-card {
  margin-top: 90px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #07100e;
}

.citation-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--mint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.citation-card button {
  min-height: 44px;
  padding: 7px 10px;
  color: #dfe9e3;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  font-size: 9px;
  cursor: pointer;
}

.citation-card pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  color: #b5c5bc;
  font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}

footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 50px max(24px, calc((100vw - var(--max)) / 2)) 34px;
  color: #738179;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: #030608;
}

footer p {
  margin: 0;
  font-size: 11px;
}

.footer-links {
  display: flex;
  gap: 18px;
  font-size: 10px;
  font-weight: 700;
}

.footer-links a:hover {
  color: #fff;
}

footer small {
  grid-column: 1 / -1;
  max-width: 900px;
  color: #7f8c85;
  font-size: 10px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s ease, transform .75s cubic-bezier(.2, .8, .2, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .glasses-stage {
    grid-template-columns: minmax(260px, 1fr) 48px minmax(260px, 1fr);
  }

  .pipeline-tab span {
    display: none;
  }

  .pipeline-tab {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .graph-layout {
    grid-template-columns: 210px 1fr;
  }

  .memory-document {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 34px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .memory-document .doc-head,
  .memory-document h3,
  .memory-document .doc-tokens {
    grid-column: 1 / -1;
  }

  .case-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 840px) {
  .portal {
    height: 210vh;
    min-height: 1200px;
  }

  .portal-sticky {
    min-height: 620px;
  }

  .glasses-stage {
    top: 60%;
    grid-template-columns: minmax(220px, 1fr) 34px minmax(220px, 1fr);
    width: 112vw;
  }

  .bridge {
    height: 50px;
  }

  .portal-mark {
    font-size: clamp(72px, 22vw, 150px);
  }

  .overview-grid,
  .query-grid,
  .paper-grid,
  .demo-theater {
    grid-template-columns: 1fr;
  }

  .memory-gap-visual {
    min-height: 500px;
  }

  .metric-ribbon,
  .scope-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-ribbon > div:nth-child(3),
  .scope-strip > div:nth-child(3) {
    border-left: 0;
  }

  .pipeline-stage {
    grid-template-columns: 1fr;
  }

  .stage-copy {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .result-highlight-grid {
    grid-template-columns: 1fr;
  }

  .result-highlight-grid article {
    min-height: 210px;
  }

  .chart-row {
    grid-template-columns: 130px 1fr;
  }
}

@media (max-width: 620px) {
  .topbar {
    grid-template-columns: 1fr auto;
    width: calc(100% - 20px);
    min-height: 52px;
    padding-left: 14px;
  }

  .topbar nav {
    display: none;
  }

  .topbar-paper {
    padding: 8px 12px;
  }

  .portal {
    height: 185vh;
    min-height: 1050px;
  }

  .portal-sticky {
    min-height: 600px;
  }

  .portal-paper-meta {
    top: 64px;
    width: 92vw;
  }

  .portal-kicker {
    margin-bottom: 8px;
    font-size: 9px;
  }

  .portal-paper-meta h1 {
    font-size: clamp(19px, 5.6vw, 26px);
  }

  .portal-authors {
    margin-top: 10px;
    font-size: 10px;
  }

  .portal-affiliations {
    gap: 2px 10px;
    margin-top: 5px;
    font-size: 7px;
  }

  .glasses-stage {
    top: 61%;
    grid-template-columns: minmax(190px, 1fr) 22px minmax(190px, 1fr);
    width: 138vw;
  }

  .lens {
    border-width: 3px;
  }

  .bridge {
    border-top-width: 5px;
  }

  .lens-hud,
  .object-target,
  .mini-graph {
    transform: scale(.82);
  }

  .lens-hud {
    right: 10px;
    left: 10px;
  }

  .lens-caption {
    right: 10%;
    bottom: 15px;
    left: 20%;
    font-size: 15px;
  }

  .portal-copy {
    top: 53%;
  }

  .portal-mark {
    font-size: 24vw;
  }

  .portal-subtitle {
    font-size: 17px;
  }

  .portal-actions {
    flex-direction: column;
    align-items: stretch;
    width: min(280px, 100%);
    margin-right: auto;
    margin-left: auto;
  }

  .enter-cue span {
    display: none;
  }

  .chapter {
    padding: 100px 18px;
  }

  .chapter-index {
    top: 28px;
    left: 18px;
  }

  .chapter-copy h2,
  .section-heading h2,
  .paper-copy h2 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .lede,
  .section-heading > p:last-child,
  .paper-copy > p:not(.eyebrow) {
    font-size: 16px;
  }

  .memory-gap-visual {
    min-height: 460px;
  }

  .identity-spine {
    left: 46%;
    grid-template-columns: 78px 154px;
    gap: 0 14px;
  }

  .memory-principle {
    flex-wrap: wrap;
  }

  .memory-principle span {
    flex: 1 1 40%;
  }

  .metric-ribbon,
  .scope-strip {
    grid-template-columns: 1fr 1fr;
  }

  .metric-ribbon > div {
    padding: 22px 12px;
  }

  .pipeline-rail {
    gap: 4px;
    padding: 6px;
    border-radius: 18px;
  }

  .pipeline-tab {
    min-height: 56px;
    padding: 7px;
  }

  .pipeline-tab b {
    width: 31px;
  }

  .stage-copy {
    padding: 30px 24px;
  }

  .stage-kicker {
    margin-top: 28px;
  }

  .stage-visual {
    min-height: 390px;
    padding: 24px 16px;
  }

  .video-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .mask-row {
    gap: 5px;
  }

  .pipeline-graph {
    transform: scale(.82);
  }

  .stage-query {
    grid-template-columns: 1fr;
  }

  .stage-query > span {
    transform: rotate(90deg);
    justify-self: center;
  }

  .relative-callout {
    min-height: 0;
    padding: 80px 28px 34px;
    border-radius: 24px;
  }

  .callout-orbit {
    top: 22px;
    left: 28px;
    width: 50px;
  }

  .graph-layout {
    grid-template-columns: 1fr;
  }

  .scene-readout {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .canvas-frame,
  #graphCanvas {
    min-height: 430px;
  }

  .memory-document {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .memory-document .doc-head,
  .memory-document h3,
  .memory-document .doc-tokens {
    grid-column: auto;
  }

  .time-control {
    padding: 28px 4px 22px;
  }

  .time-track {
    top: 43px;
    right: 16.66%;
    left: 16.66%;
  }

  .time-stop small {
    max-width: 100px;
    text-align: center;
  }

  .terminal-flow {
    grid-template-columns: 1fr;
  }

  .flow-link {
    justify-self: center;
    width: 1px;
    height: 24px;
  }

  .flow-link i {
    width: 100%;
    height: 100%;
    transform: translateY(-100%);
  }

  .retrieval-terminal.running .flow-link i {
    animation: flowSweepY .7s ease forwards;
  }

  @keyframes flowSweepY { to { transform: translateY(0); } }

  .flow-node {
    min-height: 118px;
  }

  .chart-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .scope-strip {
    grid-template-columns: 1fr;
  }

  .scope-strip > div {
    padding: 20px;
  }

  .case-inspector dl > div {
    grid-template-columns: 88px 1fr;
  }

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

  .citation-card pre {
    font-size: 9px;
  }

  footer {
    grid-template-columns: 1fr;
    padding-right: 18px;
    padding-left: 18px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 390px) {
  .glasses-stage {
    width: 142vw;
  }

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

  .metric-ribbon {
    grid-template-columns: 1fr;
  }

  .metric-ribbon > div {
    border-left: 0;
    border-top: 1px solid rgba(10, 41, 26, .15);
  }

  .metric-ribbon > div:first-child {
    border-top: 0;
  }
}

@media (pointer: coarse) {
  .canvas-frame {
    cursor: default;
    touch-action: pan-y;
  }

  .canvas-hint {
    display: none;
  }
}

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

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

  .portal {
    height: 120vh;
    min-height: 850px;
  }

  .portal-copy {
    transform: translate(-50%, -18%);
    opacity: 1;
  }

  .glasses-stage {
    transform: translate(-50%, -48%) scale(.7);
  }

  #ambientCanvas {
    opacity: .18;
  }
}
