:root {
  --ink: #eefbff;
  --muted: #9bb9c5;
  --dim: #5e7d89;
  --bg: #02070d;
  --panel: #06121a;
  --panel-2: #091a25;
  --line: rgba(45, 249, 241, 0.2);
  --line-strong: rgba(45, 249, 241, 0.42);
  --cyan: #2df9f1;
  --gold: #ffd84d;
  --coral: #ff4f8b;
  --green: #6cffb0;
  --violet: #9c82ff;
  --academic: "STIX Two Math", "Cambria Math", "Times New Roman", "Noto Serif SC", "Songti SC", serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Noto Serif SC", "Songti SC", serif;
  --sans: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    linear-gradient(rgba(4, 11, 15, 0.95), rgba(4, 11, 15, 0.95)),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(45, 249, 241, 0.035) 39px 40px);
  font-family: var(--sans);
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 8px 12px;
  color: #031012;
  background: var(--cyan);
  transform: translateY(-160%);
}

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

.page-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  min-height: 70px;
  padding: 10px clamp(18px, 4vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(4, 11, 15, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
}

.brand img {
  width: 40px;
  height: 40px;
}

.brand span {
  display: grid;
}

.brand strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 650;
}

.brand small {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 11px;
}

.page-nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.page-nav a,
.header-actions a,
.header-actions button {
  position: relative;
  border: 0;
  color: var(--muted);
  background: none;
  font-size: 13px;
  cursor: pointer;
}

.page-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.page-nav a:hover,
.page-nav a:focus-visible,
.header-actions a:hover,
.header-actions button:hover {
  color: var(--ink);
}

.page-nav a:hover::after,
.page-nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-actions {
  justify-content: flex-end;
}

.header-actions button {
  min-width: 35px;
  min-height: 32px;
  border: 1px solid var(--line-strong);
}

.hero {
  position: relative;
  min-height: calc(100vh - 70px);
  overflow: hidden;
  padding: clamp(30px, 5vw, 72px) clamp(20px, 6vw, 112px) 44px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(45, 249, 241, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 249, 241, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.research-lineage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 72px minmax(220px, 1fr) 72px minmax(220px, 1fr);
  align-items: stretch;
  width: min(1180px, 100%);
  margin: 0 auto clamp(48px, 8vh, 86px);
}

.research-lineage a,
.lineage-current {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 102px;
  padding: 16px 18px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 19, 24, 0.7);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.research-lineage a::before,
.lineage-current::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 32%;
  height: 2px;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(255, 216, 77, 0.4);
}

.research-lineage a:nth-of-type(2)::before {
  background: var(--violet);
  box-shadow: 0 0 14px rgba(156, 130, 255, 0.4);
}

.lineage-current::before {
  width: 100%;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(45, 249, 241, 0.5);
}

.research-lineage a:hover,
.research-lineage a:focus-visible {
  z-index: 2;
  border-color: rgba(45, 249, 241, 0.55);
  background: rgba(10, 27, 32, 0.94);
  transform: translateY(-3px);
}

.research-lineage span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
}

.research-lineage strong {
  align-self: end;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 620;
}

.research-lineage small {
  color: var(--muted);
  font-size: 12px;
}

.research-lineage > i {
  position: relative;
  align-self: center;
  height: 1px;
  overflow: hidden;
  background: var(--line-strong);
}

.research-lineage > i::after {
  content: "";
  position: absolute;
  top: -3px;
  right: 0;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--cyan);
  border-right: 1px solid var(--cyan);
  transform: rotate(45deg);
}

.research-lineage > i b {
  position: absolute;
  top: -2px;
  width: 28px;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: signalTravel 2.5s linear infinite;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1060px, 100%);
  margin: 0 auto;
}

.eyebrow,
.section-heading > div:nth-child(2) > p {
  margin: 0 0 14px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
}

.hero h1 {
  max-width: 980px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 6.2vw, 82px);
  font-weight: 580;
  line-height: 1.07;
}

.hero h1 span {
  display: block;
}

.hero h1 span:last-child {
  color: var(--cyan);
  text-shadow: 0 0 28px rgba(45, 249, 241, 0.16);
}

.hero-copy > p:last-child {
  max-width: 860px;
  margin: 30px 0 0;
  color: #b6c8c6;
  font-size: 17px;
  line-height: 1.9;
}

