:root {
  --pink: #fabdf9;
  --pink-dim: rgba(250, 189, 249, 0.35);
  --pink-faint: rgba(250, 189, 249, 0.14);
  --lilac: #a9ece6;
  --ink: #05090b;
  --display: 'Orbitron', 'Eurostile', sans-serif;
  --mono: 'Share Tech Mono', ui-monospace, monospace;
  --crt: 'VT323', 'Share Tech Mono', monospace;
  --glow: 0 0 12px rgba(250, 189, 249, 0.55);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: #000;
  color: var(--pink);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  will-change: transform;
  background: #030608;
}

#plate,
#gl,
.haze {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* The flight between chapters plays over the still, then hands back to it. */
.clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.clip.on {
  opacity: 1;
}

.clip.top {
  z-index: 1;
}

/* Left-hand shade so the text panel always sits on something dark. */
.stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.66) 26%, rgba(0, 0, 0, 0.22) 44%, transparent 58%);
  pointer-events: none;
  z-index: 2; /* above the flight clips too, so the shade never drops out mid-flight */
}

html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

/* Slow banks of haze drifting across the picture, so it never sits still. */
.haze {
  inset: -20%;
  width: 140%;
  height: 140%;
  background:
    radial-gradient(38% 26% at 30% 62%, rgba(60, 190, 200, 0.1), transparent 70%),
    radial-gradient(30% 22% at 72% 48%, rgba(228, 120, 236, 0.1), transparent 70%),
    radial-gradient(46% 20% at 55% 82%, rgba(228, 120, 236, 0.09), transparent 72%);
  display: none;
}

@keyframes haze {
  from {
    transform: translate3d(-4%, 1%, 0) scale(1);
  }
  to {
    transform: translate3d(5%, -2%, 0) scale(1.12);
  }
}

.fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.fx-vig {
  background: radial-gradient(120% 95% at 50% 45%, transparent 48%, rgba(1, 3, 4, 0.8) 100%);
}

.fx-scan {
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.14) 0 1px, transparent 1px 4px);
  opacity: 0.32;
}

/* Film grain: a small noise tile (set from JS) shuffled around a few times a second. */
.fx-grain {
  inset: -120px;
  background-size: 220px 220px;
  opacity: 0.22;
  mix-blend-mode: overlay;
  animation: grain 0.9s steps(1) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  12% { transform: translate(-41px, 23px); }
  25% { transform: translate(37px, -58px); }
  37% { transform: translate(-73px, -19px); }
  50% { transform: translate(19px, 61px); }
  62% { transform: translate(-27px, -83px); }
  75% { transform: translate(64px, 12px); }
  87% { transform: translate(-90px, 47px); }
}

@media (prefers-reduced-motion: reduce) {
  .haze,
  .fx-grain {
    animation: none;
  }
}

.spacer {
  height: 130vh;
}
.spacer-last {
  height: 100vh;
}

/* ---------- HUD chrome ---------- */

.hud-top,
.hud-bottom {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px clamp(16px, 3vw, 40px);
  pointer-events: none;
}
.hud-top {
  top: 0;
}
.hud-bottom {
  bottom: 0;
  align-items: flex-end;
}
.hud-top > *,
.hud-bottom > * {
  pointer-events: auto;
}

.hud-id {
  display: flex;
  gap: 2px;
  font-family: var(--crt);
  font-size: 18px;
}
.chip {
  background: var(--pink);
  color: #200039;
  padding: 0 10px;
  line-height: 22px;
}
.chip-ghost {
  background: none;
  color: var(--pink);
  border: 1px solid var(--pink-dim);
  line-height: 20px;
}

.btn {
  font: inherit;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--pink);
  background: rgba(3, 7, 9, 0.6);
  border: 1px solid var(--pink-dim);
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn:hover,
.btn:focus-visible {
  background: var(--pink);
  color: #200039;
  outline: none;
}

.hud-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.count {
  font-family: var(--crt);
  font-size: 22px;
  text-shadow: var(--glow);
}
.rail {
  width: 120px;
  height: 2px;
  background: var(--pink-faint);
}
.rail i {
  display: block;
  height: 100%;
  background: var(--pink);
  transform-origin: left;
  transform: scaleX(0);
}
.hud-note {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  opacity: 0.75;
  text-align: right;
  max-width: 46ch;
}

/* ---------- Panels ---------- */

