:root {
  --bg: #12151a;
  --bg-elev: #1a1f27;
  --ink: #f2ede4;
  --muted: #a9a296;
  --line: rgba(242, 237, 228, 0.12);
  --accent: #3db8a0;
  --accent-2: #d4845a;
  --accent-soft: rgba(61, 184, 160, 0.16);
  --fail: #c45c5c;
  --ok: #3db8a0;
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Figtree", sans-serif;
  --radius: 18px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(61, 184, 160, 0.14), transparent 55%),
    radial-gradient(900px 600px at 10% 20%, rgba(212, 132, 90, 0.1), transparent 50%),
    var(--bg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}

.nav.is-solid {
  background: rgba(18, 21, 26, 0.78);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.06);
  transition: transform 1.4s var(--ease);
  will-change: transform;
}

.hero.is-ready .hero-media img {
  transform: scale(1);
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 21, 26, 0.25) 0%, rgba(18, 21, 26, 0.15) 35%, rgba(18, 21, 26, 0.92) 78%, var(--bg) 100%),
    linear-gradient(90deg, rgba(18, 21, 26, 0.55), transparent 55%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto 4.5rem;
  max-width: 34rem;
  justify-self: start;
  margin-left: max(1.25rem, calc((100% - var(--max)) / 2));
  animation: rise 1s var(--ease) both;
}

.hero-brand {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--ink);
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 16ch;
}

.hero-lede {
  margin: 0 0 1.5rem;
  color: var(--muted);
  max-width: 34ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.78rem 1.2rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #0b1513;
}

.btn-primary:hover {
  background: #4dceb4;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: rgba(242, 237, 228, 0.35);
  background: rgba(242, 237, 228, 0.04);
}

.section {
  padding: 6.5rem 0;
}

.section-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}

.section-inner.narrow {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.8vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-lede {
  color: var(--muted);
  max-width: 58ch;
}

.bg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.75fr);
  gap: 2.5rem;
  margin-top: 2rem;
  align-items: start;
}

.bg-copy p {
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
}

.bg-lead {
  color: var(--ink) !important;
  font-size: 1.2rem !important;
  line-height: 1.55;
}

.bg-lead em {
  font-style: normal;
  color: var(--accent);
  font-weight: 700;
}

.bg-aside {
  display: grid;
  gap: 1rem;
  padding: 1.35rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(61, 184, 160, 0.1), transparent 55%),
    rgba(255, 255, 255, 0.02);
}

.bg-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.bg-stat span {
  color: var(--muted);
  font-size: 0.92rem;
}

.bg-aside-note {
  margin: 0.35rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.system-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.85fr);
  gap: 1.4rem;
  margin-top: 2rem;
  align-items: start;
}

.system-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f4f1ea;
}

.system-stage img {
  width: 100%;
  height: auto;
  display: block;
}

.system-panel {
  position: sticky;
  top: 5.5rem;
}

.system-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.sys-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.sys-tab.is-active,
.sys-tab:hover {
  color: var(--ink);
  border-color: rgba(61, 184, 160, 0.5);
  background: var(--accent-soft);
}

.system-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.15rem 1.15rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  min-height: 12.5rem;
}

.system-kicker {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-card h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.system-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.system-frame {
  margin-top: 0.9rem !important;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem !important;
}

.system-frame span {
  color: var(--ink);
  font-weight: 600;
}

.system-caption {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.method-stage {
  margin: 2.5rem 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f7f4ee;
}

.method-stage img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature {
  padding: 1.35rem 0 0;
  border-top: 1px solid var(--line);
}

.feature-num {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--accent-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.feature h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.pipeline-layout {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 2rem;
  margin-top: 2.25rem;
  align-items: start;
}

.pipeline-controls {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.step-btn {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  text-align: left;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  border-radius: 14px;
  padding: 0.95rem 1rem;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}

.step-btn:hover {
  border-color: rgba(61, 184, 160, 0.45);
}

.step-btn.is-active {
  background: var(--accent-soft);
  border-color: rgba(61, 184, 160, 0.55);
  transform: translateX(4px);
}

.step-idx {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(242, 237, 228, 0.08);
  color: var(--ink);
}

.step-btn.is-active .step-idx {
  background: var(--accent);
  color: #0b1513;
}

.step-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.step-body strong {
  font-size: 0.98rem;
}

.step-body em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.pipeline-stage {
  position: sticky;
  top: 5.5rem;
}

.stage-media {
  position: relative;
}

.stage-video {
  display: none;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #0d1014;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.stage-media.is-video .stage-video {
  display: block;
}

.stage-media.is-video .stage-frame {
  display: none;
}

.demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
  gap: 1.25rem;
  margin-top: 2.25rem;
  align-items: start;
}

.demo-player-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.demo-player {
  width: 100%;
  display: block;
  background: #0d1014;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.demo-now {
  padding: 1rem 1.15rem 1.2rem;
  border-top: 1px solid var(--line);
}

.demo-now-label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.demo-now strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

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

.demo-chapters {
  display: grid;
  gap: 0.45rem;
  max-height: min(70vh, 640px);
  overflow: auto;
  padding-right: 0.2rem;
}

.chapter {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.75rem;
  align-items: center;
  text-align: left;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  border-radius: 12px;
  padding: 0.45rem;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}

.chapter img {
  width: 88px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #0d1014;
}

.chapter span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.chapter strong {
  font-size: 0.92rem;
}

.chapter em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.8rem;
}

.chapter:hover {
  border-color: rgba(61, 184, 160, 0.45);
}

.chapter.is-active {
  background: var(--accent-soft);
  border-color: rgba(61, 184, 160, 0.55);
  transform: translateX(3px);
}

.stage-frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f7f4ee;
  cursor: zoom-in;
}

.stage-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: filter 0.45s var(--ease), opacity 0.45s var(--ease);
}

