:root {
  --canvas: #f4f2ed;
  --paper: #fffefa;
  --ink: #111312;
  --muted: #606663;
  --line: #c9cbc7;
  --dark: #111513;
  --dark-soft: #1b201e;
  --chalk: #f2f1eb;
  --acid: #c9ff4a;
  --cyan: #79d4e7;
  --coral: #ff785f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Manrope", "Helvetica Neue", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  padding: 0 34px;
  border-bottom: 1px solid rgba(17, 19, 18, 0.18);
  background: rgba(244, 242, 237, 0.92);
  backdrop-filter: blur(14px);
}

.wordmark {
  width: max-content;
  font-family: "Newsreader", Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 30px;
}

.site-header nav a,
.header-link {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.site-header nav a:hover,
.header-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.header-link {
  justify-self: end;
}

.hero {
  position: relative;
  display: flex;
  min-height: calc(82vh - 64px);
  flex-direction: column;
  justify-content: center;
  width: min(1360px, calc(100% - 68px));
  margin: 0 auto;
  padding: 88px 0 120px;
}

.kicker,
.section-index {
  margin: 0;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  display: inline-block;
  width: 34px;
  height: 8px;
  margin-right: 12px;
  background: var(--coral);
}

h1 {
  max-width: 1260px;
  margin: 28px 0 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 76px;
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 span {
  color: #0a788c;
}

.dek {
  max-width: 790px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.authors {
  max-width: 1160px;
  margin-top: 34px;
}

.authors p {
  margin: 0;
  font-size: 15px;
}

.authors .affiliations {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.action {
  padding: 11px 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.action:not(.action-coming-soon):hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.action-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-color: var(--line);
  color: var(--muted);
  cursor: default;
}

.action-coming-soon small,
.resource-status small {
  font: inherit;
  color: #087d91;
}

.action-primary {
  background: var(--ink);
  color: var(--paper);
}

.action-primary:hover {
  background: #0a788c;
}

.scroll-cue {
  position: absolute;
  right: 0;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  text-decoration: none;
  text-transform: uppercase;
}

.scroll-cue span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.hero-reel {
  position: relative;
  width: 100vw;
  margin-top: 48px;
  margin-left: calc(50% - 50vw);
  border-top: 1px solid rgba(17, 19, 18, 0.2);
  border-bottom: 1px solid rgba(17, 19, 18, 0.2);
  background: #111513;
}

.hero-reel__meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 8px max(20px, calc((100vw - 1360px) / 2));
  color: #b7bfbb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.hero-reel__viewport {
  overflow: hidden;
}

.hero-reel__track {
  display: flex;
  width: max-content;
  padding: 2px 0;
  gap: 2px;
  animation: hero-reel-slide 78s linear infinite;
  will-change: transform;
}

.hero-reel:hover .hero-reel__track,
.hero-reel:focus-within .hero-reel__track {
  animation-play-state: paused;
}

.hero-reel__tile {
  position: relative;
  display: block;
  flex: 0 0 236px;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: white;
  background: #111513;
  cursor: pointer;
}

.hero-reel__tile img {
  width: 236px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.88;
  filter: saturate(0.86) contrast(1.04);
  transition: opacity 220ms ease, filter 220ms ease, transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-reel__tile span {
  position: absolute;
  right: 8px;
  bottom: 7px;
  left: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.84);
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.02em;
  text-align: right;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

.hero-reel__tile b {
  padding: 2px 4px;
  color: white;
  background: rgba(76, 119, 168, 0.9);
  font-weight: 500;
}

.hero-reel__tile:hover img,
.hero-reel__tile:focus-visible img {
  opacity: 1;
  filter: saturate(1.08) contrast(1.02);
  transform: scale(1.045);
}

@keyframes hero-reel-slide {
  to {
    transform: translateX(-50%);
  }
}

.showcase {
  padding: 108px max(34px, calc((100vw - 1360px) / 2));
}

.showcase-dark {
  color: var(--chalk);
  background: var(--dark);
}

.showcase-light {
  color: var(--ink);
  background: var(--paper);
}

.section-heading {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 320px;
  gap: 34px;
  align-items: end;
  max-width: 1360px;
  margin: 0 auto 68px;
}

.section-index {
  align-self: start;
  color: var(--coral);
}

.showcase-light .section-index {
  color: #087d91;
}

h2 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 58px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.section-heading > p:last-child {
  margin: 0;
  color: #aeb5b1;
  font-size: 14px;
}

.showcase-light .section-heading > p:last-child {
  color: var(--muted);
}

.visual {
  max-width: 1220px;
  margin: 0 auto 92px;
}

.visual-hero {
  max-width: 1480px;
}

.visual:last-child {
  margin-bottom: 0;
}

.visual a {
  display: block;
  overflow: hidden;
  background: white;
}

.showcase-dark .visual a {
  border: 1px solid #3a403d;
}

.showcase-light .visual a {
  border: 1px solid var(--line);
}

.visual img {
  transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.visual a:hover img {
  transform: scale(1.008);
}

figcaption {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 34px;
  margin-top: 16px;
  color: #aeb5b1;
  font-size: 12px;
}

.showcase-light figcaption {
  color: var(--muted);
}

figcaption span {
  color: inherit;
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
}

.visual-metrics {
  max-width: 1040px;
}

.dataset-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1220px;
  margin: -26px auto 92px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dataset-facts div {
  min-width: 0;
  padding: 28px 22px;
}

.dataset-facts div + div {
  border-left: 1px solid var(--line);
}

.dataset-facts strong,
.dataset-facts span {
  display: block;
}

.dataset-facts strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 42px;
  font-weight: 500;
  line-height: 1;
}

.dataset-facts span {
  margin-top: 8px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.closing {
  display: flex;
  justify-content: space-between;
  gap: 36px;
  padding: 68px max(34px, calc((100vw - 1360px) / 2));
  color: var(--chalk);
  background: #087d91;
}

.closing p {
  max-width: 720px;
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 38px;
  line-height: 1.05;
}

.closing div {
  display: flex;
  align-items: center;
  gap: 24px;
}

.closing a,
.closing .resource-status {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.closing a {
  text-underline-offset: 5px;
}

.closing .resource-status {
  display: inline-flex;
  gap: 7px;
  color: rgba(242, 241, 235, 0.74);
}

.closing .resource-status small {
  color: var(--acid);
}

.citation-section {
  padding: 112px max(34px, calc((100vw - 1280px) / 2)) 124px;
  background: #fbfbf9;
}

.citation-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.citation-inner h2 {
  margin: 0;
  font-size: 54px;
  text-align: center;
}

.citation-inner h2::after {
  content: "";
  display: block;
  width: 108px;
  height: 3px;
  margin: 32px auto 0;
  background: #626764;
}

.citation-card {
  position: relative;
  margin-top: 66px;
  padding: 48px 48px 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f2f0;
}

.citation-inner pre {
  overflow-x: auto;
  margin: 0;
  padding: 0 180px 0 0;
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.citation-inner code {
  font: inherit;
}

.citation-copy {
  position: absolute;
  top: 24px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #cfd2cf;
  border-radius: 6px;
  color: #555d63;
  background: rgba(255, 255, 255, 0.58);
  font-family: "DM Mono", monospace;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.citation-copy:hover,
.citation-copy:focus-visible,
.citation-copy.is-copied {
  border-color: #087d91;
  color: #087d91;
  background: white;
}

.citation-copy:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.copy-icon {
  position: relative;
  width: 14px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.copy-icon::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -6px;
  width: 10px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 2px;
  background: #f1f2f0;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 28px 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #aeb5b1;
  background: var(--dark);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

footer p {
  margin: 0;
}

footer a {
  justify-self: end;
  text-underline-offset: 4px;
}

.video-lab {
  position: relative;
  overflow: hidden;
  padding: 108px max(34px, calc((100vw - 1360px) / 2)) 124px;
  background:
    linear-gradient(rgba(76, 119, 168, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 119, 168, 0.075) 1px, transparent 1px),
    #edf0f1;
  background-size: 32px 32px;
}

.video-lab::before {
  position: absolute;
  top: 36px;
  right: -80px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(76, 119, 168, 0.32);
  border-radius: 50%;
  content: "";
}

.video-lab__heading {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 260px;
  gap: 34px;
  align-items: start;
  max-width: 1360px;
  margin: 0 auto 58px;
}

.video-lab__heading .section-index {
  color: #4c77a8;
}

.video-lab__heading h2 {
  max-width: 720px;
}

.video-lab__heading > div:nth-child(2) > p {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.video-key {
  display: grid;
  gap: 12px;
  padding-top: 7px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.video-key span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.video-key i {
  width: 28px;
  height: 4px;
}

.video-key__baseline {
  background: #626b6a;
}

.video-key__phys {
  background: #4c77a8;
}

.method-switcher {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1360px;
  margin: 0 auto;
  border-top: 1px solid #aeb7bd;
  border-bottom: 1px solid #aeb7bd;
}

.method-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 18px;
  border: 0;
  color: #626b6a;
  background: transparent;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.method-tab + .method-tab {
  border-left: 1px solid #aeb7bd;
}

.method-tab span {
  color: #879099;
  font-size: 9px;
}

.method-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.48);
}

.method-tab.is-active {
  color: white;
  background: #17202a;
}

.method-tab.is-active span {
  color: #91b8e6;
}

.comparison-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  max-width: 1360px;
  margin: 22px auto 44px;
}

.comparison-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.play-visible {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid #98a2a7;
  border-radius: 999px;
  color: #27333a;
  background: rgba(255, 255, 255, 0.5);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  cursor: pointer;
}

.play-visible:hover,
.play-visible[aria-pressed="true"] {
  border-color: #4c77a8;
  color: white;
  background: #4c77a8;
}

.play-visible__icon {
  display: inline-block;
  min-width: 14px;
  margin-right: 4px;
}

.comparison-grid {
  display: grid;
  gap: 58px;
  max-width: 1360px;
  margin: 0 auto;
}

.video-lab--minimal {
  padding-top: 72px;
}

.comparison-toolbar--minimal {
  justify-content: flex-end;
  margin-top: 18px;
  margin-bottom: 34px;
}

.video-lab--minimal .comparison-grid {
  gap: 44px;
}

.comparison-card {
  opacity: 0;
  transform: translateY(18px);
  animation: comparison-in 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--order) * 70ms);
}

@keyframes comparison-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comparison-card__header {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 34px;
  align-items: baseline;
  margin-bottom: 13px;
}

.comparison-card__header--prompt-only {
  display: block;
  margin-bottom: 10px;
}

.comparison-card__header--prompt-only h3 {
  max-width: 1180px;
}

.case-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #687279;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.case-meta span {
  padding: 3px 6px;
  color: white;
  background: #17202a;
}

.comparison-card h3 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(24px, 2.3vw, 34px);
  font-weight: 500;
  line-height: 1.13;
}

.comparison-card h3 em {
  color: #4c77a8;
  font-style: italic;
}

.video-pair {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
  background: #17202a;
  box-shadow: 0 22px 60px rgba(27, 39, 47, 0.14);
}

.video-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #101614;
}

.video-panel video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #101614;
}

.video-label {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  color: white;
  background: rgba(14, 20, 19, 0.78);
  backdrop-filter: blur(8px);
  font-family: "DM Mono", monospace;
  line-height: 1;
}

.video-panel--phys .video-label {
  background: rgba(61, 102, 151, 0.9);
}

.video-label span {
  font-size: 11px;
  text-transform: uppercase;
}

.video-label small {
  padding-left: 9px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
}

.video-time {
  position: absolute;
  right: 11px;
  bottom: 9px;
  padding: 3px 6px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.55);
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.pair-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  background: rgba(15, 22, 20, 0.74);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 160ms ease, background 160ms ease;
}

.pair-control span {
  margin-left: 2px;
  font-size: 15px;
}

.pair-control:hover {
  background: #4c77a8;
  transform: translate(-50%, -50%) scale(1.08);
}

.pair-control.is-playing {
  opacity: 0;
}

.video-pair:hover .pair-control.is-playing,
.pair-control:focus-visible {
  opacity: 1;
}

.noscript-note {
  padding: 24px;
  border: 1px solid #aeb7bd;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .action,
  .visual img,
  .comparison-card,
  .pair-control,
  .hero-reel__tile img {
    transition: none;
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero-reel__track {
    animation: none;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 20px;
  }

  .site-header nav {
    display: none;
  }

  .hero {
    min-height: 0;
    width: calc(100% - 40px);
    padding: 72px 0 100px;
  }

  h1 {
    font-size: 52px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .video-lab {
    padding: 82px 20px 92px;
  }

  .video-lab__heading,
  .comparison-card__header {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .video-key {
    grid-template-columns: repeat(2, max-content);
  }

  .section-heading > p:last-child {
    max-width: 520px;
  }

  h2 {
    font-size: 44px;
  }

  .showcase {
    padding: 82px 20px;
  }

  .visual {
    margin-bottom: 68px;
  }

  figcaption {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .dataset-facts strong {
    font-size: 32px;
  }

  .closing {
    flex-direction: column;
    padding: 52px 20px;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 41px;
  }

  .dek {
    font-size: 16px;
  }

  .authors p {
    font-size: 13px;
  }

  .authors .affiliations {
    font-size: 11px;
  }

  .action {
    flex: 1 1 140px;
    text-align: center;
  }

  .scroll-cue {
    left: 0;
    right: auto;
  }

  .hero-reel {
    margin-top: 40px;
  }

  .hero-reel__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .hero-reel__tile,
  .hero-reel__tile img {
    width: 190px;
    flex-basis: 190px;
  }

  h2 {
    font-size: 38px;
  }

  .dataset-facts {
    grid-template-columns: 1fr;
  }

  .dataset-facts div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .closing p {
    font-size: 32px;
  }

  .closing div {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 20px;
  }

  footer a {
    justify-self: start;
  }

  .citation-section {
    padding: 72px 20px 82px;
  }

  .citation-inner h2 {
    font-size: 42px;
  }

  .citation-inner h2::after {
    width: 76px;
    margin-top: 24px;
  }

  .citation-card {
    margin-top: 48px;
    padding: 78px 20px 24px;
  }

  .citation-copy {
    top: 18px;
    right: 18px;
  }

  .citation-inner pre {
    padding: 0;
    font-size: 11px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
  }

  .method-tab {
    min-height: 56px;
    padding: 10px 8px;
    font-size: 10px;
  }

  .method-tab span {
    display: none;
  }

  .comparison-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .video-pair {
    grid-template-columns: 1fr;
  }

  .pair-control {
    top: 50%;
  }

  .video-label {
    top: 9px;
    left: 9px;
  }
}

/* Full paper demo: the second viewport */
.demo-section {
  display: flex;
  min-height: calc(100vh - 64px);
  scroll-margin-top: 64px;
  flex-direction: column;
  justify-content: center;
  padding: 86px max(34px, calc((100vw - 1360px) / 2)) 96px;
  color: var(--chalk);
  background:
    radial-gradient(circle at 88% 14%, rgba(121, 212, 231, 0.14), transparent 28%),
    linear-gradient(135deg, #101513 0%, #17202a 100%);
}

.demo-intro {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  max-width: 1220px;
  margin: 0 auto 42px;
}

.demo-intro .section-index {
  padding-top: 9px;
  color: var(--cyan);
}

.tldr {
  max-width: 1060px;
  margin: 0;
  font-family: "DM Mono", monospace;
  font-size: clamp(15px, 1.25vw, 20px);
  font-weight: 400;
  line-height: 1.62;
  letter-spacing: -0.01em;
}

.tldr strong {
  color: var(--coral);
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: baseline;
}

.paper-demo {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.paper-demo__frame {
  position: relative;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #080b0a;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
}

.paper-demo__frame::before {
  position: absolute;
  z-index: 1;
  top: -1px;
  left: -1px;
  width: 118px;
  height: 4px;
  content: "";
  background: var(--coral);
}

.paper-demo video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #101513;
}

.paper-demo figcaption {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 13px 2px 0;
  color: #aeb8b3;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.paper-demo figcaption span:first-child {
  color: white;
}

/* Dataset-first homepage */
.dataset-section {
  padding: 108px max(34px, calc((100vw - 1360px) / 2)) 124px;
  background:
    linear-gradient(90deg, rgba(99, 69, 234, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px;
}

.dataset-heading {
  margin-bottom: 58px;
}

.dataset-heading .section-index,
.annotation-heading .section-index {
  color: #6345ea;
}

.dataset-heading > p:last-child {
  color: var(--muted);
}

.dataset-video-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  max-width: 1220px;
  margin: 0 auto 112px;
}

.dataset-video-card {
  position: relative;
  grid-column: span 4;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #aeb1ad;
  background: #111513;
  box-shadow: 0 24px 58px rgba(27, 31, 29, 0.12);
}

.dataset-video-card:nth-child(1) {
  grid-column: span 7;
}

.dataset-video-card:nth-child(2) {
  grid-column: span 5;
}

.dataset-video-card:nth-child(6) {
  grid-column: 1 / -1;
}

.dataset-video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.94;
  transition: opacity 220ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dataset-video-card:nth-child(6) video {
  aspect-ratio: 24 / 7;
}

.dataset-video-card:hover video {
  opacity: 1;
  transform: scale(1.025);
}

.dataset-video-card figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 14px 11px;
  color: rgba(255, 255, 255, 0.86);
  background: linear-gradient(transparent, rgba(8, 11, 10, 0.86));
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.dataset-video-card figcaption span {
  color: var(--cyan);
}

.annotation-heading {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 320px;
  gap: 34px;
  align-items: end;
  max-width: 1360px;
  margin: 0 auto 38px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.annotation-heading h3 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 42px;
  font-weight: 500;
  line-height: 1.03;
}

.annotation-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.annotation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 1360px;
  margin: 0 auto;
}

.annotation-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #bfc2bd;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(36, 40, 38, 0.08);
}

.annotation-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 3px 2px 13px;
}

.annotation-card__eyebrow {
  color: #6345ea;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.annotation-card h4 {
  margin: 4px 0 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.08;
}

.copy-json {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid #b7bab6;
  color: #414744;
  background: transparent;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
  cursor: pointer;
}

.copy-json:hover,
.copy-json:focus-visible {
  border-color: #6345ea;
  color: white;
  background: #6345ea;
}

.annotation-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #bfc2bd;
  object-fit: cover;
  background: #111513;
}

.annotation-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 2px;
  color: #666d69;
  font-family: "DM Mono", monospace;
  font-size: 8px;
}

.annotation-card pre {
  height: 560px;
  margin: 0;
  padding: 15px;
  overflow: auto;
  border: 1px solid #c8cbc6;
  color: #272c2a;
  background:
    linear-gradient(rgba(76, 119, 168, 0.055) 1px, transparent 1px),
    #fafbf9;
  background-size: 100% 18px;
  font-family: "DM Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  line-height: 1.45;
  tab-size: 2;
  white-space: pre;
}

.json-line {
  display: inline-block;
  min-width: 100%;
}

.json-line--physics {
  color: #4c77a8;
  background: rgba(76, 119, 168, 0.08);
}

.json-line--event {
  color: #6345ea;
  background: rgba(99, 69, 234, 0.08);
}

.annotation-error {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px solid #e35757;
  color: #9c3434;
  background: #fff6f4;
}

.video-key {
  grid-template-columns: 1fr;
}

.video-key__self {
  background: #626b6a;
}

.video-key__rolling {
  background: #e35757;
}

.video-key__causal {
  background: #6345ea;
}

.video-key__phys {
  background: #4c77a8;
}

.video-quartet {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
  background: #17202a;
  box-shadow: 0 22px 60px rgba(27, 39, 47, 0.14);
}

.video-panel--self {
  border-top: 4px solid #626b6a;
}

.video-panel--rolling {
  border-top: 4px solid #e35757;
}

.video-panel--causal {
  border-top: 4px solid #6345ea;
}

.video-panel--phys {
  border-top: 4px solid #4c77a8;
}

.video-panel--rolling .video-label {
  background: rgba(161, 58, 58, 0.9);
}

.video-panel--causal .video-label {
  background: rgba(75, 50, 184, 0.9);
}

.video-quartet .video-label {
  top: 10px;
  left: 10px;
  padding: 6px 8px;
}

.video-quartet .video-label span {
  font-size: 9px;
}

.video-quartet .video-label small {
  font-size: 8px;
}

.quartet-control {
  width: 54px;
  height: 54px;
}

.video-quartet:hover .quartet-control.is-playing,
.quartet-control:focus-visible {
  opacity: 1;
}

@media (max-width: 1100px) {
  .annotation-heading {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .annotation-heading > p:last-child {
    max-width: 660px;
  }

  .video-quartet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .demo-section {
    min-height: 0;
    padding: 72px 20px 82px;
  }

  .demo-intro {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .demo-intro .section-index {
    padding-top: 0;
  }

  .paper-demo figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .dataset-section {
    padding: 82px 20px 92px;
  }

  .dataset-heading {
    margin-bottom: 42px;
  }

  .dataset-video-grid {
    margin-bottom: 78px;
  }

  .dataset-video-card,
  .dataset-video-card:nth-child(1),
  .dataset-video-card:nth-child(2) {
    grid-column: span 6;
  }

  .annotation-grid {
    grid-template-columns: 1fr;
  }

  .annotation-card pre {
    height: 480px;
  }
}

@media (max-width: 560px) {
  .tldr {
    font-size: 15px;
  }

  .dataset-video-card,
  .dataset-video-card:nth-child(1),
  .dataset-video-card:nth-child(2),
  .dataset-video-card:nth-child(6) {
    grid-column: 1 / -1;
  }

  .dataset-video-card:nth-child(6) video {
    aspect-ratio: 16 / 9;
  }

  .dataset-video-card figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .annotation-heading h3 {
    font-size: 32px;
  }

  .annotation-card h4 {
    font-size: 21px;
  }

  .annotation-card pre {
    height: 420px;
    font-size: 8px;
  }

  .annotation-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .video-quartet {
    grid-template-columns: 1fr;
  }
}
