/* ========================================================================== */
/* The dial (Round 30): a holographic instrument round the drawing.           */
/* It replaces the polished-metal coin. After the owner's reference (17 Nov    */
/* 2026: "make the circle a bit more like that"): many thin rings of light in  */
/* one tilted plane, a ring of fine ticks, segmented and dotted arcs, spokes,  */
/* nodes, a soft glowing core in the accent, a fainter base below like a       */
/* projector, and thin callout lines out to four labels. Cream light on navy;  */
/* the accent only on a few arcs, the lit node and the top mark.               */
/* main.js (initSaga) draws the rings once as SVG, tilts the plane, places the */
/* labels and draws the points on the canvas.                                  */
/* Cost: all of it is painted once. What moves is transform and opacity only:  */
/* one ring group turns very slowly (full motion; paused while the opening is  */
/* off screen) and the chapter ring turns a stop per chapter. No filters, no   */
/* masks, no blur.                                                             */
/* ========================================================================== */

.saga-on .core { perspective: 1500px; }                 /* main.js: DEPTH */
.saga-on .core::before, .saga-on .core::after { display: none; }   /* the coin's halo and the great rings behind it */

/* ---- the glowing core: one painted gradient, squashed and turned with the plane */
.hud-glow {
  position: absolute;
  z-index: 0;
  inset: -34%;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgb(var(--accent-hi-rgb) / .34), rgb(var(--accent-rgb) / .22) 20%, rgb(var(--accent-rgb) / .1) 40%, rgb(var(--accent-rgb) / .03) 60%, transparent 74%),
    radial-gradient(closest-side, rgb(27 46 94 / .5), rgb(27 46 94 / .22) 60%, transparent 92%);
}

/* ---- the plane and its rings ---------------------------------------------- */
/* flat, not preserve-3d: the ring groups all lie in one plane, and as separate
   3D layers on that plane browsers could not tell which was in front, so the
   rings flickered (18 Nov 2026). The plane is tilted as one. */
.saga-on .rings { z-index: 1; transform-style: flat; }
.saga-on .ring { inset: 0; opacity: 1; animation: none; will-change: auto; }
.saga-on .ring svg { overflow: visible; }
.saga-on .ring-b, .saga-on .ring-c { will-change: transform; }
.hud-base { position: absolute; z-index: 1; left: 50%; top: 50%; width: 100%; height: 100%; pointer-events: none; }
.hud-base svg { display: block; width: 100%; height: 100%; overflow: visible; }

