:root {
  --ink: #25232c;
  --muted: #77737e;
  --paper: #fff;
  --violet: #7647bc;
  --violet-dark: #563288;
  --avocado: #abc579;
  --green: #536d34;
  --rule: #dedce1;
  --soft: #f1edf6;
  --max: 1160px;
  --header: 68px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 85px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--avocado);
  outline-offset: 4px;
}
img { display: block; max-width: 100%; height: auto; }
button img { pointer-events: none; }
video { display: block; width: 100%; }
::selection { background: #cbdca5; color: #242127; }
.shell { width: min(var(--max), calc(100% - 64px)); margin-inline: auto; }
.reading { max-width: 790px; margin-inline: auto; }
.shell > *, .section-head > *, .resource-grid > *, .contributions > * { min-width: 0; }
.accent { color: var(--violet); }
.green { color: var(--green); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--avocado); }
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
  background: white;
  color: var(--ink);
}
.skip-link:focus { top: 10px; }
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 35;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--violet), var(--avocado));
  pointer-events: none;
}

/* Opening film, supplied wordmark, and full paper title. */
.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header);
  color: #fff;
  border-bottom: 1px solid #ffffff24;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 20px; }
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  min-height: 44px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.035em;
}
.brand img { width: 25px; height: 25px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 12px; font-weight: 500; }
.nav-links a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; opacity: .88; white-space: nowrap; }
.nav-links a:hover { color: #d2e8aa; opacity: 1; }
.nav-separator { width: 1px; height: 16px; background: #ffffff40; }
.hero {
  position: relative;
  display: flex;
  align-items: center;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  background: #19161e;
  color: #fff;
}
.hero-media, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media { opacity: .85; }
.hero-shade {
  background: linear-gradient(180deg, #10101373, #2216318f 45%, #141119c7),
              linear-gradient(115deg, #6b429733, transparent 60%, #94ae5726);
}
.hero-content { position: relative; z-index: 1; padding-block: 118px 132px; text-align: center; }
.hero h1.hero-wordmark {
  position: relative;
  width: min(88%, 900px);
  height: auto;
  margin: 0 auto 28px;
  overflow: hidden;
  line-height: 0;
  filter: drop-shadow(0 3px 20px #0005);
}
.hero h1.wordmark-pi { width: min(82%, 760px); }
.hero-wordmark img {
  position: absolute;
  width: var(--logo-width);
  max-width: none;
  height: auto;
  left: var(--logo-left);
  top: var(--logo-top);
}
.hero-subtitle {
  max-width: 950px;
  margin: 0 auto;
  color: #fff;
  font-family: 'Google Sans', 'Segoe UI', Arial, sans-serif;
  font-size: clamp(21px, 2.4vw, 31px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -.018em;
  text-wrap: balance;
  text-shadow: 0 2px 20px #0008;
}
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 13px; margin-top: 32px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  transition: background .2s, border-color .2s;
}
.button-light { background: #f5f5f0; color: #242127; }
.button-light:hover { background: #dcebbf; }
.button-ghost { border-color: #ffffff7d; background: #ffffff08; color: #fff; backdrop-filter: blur(10px); }
.button-ghost:hover { background: #ffffff18; }
.button-primary { background: var(--violet); color: #fff; }
.button-primary:hover { background: var(--violet-dark); }
.button-outline { border-color: #d8d2df; background: transparent; }
.button-outline:hover { border-color: var(--violet); background: #f0eaf8; }
.play-icon { width: 0; height: 0; border-block: 5px solid transparent; border-left: 8px solid currentColor; }
.hero-footer { position: absolute; bottom: max(24px, env(safe-area-inset-bottom)); left: 0; z-index: 2; width: 100%; }
.hero-footer .shell { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.hero-meta { display: block; color: #eee8f2; font-size: 11px; line-height: 1.5; letter-spacing: .035em; }
.hero-meta strong, .hero-meta .sota { color: #d5e8b7; font-weight: 700; white-space: nowrap; }
.meta-separator { opacity: .55; margin-inline: .25em; }
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 11px; letter-spacing: .04em; }
.scroll-cue span { font-size: 23px; }
.hero-controls { display: flex; flex-shrink: 0; align-items: center; gap: 8px; }
.hero-controls small { font-size: 10px; color: #d1cad8; }
.icon-control {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  background: #1d172b50;
  color: #fff;
  font-size: 14px;
}
.hero-pause[hidden] { display: none; }

/* Sticky chapters scroll within their own row at every viewport width. */
.chapter-nav { position: sticky; top: 0; z-index: 15; border-bottom: 1px solid var(--rule); background: #fff; backdrop-filter: blur(16px); }
.chapter-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 62px; }
.chapter-brand { flex: 0 0 auto; font-size: 15px; font-weight: 750; letter-spacing: -.035em; }
.chapter-links {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 1 auto;
  gap: 24px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  color: #77727e;
  font-size: 12px;
  white-space: nowrap;
}
.chapter-links::-webkit-scrollbar { display: none; }
.chapter-links a { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 44px; min-height: 58px; padding-block: 16px; }
.chapter-links a:hover, .chapter-links a[aria-current=true] { color: var(--violet); }
.chapter-links a[aria-current=true]::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--violet); }

/* Text-only introduction and author list. */
.work-intro { padding: 64px 0 56px; border-bottom: 1px solid #d9dccf; background: linear-gradient(112deg, #efe5fc 0%, #eeeef0 48%, #deebbe 100%); }
.work-intro h2 { margin: 0 0 12px; color: var(--violet-dark); font-size: clamp(36px, 4.8vw, 62px); font-weight: 650; line-height: 1.1; letter-spacing: -.05em; }
.work-intro h2 .pi-accent { color: #95ca37; }
.intro-subtitle { max-width: 1080px; margin: 0 0 22px; color: #3e334a; font-family: 'Google Sans', 'Segoe UI', Arial, sans-serif; font-size: clamp(23px, 2.6vw, 32px); line-height: 1.4; text-wrap: balance; }
.contributions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; margin: 32px 0 30px; }
.contribution { padding-top: 18px; border-top: 2px solid #9a78b9; }
.contribution:nth-child(2) { border-color: #9aa97e; }
.contribution:nth-child(3) { border-color: #7f985e; }
.contribution h3 { margin: 0 0 14px; color: #493553; font-size: 19px; font-weight: 650; line-height: 1.4; letter-spacing: -.02em; }
.contribution p { margin: 0; color: #615967; font-size: 14px; line-height: 1.8; }
.paper-intro { padding-block: 44px 38px; text-align: center; }
.authors { max-width: 980px; margin: 0 auto 22px; color: #6b6671; font-size: 13px; font-weight: 400; line-height: 2.05; }
.author { display: inline-block; margin: 0 6px; font-weight: 400; white-space: nowrap; }
.author a, .author:first-child, .author sup { font-weight: 400; }
.author a:hover { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.author sup { margin-left: 1px; color: var(--violet); font-size: 9px; }
.author-legend { margin: -9px 0 25px; color: var(--muted); font-size: 11px; }
.resource-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.resource-links .button { min-height: 44px; padding: 11px 16px; font-size: 12px; }
.variant-links { margin-top: 22px; color: var(--muted); font-size: 12px; }
.variant-links a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }

/* Research sections, news, and figures. */
.section { padding-block: 76px; }
.section-head { display: block; margin-bottom: 32px; }
.section h2 { margin: 0 0 12px; font-size: clamp(30px, 3.5vw, 46px); font-weight: 580; line-height: 1.2; letter-spacing: -.045em; text-wrap: balance; }
.section-head p { max-width: 680px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.section h3 { font-size: 23px; font-weight: 550; line-height: 1.4; letter-spacing: -.025em; }
.section-soft { background: #fff; }
.news-section { padding-block: 56px; border-block: 1px solid var(--rule); }
.news-list { margin: 0; padding: 0; list-style: none; }
.news-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 24px; padding: 17px 0; border-top: 1px solid var(--rule); }
.news-list li:last-child { border-bottom: 1px solid var(--rule); }
.news-list time { color: var(--violet); font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }
.news-list li > div { min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.news-list a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.abstract { color: #48424f; font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: 1.82; }
.abstract p { margin: 0 0 22px; }
.abstract strong { color: var(--violet); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: .9em; font-weight: 650; }
.figure { margin: 30px 0 0; }
.figure-trigger { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: zoom-in; }
.figure-trigger img { width: 100%; mix-blend-mode: multiply; }
.section-soft .figure-trigger { padding: 12px; border-radius: 5px; background: #fff; }
.section-soft .figure-trigger img { mix-blend-mode: normal; }
.demo-stage { position: relative; padding: 0; overflow: hidden; border: 1px solid var(--rule); border-radius: 7px; background: #fff; }
.demo-stage video { aspect-ratio: 16/9; background: #15111b; object-fit: contain; }
.demo-caption { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 20px; padding: 12px 23px; color: var(--ink); font-size: 12px; }
.demo-caption span { color: var(--muted); font-size: 11px; }
.demo-caption a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
.infra { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.infra span { padding: 7px 13px; border: 1px solid #dbd4e2; border-radius: 3px; color: #6a6273; font-size: 11px; }
.results-summary { max-width: 840px; margin: 0 auto; }
.results-summary .benchmark-lines { margin: 0; }
.benchmark-line { margin-bottom: 24px; }
.benchmark-line:last-child { margin-bottom: 0; }
.bar-label { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 8px; font-size: 14px; }
.bar-label span:first-child { min-width: 0; overflow-wrap: anywhere; }
.bar-label span:last-child { flex-shrink: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.bar-track { height: 8px; border-radius: 1px; background: #e9e5ed; }
.bar-fill { height: 100%; border-radius: 1px; background: var(--violet); }
.benchmark-line:nth-child(2) .bar-fill { background: var(--avocado); }
.benchmark-line:nth-child(3) .bar-fill { background: #bcb5c5; }
.small-note { color: var(--muted); font-size: 11px; line-height: 1.7; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--violet); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.wide-results { margin-top: 48px; }
.wide-results h3 { margin: 0 0 14px; }

/* Resources, citation, and closing links. */
.resource-section { background: #fff; }
.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.resource-block { padding-top: 22px; border-top: 1px solid #d2ccd9; }
.resource-block h3 { margin: 0 0 15px; font-size: 21px; }
.resource-block p { max-width: 480px; color: var(--muted); font-size: 14px; }
.resource-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.resource-block .button { font-size: 12px; }
.citation-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.citation-header h2 { margin: 0; }
.copy-button { min-width: 115px; min-height: 44px; padding: 9px 15px; border: 1px solid #d9d1e2; border-radius: 3px; background: none; color: var(--violet); font-size: 12px; }
.copy-status { min-height: 22px; margin: 10px 0 0; color: var(--green); font-size: 12px; }
.citation-code { display: block; max-width: 100%; margin: 23px 0 0; padding: 25px 29px; overflow-x: auto; border: 1px solid #e5dfea; border-radius: 5px; background: #fff; color: #625671; font: 12px/1.8 "Cascadia Code", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.companion { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 38px; padding: 32px 0; border-block: 1px solid var(--rule); }
.companion h3 { margin: 0; font-size: 27px; font-weight: 550; letter-spacing: -.035em; }
.companion-arrow { display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; border: 1px solid #d6cddd; border-radius: 50%; color: var(--violet); font-size: 28px; }
.companion:hover .companion-arrow { background: var(--violet); color: white; }
.footer { padding-bottom: 30px; color: var(--muted); font-size: 11px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; line-height: 1.9; }
.footer a { text-decoration: underline; text-underline-offset: 3px; }
.footer-license { max-width: 730px; margin: 18px 0 0; color: #928b98; font-size: 10px; line-height: 1.7; }
.dialog { width: min(1440px, 94vw); max-width: none; max-height: 94svh; padding: 0; overflow: auto; border: 0; border-radius: 6px; background: #15121bdc; color: white; box-shadow: 0 25px 120px #0006; }
.dialog::backdrop { background: #0b0912de; backdrop-filter: blur(8px); }
.dialog-inner { position: relative; padding: 64px 24px 24px; }
.dialog-close { position: absolute; top: 9px; right: 10px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #ffffff18; color: white; font-size: 27px; line-height: 1; }
.dialog-title { position: absolute; top: 18px; left: 24px; max-width: calc(100% - 90px); color: #d8cfdf; font-size: 12px; line-height: 1.4; }
.dialog img { width: 100%; max-height: calc(94svh - 88px); background: white; object-fit: contain; }
.dialog video { max-height: calc(94svh - 88px); }
.no-script { padding: 20px; font-size: 13px; text-align: center; }
.enhanced-only { display: none; }
.js .enhanced-only { display: inline-flex; }

@media (max-width: 1024px) {
  .nav-links { gap: 20px; }
  .chapter-inner { gap: 22px; }
  .chapter-links { gap: 20px; }
  .contributions { gap: 24px; }
  .contribution h3 { font-size: 18px; }
  .hero-content { padding-block: 112px 125px; }
  .hero-subtitle { font-size: clamp(22px, 2.65vw, 28px); }
  .hero-footer .shell { gap: 12px; }
  .hero-controls small { display: none; }
  .authors { font-size: 12px; }
}

@media (max-width: 820px) {
  .chapter-brand { display: none; }
  .chapter-links { flex: 1 1 auto; width: 100%; }
  .nav-links .nav-companion, .nav-separator { display: none; }
  .hero-footer .scroll-cue { display: none; }
  .hero-meta { flex: 1 1 auto; max-width: calc(100% - 58px); font-size: 12px; }
  .hero-footer .shell { justify-content: space-between; }
}

@media (max-width: 760px) {
  :root { --header: 62px; }
  .shell { width: calc(100% - 40px); }
  .brand { gap: 8px; font-size: 16px; }
  .nav-inner { gap: 12px; }
  .nav-links { gap: 16px; font-size: 11px; }
  .hero { min-height: 590px; }
  .hero-content { padding-block: 100px 126px; }
  .hero h1.hero-wordmark { width: 100%; margin-bottom: 24px; }
  .hero h1.wordmark-pi { width: 94%; }
  .hero-subtitle { max-width: 550px; font-size: clamp(19px, 3.5vw, 23px); line-height: 1.5; }
  .hero-actions { gap: 10px; margin-top: 27px; }
  .hero-actions .button { min-height: 46px; padding: 11px 15px; font-size: 12px; }
  .hero-footer { bottom: max(20px, env(safe-area-inset-bottom)); }
  .hero-meta { font-size: 11px; }
  .chapter-inner { min-height: 56px; }
  .chapter-links { gap: 22px; font-size: 12px; }
  .chapter-links a { min-height: 56px; padding-block: 14px; }
  .work-intro { padding-block: 43px 39px; }
  .work-intro h2 { font-size: clamp(32px, 8.5vw, 42px); }
  .intro-subtitle { margin-bottom: 20px; font-size: 23px; }
  .contributions { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-block: 27px; }
  .contribution { padding-top: 15px; }
  .contribution h3 { margin-bottom: 10px; }
  .contribution p { font-size: 14px; }
  .paper-intro { padding-block: 35px; }
  .authors { line-height: 2; }
  .author { margin-inline: 4px; }
  .resource-links { gap: 7px; }
  .resource-links .button { min-height: 44px; padding: 10px 12px; font-size: 11px; }
  .section { padding-block: 50px; }
  .section-head { margin-bottom: 24px; }
  .section h2 { font-size: 32px; }
  .section-head p { font-size: 15px; }
  .news-section { padding-block: 40px; }
  .news-list { margin-left: 0; }
  .news-list li { grid-template-columns: 92px minmax(0, 1fr); gap: 17px; padding-block: 15px; }
  .news-list time { font-size: 12px; }
  .news-list li > div { font-size: 14px; }
  .abstract { font-size: 18px; line-height: 1.8; }
  .figure { margin-top: 24px; }
  .section-soft .figure-trigger { padding: 6px; }
  .demo-caption { gap: 4px 12px; padding: 9px 14px; font-size: 11px; }
  .demo-caption span { display: none; }
  .bar-label { gap: 12px; font-size: 12px; }
  .wide-results { margin-top: 35px; }
  .resource-grid { grid-template-columns: minmax(0, 1fr); gap: 25px; }
  .resource-block { padding-top: 19px; }
  .citation-header h2 { font-size: 29px; }
  .copy-button { min-width: 105px; padding-inline: 12px; font-size: 11px; }
  .citation-code { padding: 20px 17px; font-size: 11px; }
  .companion { gap: 15px; padding-block: 27px; }
  .companion h3 { font-size: 24px; }
  .companion-arrow { width: 44px; height: 44px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  .dialog { width: 96vw; }
  .dialog-inner { padding: 64px 10px 10px; }
  .dialog-title { left: 13px; max-width: calc(100% - 72px); }
}

@media (max-width: 380px) {
  .shell { width: calc(100% - 32px); }
  .brand { font-size: 14px; gap: 6px; }
  .brand img { width: 22px; height: 22px; }
  .nav-links { gap: 12px; font-size: 10px; }
  .hero { min-height: 570px; }
  .hero-content { padding-block: 95px 122px; }
  .hero-subtitle { font-size: 18px; line-height: 1.5; }
  .hero-actions { gap: 8px; margin-top: 24px; }
  .hero-actions .button { padding-inline: 11px; gap: 8px; font-size: 11px; }
  .hero-meta { font-size: 10px; line-height: 1.6; }
  .work-intro h2 { font-size: 32px; }
  .intro-subtitle { font-size: 21px; }
  .news-list li { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .section h2 { font-size: 29px; }
  .citation-header { align-items: flex-start; }
  .companion h3 { font-size: 22px; }
}

/* Compact, complete opening for phones and tablets in landscape. */
@media (max-height: 600px) and (min-width: 600px) {
  :root { --header: 54px; }
  .site-header .brand { font-size: 15px; }
  .hero { height: 100svh; min-height: 360px; }
  .hero-content { padding-block: 74px 82px; }
  .hero h1.hero-wordmark { width: min(66%, 580px); margin-bottom: 15px; }
  .hero h1.wordmark-pi { width: min(58%, 490px); }
  .hero-subtitle { max-width: 850px; font-size: 19px; line-height: 1.35; }
  .hero-actions { margin-top: 19px; gap: 10px; }
  .hero-actions .button { min-height: 44px; padding-block: 9px; font-size: 11px; }
  .hero-footer { bottom: max(12px, env(safe-area-inset-bottom)); }
  .hero-meta { font-size: 10px; }
  .hero-controls small, .hero-footer .scroll-cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-media { opacity: .72; }
}
