/* ==========================================================================
   ULTRA project page
   Dark cinematic stage -> light editorial body. Teal accent. Fraunces + Inter.
   ========================================================================== */

:root {
  --teal: #2e8a9a;
  --teal-2: #4abfcf;
  --teal-deep: #1f6b78;

  --ink: #0b1114;
  --ink-2: #111a1e;
  --ink-3: #18242a;

  --paper: #ffffff;
  --paper-2: #f4f8f9;
  --line: #e3eaec;

  --text: #18232a;
  --text-2: #55666c;
  --text-3: #6f7f85;

  --on-ink: #f2f6f7;
  --on-ink-2: #b4c2c6;
  --on-ink-3: #8797a0;

  --r: 14px;
  --r-lg: 22px;
  --wrap: 1120px;

  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --shadow-card: 0 10px 30px rgba(6, 14, 18, .22);
  --shadow-card-light: 0 8px 28px rgba(20, 40, 48, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, figure, ul { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 3px; }
.stage :focus-visible, .worlds :focus-visible, .scene :focus-visible, .bibtex :focus-visible, .footer :focus-visible { outline-color: var(--teal-2); }

.wrap { width: min(var(--wrap), calc(100% - 3rem)); margin-inline: auto; }
.wrap.narrow { width: min(760px, calc(100% - 3rem)); }

.skip-link {
  position: absolute; left: -999px; top: .5rem; z-index: 2000;
  background: var(--teal); color: #fff; padding: .5rem .8rem; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { left: .5rem; }

.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1500;
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
}

/* --------------------------------------------------------------------------
   STAGE (hero). Default = static layout (no JS / mobile / reduced motion).
   html.stage-anim = full-bleed pinned layout driven by GSAP.
   -------------------------------------------------------------------------- */
.stage { position: relative; background: var(--ink); color: var(--on-ink); overflow: hidden; }

.stage-video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }
.stage-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 12, 14, .55) 0%, rgba(8, 12, 14, .12) 32%, rgba(8, 12, 14, .12) 62%, rgba(8, 12, 14, .72) 100%);
}

.stage-brand, .stage-acronym, .stage-kicker, .scroll-cue { display: none; }
html:not(.stage-anim) .stage-scrim { background: linear-gradient(180deg, transparent 60%, rgba(11, 17, 20, .7) 100%); }

