:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #1c1d21;
  --muted: #5f636b;
  --line: #e2e4e9;
  --accent: #2348c5;
  --accent-soft: #e9edfb;
  --good: #1f7a45;
  --bad: #b3261e;
  --fig-bg: #ffffff;
  --radius: 10px;
  --wide: 1080px;
  --text-col: 760px;
}


* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 20px; }
.prose { max-width: var(--text-col); margin-left: auto; margin-right: auto; }

/* ---------- header ---------- */

header.hero { padding: 72px 0 36px; text-align: center; }

.hero h1 {
  margin: 0 auto;
  max-width: 900px;
  font-size: clamp(1.7rem, 4.2vw, 2.7rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

.hero h1 .name { color: var(--accent); }

.authors {
  margin: 28px 0 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 28px;
  font-size: 1.1rem;
}

.authors sup, .affils sup { font-size: 0.7em; color: var(--muted); }

.affils { color: var(--muted); font-size: 0.98rem; }
.affils span { white-space: nowrap; margin: 0 10px; }

.venue {
  display: inline-block;
  margin-top: 18px;
  padding: 3px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.links { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.95rem;
  font-weight: 600;
}
.btn:hover { text-decoration: none; opacity: 0.86; }
.btn svg { width: 17px; height: 17px; fill: currentColor; }
.btn.off {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line);
  cursor: default;
  font-weight: 500;
}
.btn.off:hover { opacity: 1; }

/* ---------- sections ---------- */

section { padding: 40px 0; }
section + section { border-top: 1px solid var(--line); }

h2 {
  margin: 0 0 18px;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  text-align: center;
}

h3 { margin: 34px 0 10px; font-size: 1.1rem; }

p { margin: 0 0 1em; }
.lead { color: var(--muted); text-align: center; }

.tldr {
  margin: 0 auto;
  max-width: var(--text-col);
  font-size: 1.12rem;
  text-align: center;
  text-wrap: balance;
}

/* ---------- media ---------- */

video, img { display: block; max-width: 100%; height: auto; }

.frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.frame video { width: 100%; }

figure { margin: 26px auto; }
figure img {
  margin: 0 auto;
  background: var(--fig-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
figure.plain img { padding: 0; }
figure.narrow { max-width: 820px; }
figcaption {
  max-width: var(--text-col);
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
}

.grid { display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 26px; }
.grid.one { grid-template-columns: minmax(0, 1fr); max-width: 860px; margin-left: auto; margin-right: auto; }

.clip { margin: 0; }
.clip .frame { margin-bottom: 10px; }
.clip h4 { margin: 0 0 2px; font-size: 1rem; }
.clip p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

.tag {
  display: inline-block;
  margin-right: 6px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.7;
  vertical-align: 1px;
}
.tag.ok { color: var(--good); border: 1px solid currentColor; }
.tag.fail { color: var(--bad); border: 1px solid currentColor; }

/* ---------- stats ---------- */

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 26px auto 0; max-width: 900px; }
.stat {
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.stat b { display: block; font-size: 2rem; line-height: 1.1; letter-spacing: -0.02em; color: var(--accent); }
.stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 0.9rem; line-height: 1.4; }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; margin: 22px auto; max-width: 900px; }

table { width: 100%; border-collapse: collapse; font-size: 0.93rem; font-variant-numeric: tabular-nums; }
caption { caption-side: bottom; padding-top: 10px; color: var(--muted); font-size: 0.88rem; line-height: 1.5; text-align: center; }
th, td { padding: 8px 10px; text-align: center; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { border-bottom: 1.5px solid var(--text); font-weight: 600; }
thead tr.group th { border-bottom: 1px solid var(--line); }
tbody tr + tr td { border-top: 1px solid var(--line); }
tbody tr.ours td { background: var(--accent-soft); font-weight: 600; }
tbody tr.sep td { border-top: 1.5px solid var(--muted); }
td.best { font-weight: 700; }

/* ---------- bibtex / footer ---------- */

pre {
  margin: 0 auto;
  max-width: var(--text-col);
  padding: 16px 18px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: 0.85rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

footer { padding: 30px 0 50px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; text-align: center; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  header.hero { padding-top: 48px; }
  .grid, .stats { grid-template-columns: minmax(0, 1fr); }
  figure img { padding: 6px; }
}
