:root {
  --page: #fff;
  --surface: #f6f7f9;
  --ink: #172033;
  --muted: #606b7b;
  --line: #dfe3e8;
  --blue: #245ea8;
  --blue-soft: #eef4fb;
  --max-width: 1160px;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { max-width: 100%; height: auto; }
.section-shell { width: min(calc(100% - 40px), var(--max-width)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 8px 12px; color: white; background: var(--ink); }

.page-toc { position: fixed; z-index: 20; top: 50%; left: 20px; display: none; width: 190px; padding: 25px 20px 20px; background: linear-gradient(145deg, rgba(235,246,255,.96), rgba(255,244,246,.96)); border: 1px solid #d9deea; border-radius: 20px; box-shadow: 0 18px 45px rgba(31,49,78,.12); transform: translateY(-50%); }
.toc-brand { display: inline-flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.page-toc > p { margin: 32px 8px 14px; color: var(--ink); font-size: 15px; font-weight: 700; }
.page-toc nav { display: grid; gap: 5px; }
.toc-link { padding: 10px 12px; color: #475979; border-radius: 12px; font-size: 12px; font-weight: 600; transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease; }
.toc-link:hover { color: var(--blue); }
.toc-link.is-active { color: #0b4b96; background: rgba(255,255,255,.88); box-shadow: 0 4px 14px rgba(35,70,115,.07); }

.site-header { width: min(calc(100% - 40px), var(--max-width)); height: 64px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; }
.brand-mark { display: grid; width: 24px; height: 24px; place-items: center; color: white; background: var(--blue); border-radius: 2px; font: 700 12px var(--mono); }
.site-nav { display: flex; align-items: center; gap: 22px; color: #465266; font-size: 11px; font-weight: 500; }
.site-nav a:hover { color: var(--blue); }
.nav-button { padding: 8px 12px; color: var(--blue) !important; border: 1px solid #b8c9dd; border-radius: 2px; }
.hf-icon { display: inline-block; margin-right: 3px; font-size: 1.5em; line-height: 0; vertical-align: -.12em; }
.is-disabled { cursor: default; user-select: none; }
.menu-button { display: none; width: 36px; height: 36px; padding: 8px; border: 0; background: transparent; }
.menu-button span:not(.sr-only) { display: block; width: 100%; height: 1px; margin: 6px 0; background: currentColor; }

.hero { padding-block: 84px 72px; text-align: center; }
.kicker { margin: 0 0 20px; color: var(--blue); font: 600 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(50px, 7vw, 76px); line-height: 1.02; letter-spacing: -.045em; }
.hero-summary { margin: 26px auto 0; font-size: 20px; line-height: 1.5; }
.authors { max-width: 980px; margin: 18px auto 0; }
.authors p { margin-inline: auto; }
.authors sup { font-size: .67em; line-height: 0; vertical-align: super; }
.author-list { margin-block: 0; font-size: 15px; font-weight: 650; line-height: 1.8; }
.affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; margin-block: 7px 0; color: #364156; font-size: 13px; line-height: 1.7; }
.author-emails { margin-block: 5px 0; color: #364156; font-family: var(--mono); font-size: 11px; line-height: 1.7; }
.author-emails a { color: inherit; }
.author-emails a:hover { color: var(--blue); }
.author-notes { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 12px; margin-block: 7px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.author-note { display: inline-flex; align-items: center; gap: 5px; }
.author-note sup { position: relative; top: -.2em; font-size: .72em; }
.author-notes .note-separator { color: #364156; font-size: 9px; line-height: 1; }
.author-notes .corresponding-symbol { display: inline-flex; align-items: center; color: #364156; font-size: 14px; line-height: 1; }
.hero-description { max-width: 720px; margin: 14px auto 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.hero-actions { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 28px; }
.primary-button { padding: 11px 16px; color: white; background: var(--blue); border-radius: 2px; font-size: 11px; font-weight: 600; }
.secondary-button { padding: 10px 15px; color: var(--blue); background: white; border: 1px solid #b8c9dd; border-radius: 2px; font-size: 11px; font-weight: 600; }
.text-button { color: var(--blue); font-size: 11px; font-weight: 600; }
.text-button span { margin-left: 5px; }
.hero-chart { margin-top: 58px; text-align: left; }
.chart-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-top: 17px; }
.chart-heading h2 { margin: 0; font-size: 26px; letter-spacing: -.025em; }
.chart-kicker { margin: 0 0 8px; color: var(--blue); font: 600 8px var(--mono); text-transform: uppercase; }
.chart-heading > p { max-width: 320px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.chart-shell { padding: 18px 20px 13px; background: white; border: 1px solid var(--line); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 7px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.chart-legend button { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 2px; cursor: pointer; font-size: 9px; }
.chart-legend button::before { content: ""; width: 15px; height: 3px; background: var(--series-color); border-radius: 2px; }
.chart-legend button[aria-pressed="false"] { color: var(--muted); opacity: .48; }
.chart-canvas { position: relative; }
.chart-canvas svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: #e4e7eb; stroke-width: 1; }
.chart-axis { stroke: #aeb6c1; stroke-width: 1.2; }
.chart-axis-label, .chart-tick { fill: #687386; font-family: var(--mono); font-size: 11px; }
.chart-axis-label { font-size: 12px; font-weight: 600; }
.chart-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: opacity 150ms ease; }
.chart-point { stroke: white; stroke-width: 3; cursor: pointer; transition: r 120ms ease, opacity 150ms ease; }
.chart-point:hover, .chart-point:focus { r: 9; outline: none; }
.chart-target { stroke: #8755a5; stroke-width: 1.5; stroke-dasharray: 7 6; }
.chart-target-label { fill: #8755a5; font-family: var(--mono); font-size: 10px; font-weight: 600; }
.chart-series.is-hidden { opacity: 0; pointer-events: none; }
.chart-tooltip { position: absolute; z-index: 4; min-width: 145px; padding: 9px 11px; color: white; background: #172033; border-radius: 2px; pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); font-size: 9px; line-height: 1.5; box-shadow: 0 8px 20px rgba(23,32,51,.14); }
.chart-tooltip strong { display: block; margin-bottom: 3px; font-size: 10px; }
.chart-note, .chart-fallback { margin: 4px 0 0; padding-top: 10px; color: var(--muted); border-top: 1px solid var(--line); font-size: 9px; line-height: 1.55; }
.teaser-figure { margin: 28px 0 0; text-align: left; }
.teaser-figure img { display: block; width: 100%; border: 1px solid var(--line); }
.teaser-figure figcaption, .paper-figure figcaption { margin-top: 9px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.t2i-figure { margin-top: 40px; }

.overview, .contributions, .qualitative, .citation, .results-inner { padding-block: 86px; }
.overview, .contributions, .qualitative, .citation { border-top: 1px solid var(--line); }
.overview .section-content { max-width: 840px; margin-inline: auto; }
.contributions .section-content { max-width: none; }
.qualitative .section-content { max-width: 1040px; margin-inline: auto; }
.citation .section-content { max-width: 840px; margin-inline: auto; text-align: center; }
.citation .section-content > p { margin: 18px auto 0; }
.citation-code { margin: 24px 0 0; padding: 22px 24px; overflow-x: auto; color: #dbe7f5; background: #172033; border-radius: 3px; text-align: left; }
.citation-code code { font: 11px/1.7 var(--mono); white-space: pre; }
.eyebrow { margin: 0 0 12px !important; color: var(--blue) !important; font: 600 10px var(--mono) !important; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.section-content h2 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.15; letter-spacing: -.035em; }
.section-content > p { max-width: 760px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.section-content .lead { margin-top: 24px; color: var(--ink); font-size: 16px; line-height: 1.7; }
.overview h2, .contributions h2, .qualitative h2 { text-align: center; }
.overview .section-content > p { max-width: none; }
.method-intro { margin-top: 20px; }
.contributions .method-intro, .qualitative .gallery-intro { max-width: 760px; margin-inline: auto; text-align: center; }
.paper-figure { margin: 0; }
.paper-figure img { display: block; width: 100%; height: auto; }
.method-figure { margin-top: 30px; }
.method-figure img { border: 1px solid var(--line); }

.results { background: var(--surface); border-block: 1px solid var(--line); }
.results-inner { max-width: 1240px; }
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 35px; }
.results-heading > div > p { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.evaluation-note { max-width: 260px; margin: 0 !important; color: var(--muted); font-size: 9px !important; line-height: 1.5 !important; }
.results-heading .eyebrow { text-align: left; }
.results-tabs { display: flex; gap: 30px; margin-top: 42px; border-bottom: 1px solid #cfd5dd; }
.results-tabs button { position: relative; padding: 0 0 13px; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 14px; font-weight: 600; }
.results-tabs button[aria-selected="true"] { color: var(--ink); }
.results-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--blue); }
.results-panel { padding-top: 34px; }
.benchmark-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.benchmark-heading h3 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.benchmark-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.benchmark-heading > span { color: var(--muted); font: 9px var(--mono); text-transform: uppercase; }
.secondary-benchmark { margin-top: 54px; }
.result-table-wrap { margin-top: 15px; overflow-x: auto; background: white; border-block: 1px solid #ccd3dc; }
table { width: 100%; min-width: 950px; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid #e1e5ea; text-align: right; font-size: 13px; white-space: nowrap; }
th { color: var(--muted); background: #fafbfc; font: 600 11px var(--mono); text-transform: uppercase; }
th:first-child, td:first-child { text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
.group-start td { border-top: 1px solid #bfc7d1; }
.ours-row td:first-child { color: var(--blue); font-weight: 650; }
.addon-row td:first-child { padding-left: 32px; }
.best-row td { background: var(--blue-soft); }
.table-note { max-width: none !important; margin: 12px 0 0; color: var(--muted); font-size: 9px !important; line-height: 1.6 !important; }

.gallery-intro { margin-top: 18px; }

.site-footer { min-height: 90px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; border-top: 1px solid var(--line); font-size: 9px; }
.site-footer p { color: var(--muted); text-align: center; }
.site-footer > a:last-child { justify-self: end; color: var(--blue); }

@media (min-width: 1361px) {
  .page-toc { display: block; }
  .section-shell, .site-header {
    width: min(calc(100% - 270px), var(--max-width));
    margin-left: calc(230px + max(20px, (100vw - 1390px) / 2));
    margin-right: auto;
  }
}

@media (max-width: 760px) {
  .section-shell, .site-header { width: min(calc(100% - 28px), var(--max-width)); }
  .site-header { height: 58px; }
  .menu-button { display: block; }
  .site-nav { position: absolute; left: 14px; right: 14px; top: 58px; display: none; align-items: stretch; flex-direction: column; gap: 0; padding: 8px; background: white; border: 1px solid var(--line); box-shadow: 0 12px 25px rgba(20,30,45,.08); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 10px; }
  .hero { padding-block: 64px 52px; }
  .hero h1 { font-size: 45px; }
  .hero-summary { font-size: 17px; }
  .chart-heading { display: block; }
  .chart-heading > p { margin-top: 10px; }
  .chart-shell { padding-inline: 8px; }
  .chart-axis-label, .chart-tick { font-size: 9px; }
  .teaser-figure { margin-top: 44px; }
  .overview, .contributions, .qualitative, .citation, .results-inner { padding-block: 58px; }
  .section-content h2 { font-size: 31px; }
  .results-heading { display: block; }
  .evaluation-note { margin-top: 14px !important; }
  .results-tabs { gap: 20px; overflow-x: auto; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .site-footer p { display: none; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
