:root {
  --ink: #1b1f24;
  --muted: #5b6470;
  --line: #e5e7eb;
  --soft: #f7f8fa;
  --blue: #245b8f;
  --blue-soft: #eaf3fb;
  --green: #2d7a4b;
  --green-soft: #edf8f1;
  --red: #c94040;
  --purple: #7a5aa6;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: white;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.64;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: var(--blue); }

.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.narrow { max-width: 980px; }
.text-container { max-width: 900px; }
.media-container { max-width: 1040px; }
.center { text-align: center; }
.section-pad { padding: 64px 0; }
.compact-top { padding-top: 34px; }
.alt { background: var(--soft); border-top: 1px solid #f0f1f3; border-bottom: 1px solid #f0f1f3; }

.hero { padding-top: 58px; }
.hero h1 {
  margin: 0 auto 18px;
  max-width: 1050px;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 750;
}
.authors {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 1.18rem;
  color: var(--blue);
  margin-top: 10px;
}
.affiliation { margin: 5px 0 0; color: #31363d; }
.venue { margin: 9px 0 20px; font-size: 1.15rem; font-weight: 700; }

.link-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 20px 0 10px;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 9px 15px;
  border-radius: 999px;
  text-decoration: none;
  color: white;
  background: #2b2f35;
  border: 1px solid #2b2f35;
  font-size: .94rem;
  font-weight: 650;
  transition: transform .15s ease, background .15s ease;
}
.pill:hover { transform: translateY(-1px); background: #111418; }
.pill.muted { background: #f1f3f5; color: #8a929c; border-color: #e2e5e9; cursor: default; }

.hero-media { margin-top: 34px; }
.hero-media video {
  width: 100%;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 10px 36px rgba(16, 24, 40, .10);
}
.teaser-caption {
  max-width: 930px;
  margin: 18px auto 0;
  text-align: center;
  color: #333a43;
  font-size: 1.03rem;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h3 { margin: 0 0 8px; font-size: 1.13rem; line-height: 1.35; }
p { margin: 0 0 16px; }
.section-heading { max-width: 900px; margin: 0 auto 34px; text-align: center; }
.section-heading p { color: #46505b; }

.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.video-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(20, 30, 45, .05);
}
.video-card video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.card-copy { padding: 18px 20px 20px; }
.card-copy p { color: var(--muted); margin-bottom: 0; font-size: .97rem; }

.figure-wide, .figure-medium, .paper-figure { margin: 0; }
.figure-wide img {
  width: 100%;
  background: white;
  border-radius: 10px;
  border: 1px solid #edf0f2;
}
.figure-medium { max-width: 860px; margin: 0 auto; text-align: center; }
.figure-medium img { width: 100%; background: white; border-radius: 10px; border: 1px solid var(--line); }
figcaption { color: #65707c; font-size: .92rem; margin-top: 9px; line-height: 1.45; }

.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.idea-card {
  border: 1px solid var(--line);
  border-top: 4px solid #5b6470;
  border-radius: 12px;
  padding: 20px;
  background: white;
}
.idea-card.highlight-blue { border-top-color: var(--blue); }
.idea-card.highlight-green { border-top-color: var(--green); }
.idea-card p { margin: 0; color: var(--muted); font-size: .96rem; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: #737d88; font-weight: 750; margin-bottom: 8px; }

.gate-box {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  background: #fbfbfc;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.gate-box > div { display: grid; grid-template-columns: 14px 1fr; column-gap: 9px; align-items: center; }
.gate-box span:last-child { grid-column: 2; color: var(--muted); font-size: .91rem; }
.gate-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.gate-dot.safe { background: var(--green); }
.gate-dot.risk { background: var(--red); }
.gate-dot.uncertain { background: var(--purple); }

.figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.paper-figure { background: white; padding: 14px; border-radius: 12px; border: 1px solid var(--line); }
.paper-figure img { width: 100%; }

.stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.stat { text-align: center; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 22px 18px; }
.stat-value { font-size: 2.15rem; line-height: 1; font-weight: 780; color: var(--blue); letter-spacing: -.03em; }
.stat-label { margin-top: 8px; color: var(--muted); font-size: .9rem; line-height: 1.35; }

.result-callout {
  margin: 28px auto 0;
  max-width: 870px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  background: #f8fbfd;
  border: 1px solid #dce9f3;
  border-radius: 14px;
  overflow: hidden;
}
.result-callout > div:not(.divider) { padding: 22px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.divider { width: 1px; background: #dce9f3; }
.big-number { font-size: 2.25rem; font-weight: 800; color: var(--blue); line-height: 1; }
.small-label { margin-top: 8px; color: #53606c; font-size: .9rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
table { border-collapse: collapse; width: 100%; min-width: 850px; font-size: .94rem; }
th, td { padding: 12px 13px; text-align: center; border-bottom: 1px solid #eceff2; }
th:first-child, td:first-child { text-align: left; }
thead th { background: #f8f9fa; font-weight: 720; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfd; }
tr.ours td { background: var(--green-soft); color: #1f5135; }
tr.ours:hover td { background: #e5f4eb; }
.small-note { color: #747e88; font-size: .87rem; margin-top: 10px; }

.recovery-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 900px; margin: 0 auto; }
.mini-table { border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: white; }
.mini-row { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-top: 1px solid #edf0f2; color: #505965; font-size: .94rem; }
.mini-row.strong { color: #245f3c; font-weight: 700; }
.full-video-grid { align-items: start; }

.bibtex-box { position: relative; background: #111418; color: #e8edf2; border-radius: 12px; padding: 22px; overflow-x: auto; }
.bibtex-box pre { margin: 0; font-size: .92rem; line-height: 1.55; }
.bibtex-box button {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid #424850;
  color: #ecf1f5;
  background: #252a30;
  border-radius: 7px;
  padding: 6px 10px;
  cursor: pointer;
}
.bibtex-box button:hover { background: #333941; }

footer { padding: 34px 0 44px; color: #6b747e; font-size: .88rem; }
footer p { margin: 3px 0; }
.template-note { color: #959ca4; }

@media (max-width: 850px) {
  body { font-size: 16px; }
  .section-pad { padding: 50px 0; }
  .video-grid, .figure-grid, .three-col, .stats-row, .recovery-results { grid-template-columns: 1fr; }
  .gate-box { grid-template-columns: 1fr; }
  .result-callout { grid-template-columns: 1fr; }
  .result-callout .divider { width: auto; height: 1px; }
  .hero { padding-top: 38px; }
  .hero h1 { font-size: clamp(2rem, 9vw, 3rem); }
}

@media (max-width: 520px) {
  .container { width: min(100% - 24px, 1120px); }
  .authors { gap: 8px 20px; }
  .pill { min-width: 82px; padding: 8px 12px; }
  .section-heading { margin-bottom: 26px; }
}
