:root {
  --ink: #111827;
  --muted: #667085;
  --subtle: #98a2b3;
  --paper: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #d9e2ec;
  --blue: #2563eb;
  --cyan: #0891b2;
  --green: #16a34a;
  --coral: #e05243;
  --violet: #6d5bd0;
  --shadow: 0 26px 70px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 18px 44px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f9fbff 0%, #ffffff 34%, #f4f7fb 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(8, 145, 178, 0.05) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(180deg, black 0%, transparent 72%);
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

.site-header {
  position: fixed;
  inset: 16px 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 48px));
  min-height: 52px;
  margin: 0 auto;
  padding: 0 10px 0 16px;
  color: rgba(17, 24, 39, 0.82);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(217, 226, 236, 0.78);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(22px);
}

.brand,
.nav-links,
.hero-actions,
.panel-topline {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 50%;
  background: conic-gradient(from 160deg, var(--blue), var(--cyan), var(--green), var(--coral), var(--blue));
}

.brand-mark::after {
  position: absolute;
  inset: 5px;
  content: "";
  background: #ffffff;
  border-radius: 50%;
}

.nav-links {
  gap: 4px;
}

.nav-links a {
  min-height: 34px;
  padding: 7px 11px;
  color: rgba(17, 24, 39, 0.64);
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  background: rgba(37, 99, 235, 0.08);
}

.hero {
  position: relative;
  min-height: min(740px, 86vh);
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(244, 248, 255, 0.82) 58%, rgba(255, 255, 255, 1) 100%);
}

.flow-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.48;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
  align-items: center;
  gap: 56px;
  width: min(1120px, calc(100% - 48px));
  min-height: min(740px, 86vh);
  margin: 0 auto;
  padding: 108px 0 42px;
}