.hero-facts {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(1060px, 100%);
  margin: clamp(52px, 8vh, 86px) auto 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-facts div {
  display: grid;
  gap: 7px;
  min-height: 92px;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

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

.hero-facts dt {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 25px;
}

.hero-facts dd {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.research-section {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 110px clamp(20px, 5vw, 76px);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 68px minmax(310px, 0.95fr) minmax(340px, 1.25fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 52px;
}

.section-number {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 620;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.model-system {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(7, 19, 24, 0.68);
}

.model-flow {
  display: grid;
  grid-template-columns: minmax(150px, 0.82fr) 70px minmax(185px, 1fr) 70px minmax(230px, 1.2fr) 70px minmax(180px, 1fr);
  align-items: stretch;
  min-height: 230px;
  padding: 30px;
}

.model-node,
.physics-module {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(4, 11, 15, 0.74);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.model-node {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 20px;
}

.model-node:hover,
.model-node:focus-visible,
.model-node.active,
.physics-module:hover,
.physics-module:focus-visible,
.physics-module.active {
  border-color: var(--node-accent, var(--cyan));
  background: rgba(10, 27, 32, 0.95);
  box-shadow: inset 0 0 26px color-mix(in srgb, var(--node-accent, var(--cyan)) 9%, transparent), 0 0 16px color-mix(in srgb, var(--node-accent, var(--cyan)) 10%, transparent);
  transform: translateY(-3px);
}

.model-node.condition { --node-accent: var(--gold); }
.model-node.vae { --node-accent: var(--violet); }
.model-node.dit { --node-accent: var(--cyan); }
.model-node.topology { --node-accent: var(--green); }

.node-code {
  color: var(--node-accent);
  font-family: var(--serif);
  font-size: 21px;
}

.model-node strong,
.physics-module strong {
  font-size: 15px;
}

.model-node small,
.physics-module small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.model-node em,
.model-node b {
  width: max-content;
  margin-top: 4px;
  color: var(--node-accent);
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
}

.dit-stack {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-top: 7px;
}

.dit-stack i {
  height: 14px;
  border: 1px solid rgba(45, 249, 241, 0.38);
  background: linear-gradient(90deg, rgba(45, 249, 241, 0.08), rgba(45, 249, 241, 0.25));
}

.signal-line {
  position: relative;
  align-self: center;
  height: 1px;
  overflow: hidden;
  background: var(--line-strong);
}

.signal-line::after {
  content: "";
  position: absolute;
  top: -3px;
  right: 0;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--cyan);
  border-right: 1px solid var(--cyan);
  transform: rotate(45deg);
}

.signal-line i {
  position: absolute;
  top: -2px;
  width: 28px;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: signalTravel 1.6s linear infinite;
}

.physics-engine {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(210px, 1.1fr) minmax(220px, 1fr);
  gap: 20px;
  align-items: center;
  padding: 30px;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(255, 216, 77, 0.03), rgba(45, 249, 241, 0.04), rgba(255, 79, 139, 0.03));
}

.physics-module {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 100px;
  padding: 16px;
}

.physics-module.theory { --node-accent: var(--gold); }
.physics-module.response { --node-accent: var(--coral); }

.physics-module > span {
  color: var(--node-accent);
  font-family: var(--serif);
  font-size: 28px;
}

.physics-module > div {
  display: grid;
  gap: 6px;
}

.physics-module em {
  color: var(--node-accent);
  font-family: var(--serif);
  font-size: 13px;
  font-style: normal;
}

.model-readout {
  display: grid;
  grid-template-columns: 180px minmax(220px, 0.7fr) 1.3fr;
  gap: 24px;
  align-items: center;
  min-height: 105px;
  padding: 22px 30px;
  border-top: 1px solid var(--line);
}

.model-readout span {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
}

.model-readout strong {
  font-family: var(--serif);
  font-size: 18px;
}

.model-readout p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.architecture-section {
  background: rgba(3, 11, 16, 0.72);
}

.architecture-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #02090e;
  box-shadow: inset 0 0 42px rgba(45, 249, 241, 0.035);
}

.architecture-toolbar {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 16px;
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  padding: 3px;
  border: 1px solid rgba(139, 192, 188, 0.22);
  border-radius: 3px;
  background: rgba(2, 9, 14, 0.92);
}

.architecture-toolbar button {
  min-width: 78px;
  min-height: 30px;
  padding: 5px 12px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.architecture-toolbar button:hover,
.architecture-toolbar button:focus-visible {
  color: var(--ink);
  outline: none;
}

.architecture-toolbar button[aria-selected="true"] {
  background: rgba(45, 249, 241, 0.12);
  color: var(--cyan);
  box-shadow: inset 0 -1px 0 var(--cyan), 0 0 12px rgba(45, 249, 241, 0.12);
}

.architecture-stage[data-mode="training"] .architecture-toolbar button[aria-selected="true"] {
  background: rgba(255, 216, 77, 0.11);
  color: var(--gold);
  box-shadow: inset 0 -1px 0 var(--gold), 0 0 12px rgba(255, 216, 77, 0.1);
}

.architecture-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pan-y;
  scrollbar-color: rgba(45, 249, 241, 0.32) rgba(3, 10, 14, 0.7);
  scrollbar-width: thin;
}

.architecture-map {
  display: block;
  width: 100%;
  min-width: 980px;
  height: auto;
}

.architecture-map text {
  font-family: var(--academic);
  letter-spacing: 0;
  user-select: none;
}

.architecture-backdrop {
  fill: #030b11;
  stroke: rgba(45, 249, 241, 0.1);
}

.architecture-domain-label {
  fill: rgba(155, 185, 197, 0.66);
  font-size: 10px;
}

.architecture-domain-label.latent {
  fill: rgba(156, 130, 255, 0.76);
}

.architecture-domain-label.physics {
  fill: rgba(255, 79, 139, 0.72);
}

.architecture-domain-label.condition-domain {
  fill: rgba(255, 216, 77, 0.72);
}

.architecture-lower-band {
  fill: rgba(2, 9, 14, 0.88);
  stroke: rgba(139, 192, 188, 0.18);
  stroke-width: 1;
}

.architecture-route {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.12;
  transition: opacity 220ms ease, filter 220ms ease;
}

.route-latent {
  stroke: var(--cyan);
  stroke-dasharray: 8 10;
}

.route-condition {
  stroke: var(--gold);
  stroke-dasharray: 5 9;
}

.route-physics {
  stroke: var(--coral);
  stroke-dasharray: 3 8;
}

.architecture-stage[data-mode="generation"] .route-shared,
.architecture-stage[data-mode="training"] .route-shared,
.architecture-stage[data-mode="training"] .route-training {
  opacity: 0.86;
  animation: architectureFlow 1.25s linear infinite;
}

.architecture-stage[data-mode="generation"] .route-shared.route-latent,
.architecture-stage[data-mode="training"] .route-training.route-latent,
.architecture-stage[data-mode="training"] .route-shared.route-latent {
  filter: url(#architectureCyanGlow);
}

.architecture-stage[data-mode="generation"] .route-shared.route-condition,
.architecture-stage[data-mode="training"] .route-shared.route-condition {
  filter: url(#architectureGoldGlow);
}

.architecture-module,
.architecture-condition,
.architecture-physics {
  transition: opacity 220ms ease, filter 220ms ease;
}

.architecture-stage[data-mode="generation"] .mode-training {
  opacity: 0.42;
}

.architecture-stage[data-mode="generation"] .architecture-latent {
  opacity: 0.48;
}

.architecture-stage[data-mode="training"] .mode-training {
  opacity: 1;
  filter: url(#architectureCyanGlow);
}

.module-frame,
.condition-module,
.physics-module-map,
.gate-shell {
  fill: rgba(5, 17, 24, 0.94);
  stroke: rgba(139, 192, 188, 0.34);
  stroke-width: 1;
}

.module-frame {
  stroke: rgba(45, 249, 241, 0.4);
}

.module-symbol,
.condition-symbol {
  fill: var(--ink);
  font-size: 21px;
  font-weight: 600;
  text-anchor: middle;
}

.module-title {
  fill: var(--ink);
  font-size: 13px;
}

.module-caption,
.module-micro {
  fill: rgba(155, 185, 197, 0.72);
  font-size: 10px;
}

.module-micro {
  font-size: 8px;
}

.module-panel-title {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.module-panel-meta {
  fill: rgba(255, 216, 77, 0.88);
  font-size: 9px;
}

.module-panel-meta.physics-meta {
  fill: rgba(255, 79, 139, 0.86);
}

.network-slab {
  fill: rgba(44, 216, 224, 0.08);
  stroke: rgba(45, 249, 241, 0.68);
  stroke-width: 1;
}

.network-slab.slab-2 {
  fill: rgba(156, 130, 255, 0.09);
  stroke: rgba(156, 130, 255, 0.66);
}

.network-slab.slab-3 {
  fill: rgba(255, 216, 77, 0.08);
  stroke: rgba(255, 216, 77, 0.62);
}

.feature-plane {
  fill: rgba(45, 249, 241, 0.055);
  stroke: rgba(45, 249, 241, 0.78);
  stroke-width: 1.05;
}

.feature-plane.plane-mid {
  fill: rgba(156, 130, 255, 0.075);
  stroke: rgba(156, 130, 255, 0.78);
}

.feature-plane.plane-token {
  fill: rgba(255, 216, 77, 0.065);
  stroke: rgba(255, 216, 77, 0.74);
}

.feature-mesh {
  fill: none;
  stroke: rgba(45, 249, 241, 0.2);
  stroke-width: 0.55;
}

.feature-mesh.mid {
  stroke: rgba(156, 130, 255, 0.24);
}

.feature-flow,
.attention-network path {
  fill: none;
  stroke: rgba(255, 216, 77, 0.58);
  stroke-width: 0.75;
}

.attention-network path {
  stroke: rgba(45, 249, 241, 0.54);
  stroke-dasharray: 2 2;
}

.attention-network circle {
  fill: #06141c;
  stroke: var(--gold);
  stroke-width: 0.9;
}

.attention-network circle:nth-of-type(even) {
  stroke: var(--cyan);
}

.latent-token-stack circle {
  fill: rgba(45, 249, 241, 0.2);
  stroke: var(--cyan);
  stroke-width: 1;
  filter: url(#architectureCyanGlow);
}

.topoformer-visual .latent-token-stack circle:nth-child(2),
.topoformer-visual .attention-network circle:nth-of-type(2) {
  animation: topologyTokenPulse 1.5s ease-in-out infinite alternate;
}

.attention-core {
  fill: #06171f;
  stroke: var(--gold);
  stroke-width: 1;
}

.attention-cross {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
}

.diffusion-shell {
  fill: rgba(6, 18, 28, 0.98);
  stroke: rgba(45, 249, 241, 0.58);
  stroke-width: 1.3;
}

.diffusion-header {
  fill: rgba(45, 249, 241, 0.07);
  stroke: none;
}

.diffusion-name {
  fill: var(--cyan);
  font-size: 17px;
  font-weight: 600;
}

.diffusion-meta,
.diffusion-mini,
.diffusion-output {
  fill: rgba(238, 251, 255, 0.82);
  font-size: 9px;
}

.noise-frame {
  stroke: rgba(156, 130, 255, 0.58);
}

.dit-stack rect {
  fill: rgba(45, 249, 241, 0.055);
  stroke: rgba(45, 249, 241, 0.44);
  stroke-width: 1;
}

.dit-stack rect:nth-child(2) {
  fill: rgba(156, 130, 255, 0.065);
  stroke: rgba(156, 130, 255, 0.48);
}

.dit-stack rect:nth-child(3) {
  fill: rgba(255, 216, 77, 0.055);
  stroke: rgba(255, 216, 77, 0.46);
}

.dit-stack rect:nth-child(4) {
  fill: rgba(255, 79, 139, 0.05);
  stroke: rgba(255, 79, 139, 0.42);
}

.dit-stack text {
  fill: rgba(238, 251, 255, 0.8);
  font-size: 8px;
}

.diffusion-loop {
  fill: none;
  stroke: rgba(45, 249, 241, 0.55);
  stroke-width: 1;
  stroke-dasharray: 4 6;
  animation: architectureFlow 1.1s linear infinite;
}

.gate-shell {
  stroke: rgba(108, 255, 176, 0.58);
}

.gate-shell-cut {
  fill: rgba(3, 17, 22, 0.98);
  stroke: rgba(108, 255, 176, 0.7);
  stroke-width: 1.1;
}

.gate-grid {
  fill: none;
  stroke: rgba(108, 255, 176, 0.44);
  stroke-width: 1;
}

.gate-pass {
  fill: var(--green);
  filter: url(#architectureCyanGlow);
}

.gate-cell-grid rect {
  fill: rgba(45, 249, 241, 0.035);
  stroke: rgba(45, 249, 241, 0.28);
  stroke-width: 0.7;
}

.gate-cell-grid rect.is-connected {
  fill: rgba(108, 255, 176, 0.1);
  stroke: rgba(108, 255, 176, 0.58);
}

.gate-connect-path {
  fill: none;
  stroke: var(--green);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 4 5;
  filter: url(#architectureCyanGlow);
  animation: gateConnectivityFlow 1.05s linear infinite;
}

.gate-source,
.gate-sink {
  fill: #031115;
  stroke: var(--green);
  stroke-width: 1.2;
}

.gate-sink {
  fill: var(--green);
  filter: url(#architectureCyanGlow);
}

.gate-scan {
  fill: none;
  stroke: rgba(255, 216, 77, 0.72);
  stroke-width: 1;
  filter: url(#architectureGoldGlow);
  animation: gateScan 2.2s ease-in-out infinite;
}

.hys-theory-input {
  fill: none;
  stroke: rgba(255, 79, 139, 0.64);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.condition-module {
  stroke: rgba(255, 216, 77, 0.46);
}

.condition-demand-module,
.condition-mlp-module,
.theory-module-map,
.hys-module-map {
  fill: rgba(4, 14, 20, 0.98);
}

.condition-symbol {
  fill: var(--gold);
  font-size: 17px;
}

.demand-table path {
  fill: none;
  stroke: rgba(255, 216, 77, 0.55);
  stroke-width: 1;
}

.demand-table text {
  fill: rgba(228, 238, 238, 0.78);
  font-size: 7px;
}

.demand-table text:nth-of-type(odd) {
  fill: var(--gold);
  font-weight: 700;
}

.curve-axis {
  fill: none;
  stroke: rgba(155, 185, 197, 0.32);
  stroke-width: 0.8;
}

.mini-curve-frame text {
  fill: rgba(155, 185, 197, 0.72);
  font-size: 7px;
}

.mini-curve-frame .curve-tag {
  fill: rgba(255, 216, 77, 0.78);
  font-size: 7px;
}

.module-equation {
  fill: rgba(220, 232, 234, 0.78);
  font-size: 8px;
}

.transform-equations text {
  fill: rgba(239, 232, 190, 0.84);
  font-size: 8px;
}

.transform-equations path {
  fill: none;
  stroke: rgba(255, 216, 77, 0.32);
  stroke-width: 1;
}

.mlp-dense-edge {
  fill: none;
  stroke: rgba(45, 249, 241, 0.16);
  stroke-width: 0.55;
}

.mlp-dense-edge.hidden-links {
  stroke: rgba(255, 216, 77, 0.2);
}

.mlp-dense-edge.output-links {
  stroke: rgba(255, 79, 139, 0.24);
}

.mlp-input-nodes circle,
.mlp-hidden-nodes circle {
  fill: #06141c;
  stroke: var(--cyan);
  stroke-width: 0.9;
}

.mlp-input-nodes circle:nth-child(3n),
.mlp-hidden-nodes circle:nth-child(2n) {
  stroke: var(--gold);
}

.mlp-output-nodes rect {
  fill: rgba(255, 79, 139, 0.12);
  stroke: rgba(255, 79, 139, 0.75);
  stroke-width: 0.9;
}

.mlp-layer-label {
  fill: rgba(155, 185, 197, 0.74);
  font-size: 7px;
}

.mlp-layer-label.output {
  fill: var(--gold);
}

.architecture-stage[data-mode="generation"] .mlp-dense-edge,
.architecture-stage[data-mode="training"] .mlp-dense-edge {
  animation: mlpSignal 1.7s ease-in-out infinite alternate;
}

.physics-module-map {
  stroke: rgba(255, 79, 139, 0.48);
}

.theory-input-frame,
.hys-topology-frame {
  fill: rgba(255, 79, 139, 0.035);
  stroke: rgba(255, 79, 139, 0.48);
  stroke-width: 1;
}

.theory-arrow,
.hys-arrow,
.hys-array-branch path,
.precision-gate path {
  fill: none;
  stroke: rgba(255, 79, 139, 0.58);
  stroke-width: 1;
}

.theory-step-label,
.theory-feature-stack text,
.theory-formula,
.hys-branch-label,
.hys-convnext-stack text,
.hys-array-branch text,
.hys-fusion-core text,
.hys-curve-decoders text,
.precision-gate text,
.hys-output-equation,
.hys-legend text {
  fill: rgba(224, 235, 237, 0.78);
  font-size: 7px;
}

.theory-feature-stack circle {
  fill: rgba(255, 79, 139, 0.12);
  stroke: rgba(255, 79, 139, 0.74);
  stroke-width: 0.8;
}

.theory-formula {
  fill: rgba(255, 216, 77, 0.88);
  font-size: 10px;
}

.theory-formula.small {
  fill: rgba(155, 185, 197, 0.7);
  font-size: 6px;
}

.physics-equation {
  fill: rgba(255, 79, 139, 0.9);
  font-size: 9px;
}

.hys-convnext-stack rect,
.hys-array-branch rect,
.hys-curve-decoders rect,
.precision-gate rect {
  fill: rgba(255, 79, 139, 0.05);
  stroke: rgba(255, 79, 139, 0.46);
  stroke-width: 0.8;
}

.hys-convnext-stack rect:nth-child(2),
.hys-curve-decoders rect:nth-of-type(2) {
  fill: rgba(45, 249, 241, 0.05);
  stroke: rgba(45, 249, 241, 0.45);
}

.hys-fusion-core path {
  fill: rgba(255, 216, 77, 0.09);
  stroke: rgba(255, 216, 77, 0.62);
  stroke-width: 1;
}

.hys-fusion-core text,
.precision-gate text {
  fill: rgba(255, 232, 143, 0.9);
}

.theory-curve,
.response-curve {
  fill: none;
  stroke: var(--coral);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.response-curve.target {
  stroke: var(--gold);
  stroke-dasharray: 3 3;
  opacity: 0.76;
}

.response-curve.data {
  stroke: var(--violet);
  opacity: 0.7;
}

.response-curve.fused {
  stroke: var(--cyan);
  stroke-width: 1.65;
  filter: url(#architectureCyanGlow);
}

.hys-legend text:nth-child(1) {
  fill: var(--gold);
}

.hys-legend text:nth-child(2) {
  fill: var(--violet);
}

.hys-legend text:nth-child(3) {
  fill: var(--cyan);
}

.loss-label {
  fill: var(--coral);
  font-size: 13px;
}

.route-label {
  fill: rgba(155, 185, 197, 0.74);
  font-size: 10px;
}

.condition-label {
  fill: var(--gold);
}

.architecture-readout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  min-height: 108px;
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  background: rgba(5, 15, 21, 0.94);
}

.architecture-readout > div:first-child {
  display: grid;
  gap: 5px;
}

.architecture-readout span,
.architecture-readout strong,
.architecture-readout p {
  margin: 0;
}

.architecture-readout > div:first-child > span {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 9px;
}

.architecture-stage[data-mode="training"] .architecture-readout > div:first-child > span {
  color: var(--gold);
}

.architecture-readout strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
}

.architecture-readout p {
  max-width: 900px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.architecture-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.architecture-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.architecture-legend b {
  font-weight: 500;
}

.architecture-legend i {
  width: 24px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}

.architecture-legend .latent {
  color: var(--cyan);
}

.architecture-legend .condition {
  color: var(--gold);
}

.architecture-legend .physics {
  color: var(--coral);
}

@keyframes architectureFlow {
  to { stroke-dashoffset: -36; }
}

@keyframes mlpSignal {
  0% { stroke-opacity: 0.35; }
  100% { stroke-opacity: 1; filter: drop-shadow(0 0 1.5px rgba(255, 216, 77, 0.5)); }
}

@keyframes topologyTokenPulse {
  0% { fill: rgba(45, 249, 241, 0.16); transform: scale(0.82); transform-origin: center; }
  100% { fill: rgba(255, 216, 77, 0.8); transform: scale(1.35); transform-origin: center; }
}

@keyframes gateConnectivityFlow {
  to { stroke-dashoffset: -18; }
}

@keyframes gateScan {
  0%, 100% { transform: translateY(-8px); opacity: 0.28; }
  50% { transform: translateY(48px); opacity: 0.95; }
}

.training-section {
  background: rgba(9, 19, 23, 0.46);
}

.training-stage {
  padding: 26px 30px 20px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(4, 11, 15, 0.72);
}

.training-topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.training-status {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.training-status > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: statusPulse 1.8s ease-in-out infinite;
}

.training-status strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.training-status b {
  color: var(--cyan);
}

.training-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 15px;
}

.training-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
}

.training-legend i {
  width: 18px;
  height: 2px;
  background: var(--legend);
}

.training-legend .total { --legend: var(--cyan); }
.training-legend .denoise { --legend: var(--violet); }
.training-legend .theory { --legend: var(--gold); }
.training-legend .response { --legend: var(--coral); }

#trainingChart {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  margin-top: 16px;
  overflow: visible;
}

#trainingChart text {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

#trainingChart .grid {
  stroke: rgba(139, 192, 188, 0.12);
  stroke-width: 1;
}

#trainingChart .axis {
  stroke: rgba(139, 192, 188, 0.38);
  stroke-width: 1;
}

#trainingChart .series {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#trainingChart .cursor {
  stroke: rgba(45, 249, 241, 0.42);
  stroke-width: 1;
  stroke-dasharray: 5 6;
}

.training-readout {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
}

.training-readout div {
  display: grid;
  gap: 5px;
  padding: 14px 16px 6px;
  border-right: 1px solid var(--line);
}

.training-readout div:last-child {
  border-right: 0;
}

.training-readout span {
  color: var(--dim);
  font-size: 10px;
}

.training-readout strong {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
}

.case-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.case-selector button {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  background: var(--panel);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.case-selector button::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 1px;
  background: var(--case-color, var(--cyan));
  box-shadow: 0 0 10px var(--case-color, var(--cyan));
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.case-selector button:hover,
.case-selector button:focus-visible,
.case-selector button.active {
  border-color: var(--case-color, var(--cyan));
  color: var(--ink);
  transform: translateY(-2px);
}

.case-selector button.active::after {
  transform: scaleX(1);
}

.case-selector button > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--case-color, var(--cyan)) 55%, transparent);
  color: var(--case-color, var(--cyan));
  font-family: var(--serif);
  font-size: 17px;
}

.case-selector button > b {
  display: grid;
  gap: 3px;
  font-weight: 600;
}

.case-selector button small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
}

.workflow-machine {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(7, 19, 24, 0.72);
}

.workflow-rail {
  display: grid;
  grid-template-columns: minmax(150px, 1.08fr) 26px minmax(130px, 0.82fr) 26px minmax(130px, 0.82fr) 26px minmax(145px, 0.92fr) 26px minmax(145px, 0.92fr) 26px minmax(145px, 0.92fr) 26px minmax(175px, 1.2fr);
  align-items: stretch;
  gap: 0;
  padding: 28px 24px;
}

.workflow-step {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  min-height: 230px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(4, 11, 15, 0.78);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.workflow-step::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(45, 249, 241, 0.09) 48%, transparent 66%);
  transform: translateX(-100%);
}

.workflow-step.active {
  border-color: var(--cyan);
  box-shadow: inset 0 0 24px rgba(45, 249, 241, 0.08), 0 0 14px rgba(45, 249, 241, 0.12);
  transform: translateY(-4px);
}

.workflow-step.active::after {
  animation: stageScan 1.2s ease-out;
}

.workflow-step header {
  display: flex;
  gap: 7px;
  align-items: baseline;
  margin-bottom: 8px;
}

.workflow-step header span {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 9px;
}

.workflow-step header strong {
  font-size: 11px;
}

.workflow-step canvas,
.micro-image {
  display: block;
  align-self: center;
  width: 100%;
  height: auto;
  max-height: 154px;
  touch-action: pan-y;
}

.workflow-step canvas.square-result {
  width: min(100%, 168px);
  aspect-ratio: 1;
  object-fit: contain;
  justify-self: center;
}

.workflow-step canvas.latent-field-result {
  width: min(100%, 196px);
  aspect-ratio: 2 / 1;
  object-fit: contain;
  justify-self: center;
}

.micro-image {
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(45, 249, 241, 0.24);
  background: #040b0f;
}

.micro-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.workflow-step > small {
  align-self: end;
  margin-top: 8px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
  text-align: center;
}

.workflow-link {
  position: relative;
  align-self: center;
  height: 1px;
  overflow: hidden;
  background: var(--line-strong);
}

.workflow-link::after {
  content: "";
  position: absolute;
  top: -3px;
  right: 1px;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--cyan);
  border-right: 1px solid var(--cyan);
  transform: rotate(45deg);
}

.workflow-link b {
  position: absolute;
  top: -2px;
  width: 18px;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: workflowSignal 1.15s linear infinite;
}

.workflow-status {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) 2fr;
  gap: 28px;
  align-items: center;
  padding: 18px 24px;
  border-top: 1px solid var(--line);
}

.workflow-status > div {
  display: grid;
  gap: 5px;
}

.workflow-status > div span,
.workflow-status dt {
  color: var(--dim);
  font-size: 9px;
}

.workflow-status > div strong {
  color: var(--cyan);
  font-family: var(--serif);
  font-size: 16px;
}

.workflow-status dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
}

.workflow-status dl div {
  padding: 0 18px;
  border-left: 1px solid var(--line);
}

.workflow-status dd {
  margin: 5px 0 0;
  font-family: var(--mono);
  font-size: 12px;
}

.workflow-status .status-pass {
  color: var(--green);
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 76px);
  color: var(--dim);
  font-size: 11px;
}

