:root {
  color-scheme: light;
  --ink: #261a38;
  --muted: #655b72;
  --purple: #6335a7;
  --deep: #4c2189;
  --line: #e4daee;
  --paper: #fefcff;
  --radius: 20px;
  --wrap: 1080px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--sans);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
h1, h2, h3, p, figure, dl { margin: 0; }
a { color: inherit; }
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #8a4fd3; outline-offset: 4px; }
section[id] { scroll-margin-top: 2.5rem; }
.wrap { width: min(var(--wrap), calc(100% - 3.5rem)); margin-inline: auto; }

.skip {
  position: absolute;
  z-index: 2;
  inset: .5rem auto auto .5rem;
  padding: .65rem 1rem;
  background: white;
  transform: translateY(-180%);
}
.skip:focus { transform: none; }

.section-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem .35rem; margin-top: 1.25rem; }
.section-nav a { display: flex; align-items: center; gap: .5rem; min-height: 36px; padding: .45rem .65rem; border-radius: .55rem; color: var(--muted); font-size: .875rem; font-weight: 650; line-height: 1.2; text-decoration: none; }
.section-nav a::before { content: ""; flex: none; width: .42rem; height: .42rem; border-radius: 50%; background: #b8a4ca; }
.section-nav a:hover, .section-nav [aria-current="location"] { color: var(--deep); background: #efe4f8; }
.section-nav [aria-current="location"]::before { background: var(--purple); }

@media (min-width: 820px) {
  .section-nav { position: fixed; z-index: 1; top: 50%; right: max(8px, calc((100vw - 1580px) / 2)); transform: translateY(-50%); flex-direction: column; gap: .25rem; margin: 0; padding: .35rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--paper); box-shadow: 0 4px 18px #341a5c0d; }
}
@media (min-width: 820px) and (max-width: 1179px) {
  .wrap { width: min(var(--wrap), calc(100% - 6rem)); }
}
@media (min-width: 820px) and (max-width: 1379px) {
  .section-nav a { justify-content: center; width: 26px; min-height: 32px; padding: .3rem; }
  .section-nav a span { position: absolute; right: calc(100% + .4rem); padding: .36rem .55rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--paper); white-space: nowrap; opacity: 0; pointer-events: none; }
  .section-nav a:hover span, .section-nav a:focus-visible span { opacity: 1; }
}

.hero { padding: 3.9rem 0 2.35rem; background: radial-gradient(ellipse at 50% 15%, #eadbf9 0%, #f5edfb 52%, var(--paper) 96%); }
.hero-copy { max-width: 1060px; margin-inline: auto; text-align: center; }
.venue { color: var(--deep); font-size: 1rem; font-weight: 650; }
.venue strong { font-size: 1.25em; font-weight: 750; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.045em; line-height: 1.02; font-weight: 540; }
h1 { margin-top: 1rem; color: #111; font-size: clamp(1.1rem, 5.3vw, 4rem); }
.title-line { display: block; text-wrap: balance; }
.title-initial { color: var(--purple); }
.subtitle { display: block; max-width: 47rem; margin: .9rem auto 0; font-family: var(--sans); font-size: clamp(1.02rem, 2vw, 1.32rem); font-weight: 560; letter-spacing: 0; line-height: 1.35; text-wrap: balance; }
.authors { margin-top: 1.1rem; font-weight: 690; }
.authors a { color: var(--deep); text-decoration-color: #a88ac5; text-underline-offset: .18em; white-space: nowrap; }
.authors a:hover { text-decoration-color: currentColor; }
.authors span { display: inline-block; margin: 0 .3rem; color: #856e9d; }
.affiliation { margin-top: .5rem; color: var(--muted); font-size: .94rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .72rem; margin-top: 1.5rem; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: .48rem; min-height: 43px;
  border: 1px solid transparent; border-radius: 99px; padding: .55rem .95rem;
  text-decoration: none; font-size: .94rem; font-weight: 720;
}
.button svg { flex: none; width: 1.05rem; height: 1.05rem; }
.primary { color: white; background: var(--deep); }
.primary:hover { background: #6031a3; }
.secondary { color: var(--deep); border-color: #d9cae8; background: #ffffffb5; }
.secondary:hover { background: white; border-color: #9f7abc; }
.hero-figure { margin-top: 2.28rem; }
.hero-image-frame {
  padding: .7rem; border-radius: 20px;
  box-shadow: 0 13px 37px #341a5c16; background: white;
}
.hero-image-frame img { width: 100%; }
figcaption { margin-top: .65rem; color: var(--muted); font-size: .9rem; text-align: center; }

.section { padding-block: 4.45rem; }
.section-intro { max-width: 670px; margin-bottom: 1.8rem; }
h2 { font-size: clamp(2.35rem, 5vw, 4.1rem); }
.section-intro p { color: var(--muted); margin-top: .7rem; font-size: 1.06rem; }
.contributions { display: grid; gap: .75rem; max-width: 48rem; margin: 0; padding-left: 1.2rem; }
.contributions li { padding-left: .25rem; }
.contributions li::marker { color: var(--purple); }
.results-layout, .qualitative-layout, .ablation-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); }
.sample-card, .benchmark, .architecture { border: 1px solid var(--line); background: white; border-radius: var(--radius); }
.sample-card { padding: .78rem; }
.tabs { display: flex; gap: .4rem; margin-bottom: .75rem; padding: .28rem; border-radius: 11px; background: #f4eff8; }
.tabs button { flex: 1; padding: .54rem .4rem; border: 1px solid transparent; border-radius: 8px; color: #584968; background: transparent; font-size: .92rem; font-weight: 690; cursor: pointer; }
.tabs [aria-selected="true"] { color: var(--deep); background: white; border-color: #e4d8ee; box-shadow: 0 1px 3px #3c23570d; }
.sample-card img { width: 100%; }
.sample-card figcaption { margin: .8rem .4rem .2rem; text-align: left; }
.sample-card figcaption strong, .sample-card figcaption span { display: block; }
.sample-card figcaption strong { color: var(--ink); font-size: 1.05rem; }
.benchmark { padding: clamp(1.1rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; letter-spacing: -.022em; }
table { border-collapse: collapse; margin-top: .7rem; width: 100%; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: .9rem .42rem; border-bottom: 1px solid var(--line); }
th:first-child { padding-left: 0; }
thead th { font-size: .85rem; color: var(--muted); font-weight: 650; white-space: nowrap; }
tbody th { font-weight: 640; }
.result { font-weight: 780; color: var(--deep); }
.note { margin-top: .8rem; color: var(--muted); font-size: .875rem; }
.benchmark :is(td, thead th):not(:first-child) { text-align: right; }
.qualitative { background: #faf6fd; border-block: 1px solid var(--line); }
.study-description { margin-top: .4rem; color: var(--muted); }
.routing-study { grid-column: 1 / -1; }

.method { background: #f6f0fa; border-block: 1px solid var(--line); }
.method .section-intro { max-width: none; }
.method-tabs { border: 1px solid var(--line); background: #eee5f6; scroll-margin-top: 1.25rem; }
.method-tabs button { min-width: 0; min-height: 44px; line-height: 1.3; overflow-wrap: anywhere; }
.architecture { padding: clamp(.7rem, 2.1vw, 1.5rem); }
.architecture img { width: min(100%, 908px); margin-inline: auto; }
.behavior-tabs { width: min(100%, 22rem); margin-inline: auto; }
.stage-tabs { width: min(100%, 28rem); margin-inline: auto; background: #faf7fd; border: 1px solid var(--line); }
.stage-tabs button { min-width: 0; line-height: 1.25; }
.stage-tabs span { display: block; margin-top: .15rem; color: var(--muted); font-size: .875rem; font-weight: 560; }
.behavior-plot img { width: min(100%, 740px); }
.routing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; margin-top: 1.6rem; }
.routing div { border-top: 2px solid #c3aeda; padding-top: .75rem; }
dt { font-weight: 740; }
dd { margin: .3rem 0 0; color: var(--muted); }

.citation-section { padding-block: 1.65rem 2.15rem; }
.bibtex { border: 1px solid #e5dbeb; border-radius: 13px; background: #f6f1fa; }
.bibtex h2 { padding: .8rem 1.15rem; border-bottom: 1px solid #e4d9eb; font: inherit; font-weight: 700; letter-spacing: -.022em; }
.bibtex p { padding: .8rem 1.15rem 1rem; color: var(--muted); font-size: .875rem; }
.bibtex pre { margin: 0 1.15rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--paper); white-space: pre-wrap; overflow-wrap: anywhere; }
.bibtex code { font: .875rem/1.55 ui-monospace, monospace; }
.bibtex a { color: var(--deep); text-underline-offset: .18em; }

@media (max-width: 780px) {
  .wrap { width: min(var(--wrap), calc(100% - 2rem)); }
  .hero { padding-top: 3rem; }
  .section { padding-block: 3.2rem; }
  .results-layout, .ablation-layout { grid-template-columns: 1fr; }
  .routing { gap: 1.15rem; }
}
@media (max-width: 540px) {
  .hero { padding-top: 2.45rem; }
  .subtitle { padding-inline: .25rem; }
  .qualitative-layout { grid-template-columns: 1fr; }
  .hero-figure { margin-top: 1.6rem; }
  .hero-image-frame { padding: .42rem; border-radius: 12px; }
  .method-tabs { gap: .2rem; }
  .method-tabs button { padding-inline: .25rem; font-size: .875rem; }
  .routing { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