.panel {
  --dy: 0px;
  position: fixed;
  z-index: 10;
  left: clamp(16px, 5vw, 80px);
  top: 50%;
  width: min(440px, calc(100vw - 32px));
  transform: translateY(calc(-50% + var(--dy)));
  padding: 26px 26px 22px;
  background: linear-gradient(180deg, rgba(3, 7, 9, 0.86), rgba(3, 7, 9, 0.74));
  border: 1px solid var(--pink-dim);
  border-left: 3px solid var(--pink);
  backdrop-filter: blur(14px) saturate(0.8);
  -webkit-backdrop-filter: blur(14px) saturate(0.8);
  transition: opacity 0.55s ease, visibility 0.55s;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.panel::after {
  /* CRT scanlines over the panel */
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

.panel-hero {
  left: 50%;
  width: min(1200px, calc(100vw - 32px));
  transform: translate(-50%, calc(-50% + var(--dy)));
  text-align: center;
  background: none;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  clip-path: none;
}
.panel-hero::after {
  /* Dark pool behind the title so it reads against the haze */
  inset: -18% -12%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(2, 5, 7, 0.7), rgba(2, 5, 7, 0));
}

.kicker {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--lilac);
}
.kicker b {
  display: inline-block;
  min-width: 34px;
  margin-right: 10px;
  padding: 2px 8px;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  background: var(--lilac);
}

h1,
h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.02;
}
h1 {
  font-size: clamp(34px, 6.6vw, 100px);
  letter-spacing: 0.02em;
  text-shadow: 0 0 34px rgba(250, 189, 249, 0.45);
}
h2 {
  font-size: clamp(18px, 2.1vw, 24px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.04em;
}
.lede {
  margin: 18px 0 0;
  font-size: clamp(13px, 1.3vw, 16px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fdeffc;
}

.tiles {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 38px 0 0;
}
.tiles div {
  min-width: 190px;
  padding: 12px 16px;
  text-align: left;
  background: rgba(3, 7, 9, 0.6);
  border: 1px solid var(--pink-dim);
  border-top: 2px solid var(--pink);
}
.tiles dt {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lilac);
}
.tiles dd {
  margin: 4px 0 0;
  font-family: var(--crt);
  font-size: 40px;
  line-height: 1;
  text-shadow: var(--glow);
}
.hint {
  margin: 36px 0 0;
  font-size: 11px;
  letter-spacing: 0.3em;
  animation: blink 1.6s steps(2) infinite;
}
@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

.stat {
  margin: 16px 0 0;
  font-family: var(--crt);
  font-size: clamp(64px, 8vw, 104px);
  line-height: 0.85;
  color: var(--lilac);
  text-shadow: 0 0 18px rgba(169, 236, 230, 0.5);
}
.stat-l {
  margin: 6px 0 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.duo {
  display: flex;
  gap: 28px;
}

.screen {
  margin: 18px 0 0;
  padding: 14px;
  background: rgba(10, 22, 26, 0.7);
  border: 1px solid var(--pink-faint);
}
.cap {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: #c9e9e6;
}
.note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #c9e9e6;
}
.note b {
  color: var(--lilac);
}

.readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.readout span {
  display: block;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--lilac);
}
.readout b {
  font-family: var(--crt);
  font-weight: 400;
  font-size: 36px;
  line-height: 1;
  text-shadow: var(--glow);
}
.dial {
  display: block;
  margin-top: 14px;
}
.dial span {
  display: block;
  margin-bottom: 6px;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--lilac);
}
.dial input {
  width: 100%;
  accent-color: var(--pink);
}

.toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 14px;
}
.toggle button {
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--pink);
  background: none;
  border: 1px solid var(--pink-dim);
  padding: 6px 10px;
  cursor: pointer;
}
.toggle button[aria-pressed='true'] {
  background: var(--pink);
  color: #200039;
}
.toggle button:focus-visible {
  outline: 1px solid var(--lilac);
  outline-offset: 2px;
}

.bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  margin-top: 10px;
  font-size: 11px;
  text-transform: uppercase;
}
.bar .bv {
  font-family: var(--crt);
  font-size: 20px;
  line-height: 0.8;
  color: var(--lilac);
}
.bar .bt {
  grid-column: 1 / -1;
  height: 8px;
  background: var(--pink-faint);
}
.bar .bt i {
  display: block;
  height: 100%;
  background: var(--pink);
  box-shadow: var(--glow);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pair {
  margin-top: 12px;
  font-size: 11px;
  text-transform: uppercase;
}
.pair:first-child {
  margin-top: 0;
}
.pair .row {
  display: grid;
  grid-template-columns: 44px 1fr 70px;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.pair .bt {
  height: 8px;
  background: var(--pink-faint);
}
.pair .bt i {
  display: block;
  height: 100%;
  background: var(--pink-dim);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pair .now .bt i {
  background: var(--lilac);
  box-shadow: 0 0 12px rgba(169, 236, 230, 0.6);
}
.pair .v {
  font-family: var(--crt);
  font-size: 20px;
  text-align: right;
}

/* Labels projected from the 3D scene */
.ticks {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}
.tick {
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--crt);
  font-size: 18px;
  white-space: nowrap;
  color: var(--pink);
  text-shadow: var(--glow);
  will-change: transform;
}
.tick-sel {
  color: var(--lilac);
  font-size: 24px;
}

/* ---------- Chapter menu ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  background: rgba(2, 5, 7, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s, visibility 0.45s;
}
.menu-open .menu {
  opacity: 1;
  visibility: visible;
}
.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.menu li a {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.14em 16px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 4.4vw, 60px);
  line-height: 1.12;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--pink);
  transition: opacity 0.3s, color 0.3s;
}
.menu ul:hover a:not(:hover) {
  opacity: 0.3;
}
.m-n,
.m-c {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--lilac);
}
.m-n {
  min-width: 3ch;
  margin-right: 18px;
  text-align: right;
}
.m-d,
.m-c {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  margin-left: 0;
  transition: max-width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), margin-left 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.4s;
}
.m-d {
  color: #fdeffc;
}
.menu li a:hover,
.menu li a:focus-visible {
  color: #ffffff;
  outline: none;
  text-shadow: 0 0 26px rgba(250, 189, 249, 0.7);
}
.menu li a:hover .m-d,
.menu li a:focus-visible .m-d,
.menu li a:hover .m-c,
.menu li a:focus-visible .m-c {
  max-width: 34ch;
  margin-left: 18px;
  opacity: 1;
}
.m-home {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pink);
}

/* Hard cut between chapters */
.cut {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.cutting .cut {
  opacity: 1;
}
.cut span {
  font-family: var(--display);
  font-weight: 700;
  font-size: min(46vw, 60vh);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--pink);
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-content: center;
  gap: 8px;
  background: #000;
  text-align: center;
  font-family: var(--crt);
  font-size: 22px;
  transition: opacity 0.9s, visibility 0.9s;
}
.boot p {
  margin: 0;
}
.boot-n {
  font-size: 72px;
  text-shadow: var(--glow);
}
.ready .boot {
  opacity: 0;
  visibility: hidden;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 760px) {
  .panel:not(.panel-hero) {
    top: auto;
    bottom: 104px;
    left: 12px;
    width: calc(100vw - 24px);
    max-height: 56vh;
    overflow: auto;
    padding: 16px 16px 14px;
    transform: translateY(var(--dy));
  }
  .stat {
    font-size: 56px;
  }
  .tiles div {
    min-width: 0;
    flex: 1 1 140px;
  }
  .tiles dd {
    font-size: 30px;
  }
  .hud-note,
  .rail,
  .chip-ghost {
    display: none;
  }
  .m-d,
  .m-c {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hint {
    animation: none;
  }
  .bar .bt i,
  .pair .bt i,
  .menu,
  .cut,
  .m-d,
  .m-c {
    transition: none;
  }
}

/* Panel content rises in, one line after another, when its chapter arrives */
.panel > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.panel.is-on > * {
  opacity: 1;
  transform: none;
}
.panel.is-on > :nth-child(2) { transition-delay: 0.07s; }
.panel.is-on > :nth-child(3) { transition-delay: 0.14s; }
.panel.is-on > :nth-child(4) { transition-delay: 0.21s; }
.panel.is-on > :nth-child(5) { transition-delay: 0.28s; }
.panel.is-on > :nth-child(6) { transition-delay: 0.35s; }

.tick-place {
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.tick-place b {
  display: block;
  font-weight: 400;
  font-size: 22px;
  line-height: 0.9;
  color: var(--pink);
}

@media (prefers-reduced-motion: reduce) {
  .panel > * {
    transition: none;
  }
}


/* ------------------------------------------------------------------ */
/* Interface, second pass: big numbers, thin lines, outlines, a worn glow */
/* ------------------------------------------------------------------ */

.dip {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s linear;
}

.dipping .dip {
  opacity: 1;
}

.panel {
  left: clamp(20px, 4.4vw, 76px);
  width: min(600px, calc(100vw - 40px));
  padding: 0;
  background: none;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  clip-path: none;
}

.panel::after {
  display: none;
}

.panel-hero {
  left: 50%;
  width: min(1240px, calc(100vw - 40px));
}

.panel-hero::after {
  display: block;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--pink);
}

.kicker b {
  min-width: 0;
  margin: 0;
  padding: 2px 7px 1px;
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: #200039;
  background: var(--pink);
}

.kicker::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--pink-dim), transparent);
}

