:root {
  --ink: #222;
  --muted: #666;
  --line: #ddd;
  --accent: #b54d24;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img, video { display: block; max-width: 100%; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button:disabled { cursor: default; opacity: .45; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -100px; padding: 12px 20px; background: #222; color: #fff; z-index: 100; }
.skip-link:focus { top: 10px; }
.section-wrap { width: min(1100px, calc(100% - 64px)); margin-inline: auto; }

.hero { padding-top: 48px; text-align: center; }
h1 { max-width: 1100px; margin: 0 auto 28px; font-size: 42px; line-height: 1.18; font-weight: 600; letter-spacing: -.8px; }
.authors { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 18px; row-gap: 9px; max-width: 1020px; margin: auto; font-size: 15px; line-height: 1.6; }
.authors a { color: #28639a; }
.authors a:hover { text-decoration: underline; text-underline-offset: 3px; }
sup { font-size: 10px; margin-left: 2px; vertical-align: super; }
.affiliations { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 17px; row-gap: 5px; font-size: 13px; line-height: 1.6; margin: 15px auto 0; color: #555; }
.affiliations span { white-space: nowrap; }
.corresponding { margin: 7px 0 22px; font-size: 12px; color: var(--muted); }
.paper-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 28px; }
.pill { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 22px; background: #333; color: #fff; font-size: 14px; line-height: 1.2; }
.pill:hover { color: #fff; background: #555; }
.pill.unavailable, .pill.unavailable:hover { background: #666; cursor: default; }
.pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.hero-film { margin: 0; }
.hero-film video { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #fff; }
.hero-film figcaption { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 10px 0 0; text-align: left; font-size: 13px; color: var(--muted); }
.play-control { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 5px 0; border: 0; background: transparent; font-size: 12px; color: inherit; }
.control-icon { width: 14px; text-align: center; font-size: 13px; }
.teaser-caption { margin: 17px auto 0; max-width: 1000px; font-size: 16px; line-height: 1.7; text-align: left; }

.method-section, .results-section { padding-top: 58px; }
.demo-section, .comparison-section, .citation-section { padding-top: 58px; }
.section-heading { text-align: center; margin-bottom: 25px; }
.section-heading h2 { margin-bottom: 13px; font-size: 30px; line-height: 1.25; font-weight: 600; }
.section-heading p { margin: 0 auto; max-width: 850px; font-size: 15px; line-height: 1.65; color: var(--muted); }
.method-intro, .method-description { max-width: 1000px; margin: 0 auto 24px; font-size: 16px; line-height: 1.75; text-align: left; }
.method-description { margin-top: 20px; margin-bottom: 0; }
.method-description strong { font-weight: 600; }
.pipeline { margin: 0; }
.pipeline img { width: 100%; height: auto; }
.pipeline figcaption { display: flex; justify-content: space-between; gap: 20px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.pipeline figcaption a { text-decoration: underline; text-underline-offset: 3px; }
.demo-frame { position: relative; aspect-ratio: 16/9; background: #111; overflow: hidden; }
.demo-frame video { width: 100%; height: 100%; object-fit: contain; }
.demo-play { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: 16px; border: 0; color: #fff; background: #0004; text-align: left; font-size: 18px; }
.demo-play small { display: block; font-size: 12px; margin-top: 6px; }
.play-disc { display: grid; place-items: center; height: 54px; width: 54px; padding-left: 4px; border-radius: 50%; background: #fff; color: #333; font-size: 20px; }

.case-controls { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.filter-group { display: flex; flex-wrap: wrap; gap: 14px; }
.filter { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 10px 2px; font-size: 13px; white-space: nowrap; color: #555; }
.filter.active { border-color: #333; color: #222; font-weight: 600; }
.filter:hover { color: var(--accent); }
.filter span { margin-left: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.case-position { font-size: 12px; color: var(--muted); white-space: nowrap; }
.case-stage { background: #fff; }
.case-caption { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; }
.stage-kicker { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.case-caption h3 { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 500; }
.case-arrows { display: flex; gap: 8px; }
.circle-button { display: grid; place-items: center; width: 36px; height: 34px; flex: none; border: 1px solid var(--line); border-radius: 3px; background: #fff; font-size: 18px; }
.circle-button:hover { background: #f5f5f5; }
.paired-videos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.paired-videos figure { margin: 0; min-width: 0; }
.paired-videos figcaption { padding: 0 0 9px; text-align: center; font-size: 15px; line-height: 1.3; }
.paired-videos .ours-label { font-weight: 600; }
.paired-videos video { width: 100%; aspect-ratio: 2/1; object-fit: contain; background: #111; }
.case-playback { display: flex; gap: 18px; align-items: center; padding: 12px 0; }
.case-playback input { width: 100%; min-width: 50px; height: 24px; accent-color: #666; cursor: pointer; }
.view-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.expand-button { border: 0; background: transparent; font-size: 12px; white-space: nowrap; padding: 5px 0; }
.expand-button span { margin-left: 5px; }
.user-reference { display: flex; align-items: center; gap: 20px; margin: 5px 0 20px; }
.user-reference img { width: 155px; height: 140px; object-fit: contain; background: #fff; }
.user-reference figcaption { font-size: 14px; color: var(--muted); }
.case-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 16px 12px; margin-top: 12px; }
.case-tile { display: flex; flex-direction: column; position: relative; min-width: 0; padding: 0; border: 0; border-bottom: 2px solid transparent; background: #fff; text-align: left; }
.case-tile[aria-pressed=true] { border-bottom-color: var(--accent); }
.case-tile img { width: 100%; height: auto; aspect-ratio: 2/1; object-fit: contain; background: #111; }
.case-tile span { flex: 1; padding: 8px 2px; font-size: 12px; line-height: 1.4; }
.case-tile[aria-pressed=true] span { color: var(--accent); }
.case-tile:hover span { text-decoration: underline; }
.case-tile .reference-tag { position: absolute; top: 4px; right: 4px; padding: 3px 4px; background: #fffe; font-size: 8px; color: #333; }
.comparison-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-bottom: 22px; }
.comparison-tabs button { padding: 7px 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 13px; }
.comparison-tabs button[aria-pressed=true] { border-bottom-color: #333; font-weight: 600; }
.comparison-tabs button:hover { color: var(--accent); }
.comparison-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; font-size: 12px; color: var(--muted); }
.comparison-frame { background: #111; }
.comparison-frame video { width: 100%; aspect-ratio: 16/9; object-fit: contain; }

.citation-section { padding-bottom: 48px; }
.citation-block { background: #f6f6f6; overflow: hidden; }
.code-title { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid #e6e6e6; font-size: 12px; color: var(--muted); }
.code-title button { display: flex; gap: 10px; padding: 4px 0; border: 0; background: transparent; font: inherit; }
.code-title button:hover { color: var(--accent); }
pre { margin: 0; padding: 20px; overflow: auto; font: 13px/1.75 ui-monospace,SFMono-Regular,Consolas,monospace; color: #333; }
.site-footer { display: flex; justify-content: center; align-items: center; gap: 28px; border-top: 1px solid #e8e8e8; padding-block: 25px 35px; font-size: 13px; color: var(--muted); }
.wordmark { display: inline-flex; }
.site-footer .wordmark img { width: 120px; height: auto; }
dialog { width: min(1440px,94vw); max-height: 92dvh; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); }
dialog::backdrop { background: #000b; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 20px; }
.dialog-top h2 { margin: 0; font-size: 21px; line-height: 1.4; font-weight: 500; }
#dialog-content { padding: 0 20px 20px; }
#dialog-content video { width: 100%; aspect-ratio: 2/1; }

@media (max-width: 950px) {
  h1 { font-size: 36px; }
  .authors { max-width: 760px; font-size: 14px; }
  .affiliations { max-width: 750px; font-size: 12px; }
  .case-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .section-wrap { width: calc(100% - 32px); }
  .hero { padding-top: 28px; }
  h1 { font-size: 28px; line-height: 1.25; letter-spacing: -.4px; margin-bottom: 24px; }
  h1 br { display: none; }
  .authors { gap: 8px 14px; font-size: 13px; }
  .affiliations { gap: 3px 10px; font-size: 11px; margin-top: 14px; }
  sup { font-size: 9px; }
  .corresponding { font-size: 10px; }
  .pill { font-size: 13px; padding: 10px 20px; }
  .hero-film figcaption { font-size: 11px; gap: 12px; }
  .play-control { font-size: 11px; }
  .teaser-caption, .method-intro, .method-description { font-size: 14px; line-height: 1.75; }
  .method-section, .demo-section, .results-section, .comparison-section, .citation-section { padding-top: 42px; }
  .section-heading { margin-bottom: 22px; }
  .section-heading h2 { font-size: 26px; }
  .section-heading p { font-size: 13px; }
  .pipeline figcaption { font-size: 11px; }
  .demo-play { font-size: 16px; gap: 14px; }
  .play-disc { width: 45px; height: 45px; font-size: 17px; }
  .case-controls { align-items: flex-end; gap: 12px; }
  .filter-group { gap: 4px 12px; }
  .filter { font-size: 12px; padding-block: 8px; }
  .case-position { font-size: 11px; padding-bottom: 10px; }
  .case-caption { gap: 12px; }
  .case-caption h3 { font-size: 17px; }
  .stage-kicker { font-size: 12px; }
  .case-arrows { gap: 6px; }
  .circle-button { width: 32px; height: 34px; }
  .paired-videos { grid-template-columns: 1fr; gap: 17px; }
  .paired-videos figcaption { font-size: 14px; padding-bottom: 6px; }
  .case-playback { gap: 12px; }
  .view-label { display: none; }
  .expand-button { font-size: 11px; }
  .user-reference img { width: 135px; height: 130px; }
  .user-reference figcaption { font-size: 13px; }
  .case-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px 8px; }
  .case-tile span { font-size: 11px; padding-block: 7px; }
  .case-tile .reference-tag { font-size: 7px; padding: 2px 3px; top: 3px; right: 2px; }
  .comparison-tabs { gap: 4px 12px; }
  .comparison-tabs button { font-size: 12px; }
  .comparison-toolbar { font-size: 11px; }
  .code-title { padding: 11px 13px; font-size: 11px; }
  pre { padding: 16px 13px; font-size: 11px; }
  .site-footer { flex-direction: column; gap: 12px; padding-block: 24px; font-size: 12px; }
  .site-footer .wordmark img { width: 110px; }
  dialog { width: 96vw; max-height: 94dvh; }
  .dialog-top { padding: 15px; gap: 15px; }
  .dialog-top h2 { font-size: 17px; }
  #dialog-content { padding: 0 12px 15px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}
