:root {
  --bg: #f3f6fa;
  --bg-elev: #ffffff;
  --ink: #142033;
  --muted: #5c6678;
  --line: rgba(20, 32, 51, 0.12);
  --accent: #c56a2d;
  --accent-2: #2a6f97;
  --accent-soft: rgba(197, 106, 45, 0.12);
  --accent-2-soft: rgba(42, 111, 151, 0.12);
  --fail: #b44a4a;
  --ok: #2a8f6f;
  --font-display: "Syne", Georgia, serif;
  --font-body: "Source Sans 3", sans-serif;
  --radius: 18px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hero-veil-a: rgba(243, 246, 250, 0.15);
  --hero-veil-b: rgba(20, 32, 51, 0.55);
  --hero-veil-c: var(--bg);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1100px 640px at 85% -8%, rgba(197, 106, 45, 0.12), transparent 55%),
    radial-gradient(900px 560px at 8% 18%, rgba(42, 111, 151, 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;
  image-rendering: auto;
}

a {
  color: inherit;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  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(243, 246, 250, 0.86);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
}

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

.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);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-github {
  text-decoration: none;
  color: #fff8f2;
  background: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s var(--ease);
}

.nav-github:hover {
  background: #d47a3a;
  transform: translateY(-1px);
}

.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 35%;
  transform: scale(1.06);
  transition: transform 1.4s var(--ease);
  will-change: transform;
  image-rendering: auto;
}

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

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 32, 51, 0.2) 0%, rgba(20, 32, 51, 0.12) 32%, rgba(243, 246, 250, 0.82) 72%, var(--bg) 100%),
    linear-gradient(90deg, rgba(243, 246, 250, 0.72), transparent 58%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto 4.5rem;
  max-width: 36rem;
  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(1.85rem, 5.2vw, 3.35rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--ink);
  max-width: 14ch;
}

.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: 18ch;
}

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

.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: #fff8f2;
}

.btn-primary:hover {
  background: #d47a3a;
}

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

.btn-ghost:hover {
  border-color: rgba(20, 32, 51, 0.28);
  background: rgba(20, 32, 51, 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-wide {
  max-width: 68ch;
  margin: 0 0 1.75rem;
}

.intro-setup {
  margin: 0 0 2.5rem;
}

.intro-setup .figure-zoom {
  background: #f4f6f8;
}

.intro-setup .figure-zoom img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: min(72vh, 720px);
  margin: 0 auto;
}

.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(197, 106, 45, 0.1), transparent 55%),
    var(--bg-elev);
}

.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: #e8edf3;
}

.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: var(--bg-elev);
  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(197, 106, 45, 0.45);
  background: var(--accent-soft);
}

.system-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.15rem 1.15rem 1.25rem;
  background: var(--bg-elev);
  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;
}

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

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

.fab-controls {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: min(78vh, 720px);
  overflow: auto;
  padding-right: 0.15rem;
}

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

.fab-step:hover {
  border-color: rgba(197, 106, 45, 0.4);
}

.fab-step.is-active {
  background: var(--accent-soft);
  border-color: rgba(197, 106, 45, 0.5);
  transform: translateX(4px);
}

.fab-step.is-active .step-idx {
  background: var(--accent);
  color: #fff8f2;
}

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

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

.fab-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.fab-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
}

.fab-thumb {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  width: 72px;
  height: 54px;
  cursor: pointer;
  background: #1a2230;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}

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

.fab-thumb.is-active,
.fab-thumb:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.fab-card {
  margin-top: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem 1.2rem;
  background: var(--bg-elev);
}

.fab-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

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

.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: var(--bg-elev);
  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(197, 106, 45, 0.4);
}

.step-btn.is-active {
  background: var(--accent-soft);
  border-color: rgba(197, 106, 45, 0.5);
  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(20, 32, 51, 0.06);
  color: var(--ink);
}

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

.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-frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e8edf3;
  cursor: zoom-in;
}

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

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

.stage-progress {
  height: 3px;
  background: rgba(20, 32, 51, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.stage-progress-bar {
  height: 100%;
  width: 20%;
  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: var(--bg-elev);
  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(197, 106, 45, 0.45);
  background: var(--accent-soft);
}

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

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

.key-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1rem 1.1rem;
  background: rgba(243, 246, 250, 0.65);
}

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

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

.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(20, 32, 51, 0.08);
  overflow: hidden;
}

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

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

.bar-row.is-secondary .bar-fill {
  background: linear-gradient(90deg, var(--accent-2), #4f93b8);
}

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

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

.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: var(--bg-elev);
}

.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(197, 106, 45, 0.4);
}

.explain-chip.is-active {
  color: #fff8f2;
  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;
}

.figure-panel {
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-elev);
}

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

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

.zoom-hint {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(20, 32, 51, 0.78);
  color: #f3f6fa;
  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: var(--bg-elev);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(20, 32, 51, 0.28);
}

.lightbox::backdrop {
  background: rgba(20, 32, 51, 0.55);
  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: #e8edf3;
  border-radius: 10px;
}

.prior-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  margin-top: 2.25rem;
}

.prior-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem 1.4rem;
  background:
    linear-gradient(160deg, rgba(42, 111, 151, 0.08), transparent 50%),
    var(--bg-elev);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

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

.prior-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.prior-authors {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.prior-blurb {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  flex: 1;
}

.prior-card .hero-actions {
  margin-top: 0.35rem;
}

.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-2);
}

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

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

.code-card {
  margin-top: 2rem;
  padding: 1.4rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(42, 111, 151, 0.08), transparent 55%),
    var(--bg-elev);
}

.code-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.code-card p {
  margin: 0 0 1.1rem;
  color: var(--muted);
}

.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,
  .fab-layout,
  .detail-grid,
  .bg-layout,
  .system-layout,
  .key-grid,
  .prior-grid {
    grid-template-columns: 1fr;
  }

  .system-panel,
  .pipeline-stage,
  .fab-stage {
    position: static;
  }

  .fab-controls {
    max-height: none;
  }

  .nav-links {
    display: none;
  }

  .nav-github {
    font-size: 0.82rem;
    padding: 0.4rem 0.8rem;
  }

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