/* ==========================================================================
   THE FIRST DOMINO — GEMINI 4 NEON EDITION
   Folio Noir / Tactile Letterpress & Architectural Studio Documentary
   Palette: Charcoal (#121315), Warm Rag Ivory (#F4EFE5), Oakweb Ember (#E0762E)
   ========================================================================== */

:root {
  --charcoal: #121315;
  --charcoal-2: #181a1e;
  --charcoal-3: #202329;
  --charcoal-line: rgba(236, 231, 221, 0.14);
  --charcoal-line-strong: rgba(236, 231, 221, 0.26);

  --ivory: #f4efe5;
  --ivory-2: #ebe3d3;
  --ivory-paper: #fcf8ef;
  --ivory-line: rgba(31, 25, 20, 0.16);
  --ink: #1e1915;
  --ink-muted: #574d43;

  --txt: #ece7dd;
  --txt-muted: #aba69d;
  --ember: #e0762e;
  --ember-hi: #f29a5b;
  --vermilion: #b54512; /* AA/AAA contrast accent on ivory */
  --sage: #3db377;
  --sage-soft: rgba(61, 179, 119, 0.16);
  --fail: #e2584c;
  --fail-soft: rgba(226, 88, 76, 0.16);

  --display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --max-w: 1180px;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--charcoal); color: var(--txt); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  background: var(--charcoal);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--ember-hi);
  outline-offset: 3px;
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(var(--max-w), 100% - 40px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--ember); color: #121315; font-weight: 700;
  padding: 10px 16px; border-radius: 6px; text-decoration: none;
}
.skip-link:focus { left: 12px; }

/* ---------- Edition Banner (Clearly labeled Gemini 4 Neon) ---------- */
.edition-bar {
  background: #0b0c0e;
  border-bottom: 1px solid rgba(224, 118, 46, 0.4);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}
.edition-bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; padding: 9px 0;
}
.edition-stamp {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--txt);
}
.edition-stamp strong { color: var(--ember-hi); font-weight: 600; }
.stamp-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ember); box-shadow: 0 0 0 3px rgba(224, 118, 46, 0.25);
}
.edition-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-link {
  padding: 4px 10px; border-radius: 4px; text-decoration: none;
  border: 1px solid var(--charcoal-line); color: var(--txt-muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.ed-link:hover { border-color: var(--ember); color: var(--txt); }
.ed-link.is-active {
  background: rgba(224, 118, 46, 0.18);
  border-color: var(--ember);
  color: var(--txt);
}
.ed-link.is-reserved { border-style: dashed; color: #9c978d; }
.ed-tag {
  font-size: 9.5px; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px;
  background: rgba(236, 231, 221, 0.08); margin-left: 4px;
}

/* ---------- Masthead & Chapter Nav ---------- */
.masthead {
  position: sticky; top: 0; z-index: 60;
  background: rgba(18, 19, 21, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--charcoal-line);
}
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 12px 0; flex-wrap: wrap;
}
.masthead-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; font-family: var(--mono);
  font-size: 13px; letter-spacing: 0.2em; color: var(--txt);
}
.brand em { font-style: normal; color: var(--ember-hi); }
.hub-back {
  font-family: var(--mono); font-size: 12px; color: var(--txt-muted);
  text-decoration: none; letter-spacing: 0.04em;
}
.hub-back:hover { color: var(--ember-hi); }

.motion-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--charcoal-line-strong);
  background: var(--charcoal-2); color: var(--txt);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em;
  cursor: pointer;
}
.motion-btn:hover { border-color: var(--ember); }
.motion-btn[aria-pressed="true"] {
  background: rgba(224, 118, 46, 0.2);
  border-color: var(--ember);
}
.motion-btn:disabled { opacity: 0.72; cursor: default; }
.motion-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ember);
}
.motion-btn[aria-pressed="true"] .motion-dot { background: var(--txt-muted); }

.read-rail { height: 2px; background: rgba(236, 231, 221, 0.07); }
.read-rail-fill {
  height: 100%; width: calc(var(--read-progress, 0) * 100%);
  background: var(--ember);
}

.chapter-nav {
  background: var(--charcoal-2);
  border-bottom: 1px solid var(--charcoal-line);
}
.chapter-nav-inner {
  display: flex; gap: 6px; overflow-x: auto; padding: 8px 0;
  scrollbar-width: thin;
}
.chapter-nav a {
  flex: 0 0 auto; text-decoration: none;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em;
  color: var(--txt-muted); padding: 5px 10px; border-radius: 4px;
  border: 1px solid transparent; white-space: nowrap;
}
.chapter-nav a span { color: var(--ember-hi); margin-right: 5px; }
.chapter-nav a:hover { color: var(--txt); border-color: var(--charcoal-line); }
.chapter-nav a[aria-current="location"] {
  color: var(--txt); background: var(--charcoal-3);
  border-color: rgba(224, 118, 46, 0.45);
}

/* ---------- Shared Typography & Scene Spacing ---------- */
.scene {
  padding: clamp(54px, 7vw, 96px) 0;
  border-bottom: 1px solid var(--charcoal-line);
  scroll-margin-top: 68px;
}
.eyebrow {
  margin: 0 0 12px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ember-hi);
}
h1, h2, h3, h4 {
  margin: 0; font-family: var(--display); font-weight: 500;
  letter-spacing: -0.02em; line-height: 1.08;
}
h1 { font-size: clamp(44px, 6.6vw, 84px); color: var(--txt); }
h2 { font-size: clamp(32px, 4.4vw, 54px); color: var(--txt); margin-bottom: 14px; }
h3 { font-size: clamp(22px, 2.4vw, 30px); color: var(--txt); }

.scene-intro { max-width: 760px; margin-bottom: 34px; }
.lede {
  margin: 0; font-size: clamp(17px, 1.8vw, 19.5px);
  color: #cfc9be; line-height: 1.62;
}
.scene-caption {
  margin: 14px 0 0; font-size: 14px; color: var(--txt-muted);
  line-height: 1.55; max-width: 78ch;
}