.panel-hero .kicker {
  justify-content: center;
}

.panel-hero .kicker::after {
  display: none;
}

h2 {
  max-width: 30ch;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.2em;
  color: #cdbfd0;
}

/* Outlined title: only the contour is lit. */
h1 {
  color: transparent;
  -webkit-text-stroke: 1.2px var(--pink);
  text-shadow: none;
  filter: drop-shadow(0 0 14px rgba(228, 120, 236, 0.45));
  letter-spacing: 0.04em;
}

/* The number is the page: big, lit, with a slight colour split and a flicker. */
.stat,
.tiles dd {
  margin: 10px 0 0 -0.04em;
  font-family: var(--crt);
  font-size: clamp(92px, 11.5vw, 184px);
  line-height: 0.78;
  letter-spacing: -0.01em;
  color: #fabdf9;
  text-shadow:
    0 0 18px rgba(228, 120, 236, 0.55),
    1.5px 0 0 rgba(90, 230, 220, 0.3),
    -1.5px 0 0 rgba(255, 70, 40, 0.28);
  animation: worn 7s steps(1) infinite;
}

@keyframes worn {
  0%,
  100% {
    opacity: 1;
    transform: none;
  }
  41% {
    opacity: 0.82;
  }
  42% {
    opacity: 1;
    transform: translateX(1px);
  }
  43% {
    transform: none;
  }
  78% {
    opacity: 0.9;
  }
  79% {
    opacity: 1;
  }
}

.stat-l {
  margin: 12px 0 0;
  font-size: 11px;
  letter-spacing: 0.26em;
  color: var(--pink);
}

.duo {
  gap: clamp(20px, 3vw, 48px);
}

.duo .stat {
  font-size: clamp(80px, 9.5vw, 156px);
}

/* A frame drawn with one hairline and a short heavy stroke, nothing filled. */
.screen {
  position: relative;
  margin: 26px 0 0;
  padding: 16px 0 0;
  max-width: 440px;
  background: none;
  border: 0;
  border-top: 1px solid var(--pink-dim);
}

.screen::before {
  content: '';
  position: absolute;
  left: 0;
  top: -2px;
  width: 92px;
  height: 3px;
  background: var(--pink);
  box-shadow: 0 0 10px rgba(228, 120, 236, 0.7);
}

.cap,
.note {
  max-width: 440px;
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: #b3a6b6;
}

.note b {
  color: var(--pink);
}

.readout b {
  font-size: 46px;
  color: var(--pink);
}

.readout span,
.dial span {
  color: #8f8493;
  letter-spacing: 0.22em;
}

.toggle {
  gap: 0;
}

.toggle button {
  margin-right: -1px;
  padding: 7px 12px;
  border: 1px solid var(--pink-dim);
  letter-spacing: 0.18em;
}

.toggle button[aria-pressed='true'] {
  position: relative;
  background: var(--pink);
  box-shadow: 0 0 14px rgba(228, 120, 236, 0.45);
}

/* Charts are outlines: an empty box, and hatching where the value is. */
.bar {
  margin-top: 12px;
  letter-spacing: 0.14em;
  color: #cdbfd0;
}

.bar .bv {
  font-size: 26px;
  color: var(--pink);
}

.bar .bt,
.pair .bt {
  height: 12px;
  background: none;
  border: 1px solid var(--pink-dim);
}

.bar .bt i,
.pair .bt i,
.pair .now .bt i {
  background: repeating-linear-gradient(90deg, var(--pink) 0 1px, transparent 1px 4px);
  border-right: 1px solid var(--pink);
  box-shadow: none;
}

.pair .bt i {
  opacity: 0.45;
}

.pair .now .bt i {
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(228, 120, 236, 0.8));
}

.pair .v {
  font-size: 26px;
  color: var(--pink);
}

.pair .row {
  grid-template-columns: 44px 1fr 92px;
}

/* Hero: three numbers, a hairline above each, no boxes. */
.tiles {
  gap: clamp(20px, 4vw, 64px);
  margin-top: 44px;
}

.tiles div {
  min-width: 0;
  padding: 12px 0 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--pink-dim);
  position: relative;
}

.tiles div::before {
  content: '';
  position: absolute;
  left: 0;
  top: -2px;
  width: 44px;
  height: 3px;
  background: var(--pink);
}

.tiles dt {
  color: #8f8493;
  letter-spacing: 0.24em;
}