.page-footer a:hover {
  color: var(--cyan);
}

.process-lane {
  padding: 26px 30px;
  border-bottom: 1px solid var(--line);
}

.process-lane > header {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 22px;
  align-items: baseline;
  margin-bottom: 22px;
}

.process-lane > header > span {
  color: var(--lane-color, var(--cyan));
  font-family: var(--mono);
  font-size: 10px;
}

.process-lane > header > div {
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.process-lane > header strong {
  font-family: var(--serif);
  font-size: 21px;
}

.process-lane > header small {
  color: var(--muted);
  font-size: 11px;
}

.forward-lane {
  --lane-color: var(--gold);
  background: linear-gradient(90deg, rgba(255, 216, 77, 0.045), transparent 68%);
}

.inverse-lane {
  --lane-color: var(--cyan);
  background: linear-gradient(90deg, rgba(45, 249, 241, 0.045), transparent 68%);
}

.process-track,
.workflow-track {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.process-node {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 125px;
  min-height: 174px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(4, 11, 15, 0.78);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.process-node::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--node-color, var(--lane-color));
  box-shadow: 0 0 12px var(--node-color, var(--lane-color));
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.process-node.active {
  border-color: var(--node-color, var(--lane-color));
  box-shadow: inset 0 0 22px color-mix(in srgb, var(--node-color, var(--lane-color)) 9%, transparent);
  transform: translateY(-3px);
}

.process-node.active::after {
  transform: scaleX(1);
}

.process-node > b {
  color: var(--node-color, var(--lane-color));
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.process-node > strong {
  font-size: 12px;
}

.process-node > small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.45;
}

.node-motion {
  position: relative;
  display: block;
  width: 100%;
  height: 30px;
  margin-top: 4px;
  overflow: hidden;
  border-top: 1px solid rgba(139, 192, 188, 0.14);
  opacity: 0.48;
  transition: opacity 180ms ease;
}

.process-node.active .node-motion {
  opacity: 1;
}

.real-node-visual {
  display: grid;
  height: 54px;
  margin-top: 5px;
  border: 1px solid rgba(139, 192, 188, 0.16);
  background: #030a0e;
  opacity: 0.66;
}

.forward-lane .real-node-visual,
.inverse-lane .real-node-visual {
  height: 78px;
}

.forward-lane .process-node,
.inverse-lane .process-node {
  min-height: 204px;
  padding: 12px;
}

.real-node-visual::before,
.real-node-visual::after {
  content: none;
}

.real-node-visual img,
.real-node-visual canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.real-node-visual:not(.sample-strip) > img {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
}

.latent-visual img {
  aspect-ratio: 2 / 1;
}

.latent-channel-labels {
  position: absolute;
  z-index: 3;
  right: 3px;
  bottom: 3px;
  left: 3px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  pointer-events: none;
}

.latent-channel-labels i {
  justify-self: center;
  min-width: 28px;
  padding: 1px 4px;
  border: 1px solid rgba(45, 249, 241, 0.42);
  background: rgba(2, 7, 13, 0.84);
  color: #eefbff;
  font-family: "STIX Two Math", "Cambria Math", "Times New Roman", serif;
  font-size: 9px;
  font-style: normal;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 0 7px rgba(45, 249, 241, 0.5);
}

.latent-channel-labels sup,
.latent-channel-labels sub {
  font-size: 0.72em;
}

.topology-visual img {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: contain;
  aspect-ratio: auto;
}

.sample-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
}

.sample-strip img {
  min-width: 0;
  opacity: 0.34;
  transition: opacity 180ms ease, box-shadow 180ms ease;
}

.sample-strip img.active {
  opacity: 1;
  box-shadow: 0 0 8px rgba(45, 249, 241, 0.7);
}

.node-motion::before,
.node-motion::after {
  content: "";
  position: absolute;
}

.topology-scan {
  background:
    linear-gradient(45deg, transparent 38%, rgba(126, 224, 158, 0.55) 38% 52%, transparent 52%),
    linear-gradient(-45deg, transparent 42%, rgba(45, 249, 241, 0.5) 42% 54%, transparent 54%);
  background-size: 18px 18px;
}

.topology-scan::after {
  top: 0;
  bottom: 0;
  width: 18px;
  background: linear-gradient(90deg, transparent, rgba(45, 249, 241, 0.75), transparent);
  animation: nodeScan 1.5s linear infinite;
}

.encode-motion::before,
.expand-motion::before,
.decode-motion::before {
  top: 7px;
  left: 5px;
  width: 16px;
  height: 16px;
  border: 1px solid var(--violet);
  background: repeating-linear-gradient(45deg, rgba(156, 130, 255, 0.5) 0 2px, transparent 2px 4px);
  animation: encodeCompress 1.8s ease-in-out infinite;
}

.expand-motion::before,
.decode-motion::before {
  animation-name: decodeExpand;
}

.encode-motion::after,
.expand-motion::after,
.decode-motion::after {
  top: 8px;
  right: 6px;
  width: 18px;
  height: 14px;
  border-left: 2px solid var(--violet);
  border-right: 2px solid rgba(156, 130, 255, 0.35);
}

.latent-motion,
.gaussian-motion {
  background-image:
    radial-gradient(circle at 8% 32%, var(--violet) 0 2px, transparent 3px),
    radial-gradient(circle at 28% 70%, var(--cyan) 0 2px, transparent 3px),
    radial-gradient(circle at 48% 24%, var(--coral) 0 2px, transparent 3px),
    radial-gradient(circle at 69% 68%, var(--gold) 0 2px, transparent 3px),
    radial-gradient(circle at 89% 36%, var(--cyan) 0 2px, transparent 3px);
  background-size: 100% 100%;
  animation: latentPulse 1.7s ease-in-out infinite;
}

.diffusion-motion,
.ddim-motion {
  background:
    radial-gradient(circle, rgba(255, 79, 139, 0.78) 0 1px, transparent 2px) 0 0 / 9px 9px,
    radial-gradient(circle, rgba(45, 249, 241, 0.65) 0 1px, transparent 2px) 4px 4px / 11px 11px;
  animation: noiseBuild 1.7s steps(6) infinite;
}

.ddim-motion {
  animation-name: noiseResolve;
}

.dit-motion {
  background: repeating-linear-gradient(90deg, rgba(45, 249, 241, 0.16) 0 12px, transparent 12px 17px);
}

.dit-motion::after {
  inset: 5px auto 5px 0;
  width: 22px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: nodeScan 1.2s linear infinite;
}

.parameter-motion,
.condition-motion {
  background: repeating-linear-gradient(90deg, transparent 0 4px, rgba(255, 216, 77, 0.28) 4px 10px, transparent 10px 14px);
}

.parameter-motion::after,
.condition-motion::after {
  right: 0;
  bottom: 3px;
  left: 0;
  height: 22px;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  clip-path: polygon(0 88%, 8% 48%, 16% 72%, 24% 18%, 32% 62%, 40% 36%, 48% 82%, 56% 22%, 64% 55%, 72% 12%, 80% 68%, 88% 32%, 100% 48%, 100% 100%, 0 100%);
  animation: parameterRead 1.8s ease-in-out infinite;
}

.theory-curve-motion::before {
  inset: 5px 3px;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--coral);
  border-radius: 50%;
  transform: skewX(-24deg) scaleX(0.18);
  transform-origin: center;
  animation: curveOpen 1.9s ease-in-out infinite;
}