.stage-title { max-width: 1100px; margin: 0 auto; padding: 2.4rem 1.25rem 3rem; text-align: center; }
.paper-title {
  font-family: var(--serif);
  font-weight: 700;
  font-optical-sizing: auto;
  font-size: clamp(1.7rem, 3.3vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 auto 1.25rem;
  max-width: 1100px;
  text-wrap: balance;
}
.title-acro { color: var(--teal-2); white-space: nowrap; }
.tl { display: inline-block; line-height: 1; }
.tw { display: inline-block; }

.authors { font-size: clamp(1rem, 1.25vw, 1.15rem); font-weight: 500; line-height: 1.7; }
.au { white-space: nowrap; }
.au-br { display: none; }
@media (min-width: 901px) { .au-br { display: block; } }
.authors a { color: var(--on-ink); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .22); transition: color .2s, border-color .2s; }
.authors a:hover { color: var(--teal-2); border-color: var(--teal-2); }
.authors sup { font-size: .62em; color: var(--teal-2); margin-left: .06em; }
.affil { margin-top: .55rem; color: var(--on-ink-2); font-size: 1rem; }
:root { --gold: #f3d27a; --gold-2: #ffe9a8; --gold-deep: #c9962b; }
.award { margin-top: .85rem; }
.venue-chip {
  display: inline-flex; align-items: center; gap: .6em; vertical-align: middle;
  padding: .55em 1.15em .55em .95em; border-radius: 999px;
  color: var(--gold); font-weight: 700; font-size: .98rem; letter-spacing: .02em; line-height: 1.25;
  background: linear-gradient(135deg, rgba(201, 150, 43, .28), rgba(255, 224, 150, .10) 55%, rgba(201, 150, 43, .22));
  border: 1px solid rgba(243, 210, 122, .7);
  box-shadow: 0 0 0 1px rgba(243, 210, 122, .18), 0 10px 34px rgba(243, 190, 70, .28), inset 0 1px 0 rgba(255, 255, 255, .14);
  text-shadow: 0 0 18px rgba(255, 220, 130, .35);
}
.award-text { display: inline; }
.award-sep { margin: 0 .5em; opacity: .55; }
.award-venue, .award-status { color: var(--gold-2); }
.trophy { width: 1.35em; height: 1.35em; flex: 0 0 auto; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 8px rgba(255, 215, 120, .55)); }
.trophy .cup { fill: url(#gold-fill); fill: var(--gold); stroke: var(--gold-2); }
.brand-venue .trophy { width: 1.15em; height: 1.15em; margin-right: .5em; vertical-align: -.25em; display: inline-block; }
html.stage-anim .stage-brand .brand-venue { color: var(--gold); text-shadow: 0 0 14px rgba(255, 215, 120, .35); }
.notes { margin: .45rem 0 1.35rem; color: var(--on-ink-3); font-size: .85rem; }
.notes sup { color: var(--teal-2); font-style: normal; }

.actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72em 1.3em; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1; text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s;
}
.btn svg { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: linear-gradient(135deg, #1f6b78, #2a8494); color: #fff; box-shadow: 0 6px 20px rgba(46, 138, 154, .38); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(74, 191, 207, .48); }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: var(--on-ink); background: transparent; } /* also resets the UA <button> face */
.btn-ghost:hover { border-color: var(--teal-2); color: var(--teal-2); transform: translateY(-2px); }

/* ---- animated stage (JS + desktop + motion OK) ---- */
html.stage-anim .stage { height: 100vh; }
html.stage-anim .paper-title { font-variation-settings: "opsz" 144; }
html.stage-anim .stage-video {
  position: absolute; inset: 0; aspect-ratio: auto;
  transform-origin: 50% 50%; will-change: transform;
  isolation: isolate; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
html.stage-anim .stage-brand {
  display: flex; position: absolute; top: 1.6rem; left: 2rem; z-index: 3;
  align-items: center; gap: .7rem;
  font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .85);
}
.brand-mark { font-family: var(--serif); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; text-transform: none; }
.brand-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal-2); }
html.stage-anim .stage-acronym {
  display: flex; position: absolute; inset: 0; z-index: 3;
  align-items: center; justify-content: center; pointer-events: none;
}
.ac-letter {
  display: block;
  font-family: var(--serif); font-weight: 700; font-variation-settings: "opsz" 144;
  font-size: clamp(6rem, 17vw, 15rem); line-height: 1; letter-spacing: -.02em; color: #fff;
  transform-origin: 50% 50%; will-change: transform, opacity;
}
html.stage-anim .stage-kicker {
  display: block; position: absolute; left: 0; right: 0; bottom: max(15vh, 7.5rem); z-index: 3; margin: 0;
  text-align: center; font-size: clamp(1rem, 1.35vw, 1.2rem); font-weight: 500; letter-spacing: .01em;
  color: rgba(255, 255, 255, .88); pointer-events: none;
}
html.stage-anim .scroll-cue {
  display: flex; position: absolute; left: 50%; bottom: 2rem; z-index: 3; transform: translateX(-50%);
  flex-direction: column; align-items: center; gap: .5rem;
  font-size: .68rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .7);
}
.scroll-cue i { width: 1px; height: 40px; background: linear-gradient(180deg, rgba(255, 255, 255, .85), transparent); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.1% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
html.stage-anim .stage-title {
  position: absolute; top: 6vh; left: 0; right: 0; z-index: 4;
  max-width: none; padding: 0 6vw; pointer-events: none;
}
html.stage-anim .stage-title .authors,
html.stage-anim .stage-title .actions { pointer-events: auto; }
html.stage-anim:not(.stage-ready) .stage-title { visibility: hidden; }

/* static stage entrance */
html:not(.stage-anim) .stage-title { animation: rise .7s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Shared type + components
   -------------------------------------------------------------------------- */
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-deep); margin: 0 0 .9rem; }
.eyebrow.light { color: var(--teal-2); }
.h-display {
  font-family: var(--serif); font-weight: 600; font-optical-sizing: auto;
  font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.06; letter-spacing: -.02em; margin: 0 0 1rem; max-width: 28ch;
}
.h-display em { font-style: italic; color: var(--teal-2); }
.lede { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--on-ink-2); max-width: 62ch; line-height: 1.55; margin: 0 0 2.4rem; }

