/* Independently implemented layout following the Nerfies academic project page. */
:root {
  color-scheme: light;
  --text: #4a4a4a;
  --heading: #363636;
  --line: #dedede;
  --muted: #757575;
  --content-width: 960px;
  --chart-blue: #526F91;
  --chart-slate: #82909D;
  --chart-gold: #AA8B60;
  --chart-teal: #5F8582;
  --chart-ink: #596579;
  --chart-track: #F1F3F5;
  --chart-bar-height: 14px;
  --body-font: 'Noto Sans', Arial, sans-serif;
  --title-font: 'Google Sans', 'Noto Sans', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: #fff; color: var(--text); font: 16px/1.6 var(--body-font); }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.2; }
h1 { font: 600 48px/1.14 var(--title-font); letter-spacing: -1.4px; }
h2 { font: 600 32px/1.25 var(--title-font); text-align: center; margin-bottom: 24px; }
h3 { font: 500 24px/1.25 var(--title-font); margin-bottom: 16px; }
p + p { margin-top: 16px; }
a { color: inherit; text-underline-offset: 3px; }
button, select, input { font: inherit; }
a, button, select, input, [tabindex] { outline-offset: 5px; }
:focus-visible { outline: 2px solid #555; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
.container, .prose { width: min(100% - 48px, var(--content-width)); margin-inline: auto; }
.page-toc { position: fixed; z-index: 20; left: max(20px,calc((100vw - var(--content-width))/2 - 192px)); top: 50%; transform: translate(-8px,-50%); width: 164px; font: 13px/1.4 var(--title-font); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s; }
.page-toc.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(-50%); transition-delay: 0s; }
.toc-heading { color: #888; font-size: 11px; margin: 0 0 14px 14px; }
.toc-scroll { max-height: calc(100dvh - 104px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b8b8b8 transparent; padding-right: 3px; }
.toc-items { position: relative; border-left: 1px solid #e2e2e2; }
.toc-items ol { list-style: none; padding: 0; margin: 0; }
.toc-items a { position: relative; display: block; padding: 9px 4px 9px 14px; color: #787878; text-decoration: none; transition: color .15s ease; }
.toc-items a:hover { color: #222; }
.toc-items a[aria-current="location"] { color: #222; font-weight: 600; }
.toc-indicator { position: absolute; z-index: 1; left: -2px; top: 0; width: 3px; height: 36px; background: #363636; pointer-events: none; transition: transform .2s ease, height .2s ease; }
.toc-toggle { display: none; }
[data-toc-target]:focus, #top:focus { outline: none; }
.publication-header { text-align: center; padding: 64px 0 28px; }
.publication-name { font-style: normal; }
.publication-authors { font: 20px/1.5 var(--title-font); margin-top: 24px; }
.submission-note { font: 16px/1.5 var(--title-font); margin-top: 8px; }
.resource-status { color: var(--muted); font-size: 13px; margin-top: 16px; }
.teaser { padding-top: 16px; }
.figure-link { display: block; cursor: zoom-in; }
.figure-link img { width: 100%; }
.paper-figure figcaption { font-size: 14px; line-height: 1.65; margin-top: 16px; }
.overview-figure { margin-top: 28px; }
.paper-section { padding-top: 56px; padding-bottom: 12px; }
#abstract p { text-align: justify; hyphens: auto; }
.section-intro { margin: -4px 0 26px; text-align: left; }
#demonstrations .section-intro, #method .section-intro, #results .section-intro { text-align: center; }
.control-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.control-row label { font-size: 14px; font-weight: 600; }
select { background: #fff; color: var(--heading); border: 1px solid #b5b5b5; border-radius: 4px; padding: 8px 34px 8px 12px; font-size: 14px; max-width: 100%; min-height: 40px; }
[hidden] { display: none !important; }
.demo-figure, .demo-thumbnails { width: 100%; }
.demo-screen { background: #080808; aspect-ratio: 16/9; width: 100%; overflow: hidden; border-radius: 8px; }
.demo-screen img, .demo-screen video { display: block; width: 100%; height: 100%; object-fit: contain; }
.teaser .demo-screen { background: #fff; }
/* Hide the source video's encoded edge: 9px at the top and 3px on each side at 1920 × 1080. */
.teaser video { background: #fff; clip-path: inset(.833334% .15625% 0 round 8px); }
.teaser .player-controls { grid-template-columns: 44px minmax(80px,1fr) 88px 44px; border-bottom: 0; }
.demo-figure figcaption { font-size: 14px; text-align: center; margin-top: 12px; }
.demo-figure figcaption span { color: var(--muted); }
.player-controls { display: grid; grid-template-columns: 44px minmax(80px,1fr) 88px; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); background: #fff; }
.player-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 8px; padding: 10px; color: #fff; background: #252525; }
.player-button:hover { background: #454545; }
.player-button:disabled { color: #aaa; cursor: default; }
.player-button svg { width: 24px; height: 24px; fill: currentColor; }
.player-mute { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; border: 1px solid #252525; border-radius: 8px; background: #252525; color: #fff; }
.player-mute:hover { background: #454545; }
.player-mute[data-muted="false"] { background: #fff; color: #363636; border-color: #c9c9c9; }
.player-mute[data-muted="false"]:hover { background: #f3f3f3; }
.player-mute svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.player-mute[data-muted="true"] .sound-on, .player-mute[data-muted="false"] .sound-off { display: none; }
.play-symbol { display: none; }
.player-button[data-paused="true"] .pause-symbol { display: none; }
.player-button[data-paused="true"] .play-symbol { display: block; }
.video-progress { --progress: 0%; appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; height: 44px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.video-progress::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(to right,#252525 var(--progress),#d9d9d9 var(--progress)); border-radius: 3px; }
.video-progress::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border: 2px solid #fff; border-radius: 50%; background: #252525; box-shadow: 0 0 0 1px #252525; }
.video-progress::-moz-range-track { height: 6px; background: #d9d9d9; border-radius: 3px; }
.video-progress::-moz-range-progress { height: 6px; background: #252525; border-radius: 3px; }
.video-progress::-moz-range-thumb { box-sizing: border-box; width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; background: #252525; box-shadow: 0 0 0 1px #252525; }
.video-progress:disabled { opacity: .4; cursor: default; }
.video-clock { text-align: right; color: #363636; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock-divider, .video-duration { color: var(--muted); }
.player-feedback { padding-top: 10px; font-size: 13px; color: var(--muted); }
.demo-thumbnails { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px 18px; margin-top: 24px; }
.demo-thumbnail { display: block; min-width: 0; padding: 0 0 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #686868; text-align: left; }
.demo-thumbnail img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border: 2px solid transparent; border-radius: 6px; filter: grayscale(1); opacity: .5; transition: filter .22s ease, opacity .22s ease, border-color .22s ease; }
.demo-thumbnail span { display: block; margin: 8px 2px 0; font: 500 14px/1.4 var(--title-font); }
.demo-thumbnail:hover { color: #222; }
.demo-thumbnail:focus-visible img { filter: grayscale(.5); opacity: .8; border-color: #aaa; }
@media (hover: hover) and (pointer: fine) {
  .demo-thumbnail:hover img { filter: grayscale(.5); opacity: .8; border-color: #aaa; }
}
.demo-thumbnail[aria-pressed="true"] { color: #222; border-bottom-color: #363636; }
.demo-thumbnail[aria-pressed="true"] img { border-color: #363636; filter: none; opacity: 1; }
.architecture { margin-top: 28px; }
.method-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 40px; }
.method-columns p { font-size: 15px; margin-bottom: 20px; }
.method-columns figcaption { font-size: 13px; }
.domain-control { display: flex; justify-content: center; min-inline-size: 0; border: 0; padding: 0; margin: 0; }
.domain-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px; width: 288px; max-width: 100%; padding: 3px; border: 1px solid #dedede; border-radius: 6px; background: #f3f3f3; }
.domain-option { position: relative; display: block; min-width: 0; cursor: pointer; }
.domain-option input { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.domain-option-label { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 8px; border-radius: 3px; color: #686868; font: 500 14px/1.4 var(--title-font); white-space: nowrap; transition: color .16s ease, background-color .16s ease; }
.domain-check { flex-shrink: 0; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.domain-option:hover input:not(:checked) + .domain-option-label { color: #333; background: #e7e7e7; }
.domain-option input:checked + .domain-option-label { color: #fff; background: #363636; }
.domain-option input:checked + .domain-option-label .domain-check { opacity: 1; }
.domain-option input:focus-visible + .domain-option-label { outline: 2px solid #555; outline-offset: 3px; }
.result-figure { --chart-label-width: 54px; --chart-value-width: 32px; --chart-column-gap: 7px; margin-top: 36px; }
.figure-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.figure-heading h3 { margin-bottom: 0; }
.figure-heading > span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 22px; margin: 18px 0 22px; font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch { display: inline-block; width: 12px; height: 12px; background: var(--color); }
.task-charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 28px; }
.task-chart { min-width: 0; }
.task-chart h4 { font: 500 15px var(--title-font); }
.task-chart .pair-note { font-size: 10px; color: #707070; line-height: 1.5; margin: 6px 0 10px; min-height: 30px; }
.chart-axis { display: flex; justify-content: space-between; margin: 0 calc(var(--chart-value-width) + var(--chart-column-gap)) 6px calc(var(--chart-label-width) + var(--chart-column-gap)); color: #888; font-size: 9px; line-height: 1.2; }
.bar-row { display: grid; grid-template-columns: var(--chart-label-width) minmax(0,1fr) var(--chart-value-width); align-items: center; gap: var(--chart-column-gap); min-height: 18px; margin: 10px 0; font-size: 11px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.bar-row > span { white-space: nowrap; }
.bar-track { background: var(--chart-track); height: var(--chart-bar-height); }
.bar-fill { width: var(--value); height: 100%; background: var(--color); transform-origin: left; }
.chart-reveal .bar-fill { transform: scaleX(0); }
.chart-reveal.is-revealed .bar-fill { animation: bar-enter .68s cubic-bezier(.22,.68,.25,1) var(--bar-delay,0ms) both; }
.bar-row b { text-align: right; font-weight: 400; }
.result-figure figcaption, .capability-figure figcaption { font-size: 12px; color: #6b6b6b; line-height: 1.7; margin-top: 22px; }
.result-description { font-size: 15px; margin-bottom: 18px; }
.expansion-charts { --chart-label-width: 104px; --chart-value-width: 47px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.expansion-charts h4 { font: 500 16px var(--title-font); margin-bottom: 16px; }
.expansion-charts .bar-row { font-size: 10px; }
.ablation-chart { --chart-label-width: 95px; --chart-value-width: 65px; margin: 28px 0 24px; }
.ablation-chart .bar-row { font-size: 13px; }
.ablation-chart .chart-axis { font-size: 10px; }
.matrix-scroll { overflow: auto; }
.capability-row { display: grid; grid-template-columns: 130px 110px 140px repeat(3,1fr); align-items: center; gap: 10px; padding: 11px 10px; border-bottom: 1px solid #e7e7e7; min-width: 730px; font-size: 12px; }
.capability-row > :nth-child(n+4) { justify-self: center; }
.capability-row.head { border-block: 1px solid #777; font-size: 11px; line-height: 1.4; padding-block: 14px; }
.capability-row.head > :nth-child(n+4) { text-align: center; }
.capability-row.ours { background: #f3f3f3; font-weight: 600; }
.cap-dot { display: inline-block; width: 11px; height: 11px; border: 1px solid #c4c4c4; border-radius: 50%; }
.cap-dot.present { background: #363636; border-color: #363636; }
.matrix-legend { margin: 15px 0; justify-content: end; }
footer { background: #f5f5f5; margin-top: 56px; padding: 36px 0; }
footer p { font-size: 13px; line-height: 1.8; text-align: center; }
dialog { padding: 24px; border: 0; border-radius: 6px; width: min(1200px,94vw); max-height: 94vh; color: var(--text); background: #fff; }
dialog::backdrop { background: #000c; }
.lightbox-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.lightbox-header h2 { font-size: 20px; text-align: left; margin: 0; }
.lightbox-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.lightbox-actions a { font-size: 13px; white-space: nowrap; }
.lightbox-header button { display: inline-flex; align-items: center; gap: 12px; padding: 7px 13px; border: 1px solid #ccc; background: #fff; border-radius: 4px; color: #363636; font-size: 13px; }
.lightbox-header button span { font-size: 23px; line-height: 1; }
dialog img { width: 100%; max-height: 72vh; object-fit: contain; }
dialog p { font-size: 13px; margin-top: 16px; }
body:has(dialog[open]) { overflow: hidden; }
.skip-link { position: absolute; top: -100px; background: white; padding: 10px; z-index: 10; }
.skip-link:focus { top: 0; }
@keyframes bar-enter { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (min-width: 541px) {
  .method-columns { grid-template-rows: repeat(4, auto); row-gap: 0; }
  .method-columns > article { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
  .method-columns .paper-figure { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
  .method-columns .figure-link { align-self: end; }
}
@media (max-width: 1399px) {
  .page-toc { left: 0; width: 24px; }
  .toc-toggle { display: flex; align-items: center; gap: 8px; width: 24px; padding: 12px 3px; border: 1px solid #dedede; border-radius: 3px; background: #fff; color: #666; font: 12px var(--title-font); writing-mode: vertical-rl; }
  .toc-toggle:hover { color: #222; border-color: #999; }
  .toc-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
  .page-toc:not(.is-open) .toc-panel { display: none; }
  .page-toc.is-open { width: 220px; }
  .page-toc.is-open .toc-toggle { position: absolute; top: 0; left: 0; border-right: 0; border-radius: 3px 0 0 3px; }
  .toc-panel { margin-left: 23px; padding: 18px 12px; border: 1px solid #dedede; border-radius: 0 3px 3px 3px; background: #fff; }
}
@media (max-width: 800px) {
  h1 { font-size: 40px; letter-spacing: -.8px; }
  .title-break { display: none; }
  .task-charts { grid-template-columns: repeat(2,1fr); }
  .expansion-charts { --chart-label-width: 126px; --chart-value-width: 55px; grid-template-columns: 1fr; gap: 24px; }
  .expansion-charts .bar-row { font-size: 12px; }
  .method-columns { column-gap: 24px; }
}
@media (max-width: 540px) {
  .publication-header { padding-top: 40px; }
  h1 { font-size: 32px; line-height: 1.18; letter-spacing: -.65px; }
  h2 { font-size: 28px; margin-bottom: 18px; }
  h3 { font-size: 22px; }
  .publication-authors { font-size: 18px; margin-top: 20px; }
  .resource-status { font-size: 12px; }
  .teaser { padding-top: 4px; }
  .paper-section { padding-top: 42px; }
  #abstract p { text-align: left; hyphens: none; font-size: 15px; }
  .section-intro { font-size: 15px; text-align: left; }
  .player-controls { grid-template-columns: 44px minmax(60px,1fr) 76px; gap: 10px; }
  .teaser .player-controls { grid-template-columns: 44px 1fr 44px; gap: 0 12px; }
  .teaser .video-progress { grid-column: 1/-1; grid-row: 1; }
  .teaser .player-button { grid-column: 1; grid-row: 2; }
  .teaser .video-clock { grid-column: 2; grid-row: 2; text-align: left; }
  .teaser .player-mute { grid-column: 3; grid-row: 2; }
  .video-clock { font-size: 12px; }
  .demo-thumbnails { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 12px; margin-top: 20px; }
  .demo-thumbnail span { font-size: 13px; }
  .demo-figure figcaption { font-size: 12px; }
  .method-columns { grid-template-columns: 1fr; gap: 28px; margin-top: 30px; }
  .paper-figure figcaption { font-size: 12px; }
  .domain-options { width: 100%; }
  .figure-heading { display: block; }
  .figure-heading > span { display: block; margin-top: 8px; }
  .task-charts { grid-template-columns: 1fr; gap: 24px; }
  .task-chart .pair-note { min-height: 0; font-size: 11px; }
  .bar-row { font-size: 12px; }
  .legend { margin-bottom: 18px; }
  .result-figure { margin-top: 30px; }
  .control-row { gap: 9px; }
  select { font-size: 13px; }
  .lightbox-header h2 { font-size: 17px; }
  .lightbox-header { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .lightbox-actions { width: 100%; justify-content: space-between; }
  dialog { padding: 16px; }
  footer { margin-top: 38px; padding: 28px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar-fill, .chart-reveal .bar-fill, .chart-reveal.is-revealed .bar-fill { animation: none; transform: none; }
  .page-toc, .toc-indicator, .toc-items a, .domain-option-label, .domain-check, .demo-thumbnail img { transition: none; }
}
@media print {
  .bar-fill, .chart-reveal .bar-fill, .chart-reveal.is-revealed .bar-fill { animation: none; transform: none; }
}

/* The interactive example remains part of Method and follows the shared content width. */
.interactive-demo { margin-top: 44px; }
.interactive-demo > h3 { text-align: center; margin-bottom: 14px; }
.interactive-intro { text-align: center; margin-bottom: 24px; }
.interactive-stage { position: relative; height: 600px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.interactive-stage iframe { display: block; width: 100%; height: 100%; border: 0; visibility: hidden; }
.interactive-stage.is-ready iframe { visibility: visible; }
.interactive-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: #fff; }
.interactive-cover > img { width: min(100%,760px); height: calc(100% - 120px); object-fit: contain; }
.interactive-loading { padding: 0 24px 20px; text-align: center; }
#retry-interactive { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 20px; border: 1px solid #363636; border-radius: 6px; background: #363636; color: #fff; font: 500 15px/1.3 var(--title-font); }
#retry-interactive:hover { background: #4a4a4a; }
#interactive-feedback { font-size: 13px; color: var(--muted); }
#retry-interactive { margin-top: 12px; }
.interactive-demo figcaption { font-size: 14px; line-height: 1.65; margin-top: 16px; }
@media (max-width: 698px) {
  .interactive-stage { height: 700px; }
  .interactive-cover > img { height: 350px; width: 100%; }
  .interactive-cover { gap: 12px; }
  .interactive-loading { padding-inline: 16px; }
}