.binary-motion,
.assembly-motion {
  background:
    linear-gradient(45deg, transparent 38%, rgba(126, 224, 158, 0.65) 38% 51%, transparent 51%),
    linear-gradient(-45deg, transparent 40%, rgba(45, 249, 241, 0.55) 40% 53%, transparent 53%);
  background-size: 15px 15px;
  animation: topologyReveal 1.5s steps(5) infinite;
}

.assembly-motion {
  background-size: 10px 10px;
}

.gate-motion::before {
  top: 13px;
  left: 2px;
  width: calc(100% - 4px);
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 9px var(--green);
  transform-origin: left;
  animation: gatePass 1.4s ease-in-out infinite;
}

.vae-tone { --node-color: var(--violet); }
.noise-tone { --node-color: var(--coral); }
.dit-tone { --node-color: var(--cyan); }
.target-tone { --node-color: var(--gold); }
.theory-tone { --node-color: var(--gold); }
.topology-tone { --node-color: var(--green); }
.gate-tone { --node-color: #8bd8ff; }

.process-link {
  position: relative;
  flex: 0 0 40px;
  align-self: center;
  height: 1px;
  overflow: hidden;
  background: var(--line-strong);
}

.process-link[data-transfer]::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -6px;
  left: 1px;
  width: 12px;
  height: 12px;
  border: 1px solid var(--lane-color);
  background: rgba(4, 11, 15, 0.92);
  box-shadow: 0 0 8px color-mix(in srgb, var(--lane-color) 55%, transparent);
  animation: transferPayload 1.65s ease-in-out infinite;
}

