@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700;750&family=Libre+Caslon+Display&display=swap');

:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #101c30;
  --muted: #5f6c80;
  --navy: #003d7c;
  --red: #da291c;
  --pale: #f4f7fa;
  --line: #dbe2eb;
  --stage: #061626;
  --sans: 'DM Sans', Arial, sans-serif;
  --serif: 'Libre Caslon Display', Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 108px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #dc6b50; outline-offset: 4px; }
.container { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -100px; background: white; color: var(--navy); padding: 12px; z-index: 99; }
.skip:focus { top: 10px; }
.nav-wrap { position: sticky; top: 0; background: #fff; z-index: 20; border-bottom: 2px solid var(--red); }
.nav { width: min(1190px, calc(100% - 96px)); height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.university-brand { width: 160px; height: 72px; overflow: hidden; position: relative; flex: none; }
.university-brand img { position: absolute; width: 227px; height: auto; max-width: none; left: -33px; top: -29px; }
.nav-brand { font: 700 24px/1.1 var(--sans); letter-spacing: -.8px; color: var(--navy); }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 14px; color: #344c70; }
.nav-links a { position: relative; display: flex; align-items: center; min-height: 44px; }
.nav-links a:hover { color: var(--navy); }
.nav-links a[aria-current] { color: var(--navy); }
.nav-links a[aria-current]::after { content: ''; position: absolute; height: 2px; background: var(--red); bottom: 2px; inset-inline: 0; }
.hero { text-align: center; padding-top: 15px; padding-bottom: 18px; }
.hero h1 { font: 750 clamp(54px, 5.8vw, 80px)/1.1 var(--sans); color: var(--navy); letter-spacing: -4px; margin: 0 0 8px; }
.hero h1 span { font-weight: 500; font-style: italic; }
.paper-title { font-size: clamp(26px, 2.55vw, 36px); font-weight: 700; letter-spacing: -1.1px; line-height: 1.25; margin: 0 0 8px; }
.authors { display: flex; justify-content: center; gap: 5px 27px; flex-wrap: wrap; margin: auto; font-size: 18px; font-weight: 450; }
.authors a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 4px; }
.affiliation { font-size: 16px; color: #536680; margin: 7px 0 15px; }
.resource-buttons { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 44px; padding: 10px 24px; border: 1px solid #9aaec7; border-radius: 99px; color: var(--navy); background: white; font-size: 14px; font-weight: 600; line-height: 1.4; transition: background .15s, border-color .15s, transform .15s; }
.button:hover { background: #f0f4fa; border-color: var(--navy); transform: translateY(-1px); }
.button-dark { background: var(--navy); color: white; border-color: var(--navy); }
.button-dark:hover { background: #002e5f; border-color: #002e5f; }
.icon { width: 18px; height: 18px; flex: none; }
.button-dark .icon { filter: brightness(0) invert(1); }

.eyebrow { font-size: 11px; line-height: 1.5; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--red); margin: 0 0 14px; }
h2 { font: 700 clamp(34px, 3.2vw, 46px)/1.14 var(--sans); letter-spacing: -1.5px; margin: 0 0 18px; }
h2 em { font-style: normal; font-weight: inherit; color: var(--red); }
h3 { font-size: 20px; line-height: 1.4; letter-spacing: -.4px; margin: 0; font-weight: 650; }
.section-heading { text-align: center; max-width: 920px; margin: 0 auto 34px; }
.section-heading > p:last-child { color: var(--muted); font-size: 16px; max-width: 740px; margin: 0 auto; }
.content-section { padding-top: 80px; padding-bottom: 76px; }
.results-section { padding-top: 72px; padding-bottom: 76px; }

/* The backdrop is decorative. Comparison frames remain the original videos. */
.real-first { color: #f7f9ff; background: var(--stage) url('assets/brand/cinema-backdrop.jpg') center top / cover no-repeat; border-block: 1px solid #142a40; }
.real-first > .content-section { padding-top: 22px; padding-bottom: 25px; }
.real-first .section-heading { max-width: none; margin-bottom: 18px; }
.real-first .section-heading .eyebrow { display: none; }
.real-first .section-heading h2 { font: 500 51px/1.15 var(--serif); letter-spacing: -1px; margin-bottom: 10px; }
.real-first .section-heading h2 em { font-style: italic; color: #f14a36; font-weight: 500; }
.real-first .section-heading > p:last-child { color: #d4dce8; max-width: 1120px; font-size: 16px; }
.real-feature { position: relative; }
.real-feature > .featured-topline { position: absolute; right: 0; top: -8px; margin: 0; }
.real-feature > .featured-topline h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.real-first .panel-label > span { display: none; }
.featured-topline { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 10px; font-size: 13px; }
.featured-topline > p { margin: 0; font-weight: 600; }
.real-feature > .featured-topline h3 { font-size: 15px; letter-spacing: 0; color: #d4dce8; font-weight: 500; }
.pager { display: flex; gap: 18px; align-items: center; flex: none; }
.pager button { border: 0; background: transparent; padding: 8px 2px; min-height: 36px; font-size: 13px; }
.pager button:hover { color: var(--red); }
.pager span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.real-first .pager span { color: #d4dce8; }
.featured-pair, .real-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.video-panel { min-width: 0; }
.panel-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 1px 9px; font-size: 11px; color: var(--muted); }
.panel-label strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.video-panel video { display: block; background: #050d15; width: 100%; aspect-ratio: 26 / 15; object-fit: contain; border-radius: 9px; }
.real-first .panel-label { color: #adbdce; }
.real-first .panel-label strong { font-size: 16px; color: #f7f9ff; }
.real-first .video-panel video { border: 1px solid #758294; aspect-ratio: 2 / 1; }
.featured-controls { display: flex; align-items: center; gap: 20px; margin-top: 14px; }
.play-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--navy); border-radius: 99px; background: var(--navy); color: white; min-height: 44px; padding: 9px 18px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.play-button::before { content: ''; display: block; width: 18px; height: 18px; background: currentColor; mask: url('assets/icons/play.svg') center / contain no-repeat; }
.play-button[data-playing=true]::before { mask-image: url('assets/icons/pause.svg'); }
.play-button:hover { background: #002e5f; }
.real-first .play-button { padding: 0; color: white; background: transparent; border-color: transparent; }
.real-first .play-button::before { width: 40px; height: 40px; background: url('assets/icons/play.svg') center / 25px no-repeat #fff; border-radius: 50%; mask: none; }
.real-first .play-button[data-playing=true]::before { background-image: url('assets/icons/pause.svg'); }
.real-first .play-button:hover { color: #f2a193; }
.scrub-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
input[type=range] { accent-color: var(--navy); height: 32px; flex: 1; min-width: 60px; cursor: pointer; }
.real-first input[type=range] { accent-color: #f7f9ff; }
#feature-clock, #demo-clock { font-size: 12px; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.real-first #demo-clock { color: #d4dce8; }
.text-button { border: 0; background: transparent; font-size: 13px; color: var(--muted); padding: 9px 0 9px 10px; min-height: 44px; }
.text-button:hover { color: var(--red); }
.real-first .text-button { color: #e1e8f2; display: inline-flex; align-items: center; gap: 9px; }
.real-first .text-button::before { content: ''; display: block; width: 18px; height: 18px; background: currentColor; mask: url('assets/icons/restart.svg') center / contain no-repeat; }
.featured-prompt { border-bottom: 1px solid var(--line); padding: 16px 0; margin-top: 3px; font-size: 13px; }
.featured-prompt summary { width: fit-content; cursor: pointer; font-weight: 500; color: #3e5270; min-height: 28px; }
.featured-prompt p { color: var(--muted); max-width: 1000px; font-size: 14px; line-height: 1.8; }
.demo-meta { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.demo-meta > .featured-prompt { border: 0; flex: 1; padding: 6px 0; margin: 0; }
.demo-meta > a { font-size: 13px; color: #e1e8f2; white-space: nowrap; padding-top: 7px; }
.demo-meta > a:hover { text-decoration: underline; text-underline-offset: 4px; }
.real-first .featured-prompt summary { color: #e1e8f2; }
.real-first .featured-prompt p { color: #bfccd9; }
.demo-selector { color-scheme: dark; scrollbar-color: #53647b #0b1c2e; scrollbar-width: thin; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; margin: 8px auto 0; max-width: 1180px; }
.demo-choice { min-width: 0; padding: 5px; border: 1px solid #718094; background: #06162699; border-radius: 7px; text-align: left; transition: border-color .15s, background .15s; }
.demo-choice:hover { border-color: #e4eaf4; background: #152d45; }
.demo-choice img { display: block; aspect-ratio: 2.2 / 1; width: 100%; height: auto; object-fit: cover; border-radius: 3px; }
.demo-choice span { display: block; font-size: 12px; padding: 4px 3px 1px; color: #e0e7f1; white-space: nowrap; }
.demo-choice[aria-pressed=true] { border: 2px solid #f14a36; padding: 4px; background: #071625; }
.demo-choice[aria-pressed=true] span { color: #ff7968; font-weight: 650; }
.preview-note { max-width: 860px; text-align: center; font-size: 12px; line-height: 1.7; margin: 24px auto 0; color: var(--muted); }
.real-first .preview-note { color: #a7b8cb; margin-top: 15px; font-size: 11px; }

.mode-tabs { display: flex; justify-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 99px; background: var(--pale); padding: 4px; width: fit-content; margin: auto; }
.mode-tabs button { background: transparent; border: 0; border-radius: 99px; min-height: 42px; padding: 9px 22px; font-size: 14px; color: var(--muted); }
.mode-tabs button[aria-selected=true] { background: var(--navy); color: #fff; font-weight: 600; }
.mode-description { text-align: center; font-size: 12px; color: var(--muted); margin: 16px 0 30px; }
.browse-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 58px 0 24px; }
.browse-heading .eyebrow { margin-bottom: 8px; }
.search-label { min-width: 300px; display: block; }
.search-label span { display: block; font-size: 12px; margin-bottom: 4px; color: var(--muted); }
input[type=search] { width: 100%; border: 0; border-bottom: 1px solid #9caec3; border-radius: 0; padding: 10px 0; background: transparent; font-size: 14px; color: var(--ink); }
.filters { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 28px; }
.filters button { min-height: 36px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: transparent; font-size: 12px; color: var(--muted); }
.filters button[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: white; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 38px 28px; }
.example { min-width: 0; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12px; margin-bottom: 12px; color: var(--muted); }
.card-topline > span:first-child { font-weight: 600; color: var(--ink); }
.card-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.card-pair video { border-radius: 6px; }
.card-pair .panel-label { padding-bottom: 6px; }
.card-pair .panel-label strong { font-size: 11px; }
.card-actions { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 12px; }
.card-actions button { border: 1px solid #bdcada; border-radius: 99px; background: transparent; min-height: 36px; padding: 6px 14px; font-size: 12px; }
.card-actions button:hover { background: var(--pale); }
.card-actions a { font-size: 11px; color: var(--muted); }
.card-actions a:hover { text-decoration: underline; }
.example details { margin-top: 10px; font-size: 12px; }
.example summary { cursor: pointer; color: #3e5270; }
.example details p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.gallery-footer { display: flex; justify-content: center; align-items: center; gap: 24px; margin: 30px 0; }
.gallery-footer p { font-size: 13px; color: var(--muted); }
.empty-state { text-align: center; padding: 40px; color: var(--muted); }
.about-band { background: #f3f6fa; border-block: 1px solid var(--line); padding: 66px 0; }
.about-layout { display: grid; grid-template-columns: 1fr 1.05fr; gap: 75px; align-items: start; }
.about-layout h2 { font-size: 40px; line-height: 1.16; color: var(--navy); }
.about-layout p:not(.eyebrow) { font-size: 16px; color: var(--muted); line-height: 1.8; margin: 0 0 18px; }
.about-layout strong { font-weight: 650; color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 42px 0 38px; border-block: 1px solid var(--line); }
.stats > div { text-align: center; padding: 28px 15px; }
.stats strong { font: 650 44px/1.1 var(--sans); color: var(--navy); letter-spacing: -1px; }
.stats span { display: block; font-size: 12px; color: var(--muted); margin-top: 10px; }
.research-figure { margin: 32px 0 24px; }
.research-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 18px; }
.research-figure figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 14px; }
.release-note { max-width: 920px; margin: 34px auto 0; border-left: 2px solid var(--red); padding: 8px 0 8px 24px; font-size: 14px; }
.release-note strong { font-weight: 650; }
.release-note p { color: var(--muted); margin: 6px 0 10px; font-size: 13px; }
.release-note a { font-size: 13px; color: var(--navy); text-decoration: underline; text-underline-offset: 4px; }
.method-band { background: var(--pale); border-block: 1px solid var(--line); }
.memory-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 38px; }
.number-label { font-size: 11px; color: var(--red); letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.memory-columns h3 { font-size: 20px; margin: 10px 0; color: var(--navy); }
.memory-columns p { font-size: 14px; color: var(--muted); line-height: 1.8; max-width: 500px; }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 40px 0 54px; }
.resource-grid > a { border-top: 2px solid var(--navy); padding-top: 20px; }
.resource-grid h3 { font-size: 20px; margin: 10px 0 12px; color: var(--navy); }
.resource-grid p { font-size: 14px; color: var(--muted); line-height: 1.7; min-height: 66px; }
.resource-action { font-size: 13px; font-weight: 600; color: var(--navy); text-decoration: underline; text-underline-offset: 5px; }
.resource-grid > a:hover .resource-action { color: var(--red); }
.citation-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.citation-topline .button { min-height: 38px; padding: 7px 16px; font-size: 12px; }
pre { background: var(--pale); padding: 28px; border-radius: 8px; border: 1px solid var(--line); font: 12px/1.8 'SFMono-Regular', Consolas, monospace; overflow: auto; color: #344c6d; margin: 0; }
.footer { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-block: 32px 40px; }
.footer p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.footer > a:last-child { font-size: 12px; color: var(--muted); }
[hidden] { display: none !important; }

@media (max-width: 1100px) {
  .container { width: calc(100% - 64px); }
  .nav-links { gap: 20px; }
  .nav-brand { font-size: 21px; }
  .authors { max-width: 850px; font-size: 16px; gap: 5px 20px; }
  .hero { padding-block: 26px; }
  .hero h1 { font-size: 70px; }
  .paper-title { font-size: 30px; }
  .real-first .section-heading h2 { font-size: 43px; }
  .real-first .section-heading > p:last-child { font-size: 14px; }
  .demo-selector { gap: 9px; }
  .demo-choice span { font-size: 10px; }
  .about-layout { gap: 40px; }
}

@media (min-width: 761px) and (max-width: 960px) {
  html { scroll-padding-top: 135px; }
  .nav { height: auto; min-height: 120px; flex-wrap: wrap; gap: 0; padding-top: 6px; }
  .nav-links { order: 3; width: 100%; justify-content: center; gap: 30px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 122px; }
  .container { width: calc(100% - 32px); }
  .nav { width: calc(100% - 32px); height: auto; min-height: 105px; flex-wrap: wrap; gap: 0; padding-top: 4px; }
  .university-brand { width: 123px; height: 55px; }
  .university-brand img { width: 174px; left: -25px; top: -22px; }
  .nav > .nav-brand { font-size: 21px; }
  .nav-links { order: 3; width: 100%; justify-content: space-between; gap: 12px; font-size: 12px; }
  .nav-links a { min-height: 44px; }
  .hero { padding-block: 27px 30px; }
  .hero h1 { font-size: clamp(45px, 11vw, 68px); letter-spacing: -2.5px; margin-bottom: 13px; }
  .paper-title { font-size: clamp(22px, 5.6vw, 29px); line-height: 1.22; letter-spacing: -.6px; max-width: 540px; margin: 0 auto 18px; }
  .authors { gap: 6px 16px; font-size: 13px; line-height: 1.6; }
  .affiliation { font-size: 13px; margin: 11px 0 20px; }
  .resource-buttons { gap: 8px; }
  .button { font-size: 12px; padding: 10px 16px; gap: 8px; }
  .icon { width: 15px; height: 15px; }
  .real-first > .content-section { padding-top: 28px; padding-bottom: 25px; }
  .real-first .section-heading { margin-bottom: 20px; }
  .real-first .section-heading h2 { font-size: 37px; line-height: 1.08; }
  .real-first .section-heading h2 em { display: block; }
  .real-first .section-heading > p:last-child { font-size: 13px; line-height: 1.7; }
  .real-feature > .featured-topline { position: static; gap: 12px; justify-content: flex-end; margin-bottom: 8px; }
  .pager { gap: 11px; }
  .pager button { font-size: 11px; min-height: 32px; padding-top: 0; }
  .pager span { font-size: 10px; }
  .real-pair, .featured-pair { gap: 8px; }
  .real-pair { grid-template-columns: 1fr; gap: 18px; }
  .real-first .video-panel video { aspect-ratio: 26 / 15; }
  .panel-label, .real-first .panel-label { padding-bottom: 7px; }
  .panel-label strong, .real-first .panel-label strong { font-size: 11px; }
  .panel-label > span { display: none; }
  .video-panel video { border-radius: 5px; }
  .featured-controls { gap: 10px; flex-wrap: wrap; margin-top: 12px; }
  .play-button { font-size: 11px; padding-inline: 12px; gap: 6px; }
  .real-first .play-button { padding-right: 0; }
  .real-first .play-button::before { width: 30px; height: 30px; background-size: 20px; }
  #feature-clock, #demo-clock { font-size: 10px; }
  .text-button { font-size: 11px; padding-left: 0; }
  .real-first .text-button { gap: 4px; }
  .real-first .text-button::before { width: 14px; height: 14px; }
  .demo-meta { gap: 10px; }
  .demo-meta > a { font-size: 11px; }
  .featured-prompt { font-size: 12px; }
  .featured-prompt p { font-size: 13px; }
  .demo-selector { grid-template-columns: repeat(7, 112px); gap: 10px; margin-top: 14px; overflow-x: auto; padding: 4px 3px 10px; scroll-snap-type: x proximity; }
  .demo-choice { scroll-snap-align: start; }
  .demo-choice span { font-size: 11px; }
  .real-first .preview-note { font-size: 10px; }
  h2 { font-size: 33px; letter-spacing: -1px; }
  .eyebrow { font-size: 10px; letter-spacing: 1.5px; }
  .section-heading > p:last-child { font-size: 14px; }
  .content-section, .results-section { padding-block: 50px; }
  .mode-tabs { width: 100%; }
  .mode-tabs button { flex: 1; font-size: 11px; padding: 9px 10px; }
  .mode-description { font-size: 10px; margin-bottom: 22px; }
  .featured-topline { font-size: 11px; }
  .featured-topline > p { max-width: 55%; }
  .browse-heading { display: block; margin-top: 38px; }
  .browse-heading h3 { font-size: 20px; }
  .search-label { min-width: 0; margin-top: 24px; }
  .filters { gap: 6px; }
  .filters button { font-size: 11px; }
  .gallery { grid-template-columns: 1fr; gap: 30px; }
  .card-topline { font-size: 11px; }
  .card-pair .panel-label strong { font-size: 10px; }
  .gallery-footer { gap: 14px; }
  .gallery-footer p { font-size: 12px; }
  .about-band { padding-block: 46px; }
  .about-layout { grid-template-columns: 1fr; gap: 15px; }
  .about-layout h2 { font-size: 33px; }
  .about-layout p:not(.eyebrow) { font-size: 14px; }
  .stats { grid-template-columns: 1fr 1fr; margin-block: 28px; }
  .stats > div { padding: 22px 8px; }
  .stats strong { font-size: 36px; }
  .stats span { font-size: 11px; }
  .research-figure img { padding: 6px; }
  .research-figure figcaption { font-size: 11px; }
  .memory-columns { grid-template-columns: 1fr; gap: 22px; }
  .memory-columns h3 { font-size: 19px; }
  .resource-grid { grid-template-columns: 1fr; gap: 30px; margin-bottom: 38px; }
  .resource-grid p { min-height: 0; }
  .release-note { padding-left: 16px; }
  pre { font-size: 10px; padding: 18px; }
  .footer { display: block; padding-top: 28px; }
  .footer p { margin-block: 16px; }
}

@media (max-width: 390px) {
  .resource-buttons .button:last-child { min-width: 226px; }
  .featured-controls { column-gap: 8px; }
  .featured-controls input[type=range] { min-width: 45px; }
  .featured-controls .text-button { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