.hero-copy-block {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.35;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 100%;
  font-size: 5.85rem;
  line-height: 0.96;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.hero-subtitle {
  margin: 20px 0 0;
  max-width: 720px;
  color: #1f2937;
  font-size: 1.58rem;
  line-height: 1.22;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.hero-copy,
.section-heading p,
.problem p,
.mechanism-card p,
.domain p,
.loop-steps span,
.metric span,
figcaption {
  color: var(--muted);
}

.hero-copy {
  max-width: 660px;
  margin: 22px 0 0;
  font-size: 1.04rem;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  gap: 8px;
  align-items: center;
  margin-top: 34px;
}

.hero-actions .action {
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
}

.hero-actions .action-icon {
  width: 19px;
  height: 19px;
}

.action,
.copy-button,
.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.action {
  gap: 9px;
  min-width: 104px;
  padding: 10px 14px;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(152, 162, 179, 0.38);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.action.primary {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
}

.action-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

svg.action-icon {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.brand-icon {
  display: block;
  object-fit: contain;
}

.huggingface-icon {
  filter: drop-shadow(0 1px 0 rgba(15, 23, 42, 0.18));
}

.action:hover,
.action:focus-visible,
.copy-button:hover,
.copy-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.hero-visual {
  position: relative;
  min-height: 500px;
}

.glass-panel,
.formula-cell,
.problem,
.mechanism-card,
.metric,
.domain,
.figure-frame,
.citation-wrap,
.equation-stack article {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.flow-demo {
  position: absolute;
  inset: 18px 0 auto auto;
  width: min(760px, 100%);
  padding: 12px;
  transform: none;
}

.panel-topline {
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 0 4px 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.formula-strip {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  width: min(1120px, calc(100% - 48px));
  margin: -34px auto 0;
  overflow: hidden;
  border: 1px solid rgba(217, 226, 236, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.formula-cell {
  min-width: 0;
  min-height: 142px;
  padding: 22px 24px;
  border: 0;
  border-right: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.formula-cell:last-child {
  border-right: 0;
}

.formula-math {
  display: block;
  max-width: 100%;
  min-width: 0;
  min-height: 30px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.45;
  overflow-x: auto;
  overflow-y: hidden;
}

.formula-cell p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.42;
}

.formula-label {
  display: block;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.math-block {
  color: #1f2937;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 0.86rem;
  line-height: 1.45;
}

.formula-math mjx-container,
.math-block mjx-container,
.demo-formula mjx-container {
  max-width: 100%;
  margin: 0 !important;
  text-align: left !important;
}

.demo-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.86), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(217, 226, 236, 0.84);
  border-radius: var(--radius);
}

.demo-pane {
  min-width: 0;
}

.demo-pane p {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
}

.demo-pane svg {
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 250;
  overflow: visible;
}

.demo-pane text {
  fill: #111827;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 800;
}

.demo-train-arrow {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 92px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.demo-train-arrow::before {
  position: absolute;
  inset: 50% 3px auto 3px;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.14), rgba(37, 99, 235, 0.78));
  transform: translateY(-50%);
}

.demo-train-arrow::after {
  position: absolute;
  right: 0;
  top: 50%;
  width: 0;
  height: 0;
  content: "";
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid rgba(37, 99, 235, 0.78);
  transform: translateY(-50%);
}

.demo-train-arrow span {
  position: relative;
  z-index: 1;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: var(--radius);
}

.before-edge,
.after-edge,
.backward-edge,
.motion-route {
  fill: none;
}

.before-edge {
  stroke: #cbd5e1;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 3 10;
  animation: dashFlow 2.8s linear infinite;
}

.after-edge {
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: rewardPulse 2.6s ease-in-out infinite;
}

.after-edge.hot {
  stroke: url(#hotFlow);
  stroke-width: 8;
}

.after-edge.warm {
  stroke: #f59e0b;
  stroke-width: 5.5;
  opacity: 0.82;
}

.after-edge.quiet {
  stroke: #cbd5e1;
  stroke-width: 2.4;
  opacity: 0.78;
}

.backward-edge {
  stroke: url(#coolFlow);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 8 8;
  opacity: 0.74;
  animation: backwardDash 3.2s linear infinite;
}

.source,
.node,
.target-ring {
  fill: #ffffff;
  stroke: #111827;
  stroke-width: 2;
}

.target-ring {
  fill: #d1d5db;
  stroke-width: 2.4;
}

.active-source,
.active-node,
.active-target {
  filter: drop-shadow(0 8px 14px rgba(37, 99, 235, 0.18));
}

.skill {
  stroke: #111827;
  stroke-width: 2;
}

.muted-skill {
  fill: #b8bcc3;
}

.hot-skill {
  fill: #b74934;
}

.warm-skill {
  fill: #dd7b35;
}

.pale-skill {
  fill: #efe3a9;
}

.motion-route {
  stroke: transparent;
}

.flow-particle {
  stroke: #ffffff;
  stroke-width: 2;
  filter: drop-shadow(0 5px 9px rgba(15, 23, 42, 0.22));
}

.hot-particle {
  fill: #dc2626;
}

.warm-particle {
  fill: #f59e0b;
}

.demo-math-label {
  fill: var(--blue) !important;
  font-size: 16px !important;
  font-style: normal !important;
}

.demo-caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.demo-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.demo-steps li {
  min-height: 30px;
  padding: 6px 7px;
  color: var(--muted);
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(217, 226, 236, 0.86);
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.15;
  text-align: center;
  transition: background 240ms ease, color 240ms ease, border-color 240ms ease, transform 240ms ease;
}

.demo-steps li.is-active {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.demo-formula {
  min-width: 178px;
  margin: 0;
  color: #1f2937;
  font-size: 0.78rem;
  line-height: 1.25;
}

.paper-demo-figure {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(217, 226, 236, 0.84);
  border-radius: var(--radius);
}

.paper-demo-figure img {
  width: 100%;
  aspect-ratio: 2609 / 1414;
  object-fit: contain;
  background: #ffffff;
}

.paper-demo-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.paper-phase {
  opacity: 0;
  transition: opacity 360ms ease, filter 360ms ease;
}

.flow-demo[data-phase="rollout"] .phase-rollout,
.flow-demo[data-phase="ttb"] .phase-ttb,
.flow-demo[data-phase="credit"] .phase-credit,
.flow-demo[data-phase="skill"] .phase-skill {
  opacity: 1;
  filter: saturate(1.08);
}

.uniform-route {
  fill: none;
  stroke: rgba(37, 99, 235, 0.42);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 1 25;
  animation: dashFlow 3.4s linear infinite;
}

.paper-dot {
  fill: #2563eb;
  opacity: 0.64;
  filter: drop-shadow(0 5px 9px rgba(37, 99, 235, 0.2));
}

.ttb-transfer-soft,
.ttb-transfer-core {
  fill: none;
  stroke-linecap: round;
}

.ttb-transfer-soft {
  stroke: url(#ttbTransferFlow);
  stroke-width: 18;
  opacity: 0.2;
  filter: blur(0.5px);
}

.ttb-transfer-core {
  stroke: url(#ttbTransferFlow);
  stroke-width: 8;
  stroke-dasharray: 36 34;
  opacity: 0.72;
  animation: ttbSweep 1.9s linear infinite;
  filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.18));
}

.ttb-transfer-packet {
  fill: #f59e0b;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 3;
  opacity: 0.86;
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.18));
}

.packet-two {
  fill: #2563eb;
  opacity: 0.64;
}

.packet-three {
  fill: #94a3b8;
  opacity: 0.52;
}

.paper-svg-label {
  fill: #2563eb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 44px;
  font-weight: 900;
}

.after-flow-edge,
.paper-backward-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.after-flow-edge {
  stroke-dasharray: 1 30;
  animation: dashFlow 2.6s linear infinite;
}

.flow-high {
  stroke: url(#demoHotFlow);
  stroke-width: 17;
  opacity: 0.66;
  filter: url(#demoGlow);
}

.flow-mid {
  stroke: #f59e0b;
  stroke-width: 12;
  opacity: 0.44;
  filter: drop-shadow(0 10px 18px rgba(245, 158, 11, 0.22));
}

.flow-mid-low {
  stroke: #eab308;
  stroke-width: 10;
  opacity: 0.34;
}

.flow-low {
  stroke: #facc15;
  stroke-width: 7;
  opacity: 0.28;
  animation-duration: 4.8s;
}

.flow-faint {
  stroke: #c9b978;
  stroke-width: 6;
  opacity: 0.2;
  animation-duration: 5.6s;
}

.top-terminal {
  stroke-width: 16;
}

.paper-backward-path {
  stroke: url(#demoCoolFlow);
  stroke-width: 9;
  stroke-dasharray: 1 26;
  opacity: 0.58;
  animation: backwardDash 3.2s linear infinite;
}

.paper-backward-path.top-policy {
  stroke: #b7798b;
  stroke-width: 10;
  opacity: 0.58;
  animation: dashFlow 3s linear infinite;
}

.flow-token {
  stroke: #ffffff;
  stroke-width: 3;
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.22));
}

.token-high {
  fill: #dc2626;
}

.token-mid {
  fill: #f59e0b;
}

.token-mid-low {
  fill: #eab308;
}

.token-low {
  fill: #d8c895;
  opacity: 0.72;
}

.skill-pulse {
  fill: rgba(37, 99, 235, 0.02);
  stroke-width: 10;
  stroke-dasharray: 28 18;
  rx: 24;
  animation: backwardDash 3s linear infinite;
}

.skill-pulse.retain {
  stroke: rgba(220, 38, 38, 0.82);
}

.skill-pulse.refine {
  stroke: rgba(245, 158, 11, 0.82);
}

.skill-pulse.prune {
  stroke: rgba(37, 99, 235, 0.72);
}

.retain-label,
.refine-label,
.prune-label {
  fill: #111827;
  font-size: 30px;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 7px;
  stroke-linejoin: round;
}

.demo-note-track {
  position: relative;
  min-height: 58px;
  margin-top: 10px;
  overflow: hidden;
  background: rgba(248, 250, 252, 0.78);
  border: 1px solid rgba(217, 226, 236, 0.78);
  border-radius: var(--radius);
}

.demo-callout {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  color: #1f2937;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.demo-callout strong,
.demo-callout span {
  display: block;
}

.demo-callout strong {
  color: var(--blue);
  font-size: 0.72rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.demo-callout span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.28;
}

.flow-demo[data-phase="rollout"] .callout-rollout,
.flow-demo[data-phase="ttb"] .callout-ttb,
.flow-demo[data-phase="credit"] .callout-credit,
.flow-demo[data-phase="skill"] .callout-skill {
  opacity: 1;
  transform: translateY(0);
}

.demo-steps li strong,
.demo-steps li span {
  display: block;
}

.demo-steps li strong {
  margin-bottom: 2px;
  color: inherit;
  font-size: 0.68rem;
  line-height: 1;
}

.section {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 86px 0;
}

.section-heading {
  max-width: 790px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin: 0;
  font-size: 2.6rem;
  line-height: 1.08;
  font-weight: 820;
}

.section-heading p {
  margin: 16px 0 0;
  font-size: 1.02rem;
}

.overview-grid,
.claim-grid,
.method-layout,
.chapter-card-grid,
.diagnostic-grid,
.phase-rail,
.mechanism-stack,
.domain-grid,
.metric-grid {
  display: grid;
  gap: 18px;
}

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

.claim-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(217, 226, 236, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.claim-item {
  min-width: 0;
  padding: 22px;
  border-right: 1px solid rgba(217, 226, 236, 0.88);
}

.claim-item:last-child {
  border-right: 0;
}

.claim-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 28px;
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius);
  font-size: 0.76rem;
  font-weight: 850;
}

.claim-item h3 {
  margin: 18px 0 10px;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.2;
  font-weight: 820;
}

.claim-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.claim-item code {
  display: block;
  min-width: 0;
  margin-top: 18px;
  color: #1f2937;
  font-family: inherit;
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-x: auto;
  scrollbar-width: none;
}

.claim-item code::-webkit-scrollbar {
  display: none;
}

.problem,
.mechanism-card,
.domain {
  padding: 26px;
}

.soft-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius);
  font-size: 0.76rem;
  font-weight: 850;
}

.problem h3,
.mechanism-card h3,
.domain h3 {
  margin: 16px 0 10px;
  font-size: 1.25rem;
  line-height: 1.22;
  font-weight: 800;
}

.problem p,
.mechanism-card p,
.domain p {
  margin: 0;
}

.method-layout {
  grid-template-columns: 1fr;
  gap: 58px;
  align-items: start;
}

.method-layout > * {
  min-width: 0;
}

.method-chapter {
  display: grid;
  gap: 18px;
}

.chapter-heading {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
  gap: 18px 24px;
  align-items: start;
}

.chapter-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 32px;
  padding: 5px 10px;
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.chapter-heading h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.12;
  font-weight: 820;
}

.chapter-heading p {
  grid-column: 2;
  max-width: 820px;
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.chapter-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mechanism-stack {
  gap: 12px;
}

.mechanism-card {
  min-height: 0;
}

.mechanism-card h3 {
  margin-top: 14px;
}

.chapter-card {
  display: flex;
  flex-direction: column;
  min-height: 218px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.chapter-card h4 {
  margin: 16px 0 10px;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.2;
  font-weight: 820;
}

.chapter-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.evolution-lab {
  display: grid;
  gap: 18px;
  padding: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.82)),
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.1), transparent 34%),
    radial-gradient(circle at 90% 12%, rgba(22, 163, 74, 0.09), transparent 32%);
  border: 1px solid rgba(217, 226, 236, 0.94);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.lab-heading {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 18px 24px;
  align-items: start;
}

.lab-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.72rem;
  line-height: 1.14;
  font-weight: 820;
}

.lab-heading p {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.diagnostic-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(217, 226, 236, 0.86);
  border-radius: var(--radius);
}

.diagnostic-cell {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.66);
  border-right: 1px solid rgba(217, 226, 236, 0.82);
}

.diagnostic-cell:last-child {
  border-right: 0;
}

.diagnostic-cell span,
.phase-step span {
  display: block;
  color: var(--blue);
  font-size: 0.72rem;
  line-height: 1.2;
  font-weight: 850;
  text-transform: uppercase;
}

.diagnostic-cell strong,
.phase-step strong {
  display: block;
  margin-top: 9px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.18;
}

.diagnostic-cell p,
.phase-step p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.42;
}

.phase-rail {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.phase-step {
  position: relative;
  min-width: 0;
  padding: 16px 16px 18px 18px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(217, 226, 236, 0.82);
  border-radius: var(--radius);
}

.phase-step::before {
  position: absolute;
  inset: 18px auto auto -7px;
  width: 13px;
  height: 13px;
  content: "";
  background: var(--blue);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.phase-step:first-child::before {
  background: var(--cyan);
}

.phase-step:nth-child(3)::before {
  background: var(--green);
}

.phase-step:last-child::before {
  background: var(--coral);
}

.mini-formula {
  min-width: 0;
  margin-top: auto;
  padding-top: 14px;
  color: #1f2937;
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-x: auto;
  scrollbar-width: none;
}

.mini-formula::-webkit-scrollbar {
  display: none;
}

.figure-frame {
  margin: 0;
  overflow: hidden;
}

.figure-frame img {
  width: 100%;
  aspect-ratio: 16 / 9.2;
  object-fit: contain;
  background: #ffffff;
}

.method-layout .figure-frame {
  align-self: start;
}

.method-layout .figure-frame img,
.method-layout .figure-frame.architecture img {
  height: auto;
  aspect-ratio: auto;
  object-fit: initial;
}

.method-layout figcaption {
  min-height: 0;
  padding: 12px 16px 14px;
}

.method-wide-figure img {
  width: 100%;
}

.figure-frame.architecture img {
  aspect-ratio: 16 / 8.4;
}

.figure-frame.featured {
  grid-row: span 2;
}

.figure-frame.wide {
  grid-column: 1 / -1;
}

.figure-frame.featured img {
  aspect-ratio: 16 / 13;
}

.figure-frame.wide img {
  aspect-ratio: 16 / 6.6;
}

figcaption {
  min-height: 54px;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(217, 226, 236, 0.86);
  font-size: 0.92rem;
}

.metric::after {
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green), var(--coral));
}

.equation-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.equation-stack article {
  min-width: 0;
  padding: 16px;
}

.equation-stack span {
  display: block;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.equation-stack code {
  display: block;
  color: #1f2937;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.loop {
  position: relative;
  background: #0f172a;
  color: #ffffff;
  overflow: hidden;
}

.loop::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.42;
}

.loop-inner {
  position: relative;
  z-index: 1;
}

.loop .eyebrow {
  color: #8bd8ff;
}

.loop .section-heading p {
  color: rgba(255, 255, 255, 0.68);
}

.loop-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  list-style: none;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  overflow: hidden;
}