.h-ln { fill: none; stroke: rgb(var(--fg-rgb) / .32); stroke-width: 1px; vector-effect: non-scaling-stroke; }
/* the rings that draw in keep their true length (pathLength), so their width is set in the rings' own units: --hpx is one screen pixel (main.js) */
.h-main { stroke: rgb(var(--fg-rgb) / .9); stroke-width: calc(1.3px * var(--hpx, 1)); vector-effect: none; }
.h-halo { stroke: rgb(var(--fg-rgb) / .07); stroke-width: calc(6px * var(--hpx, 1)); vector-effect: none; }
.h-main-2 { stroke: rgb(var(--fg-rgb) / .36); stroke-width: calc(1px * var(--hpx, 1)); }
.h-inner { stroke: rgb(var(--fg-rgb) / .44); stroke-width: calc(1px * var(--hpx, 1)); }
.h-l1 { stroke: rgb(var(--fg-rgb) / .15); }
.h-l2 { stroke: rgb(var(--fg-rgb) / .28); }
.h-dash { stroke: rgb(var(--fg-rgb) / .3); stroke-dasharray: 2 5; }
.h-spoke { stroke: rgb(var(--fg-rgb) / .22); }
.h-cell { stroke: rgb(var(--fg-rgb) / .42); stroke-width: 1.6px; }
.h-tick { stroke: rgb(var(--fg-rgb) / .4); }
.h-tick-l { stroke: rgb(var(--fg-rgb) / .84); }
.h-band { fill: none; stroke: rgb(var(--fg-rgb) / .045); stroke-width: 7px; vector-effect: non-scaling-stroke; }
.h-band-acc { stroke: rgb(var(--accent-rgb) / .16); }
.h-seg { fill: none; stroke: rgb(var(--fg-rgb) / .42); stroke-width: 2.6px; vector-effect: non-scaling-stroke; }
.h-acc { stroke: rgb(var(--accent-rgb) / .95); }
.h-dots { stroke: rgb(var(--fg-rgb) / .42); stroke-dasharray: 1 4; }
.h-node { fill: #0E1A38; stroke: rgb(var(--fg-rgb) / .62); stroke-width: 1px; vector-effect: non-scaling-stroke; transition: fill 600ms var(--ease), stroke 600ms var(--ease); }
.h-node.is-on { fill: var(--accent-hi); stroke: var(--accent-hi); }
.h-pin { stroke: rgb(var(--fg-rgb) / .5); }
.h-b1 { stroke: rgb(var(--fg-rgb) / .26); }
.h-b2 { stroke: rgb(var(--fg-rgb) / .17); }
.h-b3 { stroke: rgb(var(--fg-rgb) / .11); }

/* the drawing stands in front of the rings, the callouts in front of both */
.saga-on .core-canvas { z-index: 2; }

/* ---- the top mark: whatever chapter sits under it is the one being read ---- */
.saga-on .core-mark {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  margin: 0;
  border: 6px solid transparent;
  border-top: 9px solid var(--accent-hi);
  border-bottom: 0;
  opacity: 1;
  transform-origin: 6px 9px;
}

/* ---- callouts: a line from a node on the main ring to each label ---------- */
.hud-calls { position: absolute; z-index: 3; inset: 0; pointer-events: none; transition: opacity 500ms var(--ease); }
.hud-lines { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.hud-call { fill: none; stroke: rgb(var(--fg-rgb) / .34); stroke-width: 1px; transition: stroke 600ms var(--ease); }
.hud-node { fill: #0E1A38; stroke: rgb(var(--fg-rgb) / .6); stroke-width: 1px; transition: stroke 600ms var(--ease); }
.hud-dot { fill: rgb(var(--fg-rgb) / .7); transition: fill 600ms var(--ease); }
.hud-call.is-on { stroke: rgb(var(--fg-rgb) / .85); }
.hud-node.is-on { stroke: var(--accent-hi); }
.hud-dot.is-on { fill: var(--accent-hi); }
.hud-label {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: rgb(var(--fg-rgb) / .62);
  transition: color 600ms var(--ease);
}
.hud-label b { font-weight: 500; color: rgb(var(--accent-hi-rgb) / .7); transition: color 600ms var(--ease); }
.hud-label span { display: block; font-weight: 400; color: rgb(var(--fg-rgb) / .56); transition: color 600ms var(--ease); }
.hud-label.is-end { text-align: right; }
.hud-label.is-on { color: #F5EEE2; }
.hud-label.is-on b { color: var(--accent-hi); }
.hud-label.is-on span { color: rgb(var(--fg-rgb) / .92); }
/* ---- motion: one ring group turns very slowly by itself ------------------- */
@keyframes hud-turn { to { transform: rotate(360deg); } }
.saga-on .ring-b { animation: hud-turn 240s linear infinite; }
.saga-on .core.is-resting .ring-b { animation-play-state: paused; }
.saga-on .core.is-grown .ring-b { animation-play-state: paused; }   /* the very slow turn waits while the dial is large in the middle */
.calm .ring-b, .lite .ring-b { animation: none; }

/* ---- the build: Home's first load, full motion (main.js adds .hud-intro) --- */
/* About 1.5 s, while the headline is already readable: the core's light rises,  */
/* the bright rings draw in from the top, the ticks sweep round, the arcs     */
/* open, the base rises, the nodes light, the lines reach out to the labels,  */
/* and the points gather into the first drawing (main.js).                    */
.hud-intro { --hud-ease: cubic-bezier(.45, 0, .15, 1); }
@keyframes hud-fade { from { opacity: 0; } }
@keyframes hud-glow-in { from { opacity: 0; scale: .5; } }
@keyframes hud-draw { from { stroke-dasharray: 100 100; stroke-dashoffset: 100; } to { stroke-dasharray: 100 100; stroke-dashoffset: 0; } }
@keyframes hud-sweep { from { opacity: 0; rotate: -120deg; } }
@keyframes hud-open { from { opacity: 0; rotate: 70deg; } }
@keyframes hud-click { from { opacity: 0; rotate: -72deg; } }
@keyframes hud-rise { from { opacity: 0; translate: 0 16px; } }
@keyframes hud-drop { from { opacity: 0; translate: 0 -10px; } }
@keyframes hud-label-in { from { opacity: 0; translate: 0 6px; } }
.hud-intro .hud-glow { animation: hud-glow-in 728ms var(--hud-ease) both; }
.hud-intro :is(.h-main, .h-halo) { animation: hud-draw 650ms var(--hud-ease) 78ms both; }
.hud-intro .h-main-2 { animation-delay: 172ms; }
.hud-intro .h-inner { animation-duration: 546ms; animation-delay: 270ms; }
.hud-intro .ring-t { animation: hud-sweep 702ms var(--hud-ease) 156ms both; }
.hud-intro .ring-a { animation: hud-fade 520ms var(--hud-ease) 312ms both; }
.hud-intro .ring-b { animation: hud-turn 240s linear infinite, hud-open 754ms var(--hud-ease) 322ms both; }
.hud-intro .ring-c { animation: hud-click 650ms var(--hud-ease) 416ms both; }
.hud-intro .hud-base { animation: hud-rise 572ms var(--hud-ease) 338ms both; }
.hud-intro .core-mark { animation: hud-drop 338ms var(--hud-ease) 676ms both; }
.hud-intro :is(.hud-node, .hud-dot) { animation: hud-fade 260ms var(--hud-ease) both; animation-delay: calc(702ms + var(--i, 0) * 57ms); }
.hud-intro .hud-call { animation: hud-draw 364ms var(--hud-ease) both; animation-delay: calc(754ms + var(--i, 0) * 57ms); }
.hud-intro .hud-label { animation: hud-label-in 364ms var(--hud-ease) both; animation-delay: calc(936ms + var(--i, 0) * 57ms); }
.hud-intro .core-canvas { animation: hud-fade 468ms var(--hud-ease) 442ms both; }
/* lighter mode: a plain fade */
.lite .core.hud-intro { animation: hud-fade 900ms var(--ease) 150ms both; }
.lite .hud-intro :is(.hud-glow, .h-main, .h-halo, .ring-t, .ring-a, .ring-b, .ring-c, .hud-base, .core-mark, .hud-node, .hud-dot, .hud-call, .hud-label, .core-canvas) { animation: none; }

/* ---- Blueprint view: the instrument as its construction drawing ----------- */
.bp .hud-glow { display: none; }
.bp :is(.h-ln, .h-seg) { stroke: rgb(255 255 255 / .42); }
.bp :is(.h-main, .h-tick-l) { stroke: rgb(255 255 255 / .75); }
.bp .h-l2 { stroke-dasharray: 4 4; }
.bp :is(.h-main, .h-inner) { stroke-dasharray: .4 .4; }   /* these two count their length in hundredths of the ring (pathLength) */
.bp .h-halo { display: none; }
.bp .h-acc { stroke: var(--accent-hi); }
.bp .h-node, .bp .hud-node { fill: none; }
.bp .hud-call { stroke: rgb(255 255 255 / .5); }
.bp .hud-label, .bp .hud-label span { color: #FFFFFF; }

/* Keep the opening readable while the instrument assembles. */
html .saga .hero .hero-copy .draft-in,
html .saga .hero .hero-copy .hero-actions > .btn,
.saga .hero-copy .hero-eyebrow,
.saga .hero-copy .hero-promise { animation: none; }
.saga .hero-copy .hero-text { max-width: 38ch; text-wrap: pretty; }
.chapter-rim { display: none; }

/* One instrument stays on stage while the mobile chapters pass behind the nav.
   Minimum heights expand naturally for larger type and longer tab panels. */
@media (max-width: 899px) {
  /* Like a watch face: the dial sits in the middle of the screen, larger than
     the screen is wide, so its outer rings run off the edges (the stage clips
     them). It is dimmed a little so the chapter text over it stays readable. */
  .saga { --core: min(140vw, 96svh); }
  .saga-on .saga-stage { height: calc(100dvh - var(--nav-h)); }
  .saga-on .saga-beats { margin-top: calc(var(--nav-h) - 100dvh); }
  .saga-on .core {
    left: 50%;
    right: auto;
    top: 50%;
    margin: calc(var(--core) / -2) 0 0 calc(var(--core) / -2);
    opacity: .5;
    transform: none;
  }
  .saga-on :is(.hud-calls, .core-mark, .ring-d, .hud-base) { display: none; }   /* a watch face has no projector base */
  .saga-on .rings > .chapter-rim {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--accent-hi);
    stroke-width: 1.65;
  }
  .saga-on .rings :is(.ring-a, .ring-t, .ring-b, .ring-c) { opacity: var(--rim-detail, .8); }
  .saga-on .saga .hero { scroll-margin-top: 1px; }
  .saga-on .saga .beat {
    min-height: calc(100dvh - var(--nav-h));
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .saga-on .saga .beat:not(.hero) {
    min-height: calc(100dvh - var(--nav-h));
    align-items: center;
    padding-block: clamp(42px, 10svh, 84px) clamp(26px, 5svh, 48px);
  }
  .saga-on .saga .hero {
    padding-block: clamp(84px, 18svh, 160px) clamp(30px, 6svh, 56px);
    text-align: left;
  }
  html.mobile-chapters:not(.is-gliding) { scroll-snap-type: y mandatory; }
  .saga-on .showcase-home { scroll-snap-align: start; scroll-margin-top: 0; }
  .saga .beat-title { margin-top: 9px; }
  .saga .beat-lead { margin-top: 12px; }
  .saga .beat .tab-points { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); }
  .saga .hero-title { max-width: 19ch; text-wrap: balance; }
  .saga .hero-copy .hero-text { margin-inline: 0; }
  .saga .hero-copy .hero-actions { justify-content: flex-start; }
  .saga .hero-eyebrow { align-items: flex-start; justify-content: flex-start; }
  .saga .hero-foot { display: none; }
  .saga-on .saga :is(.hero-inner, .beat-inner) { will-change: auto; }
}
/* Portrait tablets have room to set the drawing beside the opening copy.
   The tab panels use the full measure below the chapter heading. */
@media (min-width: 600px) and (max-width: 899px) {
  .saga-on .saga .hero { padding-block: clamp(40px, 7svh, 84px); }
  .saga .hero-title { max-width: min(17ch, 60%); }
  .saga .hero-copy .hero-text { max-width: min(38ch, 66%); }
  .saga .beat-text { max-width: 62%; }
  .saga .beat .tabs { max-width: none; }
  .saga .beat .tab-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .saga .hero-copy .hero-actions { margin-top: 20px; }
  .saga .hero-eyebrow .status { font-size: clamp(.75rem, 3.2vw, .8125rem); letter-spacing: .065em; }
  .saga .hero-promise { margin-top: 10px; }
  .saga .hero-title + .hero-eyebrow { margin-top: 12px; }
  .saga .hero-eyebrow + .hero-text { margin-top: 12px; }
}

/* This rim is visible only during the short transition between chapters. */
.saga-on .chapter-sweep { opacity: 0; animation: none; pointer-events: none; }
.chapter-sweep path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.sweep-tail { stroke: var(--accent); stroke-width: 1.5px; }
.sweep-line { stroke: var(--accent-hi); stroke-width: 2.5px; }
.sweep-tip { fill: var(--chalk); }

/* The last stop is a working sample. Keep its controls in normal page flow. */
.saga .demo-chapter .beat-title { margin: 0; max-width: 13ch; }
.saga .demo-gallery { min-width: 0; grid-column: 1; grid-row: 2; }
.demo-gallery .demo-picker { display: none; }
.demo-gallery.tabs-on .demo-picker {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(4px, 1vw, 14px);
  margin: 0 0 14px;
  border-bottom: 1px solid rgb(var(--fg-rgb) / .24);
}
.demo-picker .tab {
  padding: 9px 4px;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  color: var(--fg-2);
  background: transparent;
  font: 500 clamp(.875rem, 1.6vw, 1rem)/1.3 var(--font-body);
  text-transform: none;
  letter-spacing: 0;
}
.demo-picker .tab[aria-selected="true"] { background: transparent; color: var(--chalk); }
.demo-picker .tab-mark { background: var(--accent-hi); }
.demo-gallery.tabs-on .gallery-panel:not(.is-on) { display: none; }
.demo-gallery .gallery-panel { min-width: 0; }
.demo-gallery .demo {
  gap: 8px;
  margin: 0;
  padding: clamp(14px, 2.4vw, 24px);
  background: linear-gradient(145deg, #24355c, #101c39 70%);
  border: 1px solid rgb(var(--accent-hi-rgb) / .42);
  border-radius: 12px;
}
.demo-gallery .demo-title { color: var(--chalk); font-size: clamp(1.45rem, 3vw, 2rem); }
.demo-gallery .demo-note { margin: 0 0 6px; max-width: none; }
.demo-gallery .demo:hover { translate: none; }
.demo-gallery .ba { border-radius: 5px; }
.demo-gallery .ba-new { clip-path: inset(0 0 0 24%); }
.demo-gallery .ba-handle { transform: translateX(-26%); }
.demo-gallery .book, .demo-gallery .dash { margin-top: 6px; }
html:not(.calm):not(.lite) .demo-gallery.tabs-on .is-on > .demo {
  animation: demo-open 320ms cubic-bezier(.2,.8,.2,1) both;
}
@keyframes demo-open {
  from { opacity: .58; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (min-width: 900px) {
  .saga-on .saga .demo-chapter { padding-block: 48px; }
  .demo-chapter .beat-inner { row-gap: 14px; }
}
@media (max-width: 899px) {
  .saga-on .saga .beat.demo-chapter { align-items: flex-start; padding-block: clamp(30px, 7svh, 64px) 48px; }
  .demo-chapter .beat-text {
    display: flex; align-items: center; width: 52%; min-height: clamp(108px, 18svh, 156px);
  }
  .demo-chapter .beat-title { font-size: clamp(2.35rem, 6vw, 3.75rem); }
}
@media (min-width: 600px) and (max-width: 899px) {
  .saga-on .saga .beat.demo-chapter { padding-top: clamp(48px, 13svh, 132px); }
  .demo-chapter .beat-text { min-height: clamp(10rem, 26svh, 17rem); }
  .demo-gallery .demo-ba .ba { aspect-ratio: 1.75; }
}
.demo-gallery .demo-ba { gap: 0; padding: 0; overflow: hidden; }
.demo-gallery .demo-ba .demo-head { padding: 12px 18px 2px; }
.demo-gallery .demo-ba .demo-note { margin: 0; padding: 0 18px 10px; }
.demo-gallery .demo-ba .ba-caption { padding-inline: 18px; margin: 0 0 5px; }
.demo-gallery .demo-ba .ba { border-radius: 0; }
@media (min-width: 600px) and (max-width: 899px) {
  .demo-chapter .beat-title { font-size: clamp(3.4rem, 8.5vw, 4.75rem); }
}
@media (min-width: 600px) and (max-width: 899px) and (max-height: 850px) {
  .saga-on .saga .beat.demo-chapter { padding-top: 5svh; }
  .demo-chapter .beat-text { min-height: clamp(8rem, 20svh, 13rem); }
}

/* Phones and tablets: use the space under the menu bar, and make the chapter
   text easy to read for everyone (larger small print, full-strength colour,
   and a soft navy halo so the dial's rings never cut through the letters). */
@media (max-width: 899px) {
  .saga-on .saga .beat:not(.hero) {
    align-items: flex-start;
    padding-block: clamp(18px, 3.2svh, 32px) clamp(20px, 3.5svh, 36px);
  }
  .saga-on .saga .hero { padding-block: clamp(40px, 9svh, 96px) clamp(24px, 4svh, 48px); }

  .saga .beat-num { font-size: .875rem; color: rgb(var(--fg-rgb) / 1); }
  .saga .beat-lead, .saga .hero-copy .hero-text { font-weight: 400; color: var(--chalk); }
  .saga .tabs .tab { font-size: 1.0625rem; }
  .saga .tabs .tab-name { font-size: 1.625rem; }
  .saga .tabs .tab-panel > p { font-size: 1.0625rem; line-height: 1.55; color: var(--chalk); }
  .saga .tab-points li { font-size: 1.0625rem; line-height: 1.35; }
  .saga .tab-parts li b { font-size: .875rem; }
  .saga .tabs .tab-panel > .tab-facts { font-size: 1rem; color: var(--chalk); }

  .saga :is(.beat-num, .beat-title, .beat-lead, .hero-title, .hero-eyebrow, .hero-text, .hero-promise) {
    text-shadow: 0 0 2px rgb(14 26 56 / .9), 0 0 14px rgb(14 26 56 / .85), 0 0 28px rgb(14 26 56 / .6);
  }
}
@media (max-width: 899px) {
  /* the gold words are a gradient cut out of the text: a shadow would paint over them */
  .saga .hero-title .hl, .saga .hero-title .hl * { text-shadow: none; }
}

/* Wide screens: the dial stands beside the opening, then glides to the
   middle for the chapters (main.js: GROW, DIM). The chapter text and its
   card sit in one centred column over it, as on phones. */
@media (min-width: 900px) {
  .saga-on .saga .beat:not(.hero) .beat-inner {
    grid-template-columns: minmax(0, 40rem);
    justify-content: center;
  }
  .saga-on .saga .beat:not(.hero) :is(.beat-text, .tabs, .demo-gallery) { grid-column: 1; max-width: none; width: 100%; justify-self: stretch; }
  .saga .beat:not(.hero) :is(.beat-num, .beat-title, .beat-lead) {
    text-shadow: 0 0 2px rgb(14 26 56 / .9), 0 0 16px rgb(14 26 56 / .85), 0 0 32px rgb(14 26 56 / .6);
  }
}
@media (min-width: 900px) {
  .saga .beat:not(.hero) .beat-title .hl, .saga .beat:not(.hero) .beat-title .hl * { text-shadow: none; }
}

/* ---- engraved detail on the dial (main.js): woven band, hairlines, minute
   track, knurling and degree numbers ---------------------------------- */
.h-weave { stroke: rgb(var(--fg-rgb) / .085); }
.h-hair { stroke: rgb(var(--fg-rgb) / .14); }
.h-fine { stroke: rgb(var(--fg-rgb) / .3); }
.h-fine-l { stroke: rgb(var(--accent-hi-rgb) / .55); }
.h-knurl { stroke: rgb(var(--fg-rgb) / .2); }
.h-num {
  fill: rgb(var(--fg-rgb) / .5);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 2.3px;
  letter-spacing: .3px;
  text-anchor: middle;
  dominant-baseline: middle;
}
.h-outer { opacity: var(--outer, 1); }
.bp :is(.h-weave, .h-hair, .h-knurl) { stroke: rgb(255 255 255 / .3); }

/* ---- the chapter cards inside the dial: glass, not a solid box ----------- */
/* After the owner (18 Nov 2026: "make this info more immersive"). The dial
   shows through, softened by a blur so the words stay easy to read; bronze
   corner marks like an instrument's sight; a faint bronze glow below.
   Lighter mode and Blueprint keep the solid card. */
.saga-on .saga .beat .tabs {
  border-color: rgb(var(--fg-rgb) / .2);
  background-color: rgb(14 26 56 / .62);
  background-image:
    radial-gradient(90% 60% at 50% 0%, rgb(var(--accent-hi-rgb) / .08), transparent 70%),
    linear-gradient(180deg, rgb(var(--fg-rgb) / .06), rgb(var(--fg-rgb) / 0) 38%);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgb(var(--fg-rgb) / .12),
    0 34px 80px -34px rgb(0 0 0 / .75),
    0 0 70px -24px rgb(var(--accent-rgb) / .3);
}
.saga-on .saga .beat .tabs::after {
  --cm: rgb(var(--accent-hi-rgb) / .75);
  content: "";
  position: absolute;
  inset: -7px;
  pointer-events: none;
  background:
    linear-gradient(var(--cm), var(--cm)) left top / 16px 1px,
    linear-gradient(var(--cm), var(--cm)) left top / 1px 16px,
    linear-gradient(var(--cm), var(--cm)) right top / 16px 1px,
    linear-gradient(var(--cm), var(--cm)) right top / 1px 16px,
    linear-gradient(var(--cm), var(--cm)) left bottom / 16px 1px,
    linear-gradient(var(--cm), var(--cm)) left bottom / 1px 16px,
    linear-gradient(var(--cm), var(--cm)) right bottom / 16px 1px,
    linear-gradient(var(--cm), var(--cm)) right bottom / 1px 16px;
  background-repeat: no-repeat;
}
.saga-on .saga .beat .tabs .tab-panel > .tab-facts { background: rgb(var(--fg-rgb) / .045); }
.lite .saga-on .saga .beat .tabs, .lite.saga-on .saga .beat .tabs,
.bp .saga .beat .tabs { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: var(--navy-mid); }

/* ---- keeping it light on weaker devices (18 Nov 2026) --------------------- */
/* Wide screens: the three ring groups that turn with the scroll get layers of
   their own, so turning them moves a finished picture instead of repainting
   the whole dial (the rings are very large once the dial is in the middle). */
@media (min-width: 900px) {
  .saga-on :is(.ring-a, .ring-t, .ring-d) { will-change: transform; }
  :is(.calm, .lite).saga-on :is(.ring-a, .ring-t, .ring-d) { will-change: auto; }
}
/* Budget devices (4 GB or less, main.js adds .modest): the glass cards keep
   their look but drop the blur, the costliest part, and are a little denser. */
.modest .saga-on .saga .beat .tabs, .modest.saga-on .saga .beat .tabs {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background-color: rgb(14 26 56 / .86);
}

/* ========================================================================== */
/* The watch (18 Nov 2026): a slim gold dress watch in place of the dial of    */
/* points (main.js: initSaga, WATCH). The face is one image                    */
/* (assets/watch-face.svg, made by tools/watch-face.mjs); on top, as page      */
/* elements: the 12 and 6, the name, the day-date wheels, the hands, the       */
/* glass. Positions are in hundredths of the watch (its 760 drawing units);    */
/* sizes in cqw, so everything scales with the watch.                          */
/* ========================================================================== */
.watch-on :is(.ring, .core-canvas, .core-mark, .hud-base, .chapter-rim, .chapter-sweep) { display: none !important; }
.watch-on .hud-glow { opacity: .5; }
.watch { position: absolute; inset: 0; container-type: size; pointer-events: none; }
.watch > * { position: absolute; }
.w-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.w-face { inset: 0; width: 100%; height: 100%; display: block; user-select: none; }

/* the 12 and 6: tall, in the display serif, gold */
.w-num {
  left: 50%;
  font-family: var(--font-display);
  font-size: 8cqw;
  font-weight: 500;
  line-height: .75;
  letter-spacing: -.02em;
  background: linear-gradient(90deg, #FBE6C8, #D19A62 46%, #7E4F2B 54%, #B98450);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(.08cqw .14cqw .1cqw rgb(2 5 14 / .6));
  transform: translateX(-50%) scale(.8, 1.22);
  transform-origin: 50% 100%;
}
.w-12 { bottom: 74.4%; }
.w-6 { bottom: 18.4%; }
/* the name under the 12: the headline */
.w-name {
  left: 50%;
  top: 31%;
  transform: translateX(-50%);
  padding-left: .42em;
  font: 500 1.97cqw/1 var(--font-body);
  letter-spacing: .42em;
  color: rgb(245 238 226 / .8);
  text-align: center;
  white-space: nowrap;
}
.w-name small { display: block; margin-top: .9cqw; font-size: .5em; font-weight: 400; letter-spacing: .34em; opacity: .62; }
.w-name { top: 32%; transition: opacity 500ms var(--ease); }
.dial-behind .w-name { opacity: 0; }   /* in the middle, the chapter's own heading takes its place */
/* the day-date window at 3: the address bar. Two wheels that turn to the chapter. */
.w-win { top: 48.55%; height: 2.9%; overflow: hidden; }
.w-win { left: 71.05%; top: 48.16%; width: 10%; height: 3.68%; box-sizing: border-box; border: .24cqw solid #B98450; border-radius: .3cqw; background: linear-gradient(#03071A, #0A1330 25%, #13224A); box-shadow: 0 .16cqw .32cqw rgb(2 5 14 / .6), inset 0 .12cqw .24cqw rgb(0 0 0 / .6); }   /* one window at 3, drawn here so it can hide on the opening */
.w-reel { display: block; height: 100%; transition: transform 620ms cubic-bezier(.3, 1.35, .5, 1); }
.w-reel > span { display: flex; align-items: center; justify-content: center; height: 100%; font: 600 1.5cqw/1 var(--font-body); letter-spacing: .1em; color: #F5EEE2; }
.w-dots i { width: .78cqw; height: .78cqw; margin: 0 .28cqw; border-radius: 50%; background: rgb(245 238 226 / .75); }
.w-dots i:first-child { background: #D19A62; }
.w-bar { display: block; width: 78%; height: .8cqw; border-radius: .4cqw; background: #22232A; opacity: .75; }
.calm .w-reel, .lite .w-reel { transition: none; }
/* the hands: the outer layer carries the chapter spin (main.js), the inner one the time */
.w-hand, .w-spin { inset: 0; will-change: transform; }
.w-spin { position: absolute; }
.w-hand svg { display: block; width: 100%; height: 100%; overflow: visible; }
.w-shadow { translate: .4cqw .62cqw; opacity: .32; }
.w-shadow svg { filter: blur(.38cqw); }
@keyframes w-turn { to { rotate: 360deg; } }
.w-sec > .w-spin { animation: w-turn 60s linear infinite; animation-delay: var(--ws, 0s); }
.w-min > .w-spin { animation: w-turn 3600s linear infinite; animation-delay: var(--wm, 0s); }
.w-hour > .w-spin { animation: w-turn 43200s linear infinite; animation-delay: var(--wh, 0s); }
.calm .w-sec > .w-spin, .lite .w-sec > .w-spin { animation-timing-function: steps(60, end); }   /* calm and lighter: the seconds tick */
.lite .w-min > .w-spin { animation-timing-function: steps(60, end); }
.lite .w-hour > .w-spin { animation-timing-function: steps(720, end); }
.core.is-resting .w-spin { animation-play-state: paused; }   /* off screen; main.js sets the clock again on the way back */
.w-cap { left: 49.1%; top: 49.1%; width: 1.8%; height: 1.8%; border-radius: 50%; background: radial-gradient(circle at 36% 32%, #FBE6C8, #C08A55 50%, #4A2C16); box-shadow: .1cqw .18cqw .25cqw rgb(2 5 14 / .55); }
/* the glass: one soft window reflection */
.w-glass { inset: 7.9%; border-radius: 50%; clip-path: circle(50%); background: radial-gradient(52% 40% at 34% 27%, rgb(255 255 255 / .09), rgb(255 255 255 / .02) 60%, transparent 100%); }
/* the opening build: the watch rises in */
@keyframes watch-in { from { opacity: 0; scale: .94; } }
.hud-intro .watch { animation: watch-in 900ms var(--hud-ease) 120ms both; }

/* Phones and tablets: the watch whole, a little below the middle; faint behind
   the opening, clear behind the chapters (main.js), where the chapter heading
   sits above it and the card over it. */
@media (max-width: 899px) {
  .watch-mode .saga { --core: min(112vw, 58svh); }
  .watch-mode.saga-on .core { top: 62%; }
}

/* ---- 18 Nov 2026, round 2 of the watch ----------------------------------- */
/* A navy tint over the whole watch, deeper towards the rim, so it settles
   into the page instead of standing on it. */
.w-tint { inset: 0; border-radius: 50%; clip-path: circle(50%); background: radial-gradient(closest-side, rgb(14 26 56 / 0), rgb(14 26 56 / .1) 62%, rgb(14 26 56 / .32) 86%, rgb(14 26 56 / .6) 100%); opacity: .7; transition: opacity 600ms var(--ease); }
.dial-behind .w-tint { opacity: 1; }   /* deeper once you are inside the dial (18 Nov 2026: blend it in more) */
/* Motion off: the watch crosses to the middle with one soft fade, not a cut. */
@keyframes w-swap { from { opacity: 0; } }
.calm .core.w-swap { animation: w-swap 520ms var(--ease) both; }
/* The demos: closer under their heading. */
@media (min-width: 900px) {
  .saga-on .saga .beat.demo-chapter { align-items: flex-start; padding-block: clamp(14px, 2.6vh, 28px) 28px; }
  .saga .demo-chapter .beat-inner { row-gap: 6px; }
}

/* Inside the dial (wide screens): a soft navy vignette round the screen, so
   the case and the outer dial fade into the page; the middle stays clear for
   the words. */
.watch-mode.saga-on .saga-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 62% 70% at 50% 52%, transparent 42%, rgb(14 26 56 / .38) 70%, rgb(14 26 56 / .78) 92%, rgb(14 26 56 / .9) 100%);
  opacity: 0;
  transition: opacity 600ms var(--ease);
}
.watch-mode.dial-behind.saga-on .saga-stage::after { opacity: 1; }

/* ---- 18 Nov 2026, round 3: lighter and larger --------------------------- */
/* Inside the chapters (and on phones) the hands tick once a second, like a
   quartz watch, instead of creeping every frame: the glass cards blur what
   is behind them, and a hand moving behind a card every frame made the
   browser blur it again every frame. On the opening the seconds still sweep. */
.dial-behind .w-sec > .w-spin, .dial-behind .w-min > .w-spin { animation-timing-function: steps(60, end); }
.dial-behind .w-hour > .w-spin { animation-timing-function: steps(720, end); }
@media (max-width: 899px) {
  .watch-mode .w-sec > .w-spin, .watch-mode .w-min > .w-spin { animation-timing-function: steps(60, end); }
  .watch-mode .w-hour > .w-spin { animation-timing-function: steps(720, end); }
}
/* Wide screens (18 Nov 2026, round 4): the opening is inside the watch. It
   stands centred and fills the screen, its bezel framing the headline, which
   sits centred on the dial; scrolling dives in to the chapters (main.js). The
   hands are quieter while the headline is over them, and the headline takes
   the place of the name printed on the dial. The chapter labels round the
   old dial are hidden. */
@media (min-width: 900px) {
  .watch-mode .saga { --core: min(calc((100svh - var(--nav-h)) * 1.3), 96vw, 1500px); }
  .watch-mode.saga-on .core { left: 50%; right: auto; margin: calc(var(--core) / -2) 0 0 calc(var(--core) / -2); }
  .watch-mode.saga-on .saga .hero { text-align: center; }
  .watch-mode.saga-on .saga .hero-inner { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .watch-mode.saga-on .saga .hero-copy { grid-column: 1; max-width: 44rem; margin-inline: auto; }
  .watch-mode.saga-on .saga .hero-eyebrow, .watch-mode .saga .hero-copy .hero-actions { justify-content: center; }
  .watch-mode .saga .hero-title { margin-inline: auto; text-wrap: balance; }
  .watch-mode .saga .hero-copy .hero-text { margin-inline: auto; }
  .watch-on .hud-calls, .watch-mode .w-name { display: none; }
  .watch-mode .w-hand { transition: opacity 600ms var(--ease); }
  .watch-mode .w-cap { transition: opacity 600ms var(--ease); }
  .watch-mode:not(.dial-behind) :is(.w-hand, .w-cap) { opacity: 0; }   /* the hands arrive with the dive, spinning */
  .watch-mode .w-num { transition: opacity 600ms var(--ease); }
  .watch-mode:not(.dial-behind) .w-num { opacity: 0; }   /* the 12 and 6 arrive with the dive */
  /* simpler (18 Nov 2026): on the opening only the headline, its line and the two buttons */
  .watch-mode .saga .hero .hero-eyebrow, .watch-mode .saga .hero .hero-promise { display: none; }
  .watch-mode .saga .hero-title + .hero-eyebrow + .hero-text, .watch-mode .saga .hero .hero-text { margin-top: clamp(18px, 2.6vh, 28px); }
  .watch-mode .w-win { transition: opacity 600ms var(--ease); }
  .watch-mode:not(.dial-behind) .w-win { opacity: 0; }
}
/* The glass cards blur what is behind them only if nothing between them and
   the page marks a "backdrop root". The chapter text's will-change: opacity
   did, so the cards never blurred the watch and its hands showed sharp
   through them. Transform alone is enough for the chapter fades. */
.watch-mode.saga-on .beat-inner { will-change: transform; }

/* ---- 18 Nov 2026, round 5: the words lead -------------------------------- */
/* The watch is atmosphere, not the subject: quieter (main.js: HERO_DIM, DIM),
   and behind every block of words a wide, soft darkness with no edge to see,
   so the words stand clear of the dial, its markers and its hands. On wide
   screens it takes over the lifted light behind the text (styles.css, "The
   opening chapters"). */
@media (min-width: 900px) {
  .watch-mode.saga-on .beat:not(.hero) .beat-inner::after,
  .watch-mode.saga-on .saga .hero-copy::after {
    left: 50%;
    width: 1240px;
    height: 1000px;
    margin: -500px 0 0 -620px;
    opacity: 1;
    background: radial-gradient(closest-side, rgb(6 12 30 / .62), rgb(6 12 30 / .46) 40%, rgb(6 12 30 / .22) 70%, rgb(6 12 30 / .06) 88%, transparent);
  }
  .watch-mode.saga-on .saga .hero-copy::before { display: none; }
}
@media (max-width: 899px) {
  /* the opening starts near the top; the faded watch fills the space below */
  .watch-mode.saga-on .saga .hero { justify-content: flex-start; padding-top: clamp(28px, 6svh, 64px); }
  .watch-mode.saga-on .saga :is(.hero-copy, .beat-text) { position: relative; }
  .watch-mode.saga-on .saga :is(.hero-copy, .beat-text)::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -28% -18%;
    background: radial-gradient(closest-side, rgb(6 12 30 / .6), rgb(6 12 30 / .4) 45%, rgb(6 12 30 / .14) 78%, transparent);
    pointer-events: none;
  }
}
.bp .watch-mode .saga :is(.hero-copy, .beat-text, .beat-inner)::after { display: none; }

/* ---- 18 Nov 2026, round 6: a diagram, and a field that moves ------------- */
/* The watch is drawn as a technical diagram (main.js, FACE_ART): hairlines in
   cream, the chapter being read in bronze. --u is one screen pixel in the
   drawing's 760 units (main.js sets --hpx for the dial's 200), so the lines
   stay fine and sharp at any size. */
.watch { --u: calc(var(--hpx, .5) * 3.8px); }
.w-face { overflow: visible; fill: none; stroke: rgb(245 238 226 / .42); stroke-width: var(--u); }
.w-face .d-faint { stroke: rgb(245 238 226 / .2); }
.w-face .d-line { stroke: rgb(245 238 226 / .4); }
.w-face .d-dash { stroke: rgb(245 238 226 / .3); stroke-dasharray: calc(var(--u) * 2) calc(var(--u) * 7); }
.w-face .d-strong { stroke: rgb(245 238 226 / .72); stroke-width: calc(var(--u) * 2); }
.w-face text { stroke: none; }
.w-face .d-num { font: 400 34px/1 var(--font-display); fill: rgb(245 238 226 / .72); text-anchor: middle; dominant-baseline: central; }
.w-face .d-lab { font: 500 15px/1 var(--font-body); letter-spacing: .32em; fill: rgb(245 238 226 / .4); }
.w-face .d-arc { stroke: rgb(245 238 226 / .34); }
.w-face .d-cap { stroke: rgb(245 238 226 / .4); }
.w-face .d-node { fill: #0E1A38; stroke: rgb(245 238 226 / .55); }
.w-face .d-ch.is-on .d-arc { stroke: #D19A62; stroke-width: calc(var(--u) * 2.5); }
.w-face .d-ch.is-on .d-cap { stroke: #D19A62; }
.w-face .d-ch.is-on .d-lab { fill: #EBC394; }
.w-face .d-ch.is-on .d-node { fill: #D19A62; stroke: #FBE6C8; }
.w-hand svg { fill: none; stroke: #F5EEE2; stroke-linecap: round; stroke-linejoin: round; }
.w-hour svg { stroke-width: calc(var(--u) * 3); }
.w-hour circle { fill: #0E1A38; }
.w-min svg { stroke-width: calc(var(--u) * 2); }
.w-sec svg { stroke: #D19A62; stroke-width: calc(var(--u) * 1.2); }
.w-sec circle { fill: #0E1A38; }
.w-sec .w-pin { fill: #0E1A38; stroke-width: calc(var(--u) * 2); }
/* the hands: quiet behind the words */
.w-hand:not(.w-sec) { opacity: .62; }
.dial-behind .w-hand:not(.w-sec) { opacity: .42; }
.dial-behind .w-sec { opacity: .7; }
@media (max-width: 899px) { .watch-mode .w-hand:not(.w-sec) { opacity: .5; } }

/* The field (main.js, .hf): rings, a degree scale and spokes centred on the
   diagram, carried out to the edges of the screen. It turns a little with
   each chapter and opens out with the dive; three lights travel its rings.
   It replaces the old field (drawn for the dial beside the opening) and the
   turning shapes beside the chapters. */
.watch-mode .saga-stage > .field, .watch-mode .saga .beat > .bg-shape { display: none; }
.hf {
  --hfs: calc(var(--core) * 1.9);
  position: absolute;
  z-index: -2;
  left: 50%;
  top: 50%;
  width: var(--hfs);
  height: var(--hfs);
  margin: calc(var(--hfs) / -2) 0 0 calc(var(--hfs) / -2);
  pointer-events: none;
  will-change: transform;
  animation: fade-in 1400ms var(--ease) 200ms backwards;
}
.hf-turn { position: absolute; inset: 0; will-change: transform; }
.hf-turn img { display: block; width: 100%; height: 100%; user-select: none; }
.hf-orb { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.hf-orb i { position: absolute; left: 0; top: 0; width: 0; height: 0; display: block; animation: ring-on var(--t, 60s) linear infinite; animation-delay: var(--d, 0s); }
.hf-orb i::before {
  content: "";
  position: absolute;
  left: calc(var(--hfs) * var(--r) - 2.5px); top: -2.5px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c, #F5EEE2);
  box-shadow: 0 0 10px 2px var(--g, rgb(245 238 226 / .5));
}
.hf-orb .o1 { --r: .305; --t: 48s; --c: #EBC394; --g: rgb(209 154 98 / .7); --d: -12s; }
.hf-orb .o2 { --r: .4; --t: 74s; animation-name: ring-back; --d: -40s; }
.hf-orb .o3 { --r: .46; --t: 96s; --c: #EBC394; --g: rgb(209 154 98 / .7); --d: -70s; }
.core.is-resting ~ .hf .hf-orb i, html.is-away .hf-orb i { animation-play-state: paused; }
.calm .hf-orb i, .lite .hf-orb i { animation: none; }
.lite .hf, .lite .hf-turn, .modest .hf, .modest .hf-turn { will-change: auto; }
.bp .hf { display: none; }
@media (max-width: 899px) {
  .hf { top: 62%; opacity: .7; }
}

/* ---- 18 Nov 2026, round 7: narrow screens share one centre --------------- */
/* The owner: "nothing is centered properly". On phones and tablets the
   diagram and its field of rings stand in the middle of the screen, and the
   opening's words are centred on them, as on wide screens; the soft shade
   behind the words keeps them clear of the lines. */
@media (max-width: 899px) {
  .watch-mode.saga-on .core { top: 50%; }
  .hf { top: 50%; }
  .watch-mode.saga-on .saga .hero { justify-content: center; padding-top: 0; text-align: center; }
  .watch-mode.saga-on .saga .hero-copy { margin-inline: auto; }
  .watch-mode.saga-on .saga :is(.hero-title, .hero-text) { margin-inline: auto; }
  .watch-mode.saga-on .saga :is(.hero-eyebrow, .hero-actions, .hero-promise) { justify-content: center; }
  .watch-mode.saga-on .saga :is(.hero-eyebrow, .hero-promise) { display: flex; }
  .watch-mode.saga-on .saga .hero-eyebrow .status { margin-inline: auto; }
  /* the shade behind the words reaches past the screen's sides: clip it there,
     or the page grows wider than the phone and everything shifts left */
  .watch-mode.saga-on .saga .beat { overflow-x: clip; }
}

/* ---- 18 Nov 2026, round 8: the way out ----------------------------------- */
/* As the last chapter scrolls away the diagram and its rings fade (main.js,
   "The exit"); the darkness round the screen goes with them (--exit). */
.watch-mode.dial-behind.saga-on .saga-stage::after { opacity: calc(1 - var(--exit, 0)); }

/* ---- 18 Nov 2026, round 8: the chapters carry more, and use the width ---- */
/* The owner: "this part just completely lacks info" and "the whole site is
   underutilized". Each chapter has questions that open (index.html,
   .beat-more: plain <details>, no script), and on wide screens the chapter
   is two columns across the page: the heading, its line and the questions
   on the left, the card on the right. The page re-measures the chapters
   when a question opens (main.js: ResizeObserver on .beat-inner). */
.beat-more { margin-top: clamp(18px, 3vh, 30px); border-top: 1px solid rgb(245 238 226 / .16); }
.beat-more details { border-bottom: 1px solid rgb(245 238 226 / .16); interpolate-size: allow-keywords; }
.beat-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px;
  font: 500 1.0625rem/1.35 var(--font-body);
  color: var(--chalk, #F5EEE2);
  cursor: pointer;
  list-style: none;
}
.beat-more summary::-webkit-details-marker { display: none; }
.beat-more summary::after {
  content: "";
  flex: none;
  width: 12px; height: 12px;
  background:
    linear-gradient(#D19A62, #D19A62) center / 12px 1.5px no-repeat,
    linear-gradient(#D19A62, #D19A62) center / 1.5px 12px no-repeat;
  transition: transform 300ms var(--ease);
}
.beat-more details[open] summary::after { transform: rotate(45deg); }
.beat-more summary:hover { color: #FBE6C8; }
.beat-more summary:focus-visible { outline: 2px solid var(--gold, #D19A62); outline-offset: 2px; }
.beat-more details::details-content { block-size: 0; overflow: hidden; transition: block-size 340ms var(--ease), content-visibility 340ms allow-discrete; }
.beat-more details[open]::details-content { block-size: auto; }
.calm .beat-more details::details-content { transition: none; }
.more-body { padding: 0 2px 16px; font-size: 1rem; line-height: 1.6; color: rgb(245 238 226 / .86); }
.more-body p { margin: 0; }
.more-body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.more-body li { position: relative; padding-left: 18px; }
.more-body li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; background: #D19A62; transform: rotate(45deg); }
.more-body a { color: #EBC394; text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 900px) {
  .saga-on .saga .beat:not(.hero):not(.demo-chapter) .beat-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    column-gap: clamp(32px, 4vw, 72px);
    align-items: center;
    max-width: var(--max);
    justify-content: stretch;
  }
  .saga-on .saga .beat:not(.hero):not(.demo-chapter) .beat-text { grid-column: 1; grid-row: 1; }
  .saga-on .saga .beat:not(.hero):not(.demo-chapter) .tabs { grid-column: 2; grid-row: 1; align-self: center; }
  /* the outlined chapter number sits behind the card's top corner, not over the questions */
  .saga-on .saga .beat:not(.hero):not(.beat-last) .beat-text::before { top: 0; right: -.2em; font-size: clamp(9rem, 4rem + 12vw, 16rem); }
  .saga-on .saga .beat:not(.hero):not(.demo-chapter) .beat-lead { font-size: clamp(1.0625rem, .95rem + .4vw, 1.3125rem); }
}

/* ==========================================================================
   19 Nov 2026: the live demos as a stage (the owner: "a 3d design page where
   the options to pick ... are on the right and its kinda like stage manager
   in macos"). main.js (initDemoStage) sets .stage on the gallery where there
   is room beside the demo, and gives each waiting panel one transform: into
   its place on the right, at its size, turned to face the middle. All four
   demos stay live. The chosen demo's name sits over the stage; the other
   names lie over their windows and are what you press.
   ========================================================================== */
.demo-gallery.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  perspective: 1500px;
  perspective-origin: 62% 46%;
  translate: var(--stage-shift, 0px) 0;
}
.demo-gallery.stage .demo-picker { grid-row: 1; grid-column: 1; border-bottom-color: transparent; }
.demo-gallery.stage.tabs-on .gallery-panel { display: block; }
.demo-gallery.stage .gallery-panel {
  grid-row: 2;
  grid-column: 1;
  align-self: start;
  position: relative;
  z-index: 1;
  transform-origin: 0 0;
  will-change: transform;
}
.demo-gallery.stage.stage-live .gallery-panel { transition: transform 620ms var(--ease), opacity 420ms var(--ease); }
.demo-gallery.stage .gallery-panel.is-on { z-index: 3; }
.demo-gallery.stage .gallery-panel:not(.is-on) { opacity: .86; pointer-events: none; -webkit-user-select: none; user-select: none; }
.demo-gallery.stage .gallery-panel.is-peek { opacity: 1; --peek: 1; }
/* a waiting window: a brighter rim and a long shadow, so it reads as a pane standing in space */
.demo-gallery.stage .gallery-panel:not(.is-on) > .demo { border-color: rgb(var(--accent-hi-rgb) / .7); box-shadow: 0 60px 120px -30px rgb(0 0 0 / .8), 0 0 0 2px rgb(var(--accent-hi-rgb) / .12); }
.demo-gallery.stage .gallery-panel.is-on > .demo { box-shadow: 0 40px 90px -40px rgb(0 0 0 / .85), 0 0 60px -30px rgb(var(--accent-rgb) / .5); }
/* the fly-in replaces the old small rise */
html .demo-gallery.stage.tabs-on .is-on > .demo { animation: none; }

/* the names: the chosen one over the stage, the others over their windows */
.demo-gallery.stage .demo-picker .tab[aria-selected="false"] {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
  padding: 0 0 2px;
  border-radius: 10px;
  font-size: 0.875rem;
  color: var(--fg-2);
  cursor: pointer;
  transition: color 200ms var(--ease);
}
.demo-gallery.stage .demo-picker .tab[aria-selected="false"]:hover,
.demo-gallery.stage .demo-picker .tab[aria-selected="false"]:focus-visible { color: var(--accent-hi); }
.demo-gallery.stage .demo-picker .tab[aria-selected="false"]:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.demo-gallery.stage .demo-picker .tab[aria-selected="true"] { font-size: 1.0625rem; cursor: default; }

/* calm and lighter modes: the same places, no travelling */
:is(.calm, .lite) .demo-gallery.stage.stage-live .gallery-panel { transition: opacity 240ms var(--ease); }
html.bp .demo-gallery.stage .gallery-panel > .demo { box-shadow: none; }
/* the pile stands outside the demo's own box (.showcase clips sideways) */
.demo-gallery.stage { overflow: visible; }