/* ---------- Split Frame (Shared Ivory / Charcoal Pairing) ---------- */
.split-frame {
  margin: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--charcoal-line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.36);
}
.split-frame > figcaption {
  grid-column: 1 / -1;
  margin: 0; padding: 14px 20px;
  background: #0e0f12; border-top: 1px solid var(--charcoal-line);
  max-width: none;
}
.era-pane {
  display: flex; flex-direction: column;
  padding: 20px 22px 22px; min-width: 0;
}
.era-ivory {
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.55), transparent 60%),
    linear-gradient(180deg, var(--ivory) 0%, var(--ivory-2) 100%);
  color: var(--ink);
  border-right: 1px solid var(--ivory-line);
}
.era-charcoal {
  background:
    radial-gradient(circle at 80% 15%, rgba(224, 118, 46, 0.08), transparent 55%),
    linear-gradient(180deg, #16181c 0%, #101215 100%);
  color: var(--txt);
}
.pane-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid currentColor;
  border-bottom-color: rgba(31, 25, 20, 0.14);
}
.era-charcoal .pane-head { border-bottom-color: var(--charcoal-line); }
.era-tag {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; color: var(--vermilion);
}
.era-charcoal .era-tag { color: var(--ember-hi); }
.era-sub { font-size: 12.5px; color: var(--ink-muted); }
.era-charcoal .era-sub { color: var(--txt-muted); }

.pane-art { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; }
.art-svg { width: 100%; height: auto; }

/* Editorial Ink-and-Gouache Plates */
.art-plate {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.plate-ivory {
  background: #f2ebdd;
  border: 1px solid rgba(31, 25, 20, 0.18);
  box-shadow: 0 10px 26px rgba(31, 25, 20, 0.1);
}
.plate-charcoal {
  background: #14161a;
  border: 1px solid rgba(236, 231, 221, 0.14);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.36);
}
.plate-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.plate-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 2;
  pointer-events: none;
}
.panorama-video {
  object-position: center 48%;
}
.plate-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pane-note {
  margin: 14px 0 0; font-size: 14px; line-height: 1.5;
  color: var(--ink-muted);
}
.era-charcoal .pane-note { color: var(--txt-muted); }

/* ---------- Scene 1: Hero ---------- */
.scene-hero { padding-top: clamp(36px, 5vw, 62px); }
.hero-header { max-width: 920px; margin-bottom: 30px; }
.hero-subtitle {
  margin: 12px 0 0; font-size: clamp(18px, 2.2vw, 23px);
  color: #d6d0c5; max-width: 52ch; line-height: 1.42;
}
.hero-question {
  margin: 22px 0 0; padding: 14px 0 14px 20px;
  border-left: 3px solid var(--ember);
  font-family: var(--display); font-style: italic;
  font-size: clamp(22px, 2.7vw, 31px); line-height: 1.3;
  color: var(--ivory);
}
.hero-meta {
  margin-top: 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.attribution {
  margin: 0; font-size: 14px; color: var(--txt-muted); max-width: 58ch;
}
.attribution a { color: var(--ember-hi); text-underline-offset: 3px; }
.scroll-cue {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(224, 118, 46, 0.55);
  color: var(--ember-hi);
}
.scroll-cue:hover { background: var(--ember); color: #121315; }

/* Restrained opening settle animation (only when motion is enabled) */
html.motion-on .hero-plate-press {
  animation: heroSettlePlate 0.9s steps(6, end) 0.08s both;
}
html.motion-on .hero-plate-work {
  animation: heroSettlePlate 0.9s steps(6, end) 0.18s both;
}
@keyframes heroSettlePlate {
  from { opacity: 0.72; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Scene 2: Stepped Stop-Motion Pace Meters ---------- */
.pose-meter {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 8px 11px; border-radius: 5px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.11em;
}
.meter-ivory {
  background: rgba(31, 25, 20, 0.06);
  border: 1px solid rgba(31, 25, 20, 0.14);
  color: #4f453b;
}
.meter-charcoal {
  background: rgba(236, 231, 221, 0.04);
  border: 1px solid var(--charcoal-line);
  color: var(--txt-muted);
}
.meter-ticks { display: flex; gap: 4px; flex: 0 0 auto; }
.s2-tick {
  width: 11px; height: 7px; border-radius: 2px;
  transition: opacity 0.12s steps(1), background-color 0.12s steps(1);
}
.meter-ivory .s2-tick { background: var(--vermilion); }
.meter-charcoal .s2-tick { background: var(--ember); }

#before-stage[data-s2="0"] .s2-tick:nth-child(n+2) { opacity: 0.18; }
#before-stage[data-s2="1"] .s2-tick:nth-child(n+3) { opacity: 0.18; }
#before-stage[data-s2="2"] .s2-tick:nth-child(n+4) { opacity: 0.18; }
#before-stage[data-s2="3"] .s2-tick:nth-child(n+5) { opacity: 0.18; }
#before-stage[data-s2="4"] .s2-tick:nth-child(n+6) { opacity: 0.18; }
#before-stage[data-s2="5"] .s2-tick:nth-child(n+7) { opacity: 0.18; }
#before-stage[data-s2="6"] .s2-tick:nth-child(n+8) { opacity: 0.18; }

/* ---------- Scene 3: Signature Pinned Transformation ---------- */
.scene-mechanism { padding-bottom: clamp(56px, 7vw, 88px); }
.mechanism-runway { position: relative; }
html.motion-on .mechanism-runway { min-height: 235vh; }
html.motion-on .mechanism-sticky {
  position: sticky; top: 62px; padding-top: 12px;
}

.mech-toolbar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 14px;
}
.beat-rail {
  flex: 1;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
}
.beat-rail li {
  display: flex;
  border-radius: 5px;
  background: var(--charcoal-2); border: 1px solid var(--charcoal-line);
  transition: border-color 0.2s, background-color 0.2s;
}
.beat-btn {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--txt-muted);
  font-family: var(--mono); font-size: 11px;
  padding: 8px 11px;
  cursor: pointer;
  border-radius: 5px;
}
.beat-btn:hover { color: var(--txt); }
.beat-rail li span { color: var(--ember-hi); margin-right: 5px; }
.beat-rail li.is-current {
  border-color: var(--ember);
  background: rgba(224, 118, 46, 0.16);
}
.beat-rail li.is-current .beat-btn { color: var(--txt); }

.play-seq-btn, .replay-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 5px;
  border: 1px solid rgba(224, 118, 46, 0.55);
  background: rgba(224, 118, 46, 0.14);
  color: var(--ember-hi);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
}
.play-seq-btn:hover, .replay-btn:hover {
  background: var(--ember);
  border-color: var(--ember);
  color: #121315;
}
.play-seq-btn[aria-pressed="true"] {
  background: var(--ember);
  border-color: var(--ember);
  color: #121315;
}

.mech-stage {
  position: relative;
  height: clamp(410px, 58vh, 510px);
  border: 1px solid var(--charcoal-line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--charcoal-2);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.45);
}
.mech-backdrop {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 1fr 1fr;
}
.mech-half {
  position: relative; padding: 18px 22px;
  display: flex; flex-direction: column; justify-content: flex-start;
  opacity: var(--eras-opacity, 0.25);
}
.mech-half-left {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--ivory-2) 100%);
  color: var(--ink);
}
.mech-half-right {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='1' cy='1' r='0.8' fill='%23ece7dd' fill-opacity='0.12'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #16181c 0%, #101215 100%);
  color: var(--txt);
}
.stage-era-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  color: var(--vermilion); font-weight: 600; margin-bottom: 8px;
}
.mech-half-right .stage-era-label { color: var(--ember-hi); }