.process-link[data-transfer="encode"]::before,
.process-link[data-transfer="decode"]::before,
.process-link[data-transfer="assemble"]::before {
  background:
    linear-gradient(45deg, transparent 36%, var(--lane-color) 36% 51%, transparent 51%),
    linear-gradient(-45deg, transparent 41%, var(--lane-color) 41% 53%, transparent 53%),
    var(--bg);
  background-size: 6px 6px;
}

.process-link[data-transfer="encode"]::before {
  animation-name: encodePayload;
}

.process-link[data-transfer="reconstruct"]::before,
.process-link[data-transfer="decode"]::before {
  animation-name: decodePayload;
}

.process-link[data-transfer="sample"]::before,
.process-link[data-transfer="latent"]::before,
.process-link[data-transfer="inject"]::before {
  border-radius: 50%;
  background: radial-gradient(circle, var(--lane-color) 0 2px, transparent 3px), var(--bg);
}

.process-link[data-transfer="noise"]::before,
.process-link[data-transfer="denoise"]::before {
  background: radial-gradient(circle, var(--coral) 0 1px, transparent 2px) 0 0 / 4px 4px, var(--bg);
}

.process-link[data-transfer="denoise"]::before {
  animation-name: denoisePayload;
}

.process-link[data-transfer="theory"]::before {
  width: 15px;
  height: 8px;
  border: 0;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--coral);
  border-radius: 50%;
}

