@font-face{font-family:DM Sans;src:url('../fonts/DM-Sans-400.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:DM Sans;src:url('../fonts/DM-Sans-500.ttf') format('truetype');font-weight:500;font-display:swap}
@font-face{font-family:DM Sans;src:url('../fonts/DM-Sans-600.ttf') format('truetype');font-weight:600;font-display:swap}
@font-face{font-family:DM Sans;src:url('../fonts/DM-Sans-700.ttf') format('truetype');font-weight:700;font-display:swap}

:root {
  --ink: #24262b;
  --muted: #535a65;
  --accent: #2368ad;
  --accent-deep: #1b5085;
  --accent-soft: #ebf3fc;
  --line: #e0e4ea;
  --soft: #f6f7f9;
  font: 1rem/1.65 "DM Sans", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, select {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 7px;
  padding: 9px 14px;
  font-size: .875rem;
  min-height: 42px;
}
button:hover, select:hover { border-color: #aab8c9; background-color: var(--soft); }
button:disabled, select:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #3c87d0; outline-offset: 4px; }
select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23535a65' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
input { accent-color: var(--accent); }
[hidden] { display: none !important; }

h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.18; font-weight: 600; letter-spacing: -.032em; }
h2 { font-size: clamp(1.65rem, 3.5vw, 2rem); }
h3 { font-size: 1.25rem; }
p + p { margin-top: 1em; }
img { max-width: 100%; height: auto; display: block; }
.section-wrap { width: min(1040px, calc(100% - 48px)); margin-inline: auto; }
.section-wrap.wide { max-width: 1220px; width: calc(100% - 48px); }
.section-wrap.narrow { max-width: 780px; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: 10px;
  left: 16px;
  z-index: 99;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
}

.hero {
  padding-block: clamp(36px, 5vw, 66px) 6px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.2vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.author-row, .affiliations, .hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.authors { margin-top: 22px; font-size: 1.0625rem; }
.author-row { gap: 2px 9px; }
.authors span { white-space: nowrap; }
sup { font-size: .68em; margin-left: 1px; }
.affiliations { gap: 3px 18px; color: var(--muted); margin-top: 5px; font-size: 1.1875rem; }
.hero-actions { gap: 8px; margin-top: 21px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  line-height: 1.5;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  font-size: .9375rem;
}
.button:hover { background: #424650; text-decoration: none; }
.button-secondary { background: #666b74; }
.button-secondary:hover { background: #555a62; }
.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.section-heading { text-align: center; }
.method-section > h2, .training-section h2 { margin-bottom: 24px; }
.paper-figure { min-width: 0; }
.figure-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 0;
  cursor: zoom-in;
}
.figure-button:hover { background: transparent; }
.paper-figure img { width: 100%; }
.paper-figure figcaption, .section-heading p {
  max-width: 760px;
  margin: 14px auto 0;
  color: var(--muted);
  text-align: center;
}
.benchmark-overview {
  max-width: 550px;
  padding-top: clamp(24px, 4vw, 40px);
  text-align: center;
}
.benchmark-overview h2 { margin-bottom: 18px; }
.section-wrap.wide.sgt-results {
  max-width: 1040px;
  padding-top: clamp(22px, 3vw, 40px);
}
.sgt-results .scene-thumbnails { margin-bottom: 5px; }
.sgt-results .image-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sgt-results .figure-button:focus-visible { outline-offset: -3px; }
.sgt-cloud {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.sgt-cloud figcaption {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.sgt-cloud figcaption strong { font-weight: 600; }
#sgt-cloud-reset { min-height: 32px; padding: 4px 10px; }
.sgt-cloud-stage {
  position: relative;
  aspect-ratio: 16 / 9;
}
.sgt-cloud-stage > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.sgt-cloud-stage img { width: 100%; height: 100%; object-fit: contain; }
.sgt-cloud-stage canvas { display: block; cursor: grab; touch-action: none; }
.sgt-cloud-stage canvas:active { cursor: grabbing; }
.sgt-cloud-stage canvas:focus-visible { outline-offset: -3px; }
.sgt-cloud-note { padding: 8px 14px 12px; color: var(--muted); font-size: .875rem; }
.comparison-section { padding-block: clamp(32px, 4vw, 52px); }
.section-heading { margin-bottom: 25px; }
.comparison-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(12px, 2vw, 24px);
  box-shadow: 0 6px 24px #24262b0a;
}

.scene-nav{display:flex;justify-content:space-between;gap:20px;align-items:center}
.scene-selector{display:flex;gap:12px;align-items:center;font-size:.875rem;font-weight:500;min-width:0}
.scene-selector select{width:350px;max-width:100%;font-weight:400}
.scene-step{display:flex;gap:8px;align-items:center}
.scene-step span{font-size:.875rem;font-variant-numeric:tabular-nums;color:var(--muted);margin-right:12px;white-space:nowrap}
.scene-thumbnails{display:flex;gap:9px;overflow-x:auto;overscroll-behavior-x:contain;padding:18px 2px 13px;scrollbar-width:thin;scrollbar-color:#cbd3dd transparent}
.scene-thumbnails button{width:101px;min-width:101px;flex:0 0 101px;padding:3px;border:1px solid var(--line);border-radius:7px;overflow:hidden;background:#fff}
.scene-thumbnails img{width:93px;height:53px;object-fit:cover;border-radius:3px}
.scene-thumbnails button[aria-current=true]{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent);color:var(--accent);background:var(--accent-soft)}
.selected-scene{padding:10px 0 16px}
.selected-scene strong{font-size:1.0625rem;font-weight:500}
.toolbar{border-top:1px solid var(--line);padding:16px 0;display:flex;gap:24px;justify-content:space-between;align-items:center;flex-wrap:wrap}
.model-selectors,.view-controls{display:flex;gap:14px;align-items:center}
.model-selectors label{display:flex;gap:10px;align-items:center;color:var(--muted);font-size:.875rem}
.model-selectors select{min-width:170px;color:var(--ink)}
.versus{font-size:.875rem;color:var(--muted)}
.check{font-size:.875rem;display:flex;align-items:center;gap:7px;white-space:nowrap}
.image-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.image-grid figure{border:1px solid var(--line);border-radius:8px;overflow:hidden}
.image-grid img{aspect-ratio:16/9;width:100%;object-fit:contain;background:var(--soft)}
.image-grid figcaption{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:7px;padding:10px 12px;border-top:1px solid var(--line);font-size:.875rem;min-height:48px}
.image-grid figcaption>span{color:var(--muted)}
.camera-toggle{display:flex;border:1px solid var(--line);border-radius:5px;overflow:hidden}
.camera-toggle button{padding:2px 9px;min-height:28px;font-size:.875rem;border:0;border-radius:0}
.camera-toggle button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent);font-weight:600}
.disparity-key{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap;color:var(--muted);font-size:.875rem;padding:11px 0 19px}
.colorbar{width:95px;height:7px;border-radius:6px;background:linear-gradient(90deg,#30123b,#4662d7,#1bb7e8,#4bf56c,#d5e735,#f47a1f,#7a0403)}
.disparity-key>span:last-child{margin-left:10px}
.cloud-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.cloud-panel{min-width:0;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:white}
.cloud-heading{display:flex;justify-content:space-between;align-items:center;padding:11px 15px;border-bottom:1px solid var(--line);gap:12px}
.cloud-heading h3{font-size:1rem;font-weight:500;letter-spacing:-.015em}
.fullscreen{padding:4px 7px;min-height:30px;color:var(--muted);font-size:.875rem;border:0}
.cloud-options{display:flex;gap:9px 14px;align-items:center;flex-wrap:wrap;background:var(--soft);padding:9px 13px;border-bottom:1px solid var(--line)}
.cloud-options label{font-size:.875rem;color:var(--muted);display:flex;gap:6px;align-items:center}
.cloud-options select{min-height:33px;font-size:.875rem;padding:5px 28px 5px 8px;background-position:right 7px center}
.cloud-stage{height:410px;position:relative}
.cloud-stage canvas{display:block;width:100%;height:100%;cursor:grab;touch-action:none}
.cloud-stage canvas:active{cursor:grabbing}
.loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:12px;background:#ffffffeb;font-size:.875rem;color:var(--muted);padding:24px;text-align:center;line-height:1.6}
.loading.has-error{color:#9a3939}
.retry-detail { align-self: flex-start; margin: 8px 13px; color: var(--accent); }
.interaction-bar{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;margin:15px 0;color:var(--muted);font-size:.875rem}
.interaction-bar label{display:flex;gap:10px;align-items:center}
.interaction-bar input{width:90px}
.interaction-bar output{width:44px}
.viewer-notes{border-top:1px solid var(--line);padding-top:13px;margin-bottom:16px;color:var(--muted);font-size:.875rem}
.viewer-notes summary{cursor:pointer;width:fit-content;color:var(--accent)}
#image-comparison .image-grid { margin-top: 13px; }
#image-comparison .disparity-key { padding-bottom: 5px; }
#global-error{padding:15px;background:#fff0ec;color:#8d3333;border-radius:7px;margin:0 0 15px}
.cloud-panel:fullscreen{display:flex;flex-direction:column;border:0;border-radius:0}
.cloud-panel:fullscreen .cloud-stage{flex:1;height:auto}
.cloud-panel:fullscreen .cloud-options,.cloud-panel:fullscreen .cloud-heading,.cloud-panel:fullscreen .retry-detail{flex:none}

.abstract, .method-section, .training-section, .results-section, .citation-section {
  padding-block: clamp(40px, 5vw, 62px);
}
.abstract, .results-section, .page-footer { background: var(--soft); }
.abstract h2, .method-section > h2, .training-section h2, .results-section h2 {
  text-align: center;
}
.abstract h2, .results-section h2, .citation-section h2 { margin-bottom: 22px; }
.abstract p { color: var(--muted); line-height: 1.8; }

.method-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 26px;
}
.method-columns h3, .smol-block h3 { margin-bottom: 9px; }
.method-columns p, .smol-block p { color: var(--muted); }
.training-section { border-top: 1px solid var(--line); }
.smol-block {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 60px);
  margin-top: 32px;
}

.result-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 19px;
}
.result-tabs button {
  padding: 8px 16px;
  font-size: .9375rem;
  border-radius: 999px;
}
.result-tabs button[aria-selected=true] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.table-scroll table {
  border-collapse: collapse;
  width: 100%;
  font-size: .9375rem;
  white-space: nowrap;
  text-align: right;
}
.table-scroll th, .table-scroll td {
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.table-scroll thead th {
  font-size: .875rem;
  font-weight: 600;
  background: #edf0f5;
  vertical-align: middle;
}
.table-scroll thead span {
  display: block;
  font-weight: 400;
  color: var(--muted);
}
.table-scroll th[scope=colgroup] { text-align: center; }
.table-scroll th[scope=row], .table-scroll tr:first-child th:first-child { text-align: left; }
.table-scroll tbody th { font-weight: 400; }
.table-scroll tbody tr:last-child > * { border-bottom: 0; }
.table-scroll .ours-row, .table-scroll .ours-value {
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.table-scroll .ours-row th { font-weight: 700; }
.table-note { font-size: .9375rem; color: var(--muted); margin-block: 10px; }
.leaderboard-heading { margin-top: 28px; }

.citation-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  overflow: hidden;
}
.citation-box button { display: block; margin: 12px 12px 0 auto; }
.citation-box pre {
  margin: 0;
  padding: 10px 20px 20px;
  overflow: auto;
  font-size: .875rem;
  line-height: 1.7;
}
.copy-status { font-size: .875rem; color: var(--accent); }
.copy-status:not(:empty) { margin-top: 8px; }
.page-footer { padding-block: 35px; text-align: center; color: var(--muted); }
.page-footer h2 { font-size: 1.4rem; color: var(--ink); margin-bottom: 8px; }
.page-footer .credits { font-size: .875rem; }
dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(12px, 3vw, 20px);
  width: min(1500px, 94vw);
  max-height: 92vh;
  background: #fff;
}
dialog::backdrop { background: #1a202bbd; }
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}
.dialog-top h2 { font-size: 1.2rem; }
dialog img { width: 100%; max-height: 77vh; object-fit: contain; }

@media (max-width: 1020px) {
  .model-selectors label { flex-direction: column; align-items: flex-start; gap: 5px; }
  .versus { padding-top: 23px; }
  .cloud-stage { height: 370px; }
}

@media (max-width: 760px) {
  .section-wrap, .section-wrap.wide { width: calc(100% - 32px); }
  .authors { font-size: 1rem; }
  .affiliations { font-size: 1.125rem; }
  .button { padding-inline: 14px; }
  .scene-nav { flex-wrap: wrap; gap: 13px; }
  .scene-selector { width: 100%; }
  .scene-selector select { width: 100%; min-width: 0; }
  .scene-step { margin-left: auto; }
  .scene-thumbnails button { min-width: 90px; width: 90px; flex-basis: 90px; }
  .scene-thumbnails img { width: 82px; height: 47px; }
  .model-selectors { width: 100%; gap: 8px; }
  .model-selectors label { flex: 1; min-width: 0; }
  .model-selectors select { min-width: 0; width: 100%; padding-left: 9px; }
  .toolbar { gap: 15px; }
  .view-controls { width: 100%; justify-content: flex-end; }
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .image-grid figure:first-child { grid-column: 1 / -1; }
  .sgt-results .image-grid figure:first-child { grid-column: auto; }
  .image-grid figure:first-child img { max-height: 270px; }
  .image-grid figcaption { gap: 3px; padding: 9px; }
  .image-grid figcaption > span { width: 100%; }
  .disparity-key { justify-content: flex-start; }
  .disparity-key > span:last-child { width: 100%; margin-left: 0; }
  .cloud-grid { grid-template-columns: 1fr; }
  .cloud-stage { height: 340px; }
  .cloud-options { gap: 7px 13px; }
  .method-columns, .smol-block { grid-template-columns: 1fr; gap: 20px; }
  .smol-block .paper-figure { max-width: 380px; justify-self: center; }
  .smol-block > div { grid-row: 1; }
  .result-tabs button { padding-inline: 12px; }
  .citation-box pre { padding-inline: 14px; }
}

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