.mech-divider {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, transparent, var(--ember), transparent);
  opacity: var(--split-opacity, 0.15);
  pointer-events: none;
}

.mech-press-plate {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 4px auto 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(31, 25, 20, 0.16);
  background: #f2ebdd;
  box-shadow: 0 10px 24px rgba(31, 25, 20, 0.12);
}
.mech-press-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.press-platen-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  clip-path: polygon(31% 17%, 63% 17%, 63% 47%, 31% 47%);
  filter: drop-shadow(0 6px 8px rgba(31, 25, 20, 0.22));
}
.mech-platen-driven {
  transform: translateY(calc(var(--platen-drop, 0px) * 0.42));
}
.mech-impression-flash {
  position: absolute;
  left: 34%;
  top: 44%;
  width: 36%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 69, 18, 0.52), rgba(224, 118, 46, 0.02) 72%);
  opacity: var(--impression-flash, 0);
  pointer-events: none;
  z-index: 3;
}
.mech-bridge-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  opacity: var(--split-opacity, 0.15);
}
html.motion-on .mech-signal-path {
  animation: dashFlow 1.8s linear infinite;
}
.pstep {
  padding: 7px 10px; border-radius: 4px;
  background: #181b21; border: 1px solid var(--charcoal-line);
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
#mech-stage[data-phase="0"] .pstep-1,
#mech-stage[data-phase="1"] .pstep-1,
#mech-stage[data-phase="1"] .pstep-2,
#mech-stage[data-phase="2"] .pstep-1,
#mech-stage[data-phase="2"] .pstep-2,
#mech-stage[data-phase="2"] .pstep-3,
#mech-stage[data-phase="3"] .pstep {
  border-color: rgba(224, 118, 46, 0.55);
  background: rgba(224, 118, 46, 0.12);
  color: var(--txt);
}

/* Metal type rail clicking into position */
.type-rail {
  display: flex; justify-content: center; gap: 5px;
  margin-top: 10px; position: relative; z-index: 2;
  opacity: var(--type-opacity, 0);
}
.type-rail .sort {
  width: 26px; height: 28px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  color: #f4efe5; background: #3b3e45;
  border: 1px solid #1a1815; border-bottom-width: 3px; border-radius: 3px;
  transform: translateY(var(--sort-y, 0px));
}
.type-rail .sort-accent { background: var(--vermilion); }

/* Right-side prompt progression */
.prompt-panel {
  margin-top: 16px; padding: 18px; border-radius: 6px;
  background: rgba(16, 18, 22, 0.9); border: 1px solid var(--charcoal-line-strong);
  max-width: 440px;
}
.prompt-kicker {
  margin: 0 0 8px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; color: var(--ember-hi);
}
.prompt-text {
  margin: 0 0 14px; font-family: var(--display); font-size: 17px;
  line-height: 1.4; color: var(--ivory);
}
.prompt-steps { display: grid; gap: 8px; font-size: 13px; color: var(--txt-muted); }
.pstep {
  padding: 7px 10px; border-radius: 4px;
  background: #181b21; border: 1px solid var(--charcoal-line);
}
.pstep strong { color: var(--ember-hi); font-family: var(--mono); margin-right: 4px; }

/* THE RECURRING RECTANGULAR VESSEL (Paper -> Code -> Browser App) */
.folio-vessel {
  position: absolute;
  left: var(--vessel-left, 50%);
  top: var(--vessel-top, 52%);
  width: var(--vessel-width, min(520px, 86%));
  height: var(--vessel-height, 300px);
  transform: translate(-50%, -50%) rotate(var(--vessel-rot, 0deg));
  border-radius: var(--vessel-radius, 8px);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.45);
  z-index: 10;
}
.vessel-layer {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
}

