@import "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap";

/* ============================================================================
   AGLE — stage stylesheet

   The scroll runtime (source/app.js) writes a small set of custom properties
   onto <main class="story-page">:

     --fw --fh --fr      vessel width / height / corner radius, in px units
     --fit               uniform scale that keeps the vessel inside the stage
     --morph             0 at rest, 1 at the peak of a shape change
     --sheen --turn      specular sweep position, 3D turn direction
     --in-<panel>        how present each panel's content is (0..1)
     --fill-<panel>      how far through its dwell that scene has scrolled
     --sg --sga          extracted signals: emit / absorb
     --sc --scp --scr    source systems: emerge / prove / retract
     --sealed --verdict --meter --intro --atmosphere --progress

   Everything else — per-row unfolds, orbit trajectories, staggers — is derived
   from those with clamp() math, so a frame costs ~25 property writes and no
   React work.
   ========================================================================== */

:root {
  --blue: #2f80ed;
  --blue-deep: #124c86;
  --blue-ink: #082e55;
  --blue-light: #71b7ff;
  --blue-wash: #edf6ff;
  --pink: #ff4fa3;
  --pink-wash: #fff0f7;
  --green: #23b26d;
  --green-wash: #e8f7ef;
  --orange: #e79038;
  --paper: #f6f8fb;
  --ink: #111522;
  --ink-2: #2c3446;
  --grey: #697386;
  --grey-2: #969eac;
  --line: #dce2ea;
  --heading: "Manrope", sans-serif;
  --body: "Inter", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; background: #fff; }
body {
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  background: #fff;
  margin: 0;
  overflow-x: hidden;
}

.story-page { min-height: 100vh; }

/* ------------------------------------------------------------------- nav --- */

.story-nav {
  z-index: 100;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  background: #ffffffe6;
  border-bottom: 1px solid #dce2eab8;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  padding: 0 clamp(24px, 3.5vw, 56px);
  display: flex;
  position: fixed;
  top: 0; left: 0; right: 0;
}
.story-nav > img { object-fit: contain; width: 108px; height: 50px; }
.story-nav > small { letter-spacing: .17em; color: var(--grey); font-size: 8px; font-weight: 700; }
.nav-context {
  letter-spacing: .14em;
  align-items: center;
  gap: 9px;
  font-size: 8px;
  display: flex;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-context i {
  background: var(--green);
  border-radius: 50%;
  width: 6px; height: 6px;
  box-shadow: 0 0 0 5px #23b26d1a;
}
.nav-context span { color: var(--grey); }
.nav-context b { color: var(--ink-2); }

/* ----------------------------------------------------------------- stage --- */

.story-track { height: 1350vh; }

.story-stage {
  isolation: isolate;
  background: #fff;
  height: 100svh;
  /* Never taller than the viewport: a sticky stage that overflows pushes the
     rail off-screen and crops the frame. The runtime's --fit scale is what
     protects short viewports instead. */
  min-height: min(700px, 100svh);
  position: sticky;
  top: 0;
  overflow: hidden;
}

.stage-atmosphere,
.stage-grid,
.stage-vignette { pointer-events: none; position: absolute; inset: 0; }

.stage-atmosphere {
  z-index: 1;
  opacity: var(--atmosphere, 0);
  background:
    radial-gradient(circle at 50% 48%, #71b7ff47, #0000 32%),
    radial-gradient(circle, #2f80ed1f, #0000 62%),
    linear-gradient(145deg, #fff 0%, #f5faff 52%, #fff 100%);
}
.stage-grid {
  z-index: 2;
  opacity: calc(.022 + var(--atmosphere, 0) * .08);
  background-image:
    linear-gradient(#2f80ed2b 1px, #0000 1px),
    linear-gradient(90deg, #2f80ed2b 1px, #0000 1px);
  background-size: 50px 50px;
  -webkit-mask-image: radial-gradient(circle, #000 5%, #0000 72%);
  mask-image: radial-gradient(circle, #000 5%, #0000 72%);
  transform: translateY(calc(var(--progress, 0) * -60px));
}
.stage-vignette { z-index: 90; box-shadow: inset 0 0 130px #082e550b; }

/* A pressure ring that snaps outward every time the vessel changes shape. */
.stage-shockwave {
  pointer-events: none;
  position: absolute;
  top: calc(50% + 35px);
  left: 50%;
  width: min(66vmin, 640px);
  aspect-ratio: 1;
  border: 1px solid #2f80ed4d;
  border-radius: 50%;
  z-index: 3;
  transform: translate(-50%, -50%) scale(calc(.22 + var(--morph, 0) * 1.25));
  opacity: calc(var(--morph, 0) * (1 - var(--morph, 0)) * 2.4);
}

/* --------------------------------------------------------------- opening --- */

.opening-copy {
  z-index: 60;
  text-align: center;
  position: absolute;
  top: 12.5%;
  left: 50%;
  /* Anchored at left:50%, so without an explicit width it would only have half
     the stage to lay out in and would wrap early on narrow screens. */
  width: max-content;
  max-width: calc(100vw - 36px);
  opacity: var(--intro, 1);
  transform: translate3d(-50%, calc((1 - var(--intro, 1)) * -26px), 0);
  will-change: transform, opacity;
}
.opening-copy span { letter-spacing: .2em; color: var(--blue); font-size: 9px; font-weight: 700; }
.opening-copy h1 {
  font: 800 clamp(42px, 5.2vw, 78px)/1 var(--heading);
  letter-spacing: -.055em;
  margin: 7px 0 0;
}

/* ============================================================ the vessel === */
/* One object for the whole story. It never appears or disappears — it only
   changes shape, and the panels inside are revealed by that change.          */

.stage-core {
  position: absolute;
  inset: 70px 0 0;
  perspective: 1600px;
  perspective-origin: 50% 45%;
  z-index: 40;
  pointer-events: none;
  /* The frame's entrance is a mount animation, not a scroll position, so the
     hero is a complete scene the moment the page loads. */
  animation: 1s cubic-bezier(.22, .8, .24, 1) .06s both stageIn;
}

.case-vessel {
  /* Centred by transform rather than by grid alignment: a grid item taller
     than its area falls back to start-aligned, which threw the frame off
     centre on short viewports once --fit started scaling it down. */
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--fw, 600) * 1px);
  height: calc(var(--fh, 430) * 1px);
  border-radius: calc(var(--fr, 22) * 1px);
  background: #fff;
  border: 1px solid rgba(47, 128, 237, .22);
  overflow: hidden;
  transform:
    translate(-50%, -50%)
    scale(var(--fit, 1))
    rotateX(calc(var(--morph, 0) * -3.6deg))
    rotateY(calc(var(--morph, 0) * var(--turn, 1) * 3.2deg));
  /* The frame resizes every frame; containment keeps that relayout inside it
     instead of invalidating the rest of the stage. */
  contain: layout paint;
  box-shadow:
    0 calc(26px + var(--morph, 0) * 36px) calc(74px + var(--morph, 0) * 74px)
      rgba(18, 76, 134, calc(.15 + var(--morph, 0) * .15)),
    0 0 0 calc(var(--morph, 0) * 6px) rgba(47, 128, 237, calc(var(--morph, 0) * .07));
  will-change: transform;
}

/* Interior light source — brightens as the frame works. */
.vessel-aura {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 70% at 50% -10%, #71b7ff, #0000 62%);
  opacity: calc(.06 + var(--morph, 0) * .3);
}

/* Specular sweep, tracking the reshape. */
.vessel-sheen {
  position: absolute;
  inset: -20% -60%;
  z-index: 80;
  pointer-events: none;
  background: linear-gradient(102deg, #0000 38%, #ffffffde 50%, #0000 62%);
  opacity: calc(var(--morph, 0) * .85);
  transform: translateX(calc((var(--sheen, 0) * 150% - 75%)));
}

/* Accent ring that ignites during a change of state. */
.vessel-ring {
  position: absolute;
  inset: 0;
  z-index: 81;
  pointer-events: none;
  border: 1px solid rgba(47, 128, 237, calc(.12 + var(--morph, 0) * .55));
  border-radius: inherit;
}

/* ---------------------------------------------------------------- panels --- */

.vessel-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 20;
  pointer-events: none;
  opacity: var(--in, 0);
  transform: translate3d(-50%, -50%, 0) scale(calc(.955 + var(--in, 0) * .045));
  /* Quadratic falloff: content stays crisp through most of its dwell and only
     smears in the last moments before the frame reshapes. */
  filter: blur(calc((1 - var(--in, 0)) * (1 - var(--in, 0)) * 7px));
  will-change: opacity, transform, filter;
}

/* --panel-radius is read back by the runtime and becomes the frame's corner
   radius while that panel owns the stage. --in is the panel's presence, --fill
   is how far through its dwell the scroll has travelled. */
.panel-claim   { --in: var(--in-claim, 0);   --fill: var(--fill-claim, 0);   --panel-radius: 22; width: min(600px, 46vw); }
.panel-core    { --in: var(--in-core, 0);    --fill: var(--fill-core, 0);    --panel-radius: 28; width: 184px; height: 184px; }
.panel-terms   { --in: var(--in-terms, 0);   --fill: var(--fill-terms, 0);   --panel-radius: 16; width: min(700px, 58vw); }
.panel-replay  { --in: var(--in-replay, 0);  --fill: var(--fill-replay, 0);  --panel-radius: 16; width: min(1000px, 78vw); }
.panel-calc    { --in: var(--in-calc, 0);    --fill: var(--fill-calc, 0);    --panel-radius: 16; width: min(840px, 68vw); padding: 28px 30px 25px; }
.panel-decide  { --in: var(--in-decide, 0);  --fill: var(--fill-decide, 0);  --panel-radius: 16; width: min(780px, 62vw); padding: 28px; }
.panel-resolve { --in: var(--in-resolve, 0); --fill: var(--fill-resolve, 0); --panel-radius: 22; width: min(680px, 54vw); }

/* Every staggered child derives its own 0..1, so content unfolds on the way in
   and folds back on the way out.

   Two flavours. Panels whose job is to *show* something stagger off the
   panel's presence, arriving together as the frame settles. The evidence
   boards stagger off --fill instead: the frame opens empty and rows land one
   at a time as the scroll continues, so the ledger reads as it is being
   reconstructed rather than as a finished table fading up. Taking the min with
   --in means they still fold away when the panel leaves. */
.decision-seal,
.decision-actions > div,
.player-message,
.typing,
.resolution-message,
.resolution-tags span {
  --r: clamp(0, calc((var(--in, 0) - var(--i, 0) * .055) * 2.9), 1);
}

.terms-list > div,
.terms-note,
.bet-row,
.replay-seal,
.equation > div,
.equation-eq,
.equation-result,
.remaining-meter {
  --r: min(
    var(--in, 0),
    clamp(0, calc((var(--fill, 0) - var(--i, 0) * .132) * 3.7), 1)
  );
}

/* --------------------------------------------------------- panel: claim --- */

.chat-head {
  border-bottom: 1px solid var(--line);
  align-items: center;
  gap: 11px;
  height: 66px;
  padding: 0 21px;
  display: flex;
}
.chat-avatar {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  color: #fff;
  width: 35px; height: 35px;
  font: 800 13px var(--heading);
  border-radius: 50%;
  place-items: center;
  display: grid;
}
.chat-head > div:nth-child(2) { flex-direction: column; gap: 3px; display: flex; }
.chat-head b { letter-spacing: .04em; font-size: 10px; }
.chat-head span { letter-spacing: .1em; color: var(--grey); font-size: 7px; }
.chat-head > i {
  background: var(--green);
  border-radius: 50%;
  width: 7px; height: 7px;
  margin-left: auto;
  box-shadow: 0 0 0 5px #23b26d1a;
}
.chat-body {
  background: linear-gradient(#fbfcfe, #f4f8fc);
  flex-direction: column;
  align-items: flex-end;
  min-height: 292px;
  padding: 42px 25px 27px;
  display: flex;
}
.player-message {
  background: var(--blue);
  color: #fff;
  border-radius: 16px 16px 4px;
  max-width: 88%;
  padding: 16px 18px;
  font-size: 12px;
  line-height: 1.7;
  box-shadow: 0 14px 30px #2f80ed2e;
  opacity: var(--r, 1);
  transform: translateY(calc((1 - var(--r, 1)) * 16px));
}
.player-message time,
.resolution-message time { opacity: .6; margin-top: 8px; font-size: 7px; display: block; }
.typing {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px 14px 14px 4px;
  align-self: flex-start;
  gap: 4px;
  margin-top: 20px;
  padding: 12px 14px;
  display: flex;
  opacity: var(--r, 1);
  transform: translateY(calc((1 - var(--r, 1)) * 12px));
}
.typing i {
  background: var(--grey-2);
  border-radius: 50%;
  width: 4px; height: 4px;
  animation: 1.2s ease-in-out infinite typing;
}
.typing i:nth-child(2) { animation-delay: .14s; }
.typing i:nth-child(3) { animation-delay: .28s; }
.chat-foot {
  height: 47px;
  color: var(--grey-2);
  letter-spacing: .05em;
  place-items: center;
  font-size: 8px;
  display: grid;
}

/* ---------------------------------------------------------- panel: core --- */

.panel-core {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  display: flex;
  /* The seal's inner wash ring. It sits on the panel rather than the shared
     frame, so it only shows while the seal owns the stage; matching the
     frame's radius keeps the two edges concentric. */
  border-radius: calc(var(--panel-radius) * 1px);
  box-shadow: inset 0 0 0 7px var(--blue-wash);
}
.panel-core > span {
  letter-spacing: .16em;
  color: var(--grey);
  font-size: 6px;
  font-weight: 700;
  position: absolute;
  top: 18px;
}
.core-mark img { object-fit: contain; width: 98px; height: 53px; }
.panel-core > b { letter-spacing: .11em; margin-top: -4px; font-size: 8px; }
.panel-core > small {
  letter-spacing: .12em;
  color: var(--blue);
  font-size: 6px;
  font-weight: 700;
  position: absolute;
  bottom: 18px;
  left: 0; right: 0;
  height: 8px;
}
.core-state {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  align-items: center;
  gap: 6px;
  display: flex;
  white-space: nowrap;
  font-style: normal;
}
.core-state i {
  background: var(--green);
  border-radius: 50%;
  width: 5px; height: 5px;
  flex: none;
  box-shadow: 0 0 8px #23b26d8c;
}
.core-state-a { opacity: calc(1 - var(--sealed, 0)); }
.core-state-b { opacity: var(--sealed, 0); }

/* --------------------------------------------------------- orbiting set --- */

.stage-orbit {
  position: absolute;
  inset: 70px 0 0;
  pointer-events: none;
  /* Orbit spread. Narrow viewports push the ring wider so the cards, which
     shrink less than the viewport does, stop colliding. */
  --sx: 1vw;
  --sy: 1vh;
}
/* Extracted signals fly out over the frame; source systems sit behind it. */
.stage-signals { z-index: 50; }
.stage-sources { z-index: 30; }

.extracted-signal {
  --t: clamp(0, calc((var(--sg, 0) - var(--i, 0) * .075) * 2.6), 1);
  --k: calc(var(--t) * (1 - var(--sga, 0)));
  position: absolute;
  top: 52%; left: 50%;
  width: 172px;
  background: #fffffff5;
  border: 1px solid #2f80ed38;
  border-radius: 9px;
  padding: 13px 15px;
  box-shadow: 0 16px 35px #124c861f;
  opacity: var(--k);
  transform:
    translate3d(
      calc(-50% + var(--x, 0) * var(--k) * var(--sx)),
      calc(-50% + var(--y, 0) * var(--k) * var(--sy)),
      0
    )
    scale(calc(.72 + var(--t) * .28 - var(--sga, 0) * .42));
  will-change: transform, opacity;
}
.extracted-signal:before {
  content: "";
  background: var(--blue);
  width: 2px;
  position: absolute;
  top: 10px; bottom: 10px; left: -1px;
}
.extracted-signal small {
  letter-spacing: .15em;
  color: var(--grey-2);
  font-size: 6px;
  font-weight: 700;
  display: block;
}
.extracted-signal b { color: var(--ink-2); margin-top: 5px; font-size: 10px; display: block; }

.source-unit {
  --t: clamp(0, calc((var(--sc, 0) - var(--i, 0) * .045) * 2.4), 1);
  --pf: clamp(0, calc((var(--scp, 0) - var(--i, 0) * .035) * 2.4), 1);
  --k: calc(var(--t) * (1 - var(--scr, 0)));
  position: absolute;
  top: 50%; left: 50%;
}
.source-connector {
  position: absolute;
  top: 0; left: 0;
  width: var(--length);
  height: 1px;
  transform-origin: 0 50%;
  transform: rotate(var(--angle)) scaleX(var(--k));
  opacity: calc(var(--k) * .9);
  background: linear-gradient(90deg, #2f80ed1a, #2f80ed7a);
}
.source-connector i {
  background: var(--blue);
  border-radius: 50%;
  width: 7px; height: 7px;
  position: absolute;
  top: -3px; right: -3px;
  box-shadow: 0 0 12px #2f80eda6;
}
.source-node {
  position: absolute;
  top: 0; left: 0;
  width: 130px; height: 74px;
  margin: -37px 0 0 -65px;
  background: #fffffff5;
  border: 1px solid rgba(47, 128, 237, calc(.18 - var(--pf) * .04));
  border-radius: 9px;
  padding: 12px 14px;
  box-shadow: 0 15px 34px #124c861c;
  opacity: var(--k);
  transform:
    translate3d(calc(var(--x, 0) * var(--k) * var(--sx)), calc(var(--y, 0) * var(--k) * var(--sy)), 0)
    scale(calc(.82 + var(--t) * .18 - var(--scr, 0) * .35));
  will-change: transform, opacity;
}
.source-node > b { font: 800 11px var(--heading); color: var(--blue-deep); display: block; }
.source-node > small { letter-spacing: .12em; color: var(--grey); margin-top: 3px; font-size: 5px; display: block; }
.source-node > span {
  color: #167749;
  white-space: nowrap;
  align-items: center;
  gap: 5px;
  font-size: 6px;
  font-weight: 700;
  display: flex;
  position: absolute;
  bottom: 10px; left: 13px; right: 10px;
  opacity: var(--pf);
}
.source-node > span i { background: var(--green); border-radius: 50%; width: 5px; height: 5px; }

/* --------------------------------------------------------- panel: terms --- */

.board-head {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#fff, #f7f9fc);
  justify-content: space-between;
  align-items: center;
  height: 61px;
  padding: 0 20px;
  display: flex;
}
.board-head > div { flex-direction: column; gap: 4px; display: flex; }
.board-head span { letter-spacing: .15em; color: var(--blue); font-size: 6px; font-weight: 700; }
.board-head b { font: 800 12px var(--heading); }
.board-head > strong { letter-spacing: .1em; color: var(--grey); font-size: 6px; }

.terms-list { padding: 8px 0; }
.terms-list > div {
  height: 53px;
  border-bottom: 1px solid #edf0f4;
  grid-template-columns: 185px 1fr 24px;
  align-items: center;
  padding: 0 20px;
  display: grid;
  opacity: var(--r);
  transform-origin: 50% 0;
  transform:
    perspective(700px)
    rotateX(calc((1 - var(--r)) * -34deg))
    translateY(calc((1 - var(--r)) * 12px));
}
.terms-list small { letter-spacing: .08em; color: var(--grey); font-size: 7px; font-weight: 700; }
.terms-list b { color: var(--ink-2); font-size: 9px; }
.terms-list i {
  background: var(--green-wash);
  color: #167749;
  border-radius: 50%;
  place-items: center;
  width: 18px; height: 18px;
  font-size: 7px;
  font-style: normal;
  display: grid;
  opacity: var(--r);
  transform: scale(calc(.4 + var(--r) * .6));
}
.terms-note {
  background: var(--blue-wash);
  height: 45px;
  color: var(--blue-deep);
  align-items: center;
  gap: 9px;
  padding: 0 20px;
  font-size: 7px;
  font-weight: 600;
  display: flex;
  opacity: var(--r);
}
.terms-note i { background: var(--pink); border-radius: 50%; width: 6px; height: 6px; }

/* -------------------------------------------------------- panel: replay --- */

.replay-head { height: 58px; }
.replay-columns,
.bet-row {
  grid-template-columns: 90px 1.2fr 1.65fr 70px 76px;
  align-items: center;
  column-gap: 14px;
  display: grid;
}
.replay-columns {
  background: var(--paper);
  letter-spacing: .11em;
  height: 30px;
  color: var(--grey);
  padding: 0 18px;
  font-size: 6px;
  font-weight: 700;
}
.bet-row {
  border-top: 1px solid #edf0f4;
  min-height: 61px;
  padding: 0 18px;
  position: relative;
  opacity: var(--r);
  transform-origin: 0 50%;
  transform: translateX(calc((1 - var(--r)) * -26px));
}
.bet-row > b { color: var(--blue); font-size: 8px; }
.bet-row > span { color: var(--ink-2); font-size: 8px; font-weight: 700; }
.bet-row > small { color: var(--grey); font-size: 7px; line-height: 1.45; }
.bet-row > strong { font-size: 9px; }
.bet-row > em {
  background: var(--green-wash);
  color: #167749;
  letter-spacing: .07em;
  border-radius: 4px;
  justify-self: end;
  padding: 5px 7px;
  font-size: 6px;
  font-style: normal;
  font-weight: 700;
}
.bet-fail > em,
.bet-odds > em { background: var(--pink-wash); color: #a62f68; }
.bet-odds { align-content: center; min-height: 118px; padding-top: 8px; padding-bottom: 8px; }
.odds-proof {
  background: var(--blue-wash);
  border: 1px solid #2f80ed29;
  border-radius: 6px;
  grid-column: 2 / -1;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin-top: 9px;
  padding: 0 11px;
  display: flex;
}
.odds-proof span { letter-spacing: .08em; color: var(--blue-deep); font-size: 6px; font-weight: 700; }
.odds-proof b { color: #a62f68; font-size: 8px; }
.odds-proof b.boosted { color: var(--blue); }
.odds-proof i { color: var(--grey); font-size: 8px; font-style: normal; }
.odds-proof small { color: var(--grey); font-size: 6px; }
.odds-proof strong { letter-spacing: .07em; color: #a62f68; margin-left: auto; font-size: 6px; }
.replay-seal {
  height: 42px;
  color: var(--grey);
  background: #f8fafc;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  font-size: 6px;
  font-weight: 600;
  display: flex;
  opacity: var(--r);
}
.replay-seal span:before { content: "✓"; color: var(--green); margin-right: 6px; }
.replay-seal b { color: #167749; letter-spacing: .07em; margin-left: auto; }

/* ---------------------------------------------------------- panel: calc --- */

.calculation-label { text-align: center; letter-spacing: .18em; color: var(--blue); font-size: 7px; font-weight: 700; }
.equation { justify-content: center; align-items: center; gap: 12px; margin-top: 24px; display: flex; }
.equation > div {
  border: 1px solid var(--line);
  min-width: 102px;
  background: #fff;
  border-radius: 8px;
  padding: 15px 13px;
  position: relative;
  opacity: var(--r);
  transform: translateY(calc((1 - var(--r)) * 14px)) scale(calc(.9 + var(--r) * .1));
}
.equation > div > i {
  font: 700 18px var(--heading);
  color: var(--pink);
  font-style: normal;
  position: absolute;
  top: 50%; left: -18px;
  transform: translateY(-50%);
}
.equation small { letter-spacing: .1em; color: var(--grey); font-size: 6px; font-weight: 700; display: block; }
.equation b { font: 800 17px var(--heading); margin-top: 5px; display: block; }
.equation .equation-eq { font: 700 18px var(--heading); color: var(--blue); opacity: var(--r); }
.equation .equation-result {
  border-color: var(--blue);
  background: var(--blue-wash);
  min-width: 122px;
  box-shadow: 0 0 0 calc(var(--r) * 5px) rgba(47, 128, 237, .07);
}
.equation-result b { color: var(--blue); font-variant-numeric: tabular-nums; }
.remaining-meter {
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 13px;
  margin-top: 25px;
  display: grid;
  opacity: var(--r);
}
.remaining-meter > div { background: #e7ebf1; border-radius: 5px; height: 5px; overflow: hidden; }
.remaining-meter > div span {
  background: linear-gradient(90deg, var(--blue-deep), var(--blue), var(--blue-light));
  border-radius: 5px;
  height: 100%;
  display: block;
  width: calc(var(--meter, 0) * 1%);
}
.remaining-meter small { color: var(--grey); font-size: 6px; font-weight: 700; }
.remaining-meter b { color: #a62f68; font-size: 8px; font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------- panel: decide --- */

.decision-seal {
  background: radial-gradient(circle, #fff 52%, var(--blue-wash));
  border: 1px solid #2f80ed3d;
  border-radius: 50%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 220px; height: 220px;
  margin: 0 auto;
  display: flex;
  position: relative;
  box-shadow: 0 22px 55px #124c8626;
  opacity: var(--r);
  transform: scale(calc(.78 + var(--r) * .22)) rotate(calc((1 - var(--r)) * -8deg));
}
.decision-seal:before,
.decision-seal:after { content: ""; border: 1px dashed #2f80ed2b; border-radius: 50%; position: absolute; }
.decision-seal:before { inset: 13px; }
.decision-seal:after { inset: 31px; }
.decision-seal > i {
  background: var(--pink);
  border-radius: 50%;
  width: 8px; height: 8px;
  position: absolute;
  top: -4px;
  box-shadow: 0 0 14px #ff4fa380;
}
.decision-seal small,
.decision-seal b,
.decision-seal span { z-index: 2; position: relative; }
.decision-seal small { letter-spacing: .14em; color: var(--grey); font-size: 6px; }
.decision-seal b { font: 800 20px var(--heading); color: var(--blue); margin-top: 8px; }
.decision-seal span { color: #a62f68; margin-top: 4px; font-size: 6px; font-weight: 700; }
.decision-actions { grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 22px; display: grid; }
.decision-actions > div {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 14px;
  opacity: var(--r);
  transform: translateY(calc((1 - var(--r)) * 18px));
}
.decision-actions small { letter-spacing: .1em; color: var(--grey); font-size: 5px; font-weight: 700; }
.decision-actions b { color: var(--blue-deep); margin-top: 6px; font-size: 8px; display: block; }
.decision-actions span { color: var(--grey); margin-top: 4px; font-size: 6px; display: block; }

/* ------------------------------------------------------- panel: resolve --- */

.resolution-body { background: linear-gradient(#fbfcfe, #f4f8fc); min-height: 430px; padding: 30px 25px; }
.chat-head > strong {
  background: var(--green-wash);
  color: #167749;
  letter-spacing: .1em;
  border-radius: 40px;
  margin-left: auto;
  padding: 6px 9px;
  font-size: 6px;
}
.player-message.ghost { opacity: calc(var(--r, 1) * .56); max-width: 50%; margin-left: auto; padding: 10px 13px; font-size: 9px; }
.resolution-message {
  border: 1px solid var(--line);
  max-width: 92%;
  color: var(--ink-2);
  background: #fff;
  border-radius: 16px 16px 16px 4px;
  margin-top: 22px;
  padding: 17px 19px;
  font-size: 10px;
  line-height: 1.72;
  position: relative;
  box-shadow: 0 16px 38px #124c861a;
  opacity: var(--r);
  transform: translateY(calc((1 - var(--r)) * 20px));
}
.resolution-message:before {
  content: "";
  background: linear-gradient(var(--blue), var(--green));
  width: 2px;
  position: absolute;
  top: 13px; bottom: 13px; left: -1px;
}
.resolution-message b { color: var(--blue-deep); }
.resolution-tags { gap: 7px; margin-top: 20px; display: flex; }
.resolution-tags span {
  background: var(--green-wash);
  color: #167749;
  letter-spacing: .06em;
  border-radius: 40px;
  padding: 6px 8px;
  font-size: 6px;
  font-weight: 700;
  opacity: var(--r);
  transform: translateY(calc((1 - var(--r)) * 10px));
}

/* --------------------------------------------------------- stage chrome --- */

.stage-explainer {
  z-index: 85;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  width: min(390px, 30vw);
  animation: .45s both captionIn;
  display: grid;
  position: absolute;
  top: 94px;
  left: clamp(24px, 3.5vw, 56px);
}
.stage-explainer > span { letter-spacing: .16em; color: var(--blue); padding-top: 3px; font-size: 7px; font-weight: 700; }
.stage-explainer > div { border-left: 1px solid var(--line); padding-left: 14px; }
.stage-explainer b { font: 700 12px var(--heading); color: var(--ink-2); }
.stage-explainer p { color: var(--grey); margin: 5px 0 0; font-size: 8px; line-height: 1.55; }

.story-rail {
  z-index: 95;
  position: absolute;
  bottom: 20px;
  left: clamp(24px, 3.5vw, 56px);
  right: clamp(24px, 3.5vw, 56px);
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 9px 16px;
}
.rail-count {
  grid-row: 1 / 3;
  letter-spacing: .14em;
  color: var(--grey);
  font-size: 6px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rail-steps {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rail-step { display: flex; align-items: center; gap: 6px; }
.rail-step i {
  background: var(--line);
  border-radius: 50%;
  width: 5px; height: 5px;
  flex: none;
  transition: background .35s, box-shadow .35s, transform .35s;
}
.rail-step b {
  letter-spacing: .14em;
  color: var(--grey-2);
  font-size: 6px;
  font-weight: 700;
  transition: color .35s;
}
.rail-step.is-done i { background: var(--blue-light); }
.rail-step.is-done b { color: var(--grey); }
.rail-step.is-active i {
  background: var(--blue);
  transform: scale(1.35);
  box-shadow: 0 0 0 4px #2f80ed24;
}
.rail-step.is-active b { color: var(--ink-2); }
.rail-line { grid-column: 2; background: var(--line); height: 1px; overflow: hidden; }
.rail-line i {
  width: calc(var(--progress, 0) * 100%);
  background: linear-gradient(90deg, var(--blue-deep), var(--blue), var(--pink));
  height: 100%;
  display: block;
}

/* ================================================== long-form product page === */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity .9s cubic-bezier(.22, .8, .24, 1),
    transform .9s cubic-bezier(.22, .8, .24, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* Containers whose children carry the stagger stay put themselves. */
.systems-strip[data-reveal],
.architecture-stack[data-reveal],
.operating-model[data-reveal],
.value-grid[data-reveal] { opacity: 1; transform: none; }

.systems-strip > div,
.architecture-stack > div,
.operating-model article,
.value-grid article {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .8s cubic-bezier(.22, .8, .24, 1) calc(var(--i, 0) * 70ms),
    transform .8s cubic-bezier(.22, .8, .24, 1) calc(var(--i, 0) * 70ms),
    background .35s, color .35s, box-shadow .4s, border-color .4s;
}
.systems-strip.is-in > div,
.architecture-stack.is-in > div,
.operating-model.is-in article,
.value-grid.is-in article { opacity: 1; transform: none; }

.product-content { z-index: 96; border-top: 1px solid var(--line); background: #fff; position: relative; }
.product-wrap { width: min(1280px, 100% - 80px); margin: 0 auto; }
.product-problem,
.product-method { background: #fff; padding: clamp(110px, 12vw, 180px) 0; }

.section-index {
  letter-spacing: .17em;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(58px, 7vw, 96px);
  font-size: 8px;
  font-weight: 700;
  display: flex;
}
.section-index span {
  border: 1px solid var(--blue);
  width: 29px; height: 29px;
  color: var(--blue);
  border-radius: 50%;
  place-items: center;
  display: grid;
}
.section-index b { color: var(--grey); }

.problem-heading { grid-template-columns: .78fr 1.22fr; align-items: start; gap: 7vw; display: grid; }
.product-kicker {
  font: 700 11px var(--heading);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 12px 0 0;
}
.problem-heading h2,
.layer-heading h2,
.method-heading h2,
.value-heading h2,
.product-close h2 {
  font: 800 clamp(48px, 6vw, 88px)/.98 var(--heading);
  letter-spacing: -.055em;
  margin: 0;
}
.problem-heading h2 { grid-column: 2; }

.systems-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(10, 1fr);
  margin-top: clamp(70px, 8vw, 112px);
  display: grid;
}
.systems-strip > div {
  border-right: 1px solid var(--line);
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  padding: 20px 12px;
  display: flex;
}
.systems-strip > div:first-child { border-left: 1px solid var(--line); }
.systems-strip > div:hover { background: var(--blue-wash); }
.systems-strip small { letter-spacing: .12em; color: var(--grey-2); font-size: 6px; }
.systems-strip b {
  font: 700 9px var(--heading);
  letter-spacing: -.01em;
  color: var(--ink-2);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.problem-statement {
  border-top: 1px solid var(--line);
  grid-template-columns: 1fr .72fr;
  align-items: end;
  gap: 10vw;
  margin-top: clamp(75px, 9vw, 130px);
  padding-top: clamp(50px, 6vw, 85px);
  display: grid;
}
.problem-statement h3 { font: 800 clamp(54px, 7vw, 105px)/.93 var(--heading); letter-spacing: -.06em; margin: 0; }
.problem-statement h3 em { color: var(--pink); font-style: normal; }
.problem-statement p { color: var(--grey); margin: 0 0 8px; font-size: clamp(15px, 1.35vw, 19px); line-height: 1.75; }

.product-layer {
  background:
    radial-gradient(70% 80% at 85% 12%, #71b7ff52, transparent 55%),
    linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 58%, var(--blue-light) 120%);
  color: #fff;
  padding: clamp(110px, 12vw, 180px) 0;
}
.light-index span { color: #fff; border-color: #ffffff8c; }
.light-index b { color: #ffffffb3; }
.layer-heading { grid-template-columns: 1.25fr .55fr; align-items: end; gap: 10vw; display: grid; }
.layer-heading h2 { max-width: 900px; }
.layer-heading p { color: #ffffffc2; margin: 0 0 8px; font-size: 15px; line-height: 1.75; }

.architecture-stack {
  border: 1px solid #ffffff42;
  margin-top: clamp(70px, 8vw, 110px);
  box-shadow: 0 30px 90px #082e5538;
}
.architecture-stack > div {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: #ffffff0f;
  border-bottom: 1px solid #ffffff36;
  grid-template-columns: 150px 1fr auto;
  align-items: center;
  min-height: 112px;
  padding: 0 clamp(24px, 3.5vw, 52px);
  display: grid;
}
.architecture-stack > div:last-child { border-bottom: 0; }
.architecture-stack span { font: 700 9px var(--heading); letter-spacing: .15em; color: #ffffffad; }
.architecture-stack b { font: 600 clamp(13px, 1.35vw, 18px) var(--heading); letter-spacing: -.02em; }
.architecture-stack small { letter-spacing: .14em; color: #ffffff94; font-size: 6px; font-weight: 700; }
.architecture-stack .agle-layer {
  min-height: 136px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 20px 55px #082e5538;
}
.architecture-stack .agle-layer span,
.architecture-stack .agle-layer small { color: var(--blue); }
.architecture-stack .agle-layer b { font-size: clamp(15px, 1.65vw, 22px); }

.method-heading { grid-template-columns: 1fr .56fr; align-items: end; gap: 10vw; display: grid; }
.method-heading h2 em { color: var(--blue); font-style: normal; }
.method-heading p { color: var(--grey); margin: 0 0 8px; font-size: 15px; line-height: 1.75; }

.operating-model {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(80px, 9vw, 130px);
  display: grid;
}
.operating-model article {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  min-height: 320px;
  padding: 32px clamp(26px, 3vw, 42px);
  position: relative;
}
.operating-model.is-in article:hover {
  z-index: 2;
  border-color: #2f80ed59;
  transform: translateY(-7px);
  box-shadow: 0 28px 65px #124c861f;
}
.operating-model article > div { justify-content: space-between; align-items: center; display: flex; }
.operating-model article > div span { letter-spacing: .12em; color: var(--grey-2); font-size: 7px; font-weight: 700; }
.operating-model article > div b { letter-spacing: .14em; text-transform: uppercase; color: var(--blue); font-size: 8px; }
.operating-model h3 { font: 800 clamp(24px, 2.3vw, 34px)/1.08 var(--heading); letter-spacing: -.045em; margin: 75px 0 0; }
.operating-model p { color: var(--grey); margin: 22px 0 0; font-size: 12px; line-height: 1.72; }

.product-value { border-top: 1px solid var(--line); background: #f5f9fe; padding: clamp(110px, 12vw, 180px) 0; }
.value-index span { border-color: var(--pink); color: var(--pink); }
.value-heading { grid-template-columns: 1.25fr .5fr; align-items: end; gap: 10vw; display: grid; }
.value-heading h2 { max-width: 920px; }
.value-heading p { color: var(--grey); margin: 0 0 8px; font-size: 15px; line-height: 1.75; }
.value-grid {
  border: 1px solid var(--line);
  background: #fff;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(75px, 8vw, 115px);
  display: grid;
}
.value-grid article {
  border-right: 1px solid var(--line);
  flex-direction: column;
  min-height: 370px;
  padding: 34px clamp(28px, 3.3vw, 48px);
  display: flex;
}
.value-grid article:last-child { border-right: 0; }
.value-grid span { letter-spacing: .14em; color: var(--blue); font-size: 7px; font-weight: 700; }
.value-grid h3 {
  font: 800 clamp(46px, 5vw, 72px)/1 var(--heading);
  letter-spacing: -.055em;
  color: var(--blue-deep);
  margin: auto 0 20px;
}
.value-grid article:nth-child(2) h3 { color: var(--blue); }
.value-grid article:nth-child(3) h3 { color: var(--pink); }
.value-grid p { color: var(--grey); margin: 0; font-size: 12px; line-height: 1.7; }

.product-close {
  text-align: center;
  background: #fff;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 90vh;
  padding: 130px 30px 70px;
  display: flex;
}
.close-mark { width: 120px; height: 66px; }
.close-mark img { object-fit: contain; width: 100%; height: 100%; }
.product-close > p { letter-spacing: .2em; color: var(--blue); margin: 18px 0 42px; font-size: 8px; font-weight: 700; }
.product-close h2 { font-size: clamp(52px, 7vw, 104px); }
.product-close > a {
  border-bottom: 1px solid var(--blue);
  color: var(--blue);
  letter-spacing: .13em;
  text-transform: uppercase;
  align-items: center;
  gap: 30px;
  margin-top: 55px;
  padding: 0 0 11px;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
}
.product-close > a span { font-size: 16px; transition: transform .3s; }
.product-close > a:hover span { transform: translateY(-4px); }
.product-close > small { letter-spacing: .18em; color: var(--grey-2); margin-top: auto; padding-top: 100px; font-size: 7px; font-weight: 700; }

.accessible-summary {
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  width: 1px; height: 1px;
  margin: -1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
}

/* ------------------------------------------------------------- keyframes --- */

@keyframes typing { 50% { opacity: .25; transform: translateY(-2px); } }
@keyframes stageIn {
  0% { opacity: 0; transform: translateY(24px) scale(.965); }
  to { opacity: 1; transform: none; }
}
@keyframes captionIn {
  0% { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ responsive --- */

@media (width <= 1100px) {
  .stage-explainer { width: 270px; }
  .source-node { width: 112px; margin-left: -56px; }
  .panel-replay { width: 88vw; }
  .panel-terms { width: 68vw; }
  .panel-calc { width: 78vw; }
  .panel-decide { width: 72vw; }
  .panel-claim { width: 62vw; }
  .panel-resolve { width: 66vw; }
  .rail-step b { display: none; }
  .rail-steps { justify-content: flex-start; gap: 14px; }
}

@media (width <= 720px) {
  /* Mobile GPUs: drop the pure-overdraw depth cues and cut the per-frame blur
     and shadow work. The morph itself is unchanged. */
  .vessel-sheen,
  .stage-shockwave { display: none; }
  .vessel-panel { filter: blur(calc((1 - var(--in, 0)) * (1 - var(--in, 0)) * 3px)); }
  .case-vessel { box-shadow: 0 18px 44px rgba(18, 76, 134, .17); }
  .story-nav {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #fffffff5;
  }

  .story-nav { height: 60px; padding: 0 18px; }
  .story-nav > img { width: 88px; }
  .story-nav > small,
  .nav-context { display: none; }

  .story-track { height: 1200vh; }
  .story-stage { min-height: min(690px, 100svh); }
  .stage-core,
  .stage-orbit { inset: 60px 0 0; }

  .stage-explainer { grid-template-columns: 62px 1fr; width: calc(100vw - 36px); top: 76px; left: 18px; }
  .stage-explainer p { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }

  .opening-copy { top: 16%; }
  .opening-copy span { font-size: 6px; }
  .opening-copy h1 { font-size: 45px; }

  .panel-claim { width: 90vw; }
  .chat-body { min-height: 300px; }
  .player-message { font-size: 10px; }

  .extracted-signal { width: 112px; padding: 9px; }
  .extracted-signal small { font-size: 5px; }
  .extracted-signal b { font-size: 7px; }

  .panel-core { --panel-radius: 22; width: 142px; height: 142px; }
  .core-mark img { width: 80px; }
  .panel-core > span { top: 12px; }
  .panel-core > small { bottom: 12px; }

  /* Horizontal spread is already at the edge of a phone; separate the ring
     vertically instead so neighbouring cards clear each other. */
  .stage-orbit { --sy: 1.1vh; }
  .source-node {
    width: 74px; height: 56px;
    padding: 8px;
    margin: -28px 0 0 -37px;
  }
  .source-node > b { font-size: 8px; }
  .source-node > small { font-size: 4px; }
  .source-node > span { font-size: 4px; bottom: 8px; left: 9px; }
  .source-connector { opacity: calc(var(--k) * .55); }

  .panel-terms { width: 92vw; }
  .board-head { padding: 0 13px; }
  .board-head > strong { display: none; }
  .terms-list > div { grid-template-columns: 120px 1fr 20px; padding: 0 13px; }
  .terms-list small { font-size: 5px; }
  .terms-list b { font-size: 7px; }
  .terms-note { padding: 0 13px; font-size: 6px; }

  .panel-replay { width: 95vw; }
  .replay-head { padding: 0 12px; }
  .replay-columns,
  .bet-row { grid-template-columns: 57px 1fr 55px 55px; column-gap: 7px; }
  .replay-columns { padding: 0 10px; }
  .replay-columns span:nth-child(3) { display: none; }
  .bet-row { min-height: 64px; padding: 0 10px; }
  .bet-row > small { display: none; }
  .bet-row > b,
  .bet-row > span { font-size: 6px; }
  .bet-row > strong { font-size: 7px; }
  .bet-row > em { padding: 4px; font-size: 5px; }
  .bet-odds { min-height: 118px; }
  .odds-proof { grid-column: 2 / -1; gap: 6px; padding: 0 7px; }
  .odds-proof span,
  .odds-proof small { display: none; }
  .odds-proof strong { font-size: 5px; }
  .replay-seal { gap: 8px; padding: 0 10px; }
  .replay-seal span { font-size: 5px; }
  .replay-seal b { display: none; }

  .panel-calc { width: 94vw; padding: 23px 14px; }
  .equation { gap: 5px; }
  .equation > div { min-width: 59px; padding: 11px 7px; }
  .equation > div > i { font-size: 12px; left: -9px; }
  .equation small { font-size: 4px; }
  .equation b { font-size: 10px; }
  .equation .equation-result { min-width: 68px; }
  .remaining-meter { grid-template-columns: 1fr auto; gap: 8px; }
  .remaining-meter small { display: none; }

  .panel-decide { width: 92vw; padding: 20px; }
  .decision-seal { width: 190px; height: 190px; }
  .decision-actions { gap: 5px; }
  .decision-actions > div { padding: 9px; }
  .decision-actions span { display: none; }

  .panel-resolve { width: 92vw; }
  .resolution-body { min-height: 440px; padding: 25px 18px; }
  .resolution-message { max-width: 96%; font-size: 9px; }
  .resolution-tags { gap: 4px; }
  .resolution-tags span { padding: 5px; font-size: 5px; }

  .story-rail { left: 18px; right: 18px; grid-template-columns: 40px 1fr; }
  .rail-steps { gap: 10px; }

  .product-wrap { width: calc(100% - 36px); }
  .product-problem,
  .product-method,
  .product-layer,
  .product-value { padding: 90px 0; }
  .section-index { margin-bottom: 52px; }
  .problem-heading,
  .layer-heading,
  .method-heading,
  .value-heading,
  .problem-statement { grid-template-columns: 1fr; gap: 28px; }
  .problem-heading h2 { grid-column: auto; }
  .problem-heading h2,
  .layer-heading h2,
  .method-heading h2,
  .value-heading h2 { font-size: 44px; }
  .systems-strip { grid-template-columns: repeat(5, 1fr); }
  .systems-strip > div { border-bottom: 1px solid var(--line); min-height: 90px; }
  .problem-statement h3 { font-size: 56px; }
  .problem-statement p,
  .layer-heading p,
  .method-heading p,
  .value-heading p { font-size: 13px; }
  .architecture-stack > div { grid-template-columns: 82px 1fr; gap: 15px; min-height: 118px; padding: 20px; }
  .architecture-stack small { display: none; }
  .architecture-stack b { font-size: 11px; line-height: 1.6; }
  .operating-model { grid-template-columns: 1fr; }
  .operating-model article { min-height: 250px; }
  .operating-model h3 { margin-top: 55px; }
  .value-grid { grid-template-columns: 1fr; }
  .value-grid article { border-right: 0; border-bottom: 1px solid var(--line); min-height: 280px; }
  .value-grid article:last-child { border-bottom: 0; }
  .value-grid h3 { font-size: 54px; }
  .product-close { min-height: 80vh; padding: 100px 20px 55px; }
  .product-close h2 { font-size: 49px; }
}

/* ------------------------------------------------------- short viewports --- */
/* Landscape phones and small laptops: reclaim vertical space so the frame,
   caption and rail all still fit. */

@media (height <= 640px) {
  .story-nav { height: 56px; }
  .story-nav > img { width: 92px; height: 42px; }
  .stage-core,
  .stage-orbit { inset: 56px 0 0; }
  .stage-explainer { top: 64px; grid-template-columns: 60px 1fr; width: min(320px, 30vw); }
  .stage-explainer p { display: none; }
  .opening-copy { top: 7%; }
  .opening-copy h1 { font-size: clamp(30px, 4vw, 44px); }
  .story-rail { bottom: 10px; }
  .story-stage { min-height: 100svh; }
}

/* --------------------------------------------------------- reduced motion --- */

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .story-track { height: 100vh; }
  .opening-copy,
  .stage-orbit,
  .stage-shockwave,
  .vessel-sheen,
  .story-rail,
  .stage-explainer { display: none; }

  .case-vessel {
    width: min(680px, 92vw) !important;
    height: auto !important;
    border-radius: 22px !important;
    transform: none !important;
  }
  .vessel-panel:not(.panel-resolve) { display: none; }
  .panel-resolve {
    --in: 1 !important;
    position: static !important;
    width: 100% !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto;
  }
  .panel-resolve * { --r: 1 !important; }

  [data-reveal] { opacity: 1; transform: none; }
  .systems-strip > div,
  .architecture-stack > div,
  .operating-model article,
  .value-grid article { opacity: 1; transform: none; }
}