.process-link[data-transfer="condition"]::before,
.process-link[data-transfer="predict"]::before {
  width: 14px;
  height: 9px;
  border: 0;
  background: repeating-linear-gradient(90deg, var(--lane-color) 0 2px, transparent 2px 4px);
}

.process-link::after {
  content: "";
  position: absolute;
  top: -3px;
  right: 0;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--lane-color);
  border-right: 1px solid var(--lane-color);
  transform: rotate(45deg);
}

.process-link > b {
  position: absolute;
  top: -2px;
  width: 20px;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--lane-color), transparent);
  animation: workflowSignal 1.15s linear infinite;
}

.loss-routing {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.loss-card {
  position: relative;
  min-width: 0;
  min-height: 92px;
  padding: 11px 13px 12px;
  border: 1px solid var(--line);
  background: rgba(4, 11, 15, 0.52);
  overflow: hidden;
}

.loss-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--loss-color);
  box-shadow: 0 0 11px color-mix(in srgb, var(--loss-color) 56%, transparent);
}

.loss-card > span {
  display: block;
  min-height: 16px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
}

.loss-card strong {
  display: block;
  margin-top: 3px;
  color: var(--loss-color);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.loss-card p {
  margin: 4px 0 2px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 11px;
}

.loss-card small {
  color: var(--dim);
  font-size: 8px;
  line-height: 1.45;
}

.vae-loss { --loss-color: var(--violet); }
.velocity-loss { --loss-color: var(--cyan); }
.theory-loss { --loss-color: var(--gold); }
.response-loss { --loss-color: var(--coral); }

.process-readout {
  display: grid;
  grid-template-columns: 205px minmax(220px, 0.7fr) 1.3fr;
  gap: 24px;
  align-items: center;
  min-height: 100px;
  padding: 20px 30px;
  background: rgba(3, 9, 12, 0.6);
}

.process-readout > span {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 9px;
}

.process-readout > strong {
  font-family: var(--serif);
  font-size: 17px;
}

.process-readout > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.theory-input-bar {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(560px, 1.5fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 14px;
  padding: 15px 18px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 19, 24, 0.66);
}

.theory-input-bar > div:first-child {
  display: grid;
  gap: 5px;
}

.theory-input-bar > div:first-child span {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 16px;
}

.theory-input-bar > div:first-child strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.theory-input-bar .case-selector {
  justify-content: flex-end;
  margin: 0;
}

.theory-parameter-panel {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: rgba(4, 11, 15, 0.7);
}

.theory-parameter-panel.active {
  border-color: var(--gold);
  box-shadow: inset 0 0 24px rgba(255, 216, 77, 0.07), 0 0 14px rgba(255, 216, 77, 0.1);
}

.parameter-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}