.loop-steps li {
  position: relative;
  min-height: 210px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.loop-steps li::before {
  display: block;
  width: 36px;
  height: 3px;
  margin-bottom: 28px;
  content: "";
  background: #8bd8ff;
}

.loop-steps strong,
.loop-steps span {
  display: block;
}

.loop-steps strong {
  color: #ffffff;
  font-size: 1.1rem;
}

.loop-steps span {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}

.result-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 4px;
  padding: 5px;
  margin-bottom: 34px;
  background: rgba(233, 238, 246, 0.9);
  border: 1px solid rgba(217, 226, 236, 0.95);
  border-radius: var(--radius);
}

.tab-button {
  min-height: 40px;
  padding: 8px 14px;
  color: var(--muted);
  background: transparent;
}

.tab-button.active {
  color: #ffffff;
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.result-panel {
  margin-top: 8px;
}

.result-panel[hidden] {
  display: none;
}

.result-panel.active {
  animation: panelIn 380ms ease both;
}

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

.metric {
  position: relative;
  min-height: 130px;
  padding: 20px;
  overflow: hidden;
}

.metric strong {
  display: block;
  color: var(--ink);
  font-size: 1.78rem;
  line-height: 1.05;
}

.metric span {
  display: block;
  margin-top: 10px;
  font-size: 0.9rem;
}

.figure-story {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
}

.evidence-board {
  overflow: hidden;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid rgba(191, 203, 217, 0.95);
  border-radius: var(--radius);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.08);
}