.vessel-paper {
  background: var(--ivory-paper); color: var(--ink);
  border: 2px solid #231c15;
  padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between;
  opacity: var(--paper-opacity, 0);
  pointer-events: none;
}
.paper-rule-top {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--vermilion); border-bottom: 1px solid rgba(31, 25, 20, 0.2);
  padding-bottom: 7px;
}
.paper-ink-block { opacity: var(--ink-opacity, 1); }
.paper-title {
  margin: 0 0 8px; font-family: var(--display); font-size: 22px; font-weight: 600;
}
.paper-line { margin: 4px 0; font-size: 13.5px; color: #3d342b; }
.paper-marks {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; color: var(--vermilion);
}

.vessel-code {
  background: #14171d; color: var(--txt);
  border: 1.5px solid var(--ember);
  opacity: var(--code-opacity, 0);
  pointer-events: none;
  display: flex; flex-direction: column;
}
.code-chrome {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  background: #1c2028; border-bottom: 1px solid var(--charcoal-line);
  font-family: var(--mono); font-size: 11px; color: var(--txt-muted);
}
.code-chrome span { width: 8px; height: 8px; border-radius: 50%; background: #49505e; }
.code-chrome span:nth-child(3) { background: var(--ember); }
.code-snippet {
  margin: 0; padding: 16px; font-family: var(--mono); font-size: 12.5px;
  line-height: 1.55; color: #e9dfd0; overflow: hidden;
}

.vessel-app {
  background: #15181e; color: var(--txt);
  border: 1.5px solid rgba(224, 118, 46, 0.72);
  opacity: var(--app-opacity, 1);
  display: flex; flex-direction: column;
}
.browser-chrome {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 14px; background: #1e222a;
  border-bottom: 1px solid var(--charcoal-line);
}
.b-dots { display: inline-flex; gap: 5px; }
.b-dots i { width: 8px; height: 8px; border-radius: 50%; background: #525968; display: block; }
.b-dots i:last-child { background: var(--ember); }
.b-url { font-family: var(--mono); font-size: 11px; color: #b7b3aa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-badge {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em;
  color: #121315; background: var(--ember-hi); padding: 2px 7px; border-radius: 3px; font-weight: 600;
}
.browser-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; justify-content: center; }

.maint-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: 6px;
  background: #1d2129; border: 1px solid var(--charcoal-line);
}
.maint-row-quiet { background: #181c23; border-color: rgba(236, 231, 221, 0.1); }
.maint-unit { margin: 0; font-weight: 600; font-size: 15px; color: var(--txt); }
.maint-sub { margin: 2px 0 0; font-size: 12.5px; color: #bdb8af; }

.status-pill {
  flex: 0 0 auto; font-family: var(--mono); font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(224, 118, 46, 0.18); color: var(--ember-hi);
  border: 1px solid rgba(224, 118, 46, 0.5);
}
.status-pill.is-scheduled,
.status-pill.is-done {
  background: var(--sage-soft); color: #7ae5ae;
  border-color: rgba(61, 179, 119, 0.5);
}

.maint-slot {
  padding: 10px 13px; border-radius: 6px;
  background: var(--sage-soft); border: 1px solid rgba(61, 179, 119, 0.45);
  color: #d6f7e4; font-size: 13.5px;
}
.maint-actions, .mini-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn-ember {
  padding: 9px 14px; border-radius: 5px; border: 1px solid var(--ember);
  background: var(--ember); color: #121315;
  font-weight: 700; font-size: 13.5px; cursor: pointer;
}
.btn-ember:hover:not(:disabled) { background: var(--ember-hi); border-color: var(--ember-hi); }
.btn-ember:disabled { opacity: 0.42; cursor: not-allowed; }
.btn-ghost {
  padding: 9px 13px; border-radius: 5px;
  border: 1px solid var(--charcoal-line-strong);
  background: transparent; color: var(--txt);
  font-size: 13px; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--txt); }

.noscript-note { margin: 2px 0 0; font-size: 12px; color: var(--txt-muted); display: none; }
html.no-js .noscript-note { display: block; }

/* Phone stepper & Static Triptych visibility rules */
.phone-stepper { display: none; margin-top: 12px; gap: 8px; grid-template-columns: repeat(4, 1fr); }
.phone-stepper button {
  padding: 10px 6px; border-radius: 5px;
  border: 1px solid var(--charcoal-line-strong);
  background: var(--charcoal-2); color: var(--txt-muted);
  font-family: var(--mono); font-size: 11px; cursor: pointer;
}
.phone-stepper button[aria-pressed="true"] {
  background: var(--ember); border-color: var(--ember);
  color: #121315; font-weight: 600;
}

.static-triptych { display: none; }
html.static-mode .mechanism-runway,
html.no-js .mechanism-runway { min-height: 0; }
html.static-mode .mechanism-sticky,
html.no-js .mechanism-sticky { position: static; }
html.static-mode .mech-stage,
html.static-mode .mech-toolbar,
html.static-mode .beat-rail,
html.static-mode .phone-stepper,
html.static-mode .replay-btn,
html.no-js .mech-stage,
html.no-js .mech-toolbar,
html.no-js .beat-rail,
html.no-js .phone-stepper,
html.no-js .replay-btn { display: none; }
html.static-mode .static-triptych,
html.no-js .static-triptych { display: block; }

.triptych-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.tri-card {
  padding: 20px; border-radius: var(--radius);
  border: 1px solid var(--charcoal-line-strong);
  display: flex; flex-direction: column; gap: 10px;
}
.tri-ivory { background: var(--ivory); color: var(--ink); }
.tri-ivory h3 { color: var(--ink); font-size: 21px; }
.tri-ivory p { color: var(--ink-muted); margin: 0; font-size: 14.5px; }
.tri-bridge { background: #1d1b19; border-color: rgba(224, 118, 46, 0.5); }
.tri-bridge h3, .tri-charcoal h3 { font-size: 21px; }
.tri-bridge p { color: #ccc6bc; margin: 0; font-size: 14.5px; }
.tri-charcoal { background: #15181e; }
.tri-step {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.13em;
  color: var(--vermilion); font-weight: 600;
}
.tri-bridge .tri-step, .tri-charcoal .tri-step { color: var(--ember-hi); }
.tri-thumb {
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(31, 25, 20, 0.16);
  background: #f2ebdd;
}
.tri-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.static-maint-box { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Scene 4: Panorama, 3 Makers & Paired Comparison ---------- */
.panorama-figure { margin: 0 0 42px; }
.panorama-plate {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--charcoal-line-strong);
  background: #f2ebdd;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.36);
}
.panorama-stage {
  position: relative;
  overflow: hidden;
}
.panorama-img {
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: center 48%;
  display: block;
}
.panorama-key {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--ivory);
  border-top: 1px solid rgba(31, 25, 20, 0.16);
  color: var(--ink);
}
.panorama-key > div {
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-right: 1px solid rgba(31, 25, 20, 0.14);
}
.panorama-key > div:last-child { border-right: 0; }
.panorama-key span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  color: #96340c;
  font-weight: 600;
}
.panorama-key strong {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.makers-header { margin-bottom: 20px; }
.makers-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px; margin-bottom: 42px;
}
.maker-card {
  background: var(--charcoal-2);
  border: 1px solid var(--charcoal-line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}
.maker-art {
  position: relative;
  background: #14161a;
  border-bottom: 1px solid var(--charcoal-line);
  overflow: hidden;
}
.maker-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 36%;
  background: linear-gradient(180deg, transparent, rgba(24, 26, 30, 0.78));
  pointer-events: none;
}
.maker-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.maker-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.maker-top { display: flex; flex-direction: column; gap: 2px; }
.maker-role {
  display: block; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.13em; color: var(--ember-hi); margin-bottom: 2px;
}
.maker-card h4 { font-family: var(--display); font-size: 23px; color: var(--txt); }
.maker-desc { margin: 0; font-size: 14.5px; color: var(--txt-muted); line-height: 1.5; }

.mini-app {
  margin-top: auto; padding: 14px; border-radius: 6px;
  background: #101216; border: 1px solid var(--charcoal-line);
  display: flex; flex-direction: column; gap: 10px;
}
.mini-controls, .mini-subcontrols { display: flex; gap: 6px; flex-wrap: wrap; }
.chip, .chip-sm {
  border: 1px solid var(--charcoal-line-strong);
  background: #181b21; color: var(--txt-muted);
  border-radius: 4px; cursor: pointer; font-size: 12.5px;
  padding: 6px 10px;
}
.chip-sm { font-family: var(--mono); font-size: 11px; padding: 4px 9px; }
.chip.is-active, .chip-sm.is-active {
  background: rgba(224, 118, 46, 0.2);
  border-color: var(--ember); color: var(--txt); font-weight: 600;
}

.lesson-output {
  padding: 11px 12px; border-radius: 5px; background: #161920;
  border: 1px solid var(--charcoal-line); font-size: 13px;
}
.out-head { margin: 0 0 6px; color: var(--ivory); }
.out-list { margin: 0; padding-left: 17px; color: #cbc5bb; display: grid; gap: 4px; }

.stock-list { display: grid; gap: 6px; }
.stock-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: 4px; background: #161920; font-size: 13.5px;
}
.mono-num { font-family: var(--mono); color: var(--ivory); }
.tag-low {
  font-style: normal; font-size: 10px; margin-left: 4px;
  padding: 2px 5px; border-radius: 3px;
  background: rgba(224, 118, 46, 0.22); color: var(--ember-hi);
}
.tag-ok {
  font-style: normal; font-size: 10px; margin-left: 4px;
  padding: 2px 5px; border-radius: 3px;
  background: var(--sage-soft); color: #7ae5ae;
}
.stock-status { margin: 0; font-size: 12.5px; color: #cfc9be; min-height: 2.8em; }

/* Integrated Paired Comparison */
.comparison-block {
  background: var(--ivory); color: var(--ink);
  border-radius: var(--radius); padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--ivory-line);
}
.comparison-block .eyebrow { color: var(--vermilion); }
.comparison-block h3 { color: var(--ink); margin-bottom: 8px; }
.comp-distinction {
  margin: 0 0 20px; color: var(--ink-muted); max-width: 72ch; font-size: 15px;
}
.comp-table {
  border: 1px solid rgba(31, 25, 20, 0.22); border-radius: 6px; overflow: hidden;
  background: var(--ivory-paper);
}
.comp-row {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(31, 25, 20, 0.14);
}
.comp-row-head {
  border-top: 0; background: #1a1c20; color: var(--ivory);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
}
.comp-row > div { padding: 13px 16px; font-size: 15px; }
.comp-row > div:first-child { border-right: 1px solid rgba(31, 25, 20, 0.14); }
.comp-row-head > div:first-child { border-right-color: rgba(236, 231, 221, 0.18); }

/* ---------- Scene 5: Judgment & Interactive Review ---------- */
.proof-bundle {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.proof-excerpt {
  padding: 14px 16px;
  border-radius: 6px;
  background: var(--ivory-paper);
  border: 1.5px solid rgba(31, 25, 20, 0.24);
  box-shadow: 0 6px 18px rgba(31, 25, 20, 0.08);
}
.proof-excerpt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(31, 25, 20, 0.14);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  color: #5c5044;
}
.proof-bridge-tag {
  padding: 2px 7px;
  border-radius: 3px;
  background: #17191d;
  color: var(--ember-hi);
  font-weight: 600;
}
.proof-quote {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 16.5px;
  line-height: 1.48;
  color: var(--ink);
}
.proof-quote del {
  color: #8c2f0c;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: #b54512;
  background: rgba(181, 69, 18, 0.1);
  padding: 0 4px;
  border-radius: 3px;
}
.proof-quote ins {
  text-decoration: none;
  font-style: italic;
  font-weight: 600;
  color: #96340c;
  border-bottom: 1.5px solid #b54512;
  padding: 0 3px;
}
.proof-stamp {
  margin: 0;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #96340c;
  background: rgba(181, 69, 18, 0.12);
  border: 1px solid rgba(181, 69, 18, 0.35);
}

.review-workbench { display: flex; flex-direction: column; gap: 12px; }
.check-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 5px; font-size: 13.5px;
}
.check-banner.is-fail {
  background: var(--fail-soft); border: 1px solid rgba(226, 88, 76, 0.55); color: #ffd4d0;
}
.check-banner.is-pass {
  background: var(--sage-soft); border: 1px solid rgba(61, 179, 119, 0.55); color: #d6f7e4;
}
.check-pill {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 3px; background: var(--fail); color: #121315;
}
.check-banner.is-pass .check-pill { background: var(--sage); }

.pr-comment {
  padding: 12px 14px; border-radius: 5px;
  background: #1b1e25; border-left: 3px solid var(--ember);
}
.pr-author { margin: 0 0 4px; font-size: 12.5px; color: var(--ember-hi); }
.pr-body { margin: 0; font-size: 14px; color: var(--txt); }

.diff-box {
  margin: 0; padding: 12px; border-radius: 5px;
  background: #0e1014; border: 1px solid var(--charcoal-line);
  font-family: var(--mono); font-size: 11.5px; line-height: 1.55;
  overflow-x: auto;
}
.diff-del { display: block; color: #f59b94; }
.diff-add { display: block; color: #83e6b2; }

.review-preview {
  padding: 14px; border-radius: 6px;
  background: #14171d; border: 1px solid var(--charcoal-line-strong);
  display: flex; flex-direction: column; gap: 10px;
}
.preview-kicker {
  margin: 0; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; color: var(--ember-hi);
}
.confirm-row {
  display: flex; align-items: center; gap: 9px; font-size: 13.5px;
  padding: 9px 11px; border-radius: 5px; background: #1d2129; cursor: pointer;
}
.confirm-row input { width: 17px; height: 17px; accent-color: var(--ember); }
.review-outcome { margin: 0; font-size: 13px; color: var(--txt-muted); }

/* ---------- Scene 6: Dominoes, Horizons, Editions, Sources ---------- */
.dom-tile { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 0.14s steps(1), opacity 0.14s steps(1); }
#domino-stage[data-s6="0"] .dom-h2,
#domino-stage[data-s6="0"] .dom-h3,
#domino-stage[data-s6="0"] .dom-a2,
#domino-stage[data-s6="0"] .dom-a3,
#domino-stage[data-s6="0"] .dom-a4 { opacity: 0.18; }
#domino-stage[data-s6="1"] .dom-h1 { transform: rotate(4deg); }
#domino-stage[data-s6="1"] .dom-a1 { transform: rotate(5deg); }
#domino-stage[data-s6="1"] .dom-h3,
#domino-stage[data-s6="1"] .dom-a3,
#domino-stage[data-s6="1"] .dom-a4 { opacity: 0.22; }
#domino-stage[data-s6="2"] .dom-h1 { transform: rotate(7deg); }
#domino-stage[data-s6="2"] .dom-h2 { transform: rotate(4deg); }
#domino-stage[data-s6="2"] .dom-a1 { transform: rotate(8deg); }
#domino-stage[data-s6="2"] .dom-a2 { transform: rotate(4deg); }
#domino-stage[data-s6="2"] .dom-a4 { opacity: 0.25; }
#domino-stage[data-s6="3"] .dom-h1 { transform: rotate(8deg); }
#domino-stage[data-s6="3"] .dom-h2 { transform: rotate(6deg); }
#domino-stage[data-s6="3"] .dom-h3 { transform: rotate(3deg); }
#domino-stage[data-s6="3"] .dom-a1 { transform: rotate(9deg); }
#domino-stage[data-s6="3"] .dom-a2 { transform: rotate(6deg); }
#domino-stage[data-s6="3"] .dom-a3 { transform: rotate(3deg); }

.horizon-box {
  margin-top: 38px; padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius);
  background: var(--charcoal-2);
  border: 1px solid var(--charcoal-line-strong);
}
.horizon-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 20px;
}
.horizon-head .eyebrow { margin: 0; }
.horizon-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.horizon-tabs button {
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--charcoal-line-strong);
  background: var(--charcoal); color: var(--txt-muted);
  font-family: var(--mono); font-size: 12.5px; cursor: pointer;
}
.horizon-tabs button[aria-selected="true"] {
  background: var(--ember); border-color: var(--ember);
  color: #121315; font-weight: 700;
}
.horizon-panel { display: none; }
.horizon-panel.is-active { display: block; }
html.no-js .horizon-panel { display: block; padding-top: 16px; border-top: 1px solid var(--charcoal-line); margin-top: 16px; }
html.no-js .horizon-panel:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

.h-kicker {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; color: var(--ember-hi); margin-bottom: 8px;
}
.horizon-panel h3 {
  font-family: var(--display); font-size: clamp(24px, 2.8vw, 34px);
  margin-bottom: 10px; max-width: 34ch;
}
.horizon-panel p { margin: 0; color: #cbc5bb; max-width: 72ch; font-size: 16px; }

/* Editions Comparison Grid */
.editions-section {
  margin-top: 44px; padding-top: 36px;
  border-top: 1px solid var(--charcoal-line);
  scroll-margin-top: 76px;
}
.editions-head { max-width: 68ch; margin-bottom: 20px; }
.editions-head p { color: var(--txt-muted); margin: 8px 0 0; }
.editions-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.edition-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px; border-radius: var(--radius);
  background: var(--charcoal-2); border: 1px solid var(--charcoal-line-strong);
  text-decoration: none;
}
.edition-card:hover:not(.is-reserved) { border-color: var(--ember); }
.edition-card.is-current {
  border-color: var(--ember);
  background: linear-gradient(180deg, rgba(224, 118, 46, 0.14), var(--charcoal-2));
}
.edition-card.is-reserved { border-style: dashed; opacity: 0.8; }
.edition-badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ember-hi);
}
.edition-card strong { font-family: var(--display); font-size: 22px; color: var(--txt); }
.edition-note { font-size: 13.5px; color: var(--txt-muted); }
.edition-cta {
  margin-top: auto; padding-top: 8px;
  font-family: var(--mono); font-size: 11.5px; color: var(--ivory);
}

