:root {
  --ink: #262626;
  --muted: #6b6b6b;
  --faint: #8f8f8f;
  --rule: #e6e6e6;
  --accent: #2166ac;
  --accent-soft: #eef3f9;
  --panel: #f7f7f7;
  color-scheme: light;
  font-family: 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-size: 16px; line-height: 1.65; background: #fff; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img, video { display: block; max-width: 100%; height: auto; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(24px, calc((100% - 960px) / 2)); background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid #eee;
}
.topbar .brand { font-weight: 700; color: var(--ink); letter-spacing: .02em; font-size: .9rem; }
.topbar div { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.topbar div a { color: #555; font-size: .82rem; }
.topbar div a:hover { color: var(--accent); text-decoration: none; }
.topbar .gh { color: var(--accent); font-weight: 500; }
section, .hero { scroll-margin-top: 56px; }

/* Header: a quiet band with title, authors and resources */
.hero { background: linear-gradient(#f7f8fa, #fff); border-bottom: 1px solid #eef0f2; text-align: center; }
.hero-inner { max-width: 860px; margin: 0 auto; padding: 56px 24px 40px; }
h1 { font-size: 2.7rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 14px; text-wrap: balance; }
.venue { margin: 0 0 24px; font-size: 1.1rem; font-weight: 600; letter-spacing: .02em; color: var(--accent); text-wrap: balance; }
.authors { list-style: none; padding: 0; margin: 0 auto 8px; max-width: 820px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; font-size: 1.05rem; }
.authors sup, .affiliations sup { font-size: .66em; margin-left: 1px; color: var(--ink); }
.affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 20px; margin: 0 0 28px; font-size: .85rem; color: var(--ink); }
.affiliations .note { font-size: .78rem; align-self: center; }
.affiliations { align-items: center; gap: 6px 32px; }
.affiliations span { display: inline-flex; align-items: flex-start; gap: 3px; }
.affiliations .logo { display: block; width: auto; }
.affiliations .logo-eth { height: 22px; margin-top: 3px; }
.affiliations .logo-google { height: 30px; }
.affiliations .note { flex-basis: 100%; justify-content: center; margin-top: 2px; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.links a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: 999px; background: #262626;
  color: #fff; font-size: 1rem; font-weight: 500; line-height: 1.4; transition: background .15s;
}
.links a:hover { background: #000; text-decoration: none; }
.links svg { width: 18px; height: 18px; flex: none; }

/* Layout */
main { max-width: 960px; margin: 0 auto; padding: 40px 24px 0; }
section { padding: 88px 0 0; }
h2 { font-size: 1.55rem; font-weight: 600; text-align: center; letter-spacing: -0.01em; margin: 0 0 16px; }
h2::after { content: ''; display: block; width: 32px; height: 2px; margin: 14px auto 0; background: var(--accent); border-radius: 2px; }
.lede { max-width: 700px; margin: 0 auto 36px; text-align: center; color: #4a4a4a; font-size: .98rem; line-height: 1.75; }
figure { margin: 0 0 40px; }
figure img { width: 100%; }
figcaption, .caption { font-size: .88rem; line-height: 1.6; color: var(--muted); margin: 10px auto 0; text-align: center; max-width: 780px; }
figcaption b { color: var(--ink); font-weight: 600; }

.teaser { margin: 0 0 4px; }
.teaser figcaption { max-width: none; }
/* The repository demo carries 53 px letterbox bars; crop them (plus a few edge rows) to 1280×606. */
.teaser video { width: 100%; aspect-ratio: 1280 / 606; object-fit: cover; background: #fff; }
.abstract p { text-align: justify; hyphens: auto; max-width: 820px; margin: 0 auto; }

/* Qualitative results: sequence picker and video */
#qualitative .lede, #method .lede { text-align: justify; hyphens: auto; }
.picker { display: grid; gap: 8px; justify-content: center; margin: 0 auto 22px; }
.picker-row { display: flex; align-items: center; gap: 12px; }
.picker-row > span { width: 36px; font-size: .78rem; color: var(--faint); text-align: right; }
.picker-row > div { display: flex; flex-wrap: wrap; gap: 6px; }
.picker button {
  font: inherit; font-size: .8rem; font-variant-numeric: tabular-nums; padding: 4px 11px; border-radius: 6px;
  border: 1px solid #dcdcdc; background: #fff; color: #333; cursor: pointer;
}
.picker button:hover { border-color: #9aa9b8; }
.picker button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.seq-video { width: 100%; aspect-ratio: 16 / 9; background: #fff; border: 1px solid var(--rule); border-radius: 6px; margin-bottom: 18px; }
/* Method steps */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; padding: 0; margin: 8px 0 26px; }
.steps li { counter-increment: step; border-top: 2px solid var(--accent); padding-top: 14px; }
.steps h3 { font-size: .98rem; font-weight: 600; margin: 0 0 6px; }
.steps h3::before { content: counter(step); display: inline-block; width: 1.5em; color: var(--accent); }
.steps p { margin: 0; font-size: .88rem; line-height: 1.65; color: #4a4a4a; text-align: justify; hyphens: auto; }

/* Benchmark */
.headline { display: grid; grid-template-columns: repeat(3, 1fr); margin: 6px auto 34px; max-width: 760px; text-align: center; }
.headline div + div { border-left: 1px solid var(--rule); }
.headline strong { display: block; font-size: 1.9rem; font-weight: 500; line-height: 1.2; color: var(--accent); font-variant-numeric: tabular-nums; }
.headline small { font-size: .55em; font-weight: 400; }
.headline span { display: block; font-size: .8rem; line-height: 1.5; color: var(--muted); margin-top: 6px; }

.table-wrap { overflow-x: auto; margin: 18px 0 8px; }
table.results { border-collapse: collapse; width: 100%; font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.results caption { caption-side: top; text-align: left; font-size: .82rem; color: var(--muted); padding-bottom: 8px; white-space: normal; }
table.results caption span { color: var(--ink); font-weight: 600; }
table.results th, table.results td { padding: 4px 9px; text-align: right; }
table.results th:first-child { text-align: left; font-weight: 500; }
table.results thead tr:first-child th { border-top: 1.5px solid #333; font-weight: 600; }
table.results thead tr:last-child > * { border-bottom: 1px solid #333; }
table.results tbody tr:last-child > * { border-bottom: 1.5px solid #333; }
table.results .input-row td, table.results td.input { color: var(--faint); font-size: .76rem; }
table.results .avg > * { border-top: 1px solid #999; font-weight: 500; }
table.results .ours { background: var(--accent-soft); }
table.results tr.ours th { color: var(--accent); font-weight: 600; }

/* Run notes, architecture details, BibTeX, footer */
.protocol { max-width: 820px; margin: 4px auto 0; font-size: .88rem; color: #555; }
.protocol p { margin: 10px 0; text-align: justify; hyphens: auto; }
.arch { margin-top: 48px; }
.arch h3 { font-size: 1.35rem; font-weight: 600; text-align: center; margin: 0 0 20px; }
.arch .tokenizer { max-width: 560px; margin-inline: auto; }
.tables { margin-top: 8px; }
.bib { position: relative; background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; }
.bib pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: .78rem/1.6 'Noto Sans Mono', ui-monospace, monospace; color: #333; }
.bib button { position: absolute; top: 10px; right: 10px; font: inherit; font-size: .76rem; padding: 3px 10px; border: 1px solid #ccc; background: #fff; border-radius: 3px; cursor: pointer; color: #444; }
footer { text-align: center; color: var(--faint); font-size: .78rem; padding: 32px 24px 40px; margin-top: 48px; border-top: 1px solid var(--rule); }
footer p { margin: 0; }
footer a { color: #777; }

@media (max-width: 720px) {
  .topbar { padding: 8px 16px; }
  .topbar div { gap: 2px 12px; }
  .topbar div a { font-size: .76rem; }
  .topbar div a:not(.gh):nth-child(4) { display: none; }
  .hero-inner { padding: 34px 16px 28px; }
  h1 { font-size: 1.8rem; }
  .links { gap: 8px; }
  .links a { padding: 8px 16px; font-size: .9rem; }
  .authors { font-size: .9rem; gap: 0 12px; }
  main { padding: 0 16px; }
  section { padding-top: 60px; }
  main { padding-top: 24px; }
  h2 { font-size: 1.3rem; }
  .abstract p, .protocol p, .steps p, #qualitative .lede, #method .lede { text-align: left; hyphens: manual; }
  .headline strong { font-size: 1.45rem; }
  .headline span { font-size: .7rem; padding: 0 4px; }
  .picker-row { align-items: flex-start; }
  .picker-row > span { padding-top: 6px; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
