:root {
  --ink: #14233f;
  --body: #33415a;
  --muted: #65728a;
  --line: #dfe4ec;
  --tint: #f3f6fa;
  --blue: #1f6fb5;
  --red: #d9675f;
  --green: #7fbf8e;
  --sky: #6fb7d6;
  --yellow: #e9c46a;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--body); font: 400 17px/1.65 var(--sans); }
img, video { display: block; width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 800px; }
main > section.wrap { padding-top: 72px; }
main > section.band { margin-top: 72px; padding: 64px 0; background: var(--tint); }
main > section.band + section.wrap { padding-top: 64px; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0; }
h2 { font-size: 32px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 14px; }
h3 { font-size: 21px; font-weight: 600; margin: 44px 0 6px; }
h2 + h3 { margin-top: 20px; }
h4 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
p { margin: 0 0 14px; }
.lead { font-size: 19px; line-height: 1.55; max-width: 780px; margin-bottom: 24px; }
.sub { color: var(--muted); margin-bottom: 14px; }
.cap, figcaption { color: var(--muted); font-size: 15px; line-height: 1.5; }
.cap { margin-top: 10px; }
figure { margin: 0; }
figcaption { margin-top: 10px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); }
.nav-in { max-width: 1080px; margin: 0 auto; padding: 0 24px; height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.dots { display: grid; grid-template-columns: 7px 7px; gap: 2px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; }
.dots i:nth-child(1) { background: var(--red); }
.dots i:nth-child(2) { background: var(--green); }
.dots i:nth-child(3) { background: var(--sky); }
.dots i:nth-child(4) { background: var(--yellow); }
.nav-links { display: flex; gap: 22px; font-size: 14.5px; }
.nav-links a { color: var(--muted); white-space: nowrap; }
.nav-links a:hover, .nav-links a.on { color: var(--ink); text-decoration: none; }

/* Hero */
.hero-text { text-align: center; padding-top: 56px; }
.venue { font: 500 14px var(--mono); color: var(--muted); margin-bottom: 16px; }
h1 { font-size: 46px; font-weight: 700; letter-spacing: -.02em; line-height: 1.14; max-width: 900px; margin: 0 auto 22px; text-wrap: balance; }
h1 .x { color: var(--blue); }
.authors { font-size: 19px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; margin-bottom: 4px; }
.authors a, .authors span { color: var(--ink); font-weight: 500; }
.authors sup { margin-left: -22px; color: var(--muted); }
.affil { color: var(--muted); margin-bottom: 22px; }
.sep { margin: 0 6px; }
.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 34px; }
.btn { padding: 9px 22px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-weight: 500; font-size: 16px; }
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--blue); border-color: var(--blue); }
.teaser { max-width: 1440px; margin: 0 auto; }
.teaser figcaption { text-align: center; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 22px 16px; text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stats dt { font-size: 36px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.stats dd { margin: 6px 0 0; font-size: 14.5px; line-height: 1.35; color: var(--muted); }
main > section.wrap:first-child { padding-top: 48px; }

/* Media grids */
.grid { display: grid; gap: 8px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.clip { aspect-ratio: 16 / 9; object-fit: cover; background: #e9edf3; border-radius: 6px; }
.clip.sim { display: block; width: 100%; background: #fff; }
.pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.pair .g2 { grid-template-columns: 1fr; }
.bad { color: #b4453c; }
.good { color: #2d7d4c; }

/* Overview video */
.overview { max-width: 920px; margin: 0 auto; aspect-ratio: 16 / 9; background: #fff; border-radius: 8px; }

/* Method */
.factors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 32px; }
.factors div { padding: 14px 16px; background: var(--tint); border-radius: 8px; border-top: 3px solid; }
.factors b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 2px; }
.factors span { font-size: 15px; line-height: 1.45; display: block; }
.f-red { border-color: var(--red) !important; }
.f-blue { border-color: var(--sky) !important; }
.f-green { border-color: var(--green) !important; }
.fig { margin-top: 12px; }
.fig.slim { max-width: 820px; margin-left: auto; margin-right: auto; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 8px; }
.cols h3 { margin-top: 24px; font-size: 18px; }
.cols p { font-size: 16px; line-height: 1.55; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { counter-increment: s; font-size: 15.5px; line-height: 1.45; }
.steps li::before { content: counter(s); display: block; font: 500 14px var(--mono); color: var(--blue); margin-bottom: 4px; }
.steps b { color: var(--ink); }

/* Results */
.seg { display: inline-flex; padding: 3px; background: var(--tint); border-radius: 8px; margin-bottom: 14px; }
.seg button { font: 500 15px var(--sans); color: var(--muted); background: none; border: 0; border-radius: 6px; padding: 7px 16px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(20,35,63,.14); }
.table-scroll { overflow-x: auto; }
.results { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 15.5px; }
.results th { font-weight: 500; color: var(--muted); font-size: 14px; padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); line-height: 1.3; }
.results th:first-child, .results td:first-child { text-align: left; padding-left: 12px; }
.results .groups th { text-align: center; color: var(--ink); font-weight: 600; }
.results td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 14.5px; }
.results td:first-child { font-family: var(--sans); font-size: 15.5px; color: var(--ink); }
.results td.best { font-weight: 700; color: var(--ink); }
.results tr.ours td { background: #e9f2fa; }
.results tr.ours td:first-child { font-weight: 600; }
.side { display: grid; grid-template-columns: 5fr 4fr; gap: 36px; align-items: center; margin-top: 44px; }
.side h3 { margin-top: 0; margin-bottom: 10px; }

/* BibTeX */
.bib { position: relative; background: var(--tint); border-radius: 8px; }
.bib pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 400 14px/1.6 var(--mono); color: var(--ink); }
#copy { position: absolute; top: 10px; right: 10px; font: 500 13px var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px 11px; cursor: pointer; }

.foot { margin-top: 72px; padding: 28px 0 36px; border-top: 1px solid var(--line); }
.foot img { width: 140px; }

@media (max-width: 860px) {
  body { font-size: 16px; }
  h1 { font-size: 34px; }
  h2 { font-size: 27px; }
  .lead { font-size: 17px; }
  .nav-links { display: none; }
  .pair, .side, .cols, .factors { grid-template-columns: 1fr; }
  .pair .g2 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cols { gap: 0; }
  main > section.wrap { padding-top: 56px; }
}
@media (max-width: 560px) {
  .wrap, .nav-in { padding: 0 16px; }
  h1 { font-size: 29px; }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .stats dt { font-size: 29px; }
  .authors { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
