:root {
  --fg: #1d2327; --muted: #5f6b72; --line: #dfe4e6; --bg: #ffffff; --card: #f6f8f8;
  --accent: #2f6fb3; --rider: #5b9ee9; --horse: #d1b380;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--fg); background: var(--bg); }
a { color: var(--accent); }
main, .hero, footer { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.hero { text-align: center; padding-top: 48px; padding-bottom: 8px; }
.hero h1 { font-size: 2.6rem; margin: 0 0 4px; letter-spacing: -.01em; }
.subtitle { font-size: 1.25rem; color: var(--muted); margin: 0 0 18px; }
.authors { font-size: 1.1rem; margin: 0 0 18px; }
.authors span { margin: 0 14px; }
.links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.button { display: inline-block; padding: 8px 18px; border-radius: 999px; background: var(--fg); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; }
.button.disabled { background: #9aa4a9; cursor: default; }
section { margin: 46px 0; }
h2 { font-size: 1.55rem; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.hint, .caption, .small { color: var(--muted); font-size: .92rem; }
.teaser-grid { display: grid; grid-template-columns: 747fr 541fr 579fr 826fr;  /* image widths at equal height */ gap: 8px; align-items: end; }
.teaser-grid figure { margin: 0; text-align: center; }
.teaser-grid img { width: 100%; display: block; }
figcaption { font-size: .85rem; color: var(--muted); }
figure.wide { margin: 24px 0; }
figure.wide img { width: 100%; }
.method li { margin-bottom: 6px; }
.bibtex { background: var(--card); border: 1px solid var(--line); padding: 14px; overflow-x: auto; font-size: .85rem; }
footer { color: var(--muted); font-size: .85rem; padding: 30px 20px 50px; text-align: center; }

/* viewer */
.viewer-card { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.group-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button, #clip-tabs button { border: 0; background: transparent; padding: 6px 12px; font: inherit; font-size: .9rem; cursor: pointer; color: var(--fg); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--fg); color: #fff; }
.seg button:disabled { color: #b5bdc1; cursor: not-allowed; }
#clip-tabs button { border: 1px solid var(--line); border-radius: 999px; background: #fff; }
#clip-tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
#clip-tabs button.stress { font-style: italic; }
.check { font-size: .88rem; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage video.backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.labels span { position: absolute; top: 10px; padding: 2px 10px; border-radius: 6px; background: rgba(255,255,255,.85); font-weight: 600; font-size: .9rem; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); background: rgba(255,255,255,.7); z-index: 3; }
.loading.hidden { display: none; }
.transport { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.transport input[type=range] { flex: 1; }
.transport button { width: 40px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
#frame-label { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .88rem; min-width: 80px; text-align: right; }
.below { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 12px; }
.input-video video { width: 100%; border-radius: 6px; background: #000; display: block; }
table.metrics { border-collapse: collapse; width: 100%; font-size: .9rem; align-self: start; background: #fff; border-radius: 6px; }
table.metrics th, table.metrics td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: right; }
table.metrics th:first-child, table.metrics td:first-child { text-align: left; }
table.metrics td.best { font-weight: 700; }
table.metrics caption { caption-side: bottom; text-align: left; color: var(--muted); font-size: .8rem; padding-top: 6px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; }
.video-grid figure { margin: 0; }
.video-grid video { width: 100%; border-radius: 6px; border: 1px solid var(--line); display: block; }
@media (max-width: 760px) {
  .hero h1 { font-size: 2rem; }
  .teaser-grid { grid-template-columns: 1fr 1fr; }
  .below { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
}
.note { background: #fff7e6; border: 1px solid #f1d9a6; border-radius: 8px; padding: 10px 14px; font-size: .92rem; }
