:root {
  color-scheme: light;
  --ink: #202935;
  --muted: #5d6874;
  --rule: #d9e0e5;
  --paper: #f5f7f8;
  --surface: #ffffff;
  --blue: #236b91;
  --blue-dark: #174d6b;
  --teal: #25817e;
  --max: 1060px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-dark); }
.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 5;
  padding: 0.5rem 0.8rem;
  background: var(--surface);
  color: var(--ink);
}
.skip-link:focus { top: 1rem; }
.site-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 58px;
  padding: 0.6rem max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid rgba(217, 224, 229, 0.9);
  background: rgba(245, 247, 248, 0.96);
  backdrop-filter: blur(10px);
}
.wordmark { color: var(--ink); font-size: 0.92rem; font-weight: 760; text-decoration: none; white-space: nowrap; }
.wordmark span { color: var(--muted); font-weight: 540; }
.nav-links { display: flex; align-items: center; gap: 0.15rem; }
.nav-links a { display: inline-flex; min-height: 42px; align-items: center; padding: 0.35rem 0.7rem; border-bottom: 2px solid transparent; color: var(--muted); font-size: 0.82rem; font-weight: 640; text-decoration: none; white-space: nowrap; }
.nav-links a:hover, .nav-links a:focus-visible { border-bottom-color: var(--blue); color: var(--blue-dark); }
.hero, main, .site-footer { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.hero { padding: clamp(3.25rem, 8vw, 5rem) 0 0; text-align: center; }
h1, h2, h3, p, figure { margin-top: 0; }
.hero h1 { max-width: 850px; margin: 0 auto 0.7rem; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.14; font-weight: 760; letter-spacing: 0; }
.subtitle { max-width: 750px; margin: 0 auto 0.85rem; color: #445363; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.5; }
.authors { margin: 1.15rem 0 0.2rem; text-align: center; font-size: 1rem; font-weight: 670; }
.authors a { color: var(--blue-dark); text-decoration: none; }
.authors a:hover { text-decoration: underline; }
.authors sup, .affiliation sup { color: var(--teal); font-size: 0.7em; font-weight: 720; line-height: 0; vertical-align: super; }
.affiliation { margin-bottom: 1.05rem; color: var(--muted); font-size: 0.87rem; }
.publication-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.55rem; margin: 0.5rem 0 1.6rem; }
.project-button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.48rem 0.85rem; border: 1px solid #343a40; border-radius: 999px; background: #343a40; color: #fff; font-size: 0.86rem; font-weight: 680; text-decoration: none; transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease; }
.project-button:hover { transform: translateY(-1px); border-color: #171c20; background: #171c20; color: #fff; }
.project-icon { display: block; width: 1.05rem; height: 1.05rem; flex: 0 0 1.05rem; color: #fff; }
.project-icon-hf { width: 1.12rem; height: 1.12rem; flex-basis: 1.12rem; border-radius: 50%; object-fit: contain; }
.project-icon-github { width: 1.08rem; height: 1.08rem; flex-basis: 1.08rem; object-fit: contain; }
.stat-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 800px; margin: -0.55rem auto 2rem; padding: 0; list-style: none; }
.stat-strip li { display: flex; flex-direction: column; align-items: center; gap: 0.05rem; padding: 0.35rem 1rem; }
.stat-strip li + li { border-left: 1px solid var(--rule); }
.stat-strip strong { color: var(--blue-dark); font-size: 1.3rem; line-height: 1.25; font-weight: 760; }
.stat-strip span { color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.figure { margin: 0; }
.figure img { display: block; width: 100%; height: auto; }
.figure-pipeline { max-width: 820px; margin-inline: auto; padding: clamp(0.6rem, 2vw, 1.15rem); border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); box-shadow: 0 8px 22px rgba(32, 45, 62, 0.055); }
figcaption { display: flex; gap: 0.55rem; margin-top: 0.72rem; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
figcaption span { flex: 0 0 auto; color: var(--ink); font-weight: 700; }
main { padding-top: 1rem; }
.content-section { display: grid; grid-template-columns: 175px minmax(0, 1fr); gap: 2.5rem; padding: 3.2rem 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 76px; }
.section-label { padding-top: 0.45rem; color: var(--teal); font-size: 0.74rem; font-weight: 760; letter-spacing: 0.07em; text-transform: uppercase; }
.section-body { max-width: 780px; }
.section-body h2, .citation-section h2 { margin-bottom: 0.75rem; font-size: clamp(1.7rem, 3.1vw, 2.25rem); line-height: 1.22; letter-spacing: 0; }
.section-body > p { max-width: 740px; margin-bottom: 0.8rem; color: #435160; }
.contribution-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; margin-top: 1.4rem; }
.contribution-grid article { min-height: 145px; padding: 1rem; border: 1px solid var(--rule); border-top: 3px solid var(--blue); border-radius: 5px; background: rgba(255,255,255,0.75); }
.contribution-grid article > span { color: var(--teal); font-size: 0.72rem; font-weight: 760; }
.contribution-grid h3 { margin: 0.35rem 0 0.3rem; font-size: 1rem; }
.contribution-grid p { margin: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.5; }
.method-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr); align-items: center; gap: 1.6rem; margin-top: 1.6rem; }
.method-layout h3 { margin-bottom: 0.45rem; color: var(--blue-dark); font-size: 1.3rem; }
.method-layout p { margin-bottom: 0.7rem; color: #435160; font-size: 0.93rem; }
.figure-small { padding: 0.55rem; border: 1px solid var(--rule); border-radius: 5px; background: #fff; }
.figure-small figcaption { display: block; }
.figure-small figcaption span { display: block; }
.variant-examples { margin-top: 1.8rem; }
.variant-examples h3 { margin-bottom: 0.7rem; font-size: 1rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 5px; background: #fff; }
.table-wrap table { width: 100%; border-collapse: collapse; text-align: left; }
.table-wrap caption { padding: 0.8rem 0.9rem 0.55rem; color: var(--muted); font-size: 0.78rem; text-align: left; }
.table-wrap th, .table-wrap td { padding: 0.72rem 0.85rem; border-top: 1px solid #e5eaee; vertical-align: top; font-size: 0.86rem; }
.table-wrap thead th { border-top: 0; background: #f0f4f6; color: #374655; font-size: 0.76rem; font-weight: 750; }
.table-wrap tbody th[scope="row"] { color: #334656; font-weight: 700; white-space: nowrap; }
.table-wrap tbody tr:hover { background: #f8fafb; }
.example-list { display: block; max-width: 42ch; line-height: 1.55; }
.results-table td:last-child { min-width: 340px; }
.table-note { margin-top: 0.65rem; color: var(--muted) !important; font-size: 0.8rem; }
.scope-note { margin-top: 1.45rem; padding: 1rem 1.1rem; border-left: 3px solid var(--teal); background: #edf3f3; }
.scope-note strong { font-size: 0.87rem; }
.scope-note p { margin: 0.25rem 0 0; color: #435160; font-size: 0.88rem; }
.citation-section { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 2rem; padding: 3.1rem 0; scroll-margin-top: 76px; }
.citation-section h2 { margin-top: 0.25rem; }
.citation-section p { max-width: 410px; margin: 0; color: #435160; font-size: 0.9rem; }
.citation-section pre { overflow-x: auto; margin: 0; padding: 1rem 1.2rem; border: 1px solid var(--rule); border-radius: 5px; background: #fff; color: #33404d; font: 0.79rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.15rem 0 1.7rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.8rem; }
.site-footer a { text-decoration: none; }

@media (max-width: 720px) {
  .site-nav { align-items: flex-start; flex-direction: column; gap: 0.35rem; padding: 0.65rem 18px 0.55rem; }
  .nav-links { width: 100%; gap: 0.1rem; overflow-x: auto; padding: 0.15rem 0 0; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { min-height: 38px; flex: 0 0 auto; padding-inline: 0.55rem; font-size: 0.78rem; }
  .hero, main, .site-footer { width: calc(100% - 36px); }
  .hero { padding-top: 2.6rem; }
  .hero h1 { font-size: clamp(1.8rem, 7.5vw, 2.7rem); }
  .desktop-break { display: none; }
  .authors { font-size: 0.93rem; }
  .affiliation { margin-bottom: 0.8rem; }
  .publication-links { gap: 0.45rem; margin-bottom: 1.3rem; }
  .project-button { min-height: 39px; padding-inline: 0.7rem; font-size: 0.82rem; }
  .stat-strip { grid-template-columns: 1fr; gap: 0.65rem; margin: 0.15rem auto 1.45rem; padding: 0.8rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .stat-strip li { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: baseline; gap: 0.6rem; padding: 0; text-align: left; }
  .stat-strip li + li { border-left: 0; }
  .stat-strip strong { font-size: 1.15rem; text-align: right; }
  .stat-strip span { max-width: none; font-size: 0.75rem; }
  .content-section { grid-template-columns: 1fr; gap: 0.55rem; padding: 2.25rem 0; }
  .section-label { padding: 0; }
  .contribution-grid { grid-template-columns: 1fr; gap: 0.6rem; }
  .contribution-grid article { min-height: 0; }
  .table-wrap { overflow: visible; border: 0; background: transparent; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td, .table-wrap th { display: block; width: 100%; }
  .table-wrap caption { padding: 0 0 0.55rem; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .table-wrap tbody tr { margin-bottom: 0.65rem; padding: 0.35rem 0.8rem; border: 1px solid var(--rule); border-radius: 5px; background: #fff; }
  .table-wrap th, .table-wrap td { padding: 0.45rem 0; border-top: 0; }
  .table-wrap tbody th[scope="row"] { padding-bottom: 0.35rem; border-bottom: 1px solid #e5eaee; color: var(--blue-dark); }
  .table-wrap td::before { display: block; margin-bottom: 0.1rem; color: var(--muted); content: attr(data-label); font-size: 0.67rem; font-weight: 730; text-transform: uppercase; }
  .results-table td:last-child { min-width: 0; }
  .method-layout { grid-template-columns: 1fr; gap: 0.75rem; }
  .citation-section { grid-template-columns: 1fr; gap: 0.8rem; padding: 2.25rem 0; }
  .citation-section pre { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
