:root {
  color-scheme: light;
  --ink: #243449;
  --muted: #566476;
  --accent: #355c87;
  --selected-fill: linear-gradient(135deg, #527aa1 0%, #3a628c 46%, #2d4e73 100%);
  --selected-shadow: inset 0 1px 0 #ffffff30, inset 0 -1px 0 #172e4826, 0 3px 8px #294a7026, 0 1px 2px #294a7014;
  --blue: #aabed5;
  --blue-soft: #e6edf5;
  --sage: #bfd0c3;
  --sage-soft: #eaf0ec;
  --line: #d8dee5;
  --paper: #fafbfc;
  --split: 50%;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; border-top: 4px solid var(--blue); background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.65; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
svg { display: block; }
sup { font-size: .65em; vertical-align: super; line-height: 0; margin-left: 2px; }
[hidden] { display: none !important; }
.page-width { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: absolute; left: 20px; top: -70px; z-index: 99; background: #fff; padding: 10px 18px; border: 1px solid var(--accent); }
.skip-link:focus { top: 15px; }

/* Title, authors, and release resources. */
.hero { text-align: center; padding-top: 52px; padding-bottom: 40px; }
.hero h1 { max-width: 1060px; margin: 0 auto 28px; font-weight: 600; line-height: 1.13; letter-spacing: -1.7px; text-wrap: balance; }
.title-main { display: block; font-size: clamp(14px, 4.8vw, 54px); white-space: nowrap; }
.title-sub { display: block; max-width: 970px; margin: 15px auto 0; color: #53667d; font-size: clamp(20px, 2vw, 25px); line-height: 1.4; font-weight: 400; letter-spacing: -.4px; }
.authors { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px 23px; margin: 0 auto 12px; font-size: 17px; font-weight: 450; }
.authors a { white-space: nowrap; color: var(--ink); }
.affiliations { max-width: 1020px; display: flex; justify-content: center; flex-wrap: wrap; gap: 2px 20px; margin: auto; color: var(--muted); font-size: 13px; }
.author-notes { margin: 10px 0 24px; display: flex; gap: 22px; justify-content: center; font-size: 12px; color: var(--muted); }
.resource-links { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; margin-top: 23px; }
.resource-button { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid #d3dce5; border-radius: 999px; background: #edf2f7; color: #3d536b; font-size: 14px; font-weight: 600; line-height: 1.5; letter-spacing: -.1px; opacity: 1; }
.resource-button svg { width: 16px; height: 16px; fill: currentColor; }
.soon { margin-left: 2px; padding: 2px 6px; border-radius: 999px; background: #fff; color: #61746b; font-size: 10px; font-weight: 500; line-height: 1.5; letter-spacing: 0; }
.section-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 34px; margin-top: 35px; padding: 13px 0; border-block: 1px solid transparent; background: linear-gradient(90deg, transparent, #c2cedb 35%, #b7c6d6 50%, #c2cedb 65%, transparent) center top / 100% 1px no-repeat, linear-gradient(90deg, transparent, #c2cedb 35%, #b7c6d6 50%, #c2cedb 65%, transparent) center bottom / 100% 1px no-repeat; }
.section-nav a { color: #556a82; font-size: 13px; font-weight: 500; letter-spacing: 0; }

/* Comparison controls stay outside the image so the reconstruction has room. */
.comparison-section { padding-bottom: 38px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 23px; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 10px; font-weight: 600; letter-spacing: 1.9px; text-transform: uppercase; }
h2 { margin: 0; font-size: 30px; line-height: 1.25; font-weight: 600; letter-spacing: -.7px; }
.comparison-section > .section-heading { display: block; text-align: center; margin-bottom: 25px; }
.comparison-section > .section-heading > p { max-width: none; margin-top: 10px; }
.section-heading > p { max-width: 430px; margin: 0 0 2px; color: var(--muted); font-size: 13px; }
.sequence-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px 140px; }
.sequence-tab { position: relative; padding: 9px 22px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #64758b; font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: -.1px; transition: background .15s, color .15s, box-shadow .18s; }
.sequence-tab:hover { background: #eaf0f5; color: var(--ink); }
.sequence-tab[aria-pressed=true] { border-color: #365b82; background: var(--selected-fill); box-shadow: var(--selected-shadow); color: #fff; }
.comparison-layout { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 0; }
.reference-selector { position: relative; z-index: 1; padding-top: 3px; }
.selector-label { margin: 0 0 11px 12px; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.method-buttons { display: flex; flex-direction: column; gap: 8px; }
.method-button { position: relative; width: calc(100% - 12px); margin-left: 12px; display: flex; align-items: center; min-height: 44px; padding: 11px 17px; border: 0; border-radius: 8px 0 0 8px; background: #e0e7ee; text-align: left; color: #455a70; font-size: 13px; font-weight: 500; line-height: 1.5; letter-spacing: 0; transition: background .15s, color .15s, box-shadow .18s; }
.method-button:hover { background: #cedbe7; color: var(--ink); }
.method-button[aria-pressed=true] { width: 100%; margin-left: 0; padding-left: 29px; background: var(--selected-fill); box-shadow: var(--selected-shadow); color: #fff; font-weight: 600; }
.sequence-tab[aria-pressed=true]:hover, .method-button[aria-pressed=true]:hover { background: linear-gradient(135deg, #527aa1 0%, #3e6892 46%, #31567c 100%); }
.method-button:active { background: #bfd0e0; }
.sequence-tab[aria-pressed=true]:active, .method-button[aria-pressed=true]:active { background: linear-gradient(135deg, #3c658d, #2b4b6f); box-shadow: inset 0 2px 4px #172e4833, 0 1px 3px #294a7020; }
.method-button:focus-visible { z-index: 2; outline-offset: 2px; }
.sidebar-note { margin: 19px 12px 0; color: #748193; font-size: 10px; line-height: 1.8; }
.player-shell { min-width: 0; border-radius: 12px; box-shadow: 0 8px 28px #2434490c; }
.video-stage { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #1e2d3e; border-radius: 12px 12px 0 0; isolation: isolate; touch-action: pan-y; }
.comparison-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #1e2d3e; pointer-events: none; }
.reference-video { clip-path: inset(0 calc(100% - var(--split)) 0 0); z-index: 1; }
.comparison-frame { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #1e2d3e; pointer-events: none; z-index: 2; }
.reference-frame { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.video-stage[data-paired=true] .comparison-frame { display: block; }
.comparison-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #1e2d3e; pointer-events: none; z-index: 2; }
.reference-poster { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.video-stage[data-preview=false] .comparison-poster { display: none; }
.video-label { position: absolute; top: 14px; display: flex; flex-direction: column; gap: 1px; padding: 5px 10px; border-radius: 1px; background: rgba(29, 43, 60, .82); color: #fff; font-size: 12px; font-weight: 500; line-height: 1.5; pointer-events: none; z-index: 2; }
.video-label-left { left: 14px; }
.video-label-right { right: 14px; background: rgba(63, 91, 122, .9); }
.rate-label { font-size: 10px; font-weight: 400; opacity: .85; }
.rate-label:empty { display: none; }
.split-divider { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; margin-left: -1px; background: #fff; z-index: 3; pointer-events: none; box-shadow: 0 0 4px #26384d50; }
.split-handle { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: rgba(38, 56, 77, .7); }
.split-handle svg { width: 28px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.split-slider { appearance: none; -webkit-appearance: none; position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; padding: 0; margin: 0; background: transparent; cursor: ew-resize; border: 0; opacity: 0; touch-action: pan-y; }
.split-slider::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 1px; height: 100%; background: transparent; }
.split-slider::-moz-range-thumb { width: 1px; height: 100%; border: 0; background: transparent; }
.split-slider::-moz-range-track { background: transparent; }
.video-stage:has(.split-slider:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.video-stage:has(.split-slider:focus-visible) .split-handle { background: var(--accent); }
.loading-status { position: absolute; z-index: 5; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 14px 8px; color: #fff; font-size: 12px; pointer-events: none; }
.loading-badge { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 12px; border-radius: 8px; background: rgba(29, 43, 60, .88); }
.spinner { height: 17px; width: 17px; border: 2px solid #ffffff55; border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player-controls { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 7px 11px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; background: #eef3f7; }
.icon-button { display: grid; place-items: center; width: 30px; height: 30px; padding: 5px; flex: 0 0 30px; border: 0; border-radius: 1px; background: transparent; color: var(--accent); }
.icon-button:hover { background: #dbe5ef; }
.icon-button:disabled { opacity: .4; }
.icon-button svg { width: 20px; height: 20px; fill: currentColor; }
.fullscreen-button svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.time-label { min-width: 68px; color: #566e87; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timeline { width: 100%; height: 4px; min-width: 40px; margin: 0; cursor: pointer; accent-color: var(--accent); }
.frame-label { min-width: 74px; color: #64758b; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.video-footnote { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; color: #708095; font-size: 10px; }
.rate-note { margin: 4px 0 0; color: #708095; font-size: 10px; }
.error-message { padding: 14px 18px; border: 1px solid #dbc1b4; border-radius: 2px; background: #fcf4f0; color: #803b20; font-size: 13px; }
.player-shell:fullscreen { display: flex; flex-direction: column; justify-content: center; padding: 12px; max-height: 100vh; background: #1c2938; }
.player-shell:fullscreen .video-stage { max-height: calc(100vh - 110px); height: calc(100vh - 110px); aspect-ratio: auto; }
.player-shell:fullscreen .video-footnote, .player-shell:fullscreen .rate-note { color: #c8d5e2; }
.player-shell:fullscreen .comparison-video { object-fit: contain; }

/* Paper content: figures, concise explanations, and the results table. */
.paper-section { border-top: 1px solid var(--line); padding-top: 38px; padding-bottom: 42px; }
.section-intro { max-width: 1060px; margin: 0 0 23px; color: #5a6b7d; font-size: 15px; line-height: 1.8; }
.motivation-copy { display: grid; grid-template-columns: .75fr 1.25fr; gap: 14px 40px; margin: 0 0 28px; }
.motivation-copy > * { min-width: 0; }
.motivation-copy h3 { margin: 0; color: var(--ink); font-size: 28px; line-height: 1.45; font-weight: 500; letter-spacing: -.6px; text-wrap: balance; }
.motivation-copy h3 em { color: var(--accent); font-style: normal; }
.motivation-copy p { margin: 0; color: #5a6b7d; font-size: 15px; line-height: 1.8; text-wrap: pretty; }
.motivation-copy p + p { margin-top: 10px; }
.motivation-copy strong, .section-intro strong { color: #3b536b; font-weight: 600; }
.figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 30px; }
.paper-figure { margin: 0; min-width: 0; grid-column: 1 / -1; }
.paper-figure.half { grid-column: auto; }
#motivation-figures .paper-figure { width: min(100%, 920px); margin-inline: auto; }
#method-figures .paper-figure { width: min(100%, 1040px); margin-inline: auto; }
.figure-image-link { display: block; padding: 0; border: 0; background: transparent; }
.paper-figure img { display: block; max-width: 100%; width: 100%; height: auto; }
.paper-figure > img { padding: 0; border: 0; background: transparent; }
.paper-figure figcaption { margin-top: 10px; color: #66788b; font-size: 12px; line-height: 1.8; }
.paper-figure figcaption strong { color: #3c526a; font-weight: 600; }
.paper-figure .figure-caption { display: block; margin-top: 2px; }
.figure-link-note { color: var(--accent); font-size: 11px; white-space: nowrap; }
.figure-detail-link { flex-shrink: 0; color: var(--accent); font-size: 13px; font-weight: 500; }
#qualitative-figures .paper-figure { width: 100%; }
#qualitative-figures figcaption { max-width: 820px; margin: 14px auto 0; text-align: center; text-wrap: pretty; }
#qualitative-figures figcaption strong { font-weight: 400; color: #66788b; }
.framework-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.framework-points > div { min-width: 0; padding: 0 23px; border-left: 1px solid var(--line); }
.framework-points > div:first-child { padding-left: 0; border-left: 0; }
.framework-points > div:last-child { padding-right: 0; }
.step-number { display: block; margin-bottom: 6px; color: #7b94ae; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.framework-points h3 { margin: 0 0 6px; color: #334d65; font-size: 16px; font-weight: 500; line-height: 1.4; }
.framework-points p { margin: 0; color: #637488; font-size: 13px; line-height: 1.8; }
.table-wrap { max-width: 100%; overflow-x: auto; background: var(--paper); scrollbar-width: thin; scrollbar-color: #b2c4d5 #edf1f5; }
.rd-table { width: 100%; min-width: 990px; border-collapse: separate; border-spacing: 0; background: var(--paper); color: #435a70; font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.45; text-align: center; }
.rd-table caption { padding: 12px 16px; color: #5b7187; font-size: 12px; text-align: left; }
.rd-table th, .rd-table td { padding: 12px 10px; border: 0; white-space: nowrap; }
.rd-table thead th { background: var(--paper); color: #3e5871; font-size: 11px; font-weight: 500; }
.rd-table thead tr:first-child th { padding-top: 13px; padding-bottom: 11px; border-top: 1.5px solid var(--ink); font-size: 12px; }
.rd-table thead th[scope=colgroup] { position: relative; }
.rd-table thead th[scope=colgroup]::after { content: ""; position: absolute; bottom: 0; left: 10px; right: 10px; border-bottom: 1px solid var(--ink); }
.rd-table thead tr:last-child th, .rd-table thead th[rowspan] { border-bottom: 1px solid var(--ink); }
.rd-table th[scope=row] { position: sticky; left: 0; z-index: 1; min-width: 120px; padding-left: 16px; background: var(--paper); color: #3b5269; font-weight: 500; text-align: left; }
.rd-table thead th:first-child[rowspan] { position: sticky; left: 0; z-index: 2; min-width: 120px; padding-left: 16px; text-align: left; }
.rd-table tbody tr:last-child > * { border-bottom: 1.5px solid var(--ink); }
.rd-table tr.ours > * { background: #e9ebed; }
.rd-table tr.ours th { font-weight: 600; }
.rd-table strong { color: #26384d; font-weight: 700; }
.table-note { max-width: 1100px; margin: 12px 0 0; color: #68798d; font-size: 11px; line-height: 1.8; }
.scroll-hint { display: none; margin: 8px 0 0; color: #75879b; font-size: 10px; }
footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; padding-top: 20px; padding-bottom: 26px; color: #75869b; font-size: 10px; }
footer a { color: #607891; }

@media (min-width: 1600px) {
  .hero { padding-top: 68px; }
}

@media (max-width: 1000px) {
  .page-width { width: calc(100% - 48px); }
  .hero { padding-top: 44px; }
  .authors { font-size: 16px; gap: 4px 18px; }
  .section-heading { align-items: flex-start; }
  .section-heading > p { max-width: 320px; padding-top: 12px; font-size: 12px; }
  .comparison-layout { grid-template-columns: 119px minmax(0, 1fr); }
  .sequence-tabs { margin-left: 119px; }
  .method-button { padding: 11px 13px; }
  .method-button[aria-pressed=true] { padding-left: 25px; }
  .frame-label { display: none; }
  .framework-points > div { padding-inline: 17px; }
  .scroll-hint { display: block; }
}

@media (max-width: 700px) {
  .page-width { width: calc(100% - 32px); }
  .hero { padding-top: 33px; padding-bottom: 29px; }
  .hero h1 { margin-bottom: 23px; letter-spacing: -.4px; }
  .title-sub { margin-top: 14px; font-size: 16px; line-height: 1.4; letter-spacing: -.2px; }
  .authors { gap: 4px 16px; font-size: 15px; }
  .affiliations { gap: 2px 12px; font-size: 11px; }
  .resource-links { margin-top: 19px; gap: 7px; }
  .resource-button { min-height: 39px; padding-inline: 10px; gap: 6px; font-size: 12px; }
  .resource-button svg { width: 14px; height: 14px; }
  .soon { margin-left: 1px; font-size: 8px; padding-inline: 4px; }
  .section-nav { gap: 8px 23px; margin-top: 27px; padding-block: 11px; }
  .section-nav a { font-size: 12px; letter-spacing: 0; }
  .section-heading { display: block; margin-bottom: 19px; }
  .section-heading > p { max-width: none; margin: 9px 0 0; padding: 0; }
  .figure-detail-link { display: inline-block; margin-top: 12px; font-size: 12px; }
  h2 { font-size: 29px; }
  .eyebrow { margin-bottom: 5px; font-size: 9px; }
  .sequence-tabs { margin: 0 0 11px; }
  .sequence-tab { flex: 1; padding: 8px 10px; font-size: 11px; }
  .comparison-layout { display: flex; flex-direction: column; gap: 0; }
  .reference-selector { padding: 0; }
  .selector-label { margin: 0 0 7px; font-size: 8px; }
  .method-buttons { flex-direction: row; gap: 5px; }
  .method-button, .method-button[aria-pressed=true] { width: auto; margin: 0; flex: 1; justify-content: center; min-height: 44px; padding: 10px 6px; border-radius: 8px 8px 0 0; font-size: 11px; white-space: nowrap; }
  .player-shell { border-radius: 0 0 12px 12px; }
  .video-stage { border-radius: 0; }
  .sidebar-note { display: none; }
  .video-label { top: 8px; padding: 3px 6px; font-size: 10px; line-height: 1.4; }
  .video-label-left { left: 8px; }
  .video-label-right { right: 8px; }
  .rate-label { font-size: 8px; }
  .split-handle { width: 32px; height: 32px; }
  .split-handle svg { width: 23px; }
  .player-controls { gap: 7px; min-height: 43px; padding: 6px 7px; }
  .time-label { min-width: 60px; font-size: 10px; }
  .icon-button { width: 27px; height: 27px; flex-basis: 27px; }
  .video-footnote { flex-direction: column; gap: 0; font-size: 9px; }
  .rate-note { font-size: 9px; }
  .comparison-section { padding-bottom: 28px; }
  .paper-section { padding-top: 26px; padding-bottom: 29px; }
  .section-intro { margin-bottom: 20px; font-size: 14px; }
  .motivation-copy { grid-template-columns: 1fr; gap: 10px; margin-bottom: 20px; }
  .motivation-copy h3 { margin-bottom: 2px; font-size: 22px; }
  .motivation-copy p { font-size: 13px; }
  .figure-grid { grid-template-columns: 1fr; gap: 22px; }
  .paper-figure.half { grid-column: 1 / -1; }
  .paper-figure figcaption { margin-top: 9px; font-size: 11px; }
  .framework-points { grid-template-columns: 1fr; gap: 16px; margin-top: 20px; padding-top: 16px; }
  .framework-points > div { display: grid; grid-template-columns: 24px 1fr; gap: 3px 12px; padding: 0; border-left: 0; }
  .step-number { grid-row: 1 / 3; margin-top: 2px; }
  .framework-points h3 { margin: 0; font-size: 15px; }
  .framework-points p { font-size: 12px; }
  .rd-table { min-width: 950px; font-size: 11px; }
  .rd-table th, .rd-table td { padding: 11px 9px; }
  .rd-table th[scope=row], .rd-table thead th:first-child[rowspan] { min-width: 108px; padding-left: 12px; }
  .table-note { font-size: 10px; }
  footer { align-items: center; gap: 12px; font-size: 9px; }
  footer span { max-width: 72%; }
}

@media (max-width: 380px) {
  .title-sub { font-size: 15px; }
  .resource-button { gap: 5px; padding-inline: 8px; font-size: 11px; }
  .section-nav { gap: 8px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