.closing-bar {
  margin-top: 34px; display: flex; justify-content: space-between;
  align-items: center; gap: 14px; flex-wrap: wrap;
}
.return-hub {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em;
  text-decoration: none; padding: 11px 18px; border-radius: 5px;
  background: var(--ivory); color: var(--ink); font-weight: 600;
}
.return-hub:hover { background: var(--ember); color: #121315; }
.return-site {
  font-family: var(--mono); font-size: 12.5px; color: var(--txt-muted);
  text-decoration: none; padding: 10px 14px; border-radius: 5px;
  border: 1px solid var(--charcoal-line-strong);
}
.return-site:hover { border-color: var(--ember); color: var(--ember-hi); }

/* Sources */
.sources-section {
  margin-top: 42px; padding-top: 30px;
  border-top: 1px solid var(--charcoal-line);
}
.sources-section h3 { font-size: 22px; margin-bottom: 8px; }
.sources-note { margin: 0 0 18px; font-size: 14px; color: var(--txt-muted); max-width: 78ch; }
.sources-list { margin: 0; padding-left: 20px; display: grid; gap: 14px; }
.sources-list li { color: var(--txt-muted); font-size: 14px; }
.sources-list a {
  display: block; color: var(--ember-hi); font-weight: 500;
  text-underline-offset: 3px; margin-bottom: 3px;
}

.site-footer {
  background: #0b0c0e; border-top: 1px solid var(--charcoal-line);
  padding: 20px 0; font-family: var(--mono); font-size: 11.5px;
  color: var(--txt-muted); letter-spacing: 0.06em;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
}
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--ember-hi); }

