:root {
  color-scheme: light;
  --ink: #102337;
  --muted: #4b6073;
  --line: #d4dfe8;
  --blue: #095da6;
  --paper: #fbfcfe;
  font: 100%/1.55 Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body, figure, dl, dd, h1, h2, h3, p { margin: 0; }
a { color: inherit; }
a:focus-visible, video:focus-visible { outline: 3px solid #2585d5; outline-offset: 3px; }
.wrap { width: min(70rem, calc(100% - 3rem)); margin-inline: auto; }
header {
  position: sticky; top: 0; z-index: 3;
  background: rgb(251 252 254 / 96%); border-bottom: 1px solid var(--line);
}
.bar, nav, .wordmark, .actions, footer .wrap { display: flex; align-items: center; }
.bar, footer .wrap { justify-content: space-between; }
.bar { min-height: 4.25rem; gap: 2rem; }
.wordmark, nav a, .button { text-decoration: none; }
.wordmark { gap: .65rem; font-size: 1.12rem; font-weight: 700; white-space: nowrap; }
.mark { display: block; width: 2.25rem; height: 2.25rem; }
nav { gap: clamp(.9rem, 2.5vw, 2.2rem); }
nav a { color: var(--muted); font-size: .94rem; }
nav a:hover, footer a:hover { color: var(--blue); text-decoration: underline; }
section[id], figure[id] { scroll-margin-top: 5.5rem; }
.hero {
  padding: clamp(3.4rem, 6vw, 6rem) 0 2.7rem;
  background: radial-gradient(ellipse at 50% 2%,#daedff,transparent 57%),linear-gradient(#f5faff,var(--paper) 90%);
  text-align: center;
}
h1 { font-size: clamp(3.4rem, 7.8vw, 6.9rem); letter-spacing: -.075em; line-height: 1.03; color: #095b9e; }
.subtitle { margin: 1rem auto .85rem; font-weight: 600; font-size: clamp(1.25rem,2.7vw,2.25rem); letter-spacing: -.035em; line-height: 1.2; text-wrap: balance; }
.authors, figcaption, .credit, article p, .gallery p, .lead { color: var(--muted); }
.actions { justify-content: center; gap: .65rem; flex-wrap: wrap; margin: 1.5rem auto 2.5rem; }
.button { display: inline-flex; align-items: center; gap: .55rem; border: 1px solid #bacbd8; background: white; border-radius: 2rem; padding: .58rem 1.15rem; font-weight: 600; }
.button.primary { color: white; background: var(--blue); border-color: var(--blue); }
.button:not(:disabled):hover { box-shadow: 0 2px 10px #24476930; }
.button:disabled { color: var(--muted); cursor: default; }
main > section[id] { border-top: 1px solid var(--line); padding: clamp(3rem,6vw,5.6rem) 0; }
main > section[id]:nth-of-type(odd) { background: #f0f5f9; }
.eyebrow { color: var(--blue); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .84rem; }
h2 { max-width: 22em; margin: .55rem 0 .9rem; font-size: clamp(2rem,4.3vw,3.5rem); letter-spacing: -.055em; line-height: 1.1; text-wrap: balance; }
.lead { max-width: 52rem; font-size: 1.14rem; }
.film, .diagram, .gallery figure { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: .85rem; }
.film, .diagram, .gallery, table, .columns { margin-top: 1.8rem; }
.diagram img, video { display: block; width: 100%; }
.diagram { padding: .8rem; }
video { aspect-ratio: 16/9; background: #101820; object-fit: contain; }
.film figcaption, .gallery figcaption { padding: .85rem 1.15rem; }
article { border-top: 2px solid #89b2d1; padding-top: .85rem; }
h3 { font-size: 1.2rem; line-height: 1.3; color: var(--ink); }
article p, .gallery p { margin-top: .4rem; }
table { width: 100%; border-collapse: collapse; background: white; }
caption { text-align: left; font-weight: 650; margin-bottom: .7rem; font-size: 1.2rem; }
th, td { border-bottom: 1px solid var(--line); padding: .8rem 1rem; text-align: left; }
thead { background: #e1edf6; }
tr > :last-child { text-align: right; font-variant-numeric: tabular-nums; }
.gallery { display: grid; gap: 2rem; }
.task-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem 1rem; scroll-margin-top: 7rem; }
.task-pair h4 { grid-column: 1 / -1; margin: 0; font-size: 1.15rem; }
.task-pair figcaption { font-weight: 600; color: var(--ink); }
@media (max-width: 38rem) {
  .task-pair { grid-template-columns: minmax(0, 1fr); }
}
footer { background: #122538; color: white; padding: 2rem 0; }
footer a { text-underline-offset: .2em; }
@media (max-width: 52rem) {
  .bar { flex-direction: column; align-items: start; gap: .45rem; padding-block: .65rem; }
  nav { max-width: 100%; overflow-x: auto; gap: 1rem; padding: .15rem 0; }
  section[id], figure[id] { scroll-margin-top: 7rem; }
}
@media (max-width: 38rem) {
  .wrap { width: calc(100% - 2rem); }
  .actions { margin-bottom: 1.7rem; }
  th, td { padding: .65rem .4rem; }
}

.real-results { margin-top: 3rem; scroll-margin-top: 7rem; }
.real-results > p { margin: .5rem 0 1.25rem; max-width: 52rem; color: var(--muted); }
.result-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 27rem), 1fr)); gap: 1rem; }
.result-charts figure { background: white; border: 1px solid var(--line); border-radius: .85rem; }
.result-charts figcaption { padding: 1rem 1rem 0; color: var(--ink); font-weight: 650; }
.result-charts img { display: block; width: 100%; height: auto; border-radius: inherit; }
.real-results details { margin-top: 1rem; }
.real-results summary { cursor: pointer; padding: .65rem 0; color: var(--blue); font-weight: 600; }
.results-scroll { overflow-x: auto; }
.results-scroll table { min-width: 55rem; margin: .6rem 0; }
.results-scroll td { font-variant-numeric: tabular-nums; }

[hidden] { display: none !important; }
:root { --card: #fff; --band: #f4f7fb; --accent: #e9f3ff; --shade: 0 1px 2px #1118270d, 0 8px 22px #1118270e; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8edf6; --muted: #b3bed0; --line: #384353; --blue: #83bcff;
  --paper: #0d1018; --card: #181e29; --band: #121822; --accent: #1a2a3d;
}
body { color: var(--ink); background: var(--paper); }
header { background: color-mix(in srgb,var(--paper) 91%,transparent); backdrop-filter: blur(14px); }
.bar { display: grid; grid-template-columns: 1fr auto 1fr; height: 4.5rem; gap: 1rem; }
.theme { justify-self: end; border-radius: 50%; width: 2.35rem; height: 2.35rem; font-size: 1.3rem; }
button, .button { font-family: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); cursor: pointer; }
button:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.hero { padding: clamp(2.5rem,5vw,4.5rem) 0 3rem; background: radial-gradient(ellipse 85% 64% at 50% 8%,var(--accent) 0%,transparent 80%); }
h1 { letter-spacing: 0; font-size: clamp(2.4rem,6.4vw,4.4rem); font-weight: 650; line-height: 1.08; background: linear-gradient(95deg,#005ea8,#1487d0 70%,#2aa8f2); color: transparent; background-clip: text; }
[data-theme="dark"] h1 { background-image: linear-gradient(95deg,#8ec1ff,#4ebcff); }
.subtitle { font-size: clamp(1.05rem,1.65vw,1.25rem); font-weight: 400; letter-spacing: 0; line-height: 1.65; color: var(--muted); }
.authors { font-weight: 650; color: var(--ink); margin-top: 1.4rem; }
.affiliations { display: flex; justify-content: center; align-items: center; margin: .9rem 0; }
.affiliations img { width: min(20rem, 90%); height: auto; }
[data-theme="dark"] .affiliations { background: #fff; width: fit-content; max-width: 100%; margin-inline: auto; padding: .55rem .9rem; border-radius: .6rem; }
.actions { margin: 1.4rem auto 1.9rem; }
.button { font-size: .94rem; font-weight: 550; }
.button.primary { background: #086abb; border-color: #086abb; color: #fff; }
.teaser, .model-card, .data-mixture, .data-figure, .film { background: var(--card); border: 1px solid var(--line); border-radius: .85rem; box-shadow: var(--shade); padding: clamp(.55rem,1.4vw,1rem); }
.teaser img, .model-card img, .data-figure img { display: block; width: 100%; height: auto; border-radius: .35rem; }
.teaser figcaption { max-width: 75ch; margin: .7rem auto 0; font-size: .95rem; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); text-align: left; gap: 1rem; margin-top: 2.8rem; }
.stats > div { border-radius: .8rem; background: var(--accent); padding: 1.35rem; }
.stats strong { font-size: clamp(2rem,3.4vw,2.7rem); color: var(--blue); line-height: 1.1; font-weight: 650; }
.stats h2 { font-size: 1.02rem; margin: .4rem 0 .2rem; letter-spacing: 0; }
.stats p { font-size: .93rem; color: var(--muted); }
main > section[id]:nth-of-type(odd) { background: var(--band); }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; letter-spacing: .025em; }
.eyebrow::before { content: ""; width: 1.4rem; height: 3px; border-radius: 2px; background: var(--blue); }
.film video { border-radius: .4rem; }
.abstract-copy { max-width: 76ch; margin: clamp(2rem, 5vw, 4rem) auto 0; font-size: 1.08rem; line-height: 1.65; }
#abstract { margin: 0; line-height: inherit; scroll-margin-top: 6rem; }
.abstract-copy p + p { margin-top: 1em; }
.model-card, .data-mixture, .data-figure { margin-top: 2rem; }
.model-card, .data-mixture {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem .35rem;
  min-width: 0;
  margin-inline: 0;
}
.view-choice { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.view-choice + label {
  display: grid; place-items: center; text-align: center; cursor: pointer;
  background: var(--band); border: 1px solid var(--line); border-radius: .55rem;
  padding: .65rem .4rem; font-weight: 600; line-height: 1.25;
}
.view-choice:checked + label { background: #125ca2; border-color: #125ca2; color: white; }
.view-choice:focus-visible + label { outline: 3px solid var(--blue); outline-offset: 2px; }
.model-card .paper-model { display: none; grid-column: 1 / -1; min-width: 0; }
#view-training:checked ~ #training-figure,
#view-inference:checked ~ #inference-figure,
#view-runtime:checked ~ #runtime-figure { display: block; }
.data-figure figcaption { padding: 1rem .35rem .25rem; }
table, .gallery figure, .result-charts figure { background: var(--card); }
thead { background: var(--accent); }
.benchmark-list td:last-child { font-weight: 700; color: var(--blue); }
.benchmark-list a { text-decoration: underline; text-underline-offset: .2em; }
.benchmark-list .clickable { cursor: pointer; }
.benchmark-list .clickable:hover { background: var(--accent); }
.benchmark-detail { margin-top: .8rem; }
.benchmark-detail summary { cursor: pointer; color: var(--blue); }
.result-dialog { box-sizing: border-box; width: min(73rem,95vw); max-height: 86vh; padding: clamp(1rem,3vw,2rem); border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); background: var(--card); }
.result-dialog::backdrop { background: #0c192ac2; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dialog-head h2 { font-size: clamp(1.4rem,3vw,2rem); }
.dialog-head button { width: 2.5rem; height: 2.5rem; border-radius: 50%; font-size: 1.55rem; flex: none; }
.dialog-body > p { color: var(--muted); }
.table-pan { overflow: auto; margin-top: 1rem; }
.table-pan table { font-size: .93rem; width: max-content; min-width: 100%; margin-top: 0; }
.table-pan th, .table-pan td { padding: .55rem .8rem; }
.table-pan td { text-align: right; font-variant-numeric: tabular-nums; }
.gallery-heading { margin: 2.5rem 0 .4rem; }
@media (max-width: 52rem) {
  .bar { height: auto; grid-template-columns: 1fr auto; grid-template-areas: "brand theme" "nav nav"; align-items: center; gap: .25rem; }
  .bar nav { grid-area: nav; flex-wrap: nowrap; }
  .theme { grid-area: theme; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 38rem) {
  .wide { display: none; }
  .hero { padding-top: 2.5rem; }
  .stats { gap: .55rem; margin-top: 1.2rem; }
  .stats > div { padding: .8rem; }
  .view-choice + label { font-size: .85rem; }
}

.citation-card { margin-top: 1.5rem; padding: clamp(1rem, 2.5vw, 1.75rem); border: 1px solid var(--line); border-radius: .85rem; background: var(--card); }
.citation-card pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 1rem; font: .95rem/1.65 ui-monospace, monospace; }
#citation-status { margin-left: .6rem; color: var(--muted); }

/* Paper figures retain their original colors in both page themes. */
.paper-model .figure-canvas { object-fit: contain; display: block; width: 100%; height: auto; max-height: 72vh; background: white; border-radius: .35rem; }
/* Give the original cleaning diagram its own reading space. */
.curation {
  display: grid; grid-template-columns: minmax(13rem, .76fr) minmax(0, 2.35fr);
  align-items: start; gap: clamp(1.75rem, 4vw, 4rem);
  border-top: 1px solid var(--line); margin-top: clamp(2.5rem, 6vw, 4.75rem);
  padding-top: clamp(1.75rem, 4vw, 3rem);
}
.curation-copy h3 { font-size: clamp(1.85rem, 3vw, 2.7rem); letter-spacing: -.04em; line-height: 1.1; }
.curation-copy p { margin-top: .9rem; color: var(--muted); line-height: 1.6; }
.curation-copy a { display: inline-block; margin-top: 1.1rem; color: var(--blue); text-underline-offset: .22em; }
.curation-visual a, .curation-visual img { display: block; }
.curation-visual img { width: 100%; height: auto; background: white; }
@media (max-width: 48rem) {
  .curation { grid-template-columns: 1fr; gap: 1.1rem; }
  .curation-copy p { margin-top: .6rem; }
  .curation-copy a { margin-top: .6rem; }
}
#runtime-figure .figure-canvas { max-height: none; max-width: 53rem; margin-inline: auto; }
.experiment-figures .data-figure img { max-height: 68vh; object-fit: contain; }

.data-mixture { --baseline: #637f9d; --added: #e99a62; }
.mixture-page { display: none; grid-column: 1 / -1; min-width: 0; padding: clamp(.25rem, 1.8vw, 1.3rem); }
#mix-actions:checked ~ #mix-actions-panel,
#mix-language:checked ~ #mix-language-panel,
#mix-force:checked ~ #mix-force-panel { display: block; }
.mixture-heading {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .35rem 1rem; border-bottom: 1px solid var(--line); padding-bottom: .9rem; margin-bottom: 1.25rem;
}
.mixture-heading h3 { font-size: clamp(1.35rem, 2.4vw, 2rem); letter-spacing: -.035em; }
.mixture-heading span, .source-key, .qa-example > p, .force-example figcaption { color: var(--muted); }
.mixture-heading span { font-size: .95rem; }
.mixture-page h4 { margin: 0; font-size: 1rem; }
.action-layout { display: grid; grid-template-columns: minmax(12rem, .75fr) minmax(0, 1.4fr); gap: clamp(1.25rem, 4vw, 3.5rem); }
.modality { align-self: center; }
.modality-ring {
  display: grid; place-items: center; width: min(100%, 12.5rem); margin-inline: auto; aspect-ratio: 1;
  border-radius: 50%; background: conic-gradient(#a8c8e5 0 51.92%, #b6d5c6 51.92% 83.06%, #c6b7df 83.06% 100%);
}
.modality-ring img { width: 66%; height: 66%; padding: 18%; object-fit: contain; border-radius: 50%; background: white; }
.modality-key { margin: 1rem auto 0; max-width: 15rem; }
.modality-key div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .2rem 0; }
.modality-key dt::before, .source-key span::before {
  content: ""; display: inline-block; width: .65em; height: .65em; margin-right: .5em; border-radius: 2px; background: var(--swatch);
}
.modality-key dd, .source-bars b { font-variant-numeric: tabular-nums; }
.source-key { display: flex; gap: 1rem; margin: .35rem 0 .65rem; font-size: .82rem; }
.source-key span:first-child, .source-bars .a15 { --swatch: var(--baseline); }
.source-key span:last-child, .source-bars .added { --swatch: var(--added); }
.source-bars { list-style: none; padding: 0; margin: 0; }
.source-bars li { display: grid; grid-template-columns: 9rem 1fr 3.75rem; gap: .65rem; align-items: center; font-size: .88rem; padding: .16rem 0; }
.source-bars i { height: .42rem; border-radius: 3px; background: var(--band); }
.source-bars i::before { content: ""; display: block; width: calc(var(--share) * 100% / 30); height: 100%; background: var(--swatch); border-radius: inherit; }
.source-bars b { text-align: right; font-weight: 550; }
.qa-grid, .force-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.force-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qa-example, .force-example { min-width: 0; border-top: 4px solid var(--swatch); background: var(--band); border-radius: .45rem; padding: 1rem; }
.mixture-page .qa-count { font-size: 1.35rem; font-weight: 650; margin: .25rem 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.qa-count span { font-size: .9rem; color: var(--muted); font-weight: 450; }
.qa-example figure { display: grid; grid-template-columns: minmax(6rem, 42%) 1fr; align-items: center; gap: 1rem; margin-top: .9rem; }
.qa-example img, .force-photo { width: 100%; height: auto; display: block; border-radius: .3rem; }
.qa-example figcaption, .force-example figcaption { font-size: .92rem; }
.qa-example strong { display: block; margin-top: .35rem; color: var(--ink); overflow-wrap: anywhere; }
.force-example figure { margin-top: .75rem; }
.force-example figure img { display: block; width: 100%; height: auto; border-radius: .3rem; background: white; }
.force-example figcaption { margin-bottom: .25rem; }
.sampling-weight { margin-top: .75rem; color: var(--muted); }
.sampling-weight strong { color: var(--ink); }
@media (max-width: 48rem) {
  .action-layout, .qa-grid, .force-grid { grid-template-columns: minmax(0, 1fr); }
  .modality { display: flex; justify-content: center; align-items: center; gap: 1rem; }
  .modality-ring { width: min(28%, 7rem); margin: 0; }
  .modality-key { margin: 0; font-size: .86rem; }
  .source-bars li { grid-template-columns: minmax(7rem, 42%) 1fr 3.3rem; gap: .35rem; font-size: .8rem; }
}
.mixture-proportions { display: flex; gap: 2px; height: .65rem; margin-bottom: 1.2rem; border-radius: .3rem; overflow: hidden; }

.contributor-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 1rem 2rem;
  max-width: 60rem;
  margin-top: 1.5rem;
}
.contributor-list dt { font-weight: 650; }
.contributor-list dd { line-height: 1.7; }
@media (max-width: 38rem) {
  .contributor-list { grid-template-columns: 1fr; gap: .2rem; }
  .contributor-list dd + dt { margin-top: .8rem; }
}