.tiles dd {
  font-size: clamp(54px, 6.4vw, 104px);
  margin-top: 10px;
}

.lede {
  color: #cdbfd0;
  letter-spacing: 0.24em;
  font-size: 12px;
}

@media (max-width: 720px) {
  .stat {
    font-size: clamp(84px, 26vw, 140px);
  }
  .duo .stat {
    font-size: clamp(60px, 17vw, 96px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stat,
  .tiles dd {
    animation: none;
  }
}


/* The vertical filter: hairline tabs under the header. */
.filter {
  position: fixed;
  z-index: 16;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  width: max-content;
  max-width: calc(100vw - 420px);
  overflow-x: auto;
  scrollbar-width: none;
  opacity: 0;
  transition: opacity 0.6s ease 0.4s;
}

.ready .filter {
  opacity: 1;
}

.filter::-webkit-scrollbar {
  display: none;
}

.filter button {
  flex: none;
  margin-right: -1px;
  padding: 8px 13px 7px;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b3a6b6;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--pink-dim);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.filter button:hover {
  color: var(--pink);
}

.filter button[aria-pressed='true'] {
  color: #200039;
  background: var(--pink);
  box-shadow: 0 0 14px rgba(228, 120, 236, 0.45);
}

.filter button:focus-visible {
  outline: 1px solid var(--lilac);
  outline-offset: 2px;
}

.at-globe #gl,
.at-globe .stage {
  cursor: grab;
}

.grabbing,
.grabbing * {
  cursor: grabbing !important;
  user-select: none;
}

@media (max-width: 900px) {
  .filter {
    top: 58px;
    left: 0;
    transform: none;
    max-width: 100vw;
    padding: 0 16px;
  }
}


/* ------------------------------------------------------------------ */
/* Portrait screens: the scene on top, the words below it on black     */
/* ------------------------------------------------------------------ */

@media (max-aspect-ratio: 1/1) {
  body {
    background: #000;
  }

  .stage {
    bottom: auto;
    height: 58svh;
    background: #000;
  }

  /* No side shade here: the picture melts into the black the text sits on. */
  .stage::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, transparent 16%, transparent 52%, rgba(0, 0, 0, 0.82) 82%, #000 100%);
  }

  .ticks {
    bottom: auto;
    height: 58svh;
  }

  .filter {
    top: 56px;
    left: 0;
    transform: none;
    width: auto;
    max-width: 100vw;
    padding: 0 16px;
  }

  .panel,
  .panel-hero {
    left: 20px;
    right: 20px;
    top: auto;
    bottom: 66px;
    width: auto;
    transform: none;
    text-align: left;
  }

  .panel-hero::after {
    display: none;
  }

  .panel-hero .kicker {
    justify-content: flex-start;
  }

  h1 {
    font-size: clamp(30px, 9.4vw, 46px);
    -webkit-text-stroke-width: 1px;
  }

  h2 {
    font-size: 11px;
    letter-spacing: 0.16em;
  }

  .lede,
  .hint,
  .cap,
  .note {
    display: none;
  }

  .tiles {
    justify-content: flex-start;
    gap: 14px 22px;
    margin-top: 18px;
  }

  .tiles div {
    padding-top: 8px;
  }

  .tiles dt {
    font-size: 9px;
  }

  .tiles dd {
    font-size: clamp(34px, 10.4vw, 48px);
    margin-top: 6px;
  }

  .stat {
    margin-top: 8px;
    font-size: clamp(68px, 22vw, 100px);
  }

  .duo .stat {
    font-size: clamp(52px, 15vw, 70px);
  }

  .stat-l {
    margin-top: 8px;
    font-size: 10px;
    letter-spacing: 0.2em;
  }

  .screen {
    margin-top: 14px;
    padding-top: 12px;
    max-width: none;
  }

  .readout b {
    font-size: 30px;
  }

  .toggle {
    margin-bottom: 8px;
  }

  .toggle button {
    padding: 6px 9px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .bar {
    margin-top: 8px;
    font-size: 10px;
  }

  .bar .bv,
  .pair .v {
    font-size: 21px;
  }

  .bar .bt,
  .pair .bt {
    height: 9px;
  }

  .pair {
    margin-top: 8px;
    font-size: 10px;
  }

  .pair .row {
    margin-top: 4px;
  }

  .hud-note {
    display: none;
  }

  /* The globe chapter has the most rows: drop the sentence and ease the number down. */
  .panel[data-panel='5'] h2 {
    display: none;
  }

  .panel[data-panel='5'] .stat {
    font-size: clamp(52px, 16vw, 72px);
  }
}