/* clips (video cards) */
.clip {
  position: relative; margin: 0; overflow: hidden; border-radius: var(--r-lg);
  background: #0d1417; cursor: pointer; box-shadow: var(--shadow-card);
  transform: translateZ(0);
}
.clip video { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0d1417; }
.clip figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem 1rem .9rem;
  display: flex; gap: .6rem; align-items: center; flex-wrap: wrap;
  font-size: .86rem; font-weight: 500; color: rgba(255, 255, 255, .92);
  background: linear-gradient(180deg, transparent, rgba(5, 10, 12, .8)); pointer-events: none;
}
.chip {
  display: inline-block; padding: .2em .65em; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #fff;
  background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.chip-wild { background: rgba(46, 138, 154, .85); }
.chip-lab { background: rgba(11, 17, 20, .72); }
.clip::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px;
  transform: translate(-50%, -50%) scale(.9); border-radius: 50%;
  background: rgba(11, 17, 20, .7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 26px no-repeat;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
.clip.is-paused::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.clip-toggle { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: inherit; }
.clip-toggle:focus-visible { outline-offset: -4px; }

/* --------------------------------------------------------------------------
   Real-world section (dark)
   -------------------------------------------------------------------------- */
.worlds { position: relative; background: var(--ink); color: var(--on-ink); padding: clamp(4rem, 9vh, 7rem) 0 clamp(6rem, 12vh, 9rem); }
.worlds-grid { display: grid; grid-template-columns: 2fr 1fr; grid-auto-rows: 1fr; gap: 1rem; }
.worlds-grid .clip-lg { grid-row: 1 / 3; display: flex; }
.worlds-grid .clip-lg video { aspect-ratio: auto; height: 100%; }

/* --------------------------------------------------------------------------
   Scene: sticky scroll-scrubbed render behind the abstract (dark)
   -------------------------------------------------------------------------- */
.scene { position: relative; background: var(--ink); color: var(--on-ink); }
.scene-bg { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.scene-bg video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.scene-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--ink) 0%, rgba(11, 17, 20, .2) 22%, rgba(11, 17, 20, .2) 72%, var(--ink) 100%);
}
.scene-content { position: relative; margin-top: -100vh; padding: 30vh 0 22vh; }
.glass {
  padding: clamp(1.6rem, 3vw, 2.6rem);
  background: rgba(11, 17, 20, .58);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.abstract-text {
  font-size: clamp(1.02rem, 1.25vw, 1.15rem); line-height: 1.78; color: var(--on-ink);
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
}
.abstract-text::first-letter {
  font-family: var(--serif); font-weight: 700; font-size: 3.4em; line-height: .82;
  float: left; padding: .1em .12em 0 0; color: var(--teal-2);
}

/* light sheet sliding over the dark block (first light section) */
.section.sheet {
  position: relative; z-index: 1; background: var(--paper);
  border-radius: 32px 32px 0 0; margin-top: -32px;
  padding-top: clamp(3.5rem, 8vh, 6rem);
  box-shadow: 0 -24px 60px rgba(0, 0, 0, .28);
}

/* --------------------------------------------------------------------------
   Result chapters
   -------------------------------------------------------------------------- */
.section { padding: clamp(3rem, 7vh, 5.5rem) 0; }
.section.alt { background: var(--paper-2); }
.sec-head { margin-bottom: 1.8rem; max-width: 860px; }
.sec-head h2 {
  font-family: var(--serif); font-weight: 600; font-optical-sizing: auto;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .6rem; color: var(--text);
}
.sec-head h2 .x { color: var(--teal); font-weight: 500; margin: 0 .12em; }
.sec-head h2 .hl { color: var(--teal); }
.sec-desc { margin: 0 0 .9rem; color: var(--text-2); font-size: 1.02rem; max-width: 62ch; }
.tags { display: flex; gap: .5rem; flex-wrap: wrap; }
.tag {
  font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--teal-deep); background: rgba(46, 138, 154, .09); border: 1px solid rgba(46, 138, 154, .22);
  padding: .32em .75em; border-radius: 999px;
}
.legend { list-style: none; padding: 0; margin: 0 0 .9rem; display: flex; gap: 1.2rem; flex-wrap: wrap; color: var(--text-2); font-size: .95rem; }
.legend li { display: inline-flex; align-items: center; gap: .45rem; }
.sw { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }

