:root {
  color-scheme: light;
  --ink: #181b21;
  --muted: #505761;
  --blue: #194f8b;
  --header-bg: #0c0c0e;
  --header-ink: #f5f5f7;
  --header-muted: #c3c6cf;
  --header-height: 55px;
  --media-radius: 10px;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
img, video { display: block; width: 100%; height: auto; border-radius: var(--media-radius); }
:focus-visible { outline: 3px solid #246bbd; outline-offset: 4px; }
.media-shell { width: 60%; max-width: 1660px; margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 4; background: var(--header-bg); color: var(--header-ink); border-bottom: 1px solid #2b2b30; }
.site-header-inner { min-height: 54px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 8px; }
.site-brand { font-weight: 700; text-decoration: none; }
.hero-header { padding: clamp(24px, 3.2vw, 42px) 0 clamp(20px, 3.2vw, 42px); background: var(--header-bg); color: var(--header-ink); }
.hero-heading { text-align: center; }
.hero-heading .project-meta { margin: 1rem 0 0; }
.hero-heading .project-authors a { white-space: nowrap; }
.hero-heading .project-affiliations { color: var(--header-muted); }
.site-header :focus-visible { outline-color: #85b7f0; }
.project-title { max-width: 31ch; margin-inline: auto; font-size: clamp(1.8rem, 4.1vw, 3.3rem); font-weight: 640; line-height: 1.12; letter-spacing: -.04em; text-wrap: balance; }
nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px clamp(10px, 2.6vw, 28px); }
nav a { color: var(--header-muted); font-size: .96rem; font-weight: 600; text-decoration: none; }
nav a:hover { color: var(--header-ink); text-decoration: underline; text-underline-offset: 3px; }
.project-meta .project-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.project-meta .project-links a, .method-chapters button, .comparison-zoom {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 6px 14px;
  border: 1px solid #505a67; border-radius: 7px; background: linear-gradient(#454c56, #333943); color: #fff;
  box-shadow: inset 0 1px #ffffff20, 0 2px 0 #13161b, 0 3px 6px #171b2424;
  font-size: .9rem; font-weight: 650; text-decoration: none;
}
.project-meta .project-links a:hover, .method-chapters button:hover, .comparison-zoom:hover { background: #515a67; }
.project-meta .project-links a:active, .method-chapters button:active, .comparison-zoom:active { translate: 0 1px; box-shadow: inset 0 1px 2px #0005; }
.project-meta .project-links a, .comparison-zoom { gap: 7px; }
.project-links svg, .comparison-zoom svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.play { min-height: 38px; padding: 0 13px; border: 0; border-radius: 5px; color: #fff; background: #292f37; font-size: .9rem; font-weight: 650; }
.play:hover { background: #3c4452; }
.video-stage, .image-stage { position: relative; }
.carousel-arrow { position: absolute; z-index: 2; top: 50%; display: grid; place-items: center; width: clamp(32px, 3.8vw, 46px); aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: 0 2px 10px #0004; }
.carousel-arrow:hover { color: var(--blue); }
.carousel-arrow svg { width: clamp(16px, 1.8vw, 22px); height: clamp(16px, 1.8vw, 22px); fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.carousel-prev { left: 0; translate: -50% -50%; }
.carousel-next { right: 0; translate: 50% -50%; }
.carousel-next svg { rotate: 180deg; }
.hero-overview { padding-top: clamp(32px, 3vw, 42px); line-height: 1.55; text-align: center; }
.hero-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(4px, 1.6vw, 16px); max-width: 48rem; margin: 0 auto; padding: 0; list-style: none; font-size: .87rem; }
.hero-results strong { display: block; color: var(--blue); font-size: clamp(1.3rem, 2vw, 1.8rem); }
.hero-baseline { margin-top: 10px; color: var(--muted); font-size: .79rem; }
.abstract-copy { max-width: 74ch; margin: clamp(14px, 2vw, 22px) auto 0; line-height: 1.72; }
.method-lead { width: 100%; margin: 14px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.result-note { margin-top: 12px; color: var(--muted); font-size: .9rem; line-height: 1.6; }
#figure1-caption .result-note, .transfer .result-note { margin-top: calc(12px + 1lh); }
.result-note strong { color: var(--blue); }
.section { padding-top: clamp(48px, 7vw, 88px); }
#method { padding-top: calc(clamp(20px, 3vw, 36px) + 2lh); }
#top { scroll-margin-top: var(--header-height); }
.section, #method-walkthrough { scroll-margin-top: calc(var(--header-height) + 8px); }
main { padding-bottom: clamp(48px, 7vw, 84px); }
h2 { font-size: clamp(1.7rem, 3.7vw, 2.45rem); line-height: 1.13; letter-spacing: -.043em; text-align: center; }
.method-walkthrough { margin-top: clamp(16px, 2.5vw, 28px); }
.method-chapters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
.method-chapters button[aria-current="true"] { border-color: #3674a9; background: linear-gradient(#275f93, #194571); }
.method-walkthrough video { width: 90%; margin-inline: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #fff; }
.prompt, .case-note { color: var(--muted); line-height: 1.45; font-size: .9rem; }
.prompt { margin-top: 4px; }
.case-note { margin: 11px 0 0; }
.scene-focus { margin: 5px 0 0; color: var(--ink); font-size: .9rem; line-height: 1.45; }
.scene-icons { position: absolute; }
.scene-switcher { display: flex; justify-content: center; flex-wrap: wrap; margin: 14px 0 10px; }
.scene-switcher button { display: grid; place-items: center; width: 26px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.scene-switcher button::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 1px rgb(24 27 33 / 20%), 0 2px 5px rgb(24 27 33 / 28%);
}
.scene-switcher button:hover::before { box-shadow: 0 0 0 1px rgb(24 27 33 / 34%), 0 2px 5px rgb(24 27 33 / 35%); }
.scene-switcher button[aria-pressed="true"]::before { width: 14px; height: 14px; }
#video-comparison .video-status { margin-inline: clamp(12px, 2vw, 32px); }
#videos > .media-shell { width: 92%; }
#images > .media-shell { width: 75%; max-width: none; }
.comparison-toolbar { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; }
.comparison-toolbar .prompt { margin: 0; text-align: center; }
.comparison-zoom { white-space: nowrap; }
.is-zoomed .zoom-plus { display: none; }
.comparison { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(144px, 1fr); gap: 6pt; overflow-x: auto; }
.comparison:empty { display: none; }
.video-controls { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px clamp(8px, 2vw, 18px); margin: 14px clamp(12px, 2vw, 32px) 0; }
.video-controls .play { min-width: 90px; }
.video-controls .play:disabled { opacity: .55; cursor: default; }
.video-seek { --seek-thumb-size: 16px; appearance: none; display: block; min-width: 0; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; }
.video-seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: #ccd4de; }
.video-seek::-moz-range-track { height: 4px; border-radius: 2px; background: #ccd4de; }
.video-seek::-webkit-slider-thumb { appearance: none; width: var(--seek-thumb-size); height: var(--seek-thumb-size); margin-top: -6px; border: 0; border-radius: 50%; background: var(--blue); }
.video-seek::-moz-range-thumb { width: var(--seek-thumb-size); height: var(--seek-thumb-size); border: 0; border-radius: 50%; background: var(--blue); }
.video-time { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.video-status { margin-top: 10px; font-size: .9rem; line-height: 1.45; }
.video-status { color: #a22336; }
.tile { position: relative; min-width: 0; }
.tile > figcaption { position: absolute; z-index: 1; top: 6px; left: 6px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 1px 5px; max-width: calc(100% - 12px); padding: 3px 6px; border-radius: 4px; color: #fff; background: rgb(0 0 0 / 55%); font-size: .76rem; line-height: 1.35; font-weight: 650; pointer-events: none; }
.tile > figcaption small { font-size: .65rem; font-weight: 500; white-space: nowrap; }
.visual, .difference-map { position: relative; overflow: hidden; border-radius: 7px; }
.visual img, .visual video, .difference-map img { width: 100%; height: 100%; border-radius: 0; object-fit: contain; }
#comparison-videos .visual { aspect-ratio: 832 / 960; }
#comparison-videos .visual::after { content: ""; position: absolute; top: calc(50% - 1px); inset-inline: 0; height: 2px; background: #fff; pointer-events: none; }
#comparison-images .visual { aspect-ratio: 1; border-radius: 7px 7px 0 0; }
#comparison-images .difference-map { aspect-ratio: 1; margin-top: 2px; border-radius: 0 0 7px 7px; }
.reference-map { background: #08051c; }
.difference-key { display: grid; gap: 6px; width: min(22.5rem, 100%); margin: 14px auto 0; color: var(--muted); line-height: 1.25; text-align: center; }
.difference-key strong { color: var(--ink); font-size: .88rem; font-weight: 630; }
.difference-gradient { height: 9px; border-radius: 9px; background: linear-gradient(90deg, #08051c, #442179, #a02c71, #ee642b, #fff1a6); }
.difference-ticks { display: flex; justify-content: space-between; font-size: .79rem; font-variant-numeric: tabular-nums; }
#comparison-images .tile img { transform-origin: var(--zoom-origin); }
.is-zoomed #comparison-images .tile img { transform: var(--zoom-transform); }
@media (prefers-reduced-motion: no-preference) {
  #comparison-images .tile img { transition: transform 180ms ease; }
}
.result-figure { margin-top: clamp(20px, 3vw, 32px); }
.chart-key { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px clamp(12px, 2.5vw, 32px); margin-top: 10px; color: var(--muted); font-size: .9rem; }
.chart-key span { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.chart-key span::before { content: ""; width: 18px; border-top: 1.5px solid var(--swatch); }
.chart-key span::after { content: ""; position: absolute; left: 7px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--swatch); translate: 0 -50%; }
.chart-key .teacache-key::before { border-top-style: dashed; }
.evaluation-setup { margin-top: clamp(26px, 4vw, 44px); }
.evaluation-setup h3 { margin-bottom: 12px; }
.evaluation-setup th:nth-child(2), .evaluation-setup td:nth-child(2) { text-align: left; }
.transfer h2 { margin-bottom: 16px; }
.transfer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr)); align-items: start; gap: clamp(16px, 2.5vw, 28px); margin-top: 18px; }
.transfer-table { overflow-x: auto; }
.transfer-table table { width: 100%; min-width: 21.5rem; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.transfer-table caption { padding-bottom: 10px; font-size: .95rem; font-weight: 700; text-align: left; }
.transfer-table caption span { display: block; margin-top: 3px; color: var(--muted); font-size: .83rem; font-weight: 450; }
.transfer-table th, .transfer-table td { padding: 8px clamp(5px, .5vw, 8px); border-bottom: 1px solid #e0e7ef; text-align: right; white-space: nowrap; }
.transfer-table th:first-child { text-align: left; }
.transfer-table thead { color: #304457; }
.transfer-table tbody { background: #fff; }
.transfer-table th[scope="row"] { font-weight: 550; white-space: normal; }
.transfer-table .transfer-ours { color: var(--blue); background: #e6f0fc; }
.transfer-table .transfer-ours th { font-weight: 700; }
[hidden] { display: none !important; }

@media (max-width: 800px) {
  .site-header-inner { width: calc(100% - 32px); }
  :is(#videos, #images) > .media-shell { width: calc(100% - 40px); }
}

@media (max-width: 620px) {
  .site-header-inner { flex-direction: column; justify-content: center; gap: 4px; }
  nav a { font-size: .82rem; }
}

/* Short explanations first; detailed comparisons remain available on demand. */
.method-summary { margin: calc(14px + 1lh) 0 0; padding-left: 1.4rem; color: var(--muted); line-height: 1.7; }
.method-summary li + li { margin-top: .45rem; }
.method-summary strong { color: var(--ink); }
.result-details { margin-top: 16px; padding-top: 12px; border-top: 1px solid #dce0e5; font-size: .9rem; line-height: 1.65; color: var(--muted); }
.result-details summary { width: fit-content; cursor: pointer; color: var(--blue); font-weight: 600; }
.result-details summary:focus-visible { outline: 3px solid #246bbd; outline-offset: 4px; }
.result-details ul { padding-left: 1.4rem; margin: 12px 0 0; }
.result-details li + li { margin-top: .5rem; }
#figure1-caption .result-note + .result-note,
.transfer .result-note + .result-note { margin-top: 10px; }

.citation-card {
  max-width: 52rem;
  margin: 20px auto 0;
  border: 1px solid #dce3ec;
  border-radius: var(--media-radius);
  background: #f7f9fc;
  overflow: hidden;
}
.citation-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #dce3ec;
  background: #eef3f8;
}
.citation-label {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.copy-bibtex {
  padding: 5px 12px;
  border: 1px solid #c4d0df;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: .84rem;
  font-weight: 600;
}
.copy-bibtex:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.bibtex-code {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .86rem;
  line-height: 1.65;
}
@media (max-width: 800px) {
  .citation-section.media-shell { width: calc(100% - 32px); }
}