.stage-hotspots span {
  position: absolute;
  top: 8%;
  bottom: 8%;
  width: 22%;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s;
  pointer-events: none;
}

.stage-hotspots span:nth-child(1) { left: 2%; }
.stage-hotspots span:nth-child(2) { left: 26.5%; }
.stage-hotspots span:nth-child(3) { left: 51%; }
.stage-hotspots span:nth-child(4) { left: 75.5%; width: 22.5%; }

.stage-hotspots span.is-on {
  border-color: var(--accent);
  background: rgba(61, 184, 160, 0.12);
  box-shadow: 0 0 0 1px rgba(61, 184, 160, 0.25), inset 0 0 40px rgba(61, 184, 160, 0.08);
}

.stage-caption {
  margin: 0.9rem 0 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.stage-progress {
  height: 3px;
  background: rgba(242, 237, 228, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.stage-progress-bar {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.45s var(--ease);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.5rem 0 2rem;
}

.metric {
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}

.metric-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.45rem;
}

.metric-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.compare-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chip.is-active,
.chip:hover {
  color: var(--ink);
  border-color: rgba(61, 184, 160, 0.5);
  background: var(--accent-soft);
}

.compare-chart {
  display: grid;
  gap: 0.65rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.bar-row span:first-child {
  font-size: 0.86rem;
  color: var(--muted);
}

.bar-row.is-ours span:first-child {
  color: var(--accent);
  font-weight: 700;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(242, 237, 228, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #6a737d, #9aa3ad);
  transition: width 0.7s var(--ease);
}

.bar-row.is-ours .bar-fill {
  background: linear-gradient(90deg, var(--accent), #7fd9c7);
}

.bar-row.is-fail .bar-fill {
  background: linear-gradient(90deg, #8a5050, var(--fail));
}

.bar-val {
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
  min-width: 4.5rem;
  text-align: right;
  color: var(--muted);
}

.compare-note {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.key-results {
  margin: 2rem 0 2.5rem;
  padding: 1.35rem 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.key-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 1rem;
  margin-top: 1rem;
}

.key-grid-secondary {
  margin-top: 1rem;
}

.key-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1rem 1.1rem;
  background: rgba(13, 17, 22, 0.55);
}

.key-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.key-card-head strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.key-card-head span {
  color: var(--muted);
  font-size: 0.84rem;
}

.key-canvas-wrap {
  min-height: 260px;
}

.key-canvas-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
}

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

.success-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.success-pill strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.success-pill.is-pass {
  border-color: rgba(61, 184, 160, 0.45);
  background: rgba(61, 184, 160, 0.1);
}

.success-pill.is-pass .tag {
  color: #0b1513;
  background: var(--accent);
}

.success-pill.is-fail .tag {
  color: #f2ede4;
  background: #8a4040;
}

.success-pill.is-ours {
  box-shadow: inset 0 0 0 1px rgba(61, 184, 160, 0.35);
}

.success-pill .tag {
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.final-bars {
  display: grid;
  gap: 0.65rem;
}

.final-bars .bar-row.is-ours .bar-fill {
  background: linear-gradient(90deg, var(--accent), #7fd9c7);
}

@media (max-width: 900px) {
  .key-grid {
    grid-template-columns: 1fr;
  }

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

.ablation {
  margin-top: 2.75rem;
  padding: 1.35rem 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.ablation-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.1rem;
}

.ablation-head h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  letter-spacing: -0.03em;
}

.ablation-head .section-lede {
  margin: 0;
  max-width: 54ch;
  font-size: 0.95rem;
}

.ablation-insight {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(61, 184, 160, 0.35);
  background: rgba(61, 184, 160, 0.1);
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.45;
}

.ablation-insight strong {
  color: var(--accent);
}

.ablation-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.ablation-worst {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) 1.4fr;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.ablation-worst-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.ablation-worst-copy span {
  color: var(--muted);
  font-size: 0.88rem;
}

.ablation-worst-bars {
  display: grid;
  gap: 0.55rem;
}

.ablation-worst-bars .bar-row.is-ours .bar-fill {
  background: linear-gradient(90deg, var(--accent), #7fd9c7);
}

@media (max-width: 900px) {
  .ablation-worst {
    grid-template-columns: 1fr;
  }
}

.ablation-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 3px;
  display: inline-block;
}

.swatch.edge { background: #7a8490; }
.swatch.sew { background: #c45c5c; }
.swatch.ours { background: linear-gradient(180deg, #4dceb4, #3db8a0); box-shadow: 0 0 0 1px rgba(61, 184, 160, 0.35); }

.ablation-plot-wrap {
  position: relative;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(61, 184, 160, 0.05), transparent 40%),
    #0d1116;
  overflow: hidden;
}

.ablation-plot-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
}

.ablation-tooltip {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  min-width: 160px;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(242, 237, 228, 0.16);
  background: rgba(12, 15, 18, 0.92);
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transform: translate(-10%, -120%);
}

.ablation-tooltip strong {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--font-display);
}

.ablation-tooltip em {
  font-style: normal;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}

.explain-figure {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 1.75rem;
}

.detail-grid .explain-figure {
  margin: 0;
}

.explain-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.explain-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.explain-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}

.explain-chip:hover {
  color: var(--ink);
  border-color: rgba(61, 184, 160, 0.45);
}

.explain-chip.is-active {
  color: #0b1513;
  background: var(--accent);
  border-color: var(--accent);
}

.explain-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
  min-height: 4.2em;
}

.explain-text strong {
  color: var(--ink);
  display: inline;
}

.explain-text.is-swap {
  animation: explainIn 0.35s var(--ease);
}

@keyframes explainIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.figure-stack {
  display: grid;
  gap: 2rem;
  margin-top: 2.75rem;
}

.xp-demos {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
}

.xp-demos-head {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.xp-demos-head strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.xp-demos-head span {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 70ch;
}

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

.xp-demo {
  appearance: none;
  border: 1px solid var(--line);
  background: #0d1014;
  color: inherit;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.xp-demo:hover {
  transform: translateY(-3px);
  border-color: rgba(61, 184, 160, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.xp-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #0d1014;
}

.xp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(61, 184, 160, 0.92);
  color: #0b1513;
  font-size: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--ease), background 0.25s;
}

.xp-demo:hover .play-badge {
  transform: scale(1.08);
  background: #4dceb4;
}

.xp-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem 1rem;
  border-top: 1px solid var(--line);
  background: rgba(18, 21, 26, 0.92);
}

.xp-meta strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.xp-meta em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.86rem;
}

.lightbox-video {
  width: min(1100px, calc(100vw - 2rem));
}

.lightbox-video video {
  width: 100%;
  max-height: calc(100vh - 8rem);
  background: #000;
  border-radius: 10px;
}

.lightbox-sub {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.figure-panel {
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.figure-zoom {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: #f7f4ee;
  cursor: zoom-in;
}

.figure-zoom img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.zoom-hint {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(18, 21, 26, 0.72);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s var(--ease);
  pointer-events: none;
}

.figure-zoom:hover .zoom-hint,
.figure-zoom:focus-visible .zoom-hint {
  opacity: 1;
  transform: none;
}

.figure-panel figcaption {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.15rem 1.2rem;
}

.figure-panel figcaption strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.figure-panel figcaption span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 75ch;
}

.lightbox {
  width: min(1200px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0d1014;
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.lightbox::backdrop {
  background: rgba(8, 10, 12, 0.78);
  backdrop-filter: blur(6px);
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.lightbox-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.lightbox img {
  width: 100%;
  max-height: calc(100vh - 7rem);
  object-fit: contain;
  background: #f7f4ee;
  border-radius: 10px;
}

.cite-block {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
}

.cite-block a {
  color: var(--accent);
}

.cite-block em {
  color: var(--ink);
}

.funding {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer {
  padding: 2rem 1.25rem 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .feature-grid,
  .metrics,
  .pipeline-layout,
  .detail-grid,
  .demo-layout,
  .xp-demo-grid,
  .bg-layout,
  .system-layout {
    grid-template-columns: 1fr;
  }

  .system-panel {
    position: static;
  }

  .demo-chapters {
    max-height: none;
    grid-template-columns: 1fr;
  }

  .pipeline-stage {
    position: static;
  }

  .nav-links {
    display: none;
  }

  .hero-copy {
    margin-bottom: 3rem;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .bar-val {
    text-align: left;
  }
}

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