.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cap { gap: 2rem; }
.grid-cap h3 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; letter-spacing: -.01em; margin: 0 0 .35rem; }
.grid-cap p { color: var(--text-2); font-size: .98rem; margin: 0 0 1rem; min-height: 4.8em; }
.section .clip { box-shadow: var(--shadow-card-light); background: #e6ecee; }
.section .clip video { background: #e6ecee; }

/* filmstrip */
.strip { position: relative; }
.strip-track {
  display: flex; gap: 1rem; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: .25rem;
  padding: .5rem .5rem 1.75rem; margin: -.5rem -.5rem 0; scrollbar-width: none;
}
.strip-track::-webkit-scrollbar { display: none; }
.strip-item { flex: 0 0 min(560px, 82vw); scroll-snap-align: start; }
.strip.ratio-4-3 .strip-item { flex-basis: min(400px, 78vw); }
.strip.ratio-4-3 .clip video { aspect-ratio: 8 / 5; object-position: 50% 92%; } /* crops the black band baked into the sim clips */
.strip-nav { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; margin-top: -.4rem; }
.strip-count { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--text-2); margin-right: .4rem; }
.strip-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--text);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(20, 40, 48, .08);
  transition: transform .2s, border-color .2s, color .2s, opacity .2s;
}
.strip-btn:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }
.strip-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.strip-btn:disabled { opacity: .3; pointer-events: none; }

/* --------------------------------------------------------------------------
   BibTeX + footer (dark)
   -------------------------------------------------------------------------- */