/* ---------- Motion Graphics Overlays & Kinetic Keyframes ---------- */
.mg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}
.mg-pill {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  pointer-events: none;
}
.mg-pill-ivory {
  background: rgba(252, 248, 239, 0.92);
  border: 1px solid rgba(31, 25, 20, 0.22);
  color: #1f1914;
}
.mg-pill-charcoal {
  background: rgba(14, 16, 20, 0.88);
  border: 1px solid rgba(224, 118, 46, 0.55);
  color: var(--txt);
}
.mg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  display: inline-block;
}
.mg-pill-ivory .mg-dot { background: var(--vermilion); }

.maker-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 72% 24%, rgba(242, 154, 91, 0.22), transparent 52%);
  opacity: 0.45;
  z-index: 2;
}
.maker-hud {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(12, 14, 18, 0.88);
  border: 1px solid rgba(224, 118, 46, 0.55);
  color: var(--txt);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  pointer-events: none;
}
.maker-hud.is-ok {
  border-color: rgba(61, 179, 119, 0.65);
  color: #b7f5d2;
}
.maker-hud.is-ok .mg-dot { background: var(--sage); }

.scene-intro-row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.scene-intro-row > div { max-width: 740px; }

.proof-bridge-tag.is-pass {
  background: #143324;
  color: #83e6b2;
  border: 1px solid rgba(61, 179, 119, 0.55);
}

