:root {
  color-scheme: light;
  --ink: #202935;
  --muted: #5d6874;
  --rule: #d9e0e5;
  --paper: #f5f7f8;
  --surface: #fff;
  --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.2rem; 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(3rem, 7vw, 4.75rem) 0 0; text-align: center; }
.project-label { margin-bottom: 0.8rem; color: var(--teal); font-size: 0.76rem; font-weight: 740; }
h1, h2, h3, p, figure { margin-top: 0; }
.hero h1 { max-width: 820px; margin: 0 auto 0.75rem; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.14; font-weight: 760; }
.subtitle { max-width: 720px; margin: 0 auto 0.9rem; color: #445363; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.5; }
.authors { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0.35rem; margin: 1.1rem 0 0.15rem; font-size: 1rem; font-weight: 670; }
.authors a { color: var(--blue-dark); text-decoration: none; }
.authors a:hover { text-decoration: underline; }
.authors span { color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.affiliation { margin-bottom: 1.05rem; color: var(--muted); font-size: 0.87rem; }
.publication-links, .resource-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.55rem; margin: 0.5rem 0 1.35rem; }
.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.05rem; height: 1.05rem; flex-basis: 1.05rem; border-radius: 50%; object-fit: contain; }
.stat-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 850px; margin: 0 auto 1.7rem; padding: 0.65rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); list-style: none; }
.stat-strip li { display: flex; flex-direction: column; align-items: center; gap: 0.08rem; padding: 0.25rem 1rem; }
.stat-strip li + li { border-left: 1px solid var(--rule); }
.stat-strip strong { color: var(--blue-dark); font-size: 1.4rem; line-height: 1.25; font-weight: 760; }
.stat-strip span { color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.figure { margin: 0; }
.figure img { display: block; width: 100%; height: auto; }
.figure-overview { max-width: 820px; margin: 0 auto; padding: clamp(0.45rem, 1.4vw, 0.85rem); 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.7rem; color: var(--muted); font-size: 0.78rem; line-height: 1.5; text-align: left; }
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: 3rem 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: 800px; min-width: 0; }
.section-body h2 { margin-bottom: 0.75rem; font-size: clamp(1.65rem, 2.8vw, 2.15rem); line-height: 1.22; }
.section-body > p { max-width: 760px; margin-bottom: 0.85rem; color: #435160; }
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-top: 1.25rem; }
.method-grid article, .finding-grid article { padding: 0.9rem 1rem; border: 1px solid var(--rule); border-top: 3px solid var(--blue); border-radius: 5px; background: rgba(255,255,255,0.75); }
.method-grid article > span { color: var(--teal); font-size: 0.72rem; font-weight: 760; }
.method-grid h3, .finding-grid h3 { margin: 0.32rem 0 0.25rem; font-size: 0.98rem; }
.method-grid p, .finding-grid p { margin: 0; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.method-note, .care-note { margin-top: 1rem; padding: 0.85rem 1rem; border-left: 3px solid var(--teal); background: #edf3f3; }
.method-note strong, .care-note strong { font-size: 0.87rem; }
.method-note p, .care-note p { margin: 0.25rem 0 0; color: #435160; font-size: 0.88rem; }
.care-note p { margin-top: 0; }
.table-wrap { overflow-x: auto; margin-top: 1.2rem; 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.65rem 0.8rem; border-top: 1px solid #e5eaee; vertical-align: top; font-size: 0.85rem; }
.table-wrap thead th { border-top: 0; background: #f0f4f6; color: #374655; font-size: 0.75rem; font-weight: 750; }
.table-wrap tbody th[scope="row"] { color: #334656; font-weight: 700; }
.table-note { margin: 0.6rem 0 1.25rem !important; color: var(--muted) !important; font-size: 0.79rem; }
.finding-subhead { margin: 1.35rem 0 0.5rem; color: var(--blue-dark); font-size: 1.15rem; line-height: 1.35; }
.figure-tokenizers { margin: 1rem 0 1.2rem; }
.figure-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 5px; background: #fff; overscroll-behavior-inline: contain; }
.figure-scroll img { display: block; width: 100%; min-width: 760px; height: auto; }
.figure-results { max-width: 390px; margin: 1.25rem auto 1.5rem; }
.figure-results img { border: 1px solid var(--rule); border-radius: 5px; background: #fff; }
.figure-transfer { margin-top: 1.5rem; padding: 0.6rem; border: 1px solid var(--rule); border-radius: 5px; background: #fff; }
.finding-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; margin-top: 1.4rem; }
.finding-grid article { border-top-color: var(--teal); }
.finding-grid h3 { color: var(--blue-dark); }
.care-note { margin-top: 1.1rem; }
.resources-section { border-bottom: 0; }
.resource-links { justify-content: flex-start; margin: 1rem 0 0.65rem; }
.paper-note { color: var(--muted) !important; font-size: 0.82rem; }
.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: 760px) {
  .site-nav { align-items: flex-start; flex-direction: column; gap: 0.3rem; padding: 0.6rem 18px 0.5rem; }
  .nav-links { width: 100%; gap: 0.1rem; overflow-x: auto; padding-top: 0.1rem; 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.4rem; }
  .hero h1 { font-size: clamp(1.8rem, 7.5vw, 2.7rem); }
  .desktop-break { display: none; }
  .authors { font-size: 0.94rem; }
  .publication-links { gap: 0.4rem; margin-bottom: 1rem; }
  .project-button { min-height: 39px; padding-inline: 0.7rem; font-size: 0.81rem; }
  .stat-strip { grid-template-columns: 1fr; gap: 0.55rem; max-width: 480px; margin-bottom: 1.3rem; }
  .stat-strip li { display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: baseline; gap: 0.65rem; padding: 0.1rem 0.25rem; }
  .stat-strip li + li { border-left: 0; }
  .stat-strip strong { font-size: 1.1rem; text-align: right; }
  .stat-strip span { font-size: 0.76rem; }
  .content-section { grid-template-columns: 1fr; gap: 0.5rem; padding: 2.2rem 0; }
  .section-label { padding: 0; }
  .method-grid { grid-template-columns: 1fr; gap: 0.6rem; }
  .finding-grid { grid-template-columns: 1fr; gap: 0.6rem; }
  .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.6rem; padding: 0.3rem 0.75rem; border: 1px solid var(--rule); border-radius: 5px; background: #fff; }
  .table-wrap th, .table-wrap td { padding: 0.38rem 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.08rem; color: var(--muted); content: attr(data-label); font-size: 0.66rem; font-weight: 730; text-transform: uppercase; }
  .figure-transfer { padding: 0.35rem; }
  figcaption { display: block; font-size: 0.75rem; }
  figcaption span { display: block; margin-bottom: 0.15rem; }
}

@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; }
}

/* CineSubBench's leaderboard and figure scale are specific to this project. */
.hero { padding-top: clamp(2rem, 3vw, 2.6rem); }
.hero h1 { font-size: clamp(2.25rem, 4vw, 3.25rem); }
.subtitle { max-width: 780px; font-size: clamp(1rem, 1.5vw, 1.16rem); }
.authors { gap: 0.22rem; }
.authors sup, .affiliation sup { position: relative; top: -0.2em; font-size: 0.65em; line-height: 0; }
.authors .author-name { color: var(--blue-dark); font-size: inherit; font-weight: inherit; }
.authors .author-comma { margin-right: 0.2rem; color: var(--ink); font-size: inherit; font-weight: inherit; }
.figure-overview { max-width: 680px; }
.stat-strip { margin-bottom: 1.1rem; }
.takeaway { margin: 1.25rem 0 0; padding: 0.9rem 1.1rem; border-left: 3px solid var(--teal); background: #edf3f3; }
.takeaway strong { font-size: 0.83rem; color: var(--blue-dark); }
.takeaway p { margin: 0.2rem 0 0; color: #435160; font-size: 0.91rem; }
.language-line { margin: 1.15rem 0 0 !important; }
.language-line + .language-line { margin-top: 0.45rem !important; }
.task-grid article { border-top-color: var(--teal); }
.task-grid article > span { text-transform: uppercase; letter-spacing: 0.04em; }
.figure-result { margin: 1.25rem auto 1.7rem; }
.figure-result img { max-width: 100%; margin-inline: auto; }
.figure-language { max-width: 440px; }
.figure-language img, .figure-result .figure-scroll { border: 1px solid var(--rule); border-radius: 5px; background: #fff; }
.figure-wide { max-width: 720px; }
.figure-wide .figure-scroll { padding: 0.45rem; }
.figure-wide .figure-scroll img { width: 100%; }
.leaderboard-wrap { overflow-x: auto; max-width: 100%; margin: 1.1rem 0 0.4rem; border: 1px solid var(--rule); border-radius: 6px; background: #fff; box-shadow: 0 5px 16px rgba(32, 45, 62, 0.05); }
.leaderboard { width: 100%; min-width: 790px; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.leaderboard caption { padding: 0.7rem 0.85rem; color: var(--muted); font-size: 0.76rem; text-align: left; }
.leaderboard th, .leaderboard td { padding: 0.58rem 0.52rem; border-top: 1px solid #e6ebee; font-size: 0.78rem; text-align: right; white-space: nowrap; }
.leaderboard thead th { padding: 0; background: #edf3f5; color: #3c4e5c; font-size: 0.73rem; }
.leaderboard thead button { display: block; width: 100%; min-height: 52px; padding: 0.43rem 0.52rem; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 750; text-align: right; cursor: pointer; }
.leaderboard thead button:hover, .leaderboard thead button:focus-visible { background: #dbeaf0; color: var(--blue-dark); }
.leaderboard thead small { display: block; color: var(--muted); font-size: 0.67rem; font-weight: 560; }
.leaderboard .rank-col { width: 44px; }
.leaderboard .rank-col button, .leaderboard .model-col button { text-align: left; }
.leaderboard .model-col { min-width: 155px; }
.leaderboard tbody tr:nth-child(even) { background: #f8fafb; }
.leaderboard tbody tr:hover { background: #eef5f7; }
.leaderboard tbody th { color: #233a4d; font-weight: 690; text-align: left; }
.leaderboard tbody td:first-child { text-align: center; }
.leaderboard tbody .score { color: var(--blue-dark); font-weight: 780; }
.medal, .rank-number { display: inline-grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; font-size: 0.73rem; font-weight: 800; }
.gold { background: #f9e8aa; color: #745106; box-shadow: inset 0 0 0 1px #e7c45d; }
.silver { background: #e4eaed; color: #4a5c69; box-shadow: inset 0 0 0 1px #b5c4cb; }
.bronze { background: #f5ddca; color: #815033; box-shadow: inset 0 0 0 1px #d5a47d; }
.rank-number { color: var(--muted); font-weight: 650; }
.sort-indicator { color: var(--teal); }
.leaderboard-wrap:focus-visible, .figure-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (max-width: 760px) {
  .site-nav { gap: 0.12rem; }
  .hero { padding-top: 2rem; }
  .authors { gap: 0.1rem; }
  .affiliation { max-width: 320px; margin-inline: auto; }
  .figure-overview { padding: 0.3rem; }
  .leaderboard { min-width: 760px; }
  .leaderboard .rank-col { position: sticky; left: 0; z-index: 2; background: #edf3f5; }
  .leaderboard .model-col { position: sticky; left: 44px; z-index: 2; background: #edf3f5; box-shadow: 3px 0 6px rgba(32, 45, 62, 0.08); }
  .leaderboard tbody td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; }
  .leaderboard tbody th { position: sticky; left: 44px; z-index: 1; background: #fff; box-shadow: 3px 0 6px rgba(32, 45, 62, 0.08); }
  .leaderboard tbody tr:nth-child(even) td:first-child, .leaderboard tbody tr:nth-child(even) th { background: #f8fafb; }
  .figure-wide .figure-scroll img { width: 680px; max-width: none; }
  .figure-language { max-width: 410px; }
}