.bibtex { background: var(--ink); color: var(--on-ink); padding: clamp(3rem, 7vh, 5.5rem) 0 2rem; }
.bib-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.bibtex h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 2.4vw, 2.1rem); letter-spacing: -.015em; }
.copy-btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .6em 1em; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: var(--on-ink); font-weight: 600; font-size: .9rem;
  transition: background .2s, border-color .2s, color .2s;
}
.copy-btn svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.copy-btn:hover { border-color: var(--teal-2); color: var(--teal-2); }
.copy-btn.copied { background: var(--teal); border-color: var(--teal); color: #fff; }
.bibtex pre {
  margin: 0; padding: 1.3rem 1.4rem; overflow-x: auto;
  background: var(--ink-2); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--r);
  font-size: .86rem; line-height: 1.6;
}
.bibtex code { font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace; color: #a7e3ec; }

.footer { background: var(--ink); color: var(--on-ink-3); padding: 1.5rem 0 3rem; font-size: .86rem; }
.footer a { color: var(--on-ink-2); }
.footer a:hover { color: var(--teal-2); }

/* --------------------------------------------------------------------------
   Rail nav + back to top
   -------------------------------------------------------------------------- */
.rail {
  position: fixed; right: 1.1rem; top: 50%; transform: translateY(-50%); z-index: 1200;
  display: flex; flex-direction: column; gap: .45rem;
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
}
.rail.visible { opacity: 1; visibility: visible; }
.rail a { position: relative; display: block; width: 24px; height: 24px; text-decoration: none; }
.rail a::before {
  content: ""; position: absolute; inset: 8px; border-radius: 50%;
  background: var(--text-3); opacity: .5; transition: transform .2s, background .2s, opacity .2s;
}
.rail a:hover::before, .rail a.is-active::before { background: var(--teal); opacity: 1; transform: scale(1.4); }
.rail a span {
  position: absolute; right: 30px; top: 50%; transform: translateY(-50%) translateX(6px);
  white-space: nowrap; font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  color: #fff; background: rgba(11, 17, 20, .92); padding: .34em .7em; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: translateY(-50%) translateX(0); }

.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1200; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--teal); cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(20, 40, 48, .16);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .3s, visibility .3s, transform .3s;
}
.to-top.visible { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1240px) { .rail { display: none; } }
@media (max-width: 900px) {
  .worlds-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
  .worlds-grid .clip-lg { grid-row: auto; grid-column: 1 / -1; display: block; }
  .worlds-grid .clip-lg video { aspect-ratio: 16 / 9; height: auto; }
}
@media (max-width: 700px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wrap, .wrap.narrow { width: calc(100% - 2rem); }
  .worlds-grid, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stage-title { padding: 1.8rem 1rem 2.2rem; }
  .paper-title { font-size: 1.55rem; }
  .venue-chip { font-size: .8rem; line-height: 1.45; border-radius: 16px; padding: .55em .9em; }
  .award-sep { margin: 0 .35em; }
  .worlds { padding-top: 2.5rem; }
  .scene-content { padding: 18vh 0 22vh; }
  .abstract-text { text-align: left; hyphens: manual; }
  .bib-head { flex-direction: column; align-items: flex-start; }
  .strip-item { flex-basis: 86vw; }
  .to-top { right: 1rem; bottom: 1rem; }
}

@media (hover: none) {
  .btn:hover, .strip-btn:hover, .to-top:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}