/* Hide kinetic motion layers & looping videos in static/no-JS modes so static reading stays completely calm */
html.static-mode .plate-video,
html.static-mode .mg-overlay,
html.static-mode .mg-pill,
html.static-mode .press-platen-layer,
html.static-mode .maker-glow,
html.no-js .plate-video,
html.no-js .mg-overlay,
html.no-js .mg-pill,
html.no-js .press-platen-layer,
html.no-js .maker-glow {
  display: none;
}

/* Active Motion Graphics Keyframes (strictly gated under html.motion-on) */
html.motion-on .mg-dot {
  animation: dotPulse 2.1s ease-in-out infinite;
}
html.motion-on .hero-platen-cycle {
  animation: heroPressCycle 4.8s cubic-bezier(0.45, 0.05, 0.25, 1) infinite;
}
html.motion-on .mg-sheet-imprint {
  animation: imprintReveal 4.8s ease-in-out infinite;
}
html.motion-on .mg-reg-marks {
  animation: regPulse 4.8s ease-in-out infinite;
}
html.motion-on .mg-datum-pulse {
  animation: datumTravel 4.8s linear infinite;
}
html.motion-on .mg-datum-right {
  animation-delay: 2.4s;
}
html.motion-on .mg-lamp-breath {
  animation: lampBreath 4.2s ease-in-out infinite;
}
html.motion-on .mg-caret {
  animation: cursorBlink 1.05s steps(1) infinite;
}
html.motion-on .mg-wire-trace {
  stroke-dasharray: 740;
  animation: wireDraw 4.8s ease-in-out infinite;
}
html.motion-on .mg-wire-row {
  stroke-dasharray: 120;
  animation: rowScan 4.8s ease-in-out infinite;
}
html.motion-on .mg-wire-row.r2 { animation-delay: 0.25s; }
html.motion-on .mg-wire-row.r3 { animation-delay: 0.5s; }
html.motion-on .mg-wire-node {
  animation: dotPulse 2.4s ease-in-out infinite;
}
html.motion-on .mg-prompt-bar {
  animation: barShimmer 3.2s ease-in-out infinite;
}
html.motion-on .mg-prompt-bar.b2 { animation-delay: 0.6s; }

/* Scene 2: Quill hand-lettering & developer code/backlog cascade */
html.motion-on .mg-quill-line {
  stroke-dasharray: 180;
  animation: quillWrite 6.4s linear infinite;
}
html.motion-on .mg-quill-line.q2 { animation-delay: 1.5s; }
html.motion-on .mg-quill-line.q3 { animation-delay: 3.0s; }
html.motion-on .mg-quill-line.q4 { animation-delay: 4.5s; }
html.motion-on .mg-nib-pulse {
  animation: nibPulse 1.6s ease-in-out infinite;
}
html.motion-on .mg-code-bar {
  stroke-dasharray: 340;
  animation: codeType 4.8s ease-in-out infinite;
}
html.motion-on .mg-code-bar.c2 { animation-delay: 0.9s; }
html.motion-on .mg-code-bar.c3 { animation-delay: 1.8s; }
html.motion-on .mg-code-bar.c4 { animation-delay: 2.7s; }
html.motion-on .mg-backlog-float {
  animation: backlogDrift 4.4s ease-in-out infinite;
}
html.motion-on .mg-backlog-float.f2 { animation-delay: 2.2s; }

/* Scene 4: Circulation arcs & maker glow */
html.motion-on .mg-arc {
  animation: dashFlow 2.6s linear infinite;
}
html.motion-on .mg-ping {
  transform-box: fill-box;
  transform-origin: center;
  animation: nodePing 2.8s ease-out infinite;
}
html.motion-on .mg-ping.p2 { animation-delay: 0.7s; }
html.motion-on .mg-ping.p3 { animation-delay: 1.4s; }
html.motion-on .mg-ping.p4 { animation-delay: 2.1s; }
html.motion-on .maker-glow {
  animation: lampBreath 5s ease-in-out infinite;
}

/* Scene 5: Proofreader animated vermilion loop */
html.motion-on .mg-ink-loop {
  stroke-dasharray: 560;
  animation: inkCircle 4.6s ease-in-out infinite;
}
html.motion-on .mg-ink-arrow {
  animation: dashFlow 2.2s linear infinite;
}

