:root {
  color-scheme: light;
  --ink: #192436;
  --muted: #49566b;
  --blue: #263f8c;
  --blue-dark: #1b3072;
  --line: #dce2ed;
  --soft: #f4f6fb;
  --surface: #fff;
  --serif: Georgia, Cambria, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; color: var(--ink); background: var(--surface); font: 1rem/1.6 var(--sans); }
a { color: var(--blue); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
.shell { width: min(74rem, calc(100% - 3rem)); margin-inline: auto; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 10; padding: .75rem 1rem; background: white; }
.skip-link:focus { top: .5rem; }
:focus-visible { outline: 3px solid #345ac0; outline-offset: 4px; }

.site-header { border-bottom: 1px solid var(--line); }
.header-layout { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 750; text-decoration: none; }
.brand img { width: 2.35rem; mix-blend-mode: multiply; }
.site-header nav, .footer-layout { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.site-header nav a, .site-footer a { color: var(--muted); font-size: .9375rem; text-decoration: none; }
.site-header nav a:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: .24em; }

.hero { padding-block: clamp(3rem, 7vw, 5.6rem) 2rem; background: linear-gradient(180deg, #eef2fc 0%, #f8f9fc 78%, #fff 100%); }
.hero-content { text-align: center; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.045em; line-height: 1.05; }
h1 { color: var(--blue-dark); font-size: clamp(3.2rem, 10vw, 7rem); }
.hero-subtitle { margin-top: .65rem; font: 600 clamp(1.4rem, 4.2vw, 2.45rem)/1.2 var(--serif); letter-spacing: -.035em; }
.hero-intro { max-width: 37rem; margin: 1.15rem auto 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.14rem); }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem 1.05rem; margin: 1.5rem auto .3rem; padding: 0; list-style: none; font-weight: 600; }
.authors sup { color: var(--blue); padding-left: .12em; }
.affiliations, .contribution { color: var(--muted); font-size: .875rem; }
.resource-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1.6rem; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: .68rem 1.2rem; border: 1px solid var(--blue); border-radius: .5rem; font-weight: 650; text-decoration: none; }
.button-primary { background: var(--blue); color: white; }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { color: var(--blue-dark); background: white; }
.button-secondary:hover { background: #e9effc; }
.resource-links .button {
  gap: .65rem;
  min-height: 3.25rem;
  padding: .5rem 1rem;
  border-color: var(--resource-border);
  border-radius: .75rem;
  background: var(--resource-bg);
  color: var(--resource-ink);
  box-shadow: inset 0 1px 0 #ffffff35, 0 2px 0 var(--resource-border), 0 .4rem .8rem #19243618;
  font-weight: 720;
  line-height: 1.25;
}
.resource-links .button:hover { background: var(--resource-hover); }
.resource-links .button:hover span { text-decoration: underline; text-underline-offset: .2em; }
.resource-links .button:active { box-shadow: inset 0 1px 3px #19243632; }
.resource-icon { width: 1.25rem; height: 1.25rem; flex: none; object-fit: contain; }
.resource-icon-github { filter: brightness(0) invert(1); }
.button-arxiv { --resource-bg: #b31b1b; --resource-hover: #991616; --resource-border: #8e1818; --resource-ink: #fff; }
.button-github { --resource-bg: #24292f; --resource-hover: #3a424c; --resource-border: #161b22; --resource-ink: #fff; }
.button-explorer { --resource-bg: #e4ddfa; --resource-hover: #d7cdf8; --resource-border: #b5a5df; --resource-ink: #362664; }
.button-hugging-face { --resource-bg: #ffd21e; --resource-hover: #ffc327; --resource-border: #b58b00; --resource-ink: #242328; }
.resource-icon-arxiv { width: 2.8rem; height: 1.6rem; padding: .28rem .3rem; border-radius: .3rem; background: white; }
.hero-figure { margin-top: clamp(2rem, 5vw, 3.6rem); }
.image-link { display: block; border-radius: .38rem; background: white; }
.image-link:hover { box-shadow: 0 0 0 2px #8198d0; }
.hero-image { padding: clamp(.55rem, 2.6vw, 1.45rem); border: 1px solid var(--line); border-radius: .85rem; box-shadow: 0 .9rem 2.7rem #25345a12; }
.hero-figure figcaption { margin: .65rem 0 0; text-align: center; }

.section { padding-block: clamp(2.75rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.45rem); }
h3 { font-size: 1.12rem; }
.section-text p { margin-top: 1rem; color: var(--muted); max-width: 39rem; }
.about-section {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr);
  gap: clamp(1.25rem, 4vw, 3.5rem);
  margin-top: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.4rem, 5vw, 3.5rem);
  border: 1px solid #d5deef;
  border-radius: 1rem;
  background: #f0f3fb;
}
.about-section h2 { color: var(--blue-dark); }
.about-copy { color: var(--muted); }
.about-copy p + p { margin-top: .9rem; }
.about-copy a { text-underline-offset: .18em; }
.task-layout { display: grid; grid-template-columns: 1fr 1.43fr; align-items: center; gap: clamp(1.5rem, 5vw, 4.75rem); }
.figure-panel { min-width: 0; background: white; border: 1px solid var(--line); border-radius: .75rem; padding: clamp(.7rem, 1.6vw, 1.15rem); }
figcaption { color: var(--muted); font-size: .9rem; }
.figure-panel figcaption { margin-top: .75rem; }
.figure-panel img { width: 100%; }

.dataset-section { background: var(--soft); border-block: 1px solid var(--line); }
.dataset-heading { display: grid; grid-template-columns: 1fr 1.07fr; gap: clamp(1.1rem, 4vw, 3.1rem); align-items: center; }
.dataset-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: white; border: 1px solid var(--line); border-radius: .65rem; overflow: hidden; }
.dataset-stats div { display: flex; flex-direction: column-reverse; padding: .75rem .65rem 1rem; text-align: center; }
.dataset-stats div + div { border-left: 1px solid var(--line); }
.dataset-stats dt, .accuracy dt { color: var(--muted); font-size: .875rem; }
.dataset-stats dd, .accuracy dd { color: var(--blue-dark); font: 600 clamp(1.18rem, 3.2vw, 2.3rem)/1.18 var(--serif); font-variant-numeric: tabular-nums; }
.dataset-layout { display: grid; grid-template-columns: 1fr 1.65fr; gap: clamp(1.25rem, 4vw, 3.2rem); align-items: start; margin-top: 2rem; }
table { width: 100%; border-collapse: collapse; margin-top: .45rem; font-variant-numeric: tabular-nums; }
th, td { padding: .55rem .25rem .55rem .55rem; text-align: right; border-bottom: 1px solid var(--line); }
tr > :first-child { text-align: left; padding-left: 0; }
thead th { color: var(--muted); font-size: .9rem; font-weight: 650; }
tbody th { font-weight: 600; }
.table-note { color: var(--muted); font-size: .9rem; margin-top: .55rem; }

.results-intro { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem 3rem; align-items: center; }
.accuracy { display: grid; grid-template-columns: 1fr 1fr; border-left: 3px solid var(--blue); padding: .75rem .9rem; background: var(--soft); }
.accuracy div { display: flex; flex-direction: column-reverse; gap: .25rem; padding: .25rem .4rem; }
.accuracy dd { font-size: clamp(1.65rem, 4vw, 2.9rem); }
.accuracy div:first-child dd { color: var(--muted); }
.results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.8rem; }
.results-grid strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: .15rem; }
.benchmark-section { padding-top: 0; }
.benchmark-scroll { margin-top: 1.15rem; overflow-x: auto; }
.benchmark-table { margin-top: 0; font-size: .9rem; white-space: nowrap; }
.benchmark-table caption { padding-bottom: .6rem; text-align: left; color: var(--muted); }
.benchmark-table :is(th, td) { padding: .55rem .8rem; }
.benchmark-table thead { background: var(--soft); }
.benchmark-table th[scope="colgroup"] { text-align: center; font-size: .95rem; }
.benchmark-table th[scope="row"], .benchmark-table th[scope="col"][rowspan] {
  position: sticky;
  left: 0;
  text-align: left;
  background: white;
  box-shadow: 1px 0 var(--line);
}
.benchmark-table th[scope="col"][rowspan]:not(:first-child) { position: static; }
.benchmark-table th[scope="col"][rowspan] { background: var(--soft); }
.benchmark-table .benchmark-group th {
  background: var(--soft);
  color: var(--muted);
  text-align: left;
  white-space: normal;
}
.benchmark-details { border-bottom: 1px solid var(--line); padding-block: .8rem; }
.benchmark-details summary { cursor: pointer; color: var(--blue-dark); font-weight: 650; }
.benchmark-details .benchmark-scroll { margin-bottom: .35rem; }
.site-footer { border-top: 1px solid var(--line); background: var(--soft); }
.footer-layout { min-height: 5rem; padding-block: .7rem; }
.footer-layout span { margin-right: auto; font-weight: 750; }

@media (max-width: 52rem) {
  .about-section, .task-layout, .dataset-heading, .dataset-layout, .results-intro { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accuracy { max-width: 28rem; }
}
@media (max-width: 36rem) {
  .shell { width: calc(100% - 2rem); }
  .resource-links .button { flex: 1 1 10rem; }
  .header-layout { flex-wrap: wrap; gap: .35rem 1rem; padding-block: .7rem; }
  .site-header nav { gap: .8rem; }
  .results-grid { grid-template-columns: 1fr; }
  .dataset-stats div { padding-inline: .45rem; }
  .footer-layout { gap: .8rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.explorer-callout {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem 2rem;
  padding: clamp(1.3rem, 4vw, 2.8rem);
  border: 1px solid #dcdff0;
  border-radius: .9rem;
  background: linear-gradient(110deg, #efedf8, #eaf5ee);
}