.parameter-title span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
}

.parameter-title strong {
  color: var(--cyan);
  font-family: var(--serif);
  font-size: 16px;
}

.parameter-grid {
  display: grid;
  grid-template-columns: 1.45fr 1.7fr repeat(5, minmax(76px, 0.65fr));
}

.parameter-grid > div {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 13px 12px;
  border-right: 1px solid var(--line);
}

.parameter-grid > div:last-child {
  border-right: 0;
}

.parameter-grid span {
  color: var(--dim);
  font-size: 8px;
}

.parameter-grid strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
}

.workflow-track {
  padding: 22px 24px;
}

.streamlined-track .assembly-fea-step,
.streamlined-track .result-step {
  flex-grow: 1.18;
}

.streamlined-track .latent-workflow-step {
  flex-grow: 1.28;
}

.streamlined-track .assembly-fea-step canvas {
  width: min(100%, 176px);
}

.workflow-track .workflow-step {
  flex: 1 1 0;
  min-width: 140px;
  min-height: 212px;
}

.workflow-track .workflow-link {
  flex: 0 0 25px;
}

.verification-track {
  width: 68%;
  margin: 0 auto;
  padding-top: 8px;
}

.workflow-source-image {
  display: none;
}

.fea-step {
  overflow: hidden;
}

.fea-mark {
  position: absolute;
  z-index: 2;
  top: 44px;
  right: 12px;
  width: 57px;
  height: 34px;
  padding: 2px 5px 3px;
  border: 1px solid rgba(45, 249, 241, 0.4);
  background: rgba(2, 7, 13, 0.84);
  color: #eefbff;
  font-family: "STIX Two Math", "Cambria Math", "Times New Roman", serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 27px;
  text-align: center;
  opacity: 0;
  text-shadow: 0 1px 1px #00070a, 0 0 10px rgba(45, 249, 241, 0.42);
  transform: scale(0.92);
  transform-origin: 100% 50%;
  transition: opacity 220ms ease, text-shadow 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.fea-step.active .fea-mark {
  text-shadow: 0 1px 1px #00070a, 0 0 14px rgba(45, 249, 241, 0.68);
}

.result-legend {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.result-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  white-space: nowrap;
}

.result-legend span::before {
  content: "";
  width: 15px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}

.result-legend .theory-legend {
  color: var(--gold);
}

.result-legend .theory-legend::before {
  background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px);
}

.result-legend .fea-legend {
  color: var(--cyan);
}

.workflow-turn {
  display: grid;
  grid-template-columns: 1fr 180px 1fr;
  gap: 14px;
  align-items: center;
  width: 76%;
  margin: 0 auto;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
  text-align: center;
}

.workflow-turn i {
  position: relative;
  height: 1px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
}

.workflow-turn i b {
  position: absolute;
  top: -2px;
  width: 22px;
  height: 5px;
  background: linear-gradient(90deg, transparent, white, transparent);
  animation: signalTravel 1.5s linear infinite;
}

@keyframes signalTravel {
  from { transform: translateX(-32px); }
  to { transform: translateX(88px); }
}