/* Scene 6: Domino kinetic impulse sparks & breathing open future outlines */
html.motion-on .dom-wave {
  animation: dashFlow 2.4s linear infinite;
}
html.motion-on .dom-spark {
  transform-box: fill-box;
  transform-origin: center;
  animation: sparkPop 3.6s ease-out infinite;
}
html.motion-on .dom-spark.ds-2 { animation-delay: 0.55s; }
html.motion-on .dom-spark.ds-a1 { animation-delay: 0.25s; }
html.motion-on .dom-breathe {
  animation: outlineBreathe 3.8s ease-in-out infinite;
}
html.motion-on .dom-breathe-2 {
  animation: outlineBreathe 3.8s ease-in-out 1.1s infinite;
}
#domino-stage.is-replaying .dom-h1 { animation: domTip1 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
#domino-stage.is-replaying .dom-h2 { animation: domTip2 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards; }
#domino-stage.is-replaying .dom-h3 { animation: domTip3 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards; }
#domino-stage.is-replaying .dom-a1 { animation: domTip1 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
#domino-stage.is-replaying .dom-a2 { animation: domTip2 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.28s forwards; }
#domino-stage.is-replaying .dom-a3 { animation: domTip3 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.56s forwards; }

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}
@keyframes cursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes heroPressCycle {
  0%, 18% { transform: translateY(0px); }
  36%, 48% { transform: translateY(22px); }
  66%, 100% { transform: translateY(0px); }
}
@keyframes imprintReveal {
  0%, 34% { opacity: 0; }
  46%, 82% { opacity: 0.88; }
  96%, 100% { opacity: 0; }
}
@keyframes regPulse {
  0%, 34% { opacity: 0.22; }
  45%, 78% { opacity: 0.9; }
  100% { opacity: 0.22; }
}
@keyframes datumTravel {
  0% { transform: translateX(0); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(1080px); opacity: 0; }
}
@keyframes lampBreath {
  0%, 100% { opacity: 0.36; }
  50% { opacity: 0.72; }
}
@keyframes wireDraw {
  0%, 10% { stroke-dashoffset: 740; opacity: 0.3; }
  50%, 82% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.4; }
}
@keyframes rowScan {
  0%, 24% { stroke-dashoffset: 120; opacity: 0.2; }
  58%, 85% { stroke-dashoffset: 0; opacity: 0.92; }
  100% { stroke-dashoffset: 0; opacity: 0.25; }
}
@keyframes barShimmer {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.85; }
}
@keyframes quillWrite {
  0%, 6% { stroke-dashoffset: 180; opacity: 0; }
  26%, 82% { stroke-dashoffset: 0; opacity: 0.72; }
  96%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes nibPulse {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(1.65); }
}
@keyframes codeType {
  0%, 8% { stroke-dashoffset: 340; opacity: 0.15; }
  36%, 84% { stroke-dashoffset: 0; opacity: 0.9; }
  96%, 100% { stroke-dashoffset: 0; opacity: 0.2; }
}
@keyframes backlogDrift {
  0%, 100% { opacity: 0.25; transform: translateY(-14px); }
  25%, 75% { opacity: 0.96; transform: translateY(0px); }
}
@keyframes dashFlow {
  from { stroke-dashoffset: 34; }
  to { stroke-dashoffset: 0; }
}
@keyframes nodePing {
  0% { transform: scale(0.55); opacity: 0.9; }
  100% { transform: scale(2.1); opacity: 0; }
}
@keyframes inkCircle {
  0%, 10% { stroke-dashoffset: 560; opacity: 0.2; }
  45%, 82% { stroke-dashoffset: 0; opacity: 0.95; }
  100% { stroke-dashoffset: 0; opacity: 0.2; }
}
@keyframes sparkPop {
  0%, 15% { transform: scale(0.3); opacity: 0; }
  28% { transform: scale(1.35); opacity: 0.95; }
  55%, 100% { transform: scale(2.1); opacity: 0; }
}
@keyframes outlineBreathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@keyframes domTip1 {
  0% { transform: rotate(0deg); }
  40%, 100% { transform: rotate(9deg); }
}
@keyframes domTip2 {
  0% { transform: rotate(0deg); }
  45%, 100% { transform: rotate(6deg); }
}
@keyframes domTip3 {
  0% { transform: rotate(0deg); }
  50%, 100% { transform: rotate(3deg); }
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 960px) {
  .makers-grid, .editions-grid, .triptych-grid { grid-template-columns: 1fr; }
  .mech-toolbar { flex-direction: column; }
}

@media (max-width: 760px) {
  .wrap { width: min(var(--max-w), 100% - 28px); }
  .split-frame { grid-template-columns: 1fr; }
  .era-ivory { border-right: 0; border-bottom: 1px solid var(--ivory-line); }
  .beat-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Phone: replace tall pinned scroll runway with compact interactive stepper */
  html.motion-on .mechanism-runway { min-height: 0; }
  html.motion-on .mechanism-sticky { position: static; padding-top: 0; }
  html.motion-on .phone-stepper { display: grid; }
  .mech-stage { height: 420px; }
  .mech-backdrop { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .mech-divider { display: none; }
  .mech-press-plate { max-width: 190px; }
  .panorama-key { grid-template-columns: 1fr; }
  .panorama-key > div { border-right: 0; border-bottom: 1px solid rgba(31, 25, 20, 0.14); }
  .panorama-key > div:last-child { border-bottom: 0; }
  .prompt-panel { margin-top: 6px; padding: 12px; }
  .prompt-steps { display: none; }
  .comp-row { grid-template-columns: 1fr; }
  .comp-row > div:first-child { border-right: 0; border-bottom: 1px solid rgba(31, 25, 20, 0.12); }
  .comp-row-head { display: none; }
  .comp-row > div:first-child::before {
    content: "PRINTING · "; font-family: var(--mono); font-size: 10px;
    letter-spacing: 0.1em; color: var(--vermilion); font-weight: 600;
  }
  .comp-row > div:last-child::before {
    content: "AI CODING · "; font-family: var(--mono); font-size: 10px;
    letter-spacing: 0.1em; color: #363c48; font-weight: 600;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

@media print {
  .edition-bar, .masthead, .chapter-nav, .phone-stepper, .scroll-cue { display: none !important; }
  body { background: #fff; color: #111; }
}