@media print {
  .rail, .to-top, .read-progress, .scroll-cue, .stage-brand, .stage-acronym, .stage-kicker { display: none !important; }
  .stage, .worlds, .scene, .bibtex, .footer, .glass { background: #fff !important; color: #000 !important; box-shadow: none !important; }
  .stage *, .worlds *, .scene *, .bibtex *, .footer * { color: #000 !important; text-shadow: none !important; }
  .scene-bg, .stage-scrim { display: none !important; }
  html.stage-anim .stage { height: auto; }
  html.stage-anim .stage-video, html.stage-anim .stage-title { position: static; transform: none !important; }
  .clip { box-shadow: none; }
}

/* --------------------------------------------------------------------------
   Interactive demo (dark). The MuJoCo iframe is created only when the visitor
   clicks Launch; until then the card is a poster + muted teaser loop.
   -------------------------------------------------------------------------- */
.playground {
  position: relative; background: var(--ink); color: var(--on-ink); overflow: hidden;
  padding: clamp(2rem, 5vh, 4rem) 0 calc(clamp(4rem, 9vh, 7rem) + 32px); /* +32px: the light sheet below overlaps by that much */
}
.playground::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 60%, rgba(46, 138, 154, .16), transparent 70%);
}
.playground .wrap { position: relative; }
.playground .lede { margin-bottom: 1.1rem; }
.tags.on-ink { margin-bottom: 2.2rem; }
.tags.on-ink .tag { color: var(--on-ink-2); background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
.btn-live svg { fill: currentColor; stroke-width: 1.6; }

.play { width: min(100%, calc((100vh - 7rem) * 1.5)); margin-inline: auto; } /* the whole frame always fits the viewport height */
.play-frame {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--r-lg);
  background: #0e1218; border: 1px solid rgba(255, 255, 255, .08); box-shadow: var(--shadow-card); transform: translateZ(0);
}
.play-frame iframe, .play-teaser { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.play-teaser { object-fit: cover; background: #0e1218; transition: opacity .6s, visibility .6s; }
.play-chip { position: absolute; top: 1rem; left: 1rem; z-index: 3; transition: opacity .3s, visibility .3s; }
.play.is-live .play-chip { opacity: 0; visibility: hidden; }
.play-launch {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem;
  text-align: center; padding: 1rem;
  background: linear-gradient(180deg, rgba(11, 17, 20, .12), rgba(11, 17, 20, .5));
  transition: opacity .6s, visibility .6s;
}
.play-launch .btn { font-size: 1.05rem; padding: .85em 1.6em; }
.play-open, .play-loading, .play-error { display: none; }
.play-error { margin: 0; max-width: 46ch; font-size: .95rem; color: var(--on-ink); }
.play-error b { color: #ffb4a8; }
.play.is-error .play-btn, .play.is-error .play-loading { display: none; }
.play.is-error .play-error, .play.is-error .play-open { display: inline-flex; }
.play.is-error .play-error { display: block; }
.play.is-error .play-launch { background: linear-gradient(180deg, rgba(11, 17, 20, .55), rgba(11, 17, 20, .8)); }
.play-tools [hidden] { display: none !important; }
.play-loading { align-items: center; gap: .6rem; margin: 0; font-weight: 500; font-size: 1rem; color: var(--on-ink); }
.play-loading i { width: 9px; height: 9px; border-radius: 50%; background: var(--teal-2); box-shadow: 0 0 12px var(--teal-2); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(.75); } 50% { opacity: 1; transform: none; } }
.play-note { margin: 0; font-size: .86rem; color: var(--on-ink-2); text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }

.play.is-loading .play-btn { display: none; }
.play.is-loading .play-loading { display: inline-flex; }
.play.is-live .play-launch, .play.is-live .play-teaser { opacity: 0; visibility: hidden; pointer-events: none; }
.play.is-link .play-btn, .play.is-link .play-keys, .play.is-link .play-tools, .play.is-link .play-loading { display: none; }
.play.is-link .play-open { display: inline-flex; }

.play-bar { display: flex; justify-content: space-between; align-items: center; gap: .8rem 1.2rem; flex-wrap: wrap; margin-top: 1rem; min-height: 2.2rem; }
.play-keys { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem 1.2rem; font-size: .84rem; color: var(--on-ink-2); }
.play-keys li { display: inline-flex; align-items: center; gap: .35rem; }
.play-keys kbd {
  display: inline-block; min-width: 1.7em; padding: .12em .45em; border-radius: 6px; text-align: center;
  border: 1px solid rgba(255, 255, 255, .18); border-bottom-width: 2px; background: rgba(255, 255, 255, .06);
  font: 600 .76rem/1.5 var(--sans); color: var(--on-ink);
}
.play-keys kbd + kbd { margin-left: -.15rem; }
.play-tools { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.play-status { font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; color: var(--on-ink-3); font-variant-numeric: tabular-nums; }
.play-status:empty { display: none; }
.btn-sm { font-size: .8rem; padding: .55em 1em; }
.play-frame:fullscreen, .play-frame:-webkit-full-screen { border-radius: 0; border: 0; }
.playground :focus-visible { outline-color: var(--teal-2); }

@media (max-width: 900px) {
  .play { width: 100%; min-width: 0; }
  .play-launch .btn { font-size: .95rem; }
}
@media (max-width: 600px) {
  .playground { padding-top: 1rem; }
  .play-note { font-size: .8rem; }
}
@media print {
  .playground { background: #fff !important; color: #000 !important; }
  .play-launch, .play-bar { display: none !important; }
}
