:root {
  color-scheme: light;
  --ink: #14182e;
  --content: #454b66;
  --accent: #473dcd;
  --accent-strong: #342ba6;
  --accent-soft: #eeecff;
  --mint: #1d7a61;
  --mint-soft: #e5f6f0;
  --line: #dfe3f1;
  --faint: #f6f7fd;
  --navy: #141838;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --shadow-sm: 0 2px 10px rgba(20, 24, 46, 0.05);
  --shadow-md: 0 14px 36px rgba(20, 24, 46, 0.09);
  font-family: var(--font);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  line-height: 1.64;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.2em; transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease; }
button { font: inherit; }
:focus-visible { outline: 3px solid #6257ef; outline-offset: 3px; border-radius: 5px; }
[hidden] { display: none !important; }

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 30;
  background: linear-gradient(90deg, #473dcd, #8b5cf6, #2bb893);
  transition: width 0.08s linear;
}

.wrap { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; inset: 0.75rem auto auto 0.75rem; z-index: 40; transform: translateY(-180%); background: #fff; padding: 0.5rem 1rem; border-radius: 8px; border: 1px solid var(--line); }
.skip:focus { transform: none; }

/* Glassmorphic Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(223, 227, 241, 0.85);
}
.topbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-decoration: none;
}
.logo span:not(.logo-icon) { color: var(--accent); }
.logo-icon {
  background: linear-gradient(135deg, #473dcd, #6d5dfc);
  border-radius: 9px;
  width: 30px;
  height: 30px;
  display: grid;
  place-content: center;
  gap: 3px;
  box-shadow: 0 4px 12px rgba(71, 61, 205, 0.28);
}
.logo-icon i { display: block; height: 2px; width: 15px; background: #fff; border-radius: 4px; transform: skew(-28deg); }
.logo-icon i:nth-child(2) { width: 12px; }
.logo-icon i:nth-child(3) { width: 9px; }

.navlinks, .actions { display: flex; align-items: center; gap: 1.35rem; }
.navlinks a { text-decoration: none; color: var(--content); font-size: 0.9rem; font-weight: 600; position: relative; padding: 0.25rem 0; }
.navlinks a:hover, .navlinks a.active { color: var(--accent); }
.navlinks a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2rem;
  height: 2px;
  border-radius: 99px;
  background: var(--accent);
}
.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem !important;
  border-radius: 999px;
  background: var(--faint);
  border: 1px solid var(--line);
  color: var(--ink) !important;
}
.nav-github:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent) !important; }

/* Hero */
.hero-band {
  background:
    radial-gradient(ellipse 60% 55% at 88% 15%, rgba(71, 61, 205, 0.08), transparent 60%),
    radial-gradient(ellipse 48% 45% at 8% 92%, rgba(29, 122, 97, 0.07), transparent 58%),
    #ffffff;
}
.hero {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: clamp(2rem, 4.5vw, 4.2rem);
  align-items: center;
  padding-block: clamp(2.8rem, 5.5vw, 4.8rem);
}
.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.95rem; }
.pill { display: inline-flex; align-items: center; padding: 0.28rem 0.72rem; border-radius: 999px; font-size: 0.75rem; font-weight: 650; }
.indigo-pill { font-family: var(--mono); background: var(--accent-soft); color: var(--accent-strong); border: 1px solid #d2ceff; }
.soft-pill { background: var(--faint); color: var(--content); border: 1px solid var(--line); }

.hero h1 {
  font-family: var(--display);
  margin: 0;
  max-width: 14.5ch;
  font-size: clamp(2.55rem, 4.5vw, 4.15rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
  font-weight: 800;
}
.hero h1 span {
  background: linear-gradient(110deg, #473dcd, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .intro { margin-block: 1.25rem 1.2rem; color: var(--content); font-size: 1.04rem; max-width: 52ch; line-height: 1.6; }
.authors { margin: 0; font-weight: 600; font-size: 0.93rem; max-width: 56ch; }
.authors span { display: inline-block; }
.affiliation { color: var(--content); margin: 0.2rem 0 1.45rem; font-size: 0.9rem; }
.actions { flex-wrap: wrap; gap: 0.6rem; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  font-size: 0.9rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.button:hover { border-color: var(--accent); color: var(--accent); background: #f6f5ff; transform: translateY(-1px); }
.button.primary {
  background: linear-gradient(135deg, #473dcd, #5c4df0);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 22px rgba(71, 61, 205, 0.28);
}
.button.primary:hover { background: linear-gradient(135deg, #372eb4, #473dcd); color: #fff; }

.hero-art {
  margin: 0;
  overflow: hidden;
  min-width: 0;
  color: var(--content);
  background: #f5f6fc;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(20, 24, 56, 0.09), 0 0 0 4px rgba(71, 61, 205, 0.05);
}
.hero-art img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: #f4f5fb; padding: 0.65rem; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.hero-art:hover img { transform: scale(1.02); }
.hero-art figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  border-top: 1px solid var(--line);
  background: #f7f8fe;
  padding: 0.65rem 1rem;
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--content);
}
.hero-art figcaption span { display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; }
.swatch { display: block; flex: none; width: 9px; height: 9px; border-radius: 2px; }
.patch-swatch { background: #473dcd; }
.retained-swatch { background: #238a6e; }
.zoom-pill {
  font-size: 0.72rem;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.zoomable { cursor: zoom-in; }

/* Stats strip */
.stats-wrap { background: var(--faint); border-block: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block: 0; padding-block: 1.65rem; gap: 0.75rem; }
.stat { padding: 0.15rem clamp(0.9rem, 2.5vw, 2.2rem); border-right: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border: 0; padding-right: 0; }
.stat dt {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.12;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--mint);
  background: var(--mint-soft);
  border: 1px solid #bce4d6;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.stat dd { margin: 0.42rem 0 0; color: var(--content); font-size: 0.9rem; line-height: 1.45; }

/* Sections */
.section { padding-block: clamp(3rem, 5.8vw, 5.2rem); }
.section-band { background: var(--faint); border-block: 1px solid var(--line); }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.45rem;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin: 0 0 0.75rem;
}
.section-lede { color: var(--content); max-width: 68ch; margin: 0 0 1.8rem; font-size: 0.98rem; }

/* Method Stages */
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; margin: 1.4rem 0 0; }
.stage {
  --stage-color: #5642a5;
  --stage-line: #dfd6fb;
  --stage-bg: #f3effe;
  background: #fff;
  border: 1px solid var(--stage-line);
  border-top: 3px solid var(--stage-color);
  border-radius: 14px;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stage:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stage.select { --stage-color: #265987; --stage-line: #d3e5f5; --stage-bg: #ebf4fd; }
.stage.correct { --stage-color: #1f6f5b; --stage-line: #cbe7df; --stage-bg: #e7f6f1; }
.stage-body { padding: 0; }
.stage-step {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.71rem;
  font-weight: 650;
  color: var(--stage-color);
  background: var(--stage-bg);
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}
.stage h3 { font-family: var(--display); margin: 0 0 0.3rem; font-size: 1.04rem; font-weight: 700; color: var(--ink); line-height: 1.35; }
.stage p { margin: 0; font-size: 0.89rem; line-height: 1.55; color: var(--content); }
.stage-art {
  min-height: 132px;
  padding: 0.65rem;
  display: flex;
  gap: clamp(0.25rem, 1.2vw, 1rem);
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--stage-color);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 1px, transparent 1px) 0 0 / 12px 12px, var(--stage-bg);
}
.art-column { display: grid; justify-items: center; align-items: end; gap: 0.35rem; }
.art-column > span { white-space: nowrap; font-weight: 700; font-size: 0.75rem; }
.tile-group { display: grid; grid-auto-columns: 12px; grid-auto-flow: column; gap: 3px; }
.tile-group i { display: block; width: 12px; height: 12px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(26, 23, 69, 0.15); }
.patch-grid { grid-template: repeat(3, 12px) / repeat(4, 12px); grid-auto-flow: row; }
.candidate-grid { grid-template: repeat(2, 12px) / repeat(2, 12px); grid-auto-flow: row; gap: 4px; }
.tile-group .diamond { transform: rotate(45deg) scale(0.78); }
.tile-group .ink { background: #664dc0; }
.tile-group .lilac { background: #bba8f1; }
.tile-group .light { background: #e1d1f8; }
.tile-group .mint { background: #81c5af; }
.tile-group .blue { background: #8cb0ee; }
.score-rows { display: grid; gap: 4px; }
.tile-group .w0 { background: #d6e6f7; }
.tile-group .w1 { background: #a0bfeb; }
.tile-group .w2 { background: #709adc; }
.tile-group .w3 { background: #3f6fb6; }
.tile-group .good { background: #399b81; }
.selected-grid { padding-block: 0.25rem; }
.flow-arrow { display: block; flex: 0 0 15px; height: 2px; background: currentColor; position: relative; margin-top: -0.75rem; }
.flow-arrow::after { content: ""; position: absolute; inset: -3px 0 auto auto; border: 4px solid transparent; border-right: 0; border-left-color: currentColor; }
.target-rows { display: grid; gap: 3px; }
.target-rows i { width: 39px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, #357c69 44%, #b4dcd0 44%); }
.target-rows i + i { background: linear-gradient(90deg, #5fa68e 72%, #b4dcd0 72%); }
.delta { padding: 0.05rem 0.35rem; border: 1px solid #81c6b3; border-radius: 4px; margin-top: -0.75rem; background: #f1fbf7; font-size: 0.76rem; font-weight: 800; }
.stage.correct .stage-art { gap: 0.39rem; }

.method-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}
.method-figure:hover { box-shadow: var(--shadow-md); }
.method-figure img { width: auto; max-width: 100%; max-height: 340px; margin-inline: auto; padding: 1.1rem; object-fit: contain; }
.figure-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.68rem 1.2rem;
  background: var(--faint);
  border-top: 1px solid var(--line);
  font-size: 0.83rem;
  color: var(--content);
}
.zoom-hint {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  white-space: nowrap;
}

/* Results */
.results-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.results-head .section-lede { margin-bottom: 0; }
.chip-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-strong);
  box-shadow: var(--shadow-sm);
}
.chip-link:hover { border-color: var(--accent); background: var(--accent-soft); }

.results-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 1.25rem; align-items: stretch; }
.hero-plot {
  margin: 0;
  padding: clamp(1.25rem, 2.4vw, 1.85rem);
  background: radial-gradient(ellipse at top right, #2a2a66 0%, var(--navy) 66%);
  color: #fff;
  border-radius: 18px;
  border: 1px solid #2c356c;
  box-shadow: 0 18px 42px rgba(20, 24, 56, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.plot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; flex-wrap: wrap; }
.hero-plot h2 { font-family: var(--display); font-size: clamp(1.2rem, 1.9vw, 1.52rem); margin: 0; line-height: 1.25; letter-spacing: -0.03em; }
.hero-plot figcaption { margin: 0.3rem 0 0.85rem; font-size: 0.88rem; color: #bfc7e4; }
.plot-pill {
  font-family: var(--mono);
  font-size: 0.73rem;
  color: #d7d3ff;
  background: rgba(181, 176, 255, 0.14);
  border: 1px solid rgba(181, 176, 255, 0.28);
  padding: 0.26rem 0.65rem;
  border-radius: 999px;
}
.legend { display: flex; align-items: center; gap: 0.6rem 1.25rem; flex-wrap: wrap; color: #e4e9ff; font-size: 0.84rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.42rem; }
.legend i { width: 16px; height: 3px; border-radius: 4px; background: #a79fff; }
.legend .base { background: #9db0d9; }
.retention-chart { display: block; width: 100%; height: 270px; margin-top: 0.55rem; cursor: crosshair; }
.axis-caption { color: #b9c2e3; font-size: 0.83rem; text-align: center; margin: 0.2rem 0 0; }

.results-aside { display: grid; gap: 1rem; min-width: 0; }
.result-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  padding: clamp(1rem, 2vw, 1.4rem);
  box-shadow: var(--shadow-sm);
}
.result-panel h3 { font-family: var(--display); margin: 0 0 0.2rem; font-size: 1.12rem; font-weight: 700; letter-spacing: -0.02em; }
.result-panel p { color: var(--content); font-size: 0.87rem; margin: 0 0 0.85rem; }

/* Tables */
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid #e7eaf5; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: clamp(0.75rem, 1vw, 0.84rem); font-variant-numeric: tabular-nums; }
th, td { padding: 0.5rem clamp(0.28rem, 0.6vw, 0.58rem); text-align: right; white-space: nowrap; border-bottom: 1px solid #ebedf7; }
th:first-child { text-align: left; }
thead th { background: var(--faint); font-weight: 650; font-size: clamp(0.66rem, 0.85vw, 0.74rem); text-transform: uppercase; letter-spacing: 0.015em; color: var(--content); white-space: normal; line-height: 1.2; }
.detailed-results table { font-size: clamp(0.68rem, 0.88vw, 0.78rem); }
.detailed-results th, .detailed-results td { padding: 0.46rem clamp(0.18rem, 0.36vw, 0.38rem); }
.detailed-results thead th { font-size: clamp(0.6rem, 0.76vw, 0.68rem); letter-spacing: 0; }
tbody tr:hover { background: #f9faff; }
tbody tr.ref-row { background: #fbfbfe; color: var(--content); }
tr:last-child th, tr:last-child td { border-bottom: 0; }
.result-panel strong, .loopzip-row { color: var(--accent-strong); }
.loopzip-row { background: linear-gradient(90deg, #eeecff, #f5f4ff); font-weight: 750; }
.loopzip-row:hover { background: #e8e5ff; }
td.col-best { font-weight: 750; color: var(--accent-strong); }
.gain-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--mint);
  background: var(--mint-soft);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
}

/* Detailed tabs */
.detailed-results {
  margin-top: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  box-shadow: var(--shadow-sm);
}
.tab-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.85rem 1.2rem; margin-bottom: 1rem; }
.tab-header h3 { font-family: var(--display); margin: 0; font-size: 1.14rem; font-weight: 750; }
.bench-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.28rem;
  background: var(--faint);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.bench-tabs button {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--content);
  font: 600 0.83rem/1.1 var(--font);
  padding: 0.48rem 0.85rem;
  border-radius: 7px;
  transition: all 0.16s ease;
}
.bench-tabs button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.8); }
.bench-tabs button[aria-selected="true"] {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(71, 61, 205, 0.25);
}
.ablation-note { margin: 0 0 0.85rem; font-size: 0.88rem; color: var(--content); }
.paper-plots { display: grid; grid-template-columns: 1fr; gap: 1.15rem; margin-top: 1.4rem; }
.paper-plot {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}
.paper-plot:hover { box-shadow: var(--shadow-md); }
.paper-plot img { width: auto; max-width: 100%; max-height: 290px; padding: 1rem 1.25rem; margin: auto; object-fit: contain; }
.results-grid .paper-plot img { max-height: 310px; }

/* Citation */
.citation { display: grid; grid-template-columns: 0.62fr 1.38fr; align-items: start; gap: 2rem; }
.codebox { border: 1px solid var(--line); background: var(--faint); border-radius: 14px; min-width: 0; overflow: hidden; box-shadow: var(--shadow-sm); }
.codebox-top { padding: 0.65rem 0.95rem; border-bottom: 1px solid var(--line); background: #eef0fa; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.codebox-top > span { color: var(--content); font-family: var(--mono); font-weight: 600; font-size: 0.78rem; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.42rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #cfd4eb;
  background: #fff;
  color: var(--ink);
  font: 600 0.82rem/1 var(--font);
  transition: all 0.16s ease;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.copy-btn.copied { background: var(--accent); border-color: var(--accent); color: #fff; }
pre { margin: 0; padding: 1.15rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 0.82rem/1.68 var(--mono); color: #24214a; }

/* Footer */
.footer { background: var(--faint); border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem 1.5rem; flex-wrap: wrap; padding-block: 1.4rem; font-size: 0.86rem; color: var(--content); }
.footer-left { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.footer-brand { font-family: var(--display); font-weight: 800; color: var(--ink); margin: 0; }
.suite-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; }
.suite-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; margin-right: 0.35rem; color: var(--content); }
.suite-links a {
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--content);
  border: 1px solid transparent;
}
.suite-links a:hover { color: var(--accent); border-color: var(--line); background: #fff; }
.suite-links a[aria-current="page"] { color: var(--accent-strong); background: var(--accent-soft); border-color: #c9c4fa; }

/* Lightbox */
.lightbox {
  max-width: min(94vw, 1200px);
  max-height: 92vh;
  padding: 0;
  border: 1px solid rgba(181, 176, 255, 0.25);
  border-radius: 16px;
  background: #121530;
  color: #eef0ff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.6);
}
.lightbox::backdrop { background: rgba(10, 12, 28, 0.82); backdrop-filter: blur(8px); }
.lightbox-inner { position: relative; padding: 1.1rem; display: grid; gap: 0.8rem; }
.lightbox img { max-height: 76vh; width: auto; max-width: 100%; margin-inline: auto; border-radius: 8px; background: #fff; }
.lightbox p { text-align: center; font-size: 0.86rem; color: #c4cae6; margin: 0; }
.lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(18, 21, 48, 0.85);
  color: #fff;
  cursor: pointer;
}
.lightbox-close:hover { background: var(--accent); }

/* Reveal */
.reveal { opacity: 1; transform: none; transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1); }
.js-anim .reveal:not(.is-visible) { opacity: 0; transform: translateY(18px); }

@media (max-width: 1020px) {
  .results-grid, .paper-plots { grid-template-columns: 1fr; }
  .stages { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .wrap { width: calc(100% - 36px); }
  .hero, .citation { grid-template-columns: 1fr; gap: 1.8rem; }
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 0.7rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
}
@media (max-width: 600px) {
  .navlinks a:not(.nav-github) { display: none; }
  .topbar { min-height: 58px; }
  .retention-chart { height: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-anim .reveal:not(.is-visible) { opacity: 1; transform: none; }
}