@keyframes gateShift {
  from { background-position: 0 0; }
  to { background-position: 200% 0; }
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.75); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes stageScan {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@keyframes workflowSignal {
  from { transform: translateX(-20px); }
  to { transform: translateX(30px); }
}

@keyframes nodeScan {
  from { transform: translateX(-24px); }
  to { transform: translateX(150px); }
}

@keyframes encodeCompress {
  0%, 15% { transform: translateX(0) scale(1); }
  70%, 100% { transform: translateX(90px) scale(0.28); border-radius: 50%; }
}

@keyframes decodeExpand {
  0%, 15% { transform: translateX(88px) scale(0.28); border-radius: 50%; }
  75%, 100% { transform: translateX(0) scale(1); border-radius: 0; }
}

@keyframes latentPulse {
  0%, 100% { opacity: 0.35; filter: saturate(0.65); }
  50% { opacity: 1; filter: saturate(1.35); }
}

@keyframes noiseBuild {
  0% { opacity: 0.2; background-size: 18px 18px, 22px 22px; }
  100% { opacity: 1; background-size: 7px 7px, 9px 9px; }
}

@keyframes noiseResolve {
  0% { opacity: 1; filter: blur(0); background-size: 7px 7px, 9px 9px; }
  100% { opacity: 0.4; filter: blur(1px); background-size: 22px 22px, 28px 28px; }
}

@keyframes parameterRead {
  0%, 100% { clip-path: inset(100% 0 0 0); }
  45%, 75% { clip-path: inset(0 0 0 0); }
}

@keyframes curveOpen {
  0%, 15% { transform: skewX(-24deg) scaleX(0.12); opacity: 0.25; }
  65%, 100% { transform: skewX(-24deg) scaleX(0.9); opacity: 1; }
}

@keyframes topologyReveal {
  0% { opacity: 0.18; background-position: 0 0, 0 0; }
  100% { opacity: 1; background-position: 30px 0, -30px 0; }
}

@keyframes gatePass {
  0%, 15% { transform: scaleX(0.04); opacity: 0.25; }
  70%, 100% { transform: scaleX(1); opacity: 1; }
}

@keyframes transferPayload {
  0%, 12% { transform: translateX(0) scale(0.7); opacity: 0; }
  25% { opacity: 1; }
  78% { opacity: 1; }
  100% { transform: translateX(27px) scale(0.7); opacity: 0; }
}

@keyframes encodePayload {
  0%, 12% { transform: translateX(0) scale(1); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateX(28px) scale(0.25); border-radius: 50%; opacity: 0; }
}

@keyframes decodePayload {
  0%, 12% { transform: translateX(0) scale(0.25); border-radius: 50%; opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateX(27px) scale(1); border-radius: 0; opacity: 0; }
}

@keyframes denoisePayload {
  0%, 12% { transform: translateX(0) rotate(0) scale(1); filter: blur(0); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateX(27px) rotate(180deg) scale(0.5); filter: blur(1px); opacity: 0; }
}

@media (max-width: 1180px) {
  .page-header {
    grid-template-columns: 1fr auto;
  }

  .page-nav {
    display: none;
  }

  .model-flow {
    grid-template-columns: minmax(140px, 1fr) 42px minmax(170px, 1fr) 42px minmax(210px, 1.25fr) 42px minmax(170px, 1fr);
    padding: 24px;
  }

  .workflow-rail {
    grid-template-columns: repeat(7, minmax(160px, 1fr));
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    touch-action: pan-x pan-y;
  }

  .process-track,
  .workflow-track {
    overflow-x: auto;
    padding-bottom: 10px;
    touch-action: pan-x pan-y;
  }

  .process-node,
  .workflow-track .workflow-step {
    flex: 0 0 165px;
  }

  .theory-input-bar {
    grid-template-columns: 1fr;
  }

  .theory-input-bar .case-selector {
    justify-content: flex-start;
  }

  .parameter-grid {
    grid-template-columns: 1.4fr 1.7fr repeat(3, 0.75fr);
  }

  .parameter-grid > div:nth-child(5) {
    border-right: 0;
  }

  .parameter-grid > div:nth-child(n + 6) {
    border-top: 1px solid var(--line);
  }

  .verification-track,
  .workflow-turn {
    width: 100%;
  }

  .workflow-step {
    scroll-snap-align: start;
  }

  .workflow-link {
    display: none;
  }
}

@media (max-width: 860px) {
  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  .research-lineage {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 44px;
  }

  .research-lineage > i {
    width: 1px;
    height: 20px;
    margin-left: 24px;
  }

  .research-lineage > i::after {
    top: auto;
    right: -3px;
    bottom: 0;
    transform: rotate(135deg);
  }

  .hero h1 {
    font-size: 46px;
  }

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

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

  .hero-facts div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .section-heading {
    grid-template-columns: 54px 1fr;
    gap: 16px;
  }

  .section-heading > p {
    grid-column: 2;
  }

  .section-number {
    font-size: 38px;
  }

  .section-heading h2 {
    font-size: 27px;
  }

  .architecture-toolbar {
    position: relative;
    top: auto;
    right: auto;
    width: max-content;
    margin: 12px 14px 0 auto;
  }

  .architecture-map {
    min-width: 940px;
  }

  .architecture-readout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .architecture-legend {
    justify-content: flex-start;
  }

  .model-flow {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .signal-line {
    width: 1px;
    height: 25px;
    justify-self: center;
  }

  .signal-line::after {
    top: auto;
    right: -3px;
    bottom: 0;
    transform: rotate(135deg);
  }

  .physics-engine {
    grid-template-columns: 1fr;
  }

  .model-readout {
    grid-template-columns: 1fr;
    gap: 9px;
  }

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

  .training-readout div {
    border-bottom: 1px solid var(--line);
  }

  .workflow-status {
    grid-template-columns: 1fr;
  }

  .process-lane > header {
    grid-template-columns: 1fr;
    gap: 7px;
  }

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

  .process-readout {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .theory-parameter-panel {
    grid-template-columns: 1fr;
  }

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

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

  .parameter-grid > div {
    border-top: 1px solid var(--line);
  }

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

@media (max-width: 620px) {
  .page-header {
    min-height: 62px;
    padding: 9px 15px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .brand strong {
    font-size: 15px;
  }

  .header-actions {
    gap: 9px;
  }

  .header-actions a {
    display: none;
  }

  .hero {
    padding-right: 16px;
    padding-left: 16px;
  }

  .research-lineage a,
  .lineage-current {
    min-height: 84px;
    padding: 13px 14px;
  }

  .research-lineage strong {
    font-size: 15px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-copy > p:last-child {
    font-size: 14px;
    line-height: 1.8;
  }

  .hero-facts div {
    min-height: 78px;
    padding: 14px;
  }

  .hero-facts dt {
    font-size: 20px;
  }

  .research-section {
    padding: 76px 15px;
  }

  .section-heading {
    grid-template-columns: 42px 1fr;
    margin-bottom: 32px;
  }

  .section-number {
    font-size: 30px;
  }

  .section-heading h2 {
    font-size: 23px;
  }

  .section-heading > p {
    font-size: 13px;
  }

  .architecture-stage {
    border-color: rgba(45, 249, 241, 0.28);
  }

  .architecture-toolbar {
    width: calc(100% - 24px);
    margin: 12px;
  }

  .architecture-toolbar button {
    min-width: 0;
  }

  .architecture-map {
    min-width: 900px;
  }

  .architecture-readout {
    padding: 17px 15px;
  }

  .architecture-readout strong {
    font-size: 15px;
  }

  .architecture-readout p {
    font-size: 11px;
  }

  .model-flow,
  .physics-engine {
    padding: 16px;
  }

  .physics-module {
    grid-template-columns: 43px 1fr;
  }

  .physics-module em {
    grid-column: 2;
  }

  .model-readout {
    padding: 18px 16px;
  }

  .training-stage {
    padding: 18px 10px 10px;
  }

  .training-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .training-legend {
    justify-content: flex-start;
  }

  .training-readout {
    grid-template-columns: 1fr 1fr;
  }

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

  .case-selector button {
    width: 100%;
  }

  .workflow-rail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    overflow: visible;
    padding: 16px;
    touch-action: pan-y;
  }

  .process-lane {
    padding: 18px 14px;
  }

  .process-lane > header > div {
    display: grid;
    gap: 4px;
  }

  .process-track,
  .workflow-track {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    overflow: visible;
    padding: 0;
    touch-action: pan-y;
  }

  .process-node,
  .workflow-track .workflow-step {
    min-width: 0;
  }

  .process-node {
    min-height: 176px;
  }

  .process-link,
  .workflow-track .workflow-link {
    display: none;
  }

  .loss-routing {
    grid-template-columns: 1fr;
  }

  .process-readout {
    padding: 17px 14px;
  }

  .theory-input-bar {
    padding: 14px;
  }

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

  .parameter-grid > div:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

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

  .workflow-turn {
    grid-template-columns: 1fr 80px 1fr;
    margin: 14px 0;
  }

  .workflow-step {
    grid-template-columns: minmax(126px, 0.95fr) 1.05fr;
    grid-template-rows: auto 1fr;
    min-height: 178px;
  }

  .workflow-step header {
    grid-column: 1 / -1;
  }

  .workflow-step canvas,
  .workflow-step .micro-image {
    grid-column: 1;
    max-height: 132px;
  }

  .workflow-step > small {
    grid-column: 2;
    align-self: center;
    margin: 0;
    padding-left: 14px;
    font-size: 9px;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .latent-workflow-step {
    grid-template-columns: 1fr;
    min-height: 244px;
  }

  .latent-workflow-step canvas.latent-field-result {
    grid-column: 1 / -1;
    width: 100%;
    max-height: none;
  }

  .latent-workflow-step > small {
    grid-column: 1 / -1;
    padding-left: 0;
    text-align: center;
  }

  .workflow-status {
    padding: 16px;
  }

  .workflow-status dl {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 0;
  }

  .page-footer {
    flex-direction: column;
  }
}

@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;
  }
}