.evidence-figure {
  min-width: 0;
  margin: 0;
  padding: 14px 16px 16px;
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid rgba(191, 203, 217, 0.74);
  border-bottom: 1px solid rgba(191, 203, 217, 0.74);
}

.evidence-main {
  grid-column: 1 / -1;
  padding: 16px 18px 18px;
  background: #ffffff;
  border-right: 0;
}

.evidence-figure:nth-child(4),
.evidence-figure:nth-child(7) {
  border-right: 0;
}

.evidence-figure:nth-child(n + 5) {
  border-bottom: 0;
}

.evidence-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 1.18 / 1;
  object-fit: contain;
  background: #ffffff;
}

.evidence-main img {
  aspect-ratio: 16 / 2.9;
}

.evidence-figure figcaption {
  min-height: 58px;
  padding: 10px 4px 0;
  border-top: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

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

.citation-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 18px;
}

pre {
  margin: 0;
  overflow-x: auto;
  color: #e5e7eb;
  background: #0f172a;
  border-radius: var(--radius);
  padding: 18px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.copy-button {
  min-width: 132px;
  padding: 10px 14px;
  color: #ffffff;
  background: var(--blue);
}

.copy-button.copied {
  background: var(--green);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
  padding: 24px 32px;
  color: rgba(255, 255, 255, 0.76);
  background: #0f172a;
}

.site-footer p {
  margin: 0;
}

.footer-meta {
  display: grid;
  gap: 6px;
}

.footer-contact {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.94rem;
}

.site-footer a {
  color: #bfdbfe;
  font-weight: 800;
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatPanel {
  0%,
  100% {
    transform: translateY(0) rotate(1.4deg);
  }
  50% {
    transform: translateY(-12px) rotate(0.7deg);
  }
}

@keyframes floatDemo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes dashFlow {
  to {
    stroke-dashoffset: -52;
  }
}

@keyframes backwardDash {
  to {
    stroke-dashoffset: 48;
  }
}

@keyframes ttbSweep {
  to {
    stroke-dashoffset: -70;
  }
}

@keyframes rewardPulse {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .hero-inner,
  .method-layout,
  .results-layout {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 480px;
  }

  .flow-demo {
    position: relative;
    inset: auto;
    margin-left: auto;
  }

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

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

  .claim-grid,
  .diagnostic-grid,
  .phase-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .claim-item:nth-child(2),
  .diagnostic-cell:nth-child(2) {
    border-right: 0;
  }

  .claim-item:nth-child(-n + 2),
  .diagnostic-cell:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(217, 226, 236, 0.82);
  }
}

@media (max-width: 820px) {
  .site-header {
    position: absolute;
    inset: 14px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: calc(100% - 32px);
    min-height: 88px;
    padding: 14px;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-links a {
    flex: 0 0 auto;
  }

  .hero-inner,
  .section,
  .formula-strip {
    width: calc(100% - 32px);
  }

  .hero-inner {
    gap: 34px;
    min-width: 0;
    padding-top: 132px;
    padding-bottom: 58px;
  }

  .hero-copy-block,
  .hero-subtitle,
  .hero-copy,
  .hero-actions,
  .hero-visual,
  .flow-demo,
  .figure-frame,
  .figure-frame img,
  .evidence-figure,
  .evidence-figure img {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  h1 {
    font-size: 3.65rem;
  }

  .hero-subtitle {
    font-size: 1.22rem;
  }

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

  .hero-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .action,
  .copy-button {
    width: 100%;
    min-width: 0;
  }

  .hero-visual {
    min-height: auto;
  }

  .flow-demo {
    width: 100%;
    transform: none;
    animation: none;
    overflow: hidden;
  }

  .demo-stage,
  .demo-caption,
  .demo-steps {
    grid-template-columns: 1fr;
  }

  .demo-note-track {
    min-height: 78px;
  }

  .demo-callout {
    grid-template-columns: 1fr;
    gap: 4px;
    align-content: center;
  }

  .demo-train-arrow {
    min-height: 42px;
  }

  .demo-train-arrow::before {
    inset: 50% 24% auto 24%;
  }

  .demo-formula {
    min-width: 0;
  }

  .formula-strip,
  .overview-grid,
  .claim-grid,
  .method-layout,
  .chapter-card-grid,
  .diagnostic-grid,
  .phase-rail,
  .mechanism-stack,
  .loop-steps,
  .metric-grid,
  .figure-story,
  .domain-grid,
  .citation-wrap,
  .equation-stack {
    grid-template-columns: 1fr;
  }

  .chapter-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lab-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .chapter-heading p {
    grid-column: auto;
    margin-top: 0;
  }

  .claim-item,
  .diagnostic-cell {
    border-right: 0;
    border-bottom: 1px solid rgba(217, 226, 236, 0.82);
  }

  .claim-item:last-child,
  .diagnostic-cell:last-child {
    border-bottom: 0;
  }

  .evolution-lab {
    padding: 18px;
  }

  .phase-step::before {
    inset: -7px auto auto 18px;
  }

  .formula-strip {
    margin-top: 0;
  }

  .formula-cell {
    border-right: 0;
    border-bottom: 1px solid rgba(217, 226, 236, 0.9);
  }

  .formula-cell:last-child {
    border-bottom: 0;
  }

  .section {
    padding: 78px 0;
  }

  .section-heading h2 {
    font-size: 2rem;
  }

  .mechanism-card,
  .chapter-card,
  .loop-steps li {
    min-height: auto;
  }

  .result-tabs {
    width: 100%;
    margin-bottom: 18px;
  }

  .figure-frame.featured,
  .figure-frame.wide {
    grid-column: auto;
    grid-row: auto;
  }

  .figure-frame.featured img,
  .figure-frame.wide img,
  .figure-frame img,
  .figure-frame.architecture img {
    aspect-ratio: 16 / 10;
  }

  .evidence-figure,
  .evidence-main,
  .evidence-figure:nth-child(4),
  .evidence-figure:nth-child(7) {
    grid-column: auto;
    border-right: 0;
  }

  .evidence-figure,
  .evidence-figure:nth-child(n + 5) {
    border-bottom: 1px solid rgba(191, 203, 217, 0.74);
  }

  .evidence-figure:last-child {
    border-bottom: 0;
  }

  .evidence-main {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .evidence-main img {
    width: max(100%, 680px);
    max-width: none;
    aspect-ratio: 16 / 2.9;
  }

  .evidence-figure:not(.evidence-main) img {
    aspect-ratio: 1.18 / 1;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .hero-inner,
  .section,
  .formula-strip {
    width: min(358px, calc(100% - 28px));
  }

  h1 {
    font-size: 2.82rem;
  }

  .hero-subtitle {
    font-size: 1.08rem;
  }

  .eyebrow {
    font-size: 0.72rem;
  }

  .site-header {
    width: min(358px, calc(100% - 28px));
  }

  .nav-links {
    gap: 2px;
  }

  .nav-links a {
    padding-left: 8px;
    padding-right: 8px;
  }

  .panel-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
