/* =========================================================================
   TOKEN TRACE // Editions Design System (Human-First + 3D Expo Mode)
   Adapted from Shopify Editions Fall '26 ("Exponential")
   ========================================================================= */

:root {
  --bg-current: #051DAA;
  --nav-h: 56px;
  --rail-w: 214px;
  --max-w: 1500px;
  --font-sans: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --surface: rgba(255, 255, 255, 0.08);
  --surface-dark: rgba(2, 6, 23, 0.52);
  --border: rgba(255, 255, 255, 0.16);
  --border-soft: rgba(255, 255, 255, 0.09);
  --text: #FFFFFF;
  --text-muted: rgba(255, 255, 255, 0.74);
  --text-dim: rgba(255, 255, 255, 0.48);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  scroll-snap-type: y proximity;
  background-color: var(--bg-current);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

html.expo-dragging { scroll-snap-type: none; }
.hero, .chapter, .ed-band { scroll-snap-align: start; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-current);
  color: var(--text);
  transition: background-color 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-x: hidden;
  position: relative;
}

/* Keep native browser scrollbar active in Expo Mode (1:1 Shopify scroll UX) */
body.expo-active {
  overflow-y: auto;
}

/* Subtle starfield dot matrix across the full-bleed chromatic flood */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px);
  background-size: 96px 96px, 48px 48px;
  background-position: 0 0, 24px 24px;
  opacity: 0.45;
}

/* Live SVG rail-wiring overlay */
#rail-wire-svg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 12;
  overflow: visible;
}

.wire-line { fill: none; stroke: rgba(255, 255, 255, 0.24); stroke-width: 1; }
.wire-pulse {
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.5;
  stroke-dasharray: 18 260;
  animation: wirePulse 2.8s linear infinite;
}

@keyframes wirePulse {
  from { stroke-dashoffset: 278; }
  to   { stroke-dashoffset: 0; }
}

/* =========================================================================
   FIXED TOP BAR
   ========================================================================= */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background-color: var(--bg-current);
  border-bottom: 1px solid var(--border-soft);
  transition: background-color 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(12px);
}

body.expo-active .topbar {
  background-color: rgba(3, 4, 7, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.topbar-left { display: flex; align-items: center; gap: 12px; }

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border: 1.5px solid #fff;
  display: inline-grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 10px;
  letter-spacing: 0.05em;
}

.nav-btn {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.84rem;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.nav-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.09); border-color: var(--border); }

/* Search */
.search-wrap { position: relative; display: flex; align-items: center; }
.search-input-box {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 4px 10px;
  width: 300px;
}
.search-input-box.open { display: flex; }
.search-input-box input {
  background: transparent; border: none; outline: none; color: #fff;
  font-family: var(--font-body); font-size: 0.82rem; width: 100%;
}
.search-input-box input::placeholder { color: var(--text-dim); }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; width: 340px;
  max-height: 320px; overflow-y: auto;
  background: rgba(6, 10, 26, 0.96); border: 1px solid var(--border);
  border-radius: 4px; padding: 6px; display: none;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); z-index: 80;
}
.search-results.open { display: block; }
.search-item {
  display: flex; flex-direction: column; gap: 2px; padding: 9px 11px;
  border-radius: 3px; text-decoration: none; color: #fff;
}
.search-item:hover { background: rgba(255, 255, 255, 0.1); }
.search-item-ch { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); }
.search-item-title { font-size: 0.88rem; font-weight: 600; }

/* Edition controls: same mono as the hero tilde line, no filled pills */
.expo-nav {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.expo-nav-rule {
  width: 1px;
  height: 12px;
  margin: 0 16px;
  background: rgba(255, 255, 255, 0.24);
  flex-shrink: 0;
}
.mode-toggle,
.os-toggle {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  padding: 0;
}
.mode-toggle button,
.os-toggle button,
.topbar .cta-link {
  appearance: none;
  border: none;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.4;
  padding: 2px 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.mode-toggle button:hover,
.os-toggle button:hover,
.topbar .cta-link:hover {
  color: #fff;
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.45);
}
.mode-toggle button.active,
.os-toggle button.active {
  background: transparent;
  color: #fff;
  font-weight: 400;
  border-bottom-color: #fff;
}

.track-hidden { display: none !important; }
.track-footer-bar { padding: 40px 0 0; }

.cta-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(2, 6, 23, 0.55); color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-family: var(--font-mono); font-weight: 600; font-size: 0.76rem;
  letter-spacing: 0.03em;
  padding: 6px 12px; border-radius: 3px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.cta-link:hover { background: #fff; color: #050a18; border-color: #fff; }

/* =========================================================================
   BOTTOM-LEFT MINIMALIST EXPONENTIAL CURVE ICON (Shopify Fall '26)
   ========================================================================= */
.expo-trigger {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 95;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 34px;
  height: 34px;
  padding: 0 7px;
  border-radius: 4px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.expo-trigger:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
  transform: scale(1.06);
}

.expo-trigger.active {
  padding: 0 12px;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(2, 6, 23, 0.72);
}

.expo-trigger svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.expo-trigger .expo-label {
  display: none;
}

.expo-trigger.active .expo-label {
  display: inline;
}

/* =========================================================================
   HAMSTER-WHEEL FORCED PERSPECTIVE // EXPO MODE OVERLAY
   Inside-of-cylinder vertical curved ramp + blueprint wireframe flanks
   ========================================================================= */
.expo-overlay {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: #030407;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  user-select: none;
}

.expo-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

#expo-webgl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  cursor: ns-resize;
}

#expo-grid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 3;
}

/* Left Chapter Rail inside Expo Mode */
.expo-rail {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 82;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 196px;
}

.expo-rail-btn {
  appearance: none;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.56);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 4px;
  cursor: pointer;
  transition: color 0.2s ease;
  text-align: left;
}

.expo-rail-btn:hover, .expo-rail-btn.active { color: #fff; font-weight: 600; }

.expo-rail-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.expo-rail-btn.active .expo-rail-dot {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 8px #fff;
}

@media (max-width: 720px) {
  .expo-rail {
    inset: auto 12px calc(58px + env(safe-area-inset-bottom)) 12px;
    width: auto;
    transform: none;
    padding: 3px 7px;
    flex-direction: row;
    align-items: stretch;
    gap: 9px;
    overflow-x: auto;
    background: rgba(5, 8, 18, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.22);
  }

  .expo-rail-btn { flex: 0 0 auto; max-width: 38vw; min-height: 36px; gap: 7px; }
}

/* 3D Vertical Hamster-Wheel Viewport */
.expo-viewport {
  position: absolute;
  inset: 0;
  z-index: 3;
  perspective: 760px;
  perspective-origin: 50% 66%;
  overflow: hidden;
  cursor: ns-resize;
}

.expo-wheel-stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

/* Continuous Curved Ribbon Slices (seamless edge-to-edge exponential ramp) */
.wheel-slice {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(76vw, 980px);
  height: 600px;
  margin-left: calc(min(76vw, 980px) / -2);
  margin-top: -300px;
  padding: 44px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

/* Curved SVG Callout Wire inside Expo Mode */
#expo-callout-svg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 81;
}

.expo-callout-label {
  position: fixed;
  z-index: 82;
  max-width: 190px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
  color: #fff;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

.wheel-slice-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.wheel-slice-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.wheel-slice-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  opacity: 0.78;
}

.wheel-slice-card {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  padding: 24px 26px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
  align-items: center;
  backdrop-filter: blur(6px);
}

.wheel-slice-card h4 {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 1.32rem;
  font-weight: 600;
}

.wheel-slice-card p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.wheel-visual-pill {
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wheel-visual-pill .v-top {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
}

.wheel-visual-pill .v-main {
  font-family: var(--font-sans);
  font-size: 1.04rem;
  font-weight: 700;
  color: #fde68a;
}

.wheel-visual-pill .v-sub {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
}

.wheel-micro-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.82);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 14px;
}

.expo-hud-hint {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 82;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 12px;
  border-radius: 6px;
  pointer-events: none;
}

/* =========================================================================
   HERO // MONUMENTAL TIGHT-KERNED BLOCK TITLE (v21)
   ========================================================================= */
.hero {
  position: relative;
  min-height: 78svh;
  padding: calc(var(--nav-h) + 40px) 48px 56px;
  display: flex;
  align-items: flex-end;
  background: var(--bg-current);
  z-index: 2;
  border-bottom: 1px solid var(--border);
}

.hero-monument {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-block-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.88;
  font-size: clamp(2.6rem, 12vw, 11rem);
  color: #FFFFFF;
  max-width: 12ch;
}

.hero-block-sub {
  margin: 28px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
  max-width: 60ch;
}
#hero-lead {
  max-width: none;
  white-space: nowrap;
}

.hero-left-strip {
  position: relative;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 8px;
  overflow: hidden;
  user-select: none;
}

.hero-vertical-wrap {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  max-height: calc(100svh - var(--nav-h) - 36px);
}

.hero-wordmark {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.0rem, 4.6vh, 3.8rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: #fff;
  white-space: nowrap;
}

.hero-subtitle-vert {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.hero-stage {
  position: relative;
  margin: 14px;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100svh - var(--nav-h) - 28px);
}

#constellation-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-overlay-top {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 34px 0;
  pointer-events: none;
}

.hero-kicker { max-width: 520px; }
.hero-kicker .eyebrow {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: #60a5fa; margin-bottom: 10px;
}
.hero-kicker h2 {
  margin: 0; font-family: var(--font-sans); font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.75rem); line-height: 1.08; letter-spacing: -0.02em;
}
.hero-kicker .lead {
  margin-top: 12px; font-size: 0.98rem; line-height: 1.5; color: var(--text-muted);
}

.stepped-index {
  pointer-events: auto;
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}

.stepped-index a {
  display: inline-flex; align-items: center; justify-content: space-between;
  gap: 20px; min-width: 248px; padding: 6px 11px; border-radius: 4px;
  text-decoration: none; color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem; font-weight: 500; white-space: nowrap;
  background: rgba(2, 6, 23, 0.6); border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.stepped-index a:hover {
  color: #fff; background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35); transform: translateX(-4px);
}
.stepped-index .num { font-family: var(--font-mono); font-size: 0.74rem; color: #93c5fd; }

.stepped-index li[data-track="push"]:nth-of-type(1) { margin-left: 0px; }
.stepped-index li[data-track="push"]:nth-of-type(2) { margin-left: 8px; }
.stepped-index li[data-track="push"]:nth-of-type(3) { margin-left: 16px; }
.stepped-index li[data-track="push"]:nth-of-type(4) { margin-left: 24px; }
.stepped-index li[data-track="push"]:nth-of-type(5) { margin-left: 32px; }
.stepped-index li[data-track="push"]:nth-of-type(6) { margin-left: 40px; }
.stepped-index li[data-track="case-study"]:nth-of-type(7) { margin-left: 0px; }
.stepped-index li[data-track="case-study"]:nth-of-type(8) { margin-left: 10px; }
.stepped-index li[data-track="case-study"]:nth-of-type(9) { margin-left: 20px; }
.stepped-index li[data-track="case-study"]:nth-of-type(10) { margin-left: 30px; }

.hero-stats-bar {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 6, 23, 0.82); backdrop-filter: blur(8px);
}
.hero-stat { padding: 18px 26px; border-right: 1px solid rgba(255, 255, 255, 0.10); display: flex; flex-direction: column; gap: 4px; }
.hero-stat:last-child { border-right: none; }
.hero-stat-val { font-family: var(--font-sans); font-size: 1.32rem; font-weight: 700; letter-spacing: -0.02em; }
.hero-stat-desc { font-size: 0.84rem; color: var(--text-muted); line-height: 1.38; }

/* =========================================================================
   LEFT STICKY CHAPTER RAIL
   ========================================================================= */
.chapter-rail {
  position: fixed;
  top: calc(var(--nav-h) + 28px);
  left: 18px;
  width: var(--rail-w);
  z-index: 30;
  display: flex; flex-direction: column; gap: 10px;
  opacity: 0; pointer-events: none; transform: translateX(-10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.chapter-rail.visible { opacity: 1; pointer-events: auto; transform: translateX(0); }

.rail-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-decoration: none; color: rgba(255, 255, 255, 0.65);
  font-size: 0.84rem; font-weight: 500; padding: 5px 8px; border-radius: 6px;
  transition: all 0.22s ease;
}
.rail-link:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.rail-link.active { color: #fff; font-weight: 700; }
.rail-dot {
  width: 13px; height: 13px; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.55); flex-shrink: 0; transition: all 0.25s ease;
}
.rail-link.active .rail-dot { background: #fff; border-color: #fff; box-shadow: 0 0 12px rgba(255, 255, 255, 0.85); }

/* =========================================================================
   CHAPTERS & HUMAN-FRIENDLY EDITORIAL CARDS
   ========================================================================= */
.editions-main {
  position: relative; z-index: 2;
  padding-left: calc(var(--rail-w) + 34px);
  padding-right: 36px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.chapter { padding: 104px 0 88px; border-bottom: 1px solid var(--border-soft); }
.hero-intro {
  display: flex;
  align-items: flex-end;
  min-height: 78svh;
  padding-block: 56px;
}
.hero-intro .hero-block-title {
  font-size: clamp(2.4rem, 9vw, 8.5rem);
  max-width: 15ch;
  text-wrap: balance;
}
.hero-intro .hero-block-sub {
  font-size: clamp(0.9rem, 1.3vw, 1.1rem);
  letter-spacing: 0;
  line-height: 1.55;
}
.chapter-opener { min-height: 24svh; display: flex; flex-direction: column; justify-content: flex-end; margin-bottom: 38px; }
.chapter-num { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: 10px; }

.chapter-title {
  margin: 0; font-family: var(--font-sans); font-weight: 700;
  font-size: clamp(3rem, 7vw, 6.4rem); line-height: 0.96; letter-spacing: -0.035em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.82);
  transition: color 0.65s cubic-bezier(0.22, 1, 0.36, 1), -webkit-text-stroke-color 0.65s ease;
}
.rail-link span:first-child,
.expo-rail-btn span:first-child {
  line-height: 1.25;
}

.chapter-title.chapter-title-long {
  font-size: clamp(2.4rem, 4.5vw, 4.5rem);
  line-height: 1.04;
  max-width: 22ch;
}
#ch-05-title { max-width: 32ch; }
.architecture-tagline {
  margin: 14px 0 0;
  max-width: 50ch;
  color: #c4fff0;
  font: 600 clamp(1.05rem, 2vw, 1.48rem) / 1.4 var(--font-sans);
}

.chapter.is-active .chapter-title { color: #FFFFFF; -webkit-text-stroke-color: transparent; }

.editorial-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.col-hero { grid-column: span 9; }
.col-rail { grid-column: span 3; display: flex; flex-direction: column; gap: 20px; }
.col-6    { grid-column: span 6; }
.col-12   { grid-column: span 12; }

.node-bullet {
  display: inline-block; width: 9px; height: 9px; border: 1.5px solid #fff;
  margin-right: 10px; vertical-align: middle; transform: translateY(-1px); flex-shrink: 0;
}

.ed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px 26px;
  backdrop-filter: blur(8px);
}

.ed-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.ed-card-head > div { flex: 1 1 320px; min-width: 0; }
.ed-card h3 { margin: 0; font-family: var(--font-sans); font-size: 1.38rem; font-weight: 600; letter-spacing: -0.015em; display: flex; align-items: center; }
.ed-card p { margin: 0 0 14px; font-size: 0.96rem; line-height: 1.5; color: rgba(255, 255, 255, 0.86); max-width: 68ch; }
.tile-subtitle { margin: 6px 0 0 !important; font-size: 0.94rem !important; line-height: 1.42 !important; color: var(--text-muted) !important; }
:is(#ch-02, #ch-02b, #ch-03) .tile-subtitle { font-size: 1.08rem !important; line-height: 1.55 !important; }
:is(#ch-02, #ch-02b, #ch-03) .notes-list li { font-size: 1rem; }
:is(#ch-02, #ch-02b, #ch-03) .diorama-stage { height: clamp(12rem, 29vw, 20rem); }
#ch-02 .key-issuer { font-size: .89rem; }
#ch-02 .key-code { font-size: 1.05rem; color: #fff; }
#ch-02 .inline-link { display: inline-flex; align-items: center; min-height: 44px; }

.briefing-card {
  padding: clamp(24px, 4vw, 64px);
  background: rgba(2, 6, 23, 0.60);
}

.briefing-card > p {
  max-width: 62ch;
  font-size: clamp(1.12rem, 1.9vw, 1.5rem);
}

.briefing-card > .briefing-lead {
  max-width: 53ch;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}

.briefing-card > .briefing-footer {
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.briefing-records {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
  gap: 14px;
  margin: 26px 0 0;
}

.briefing-records > div {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.briefing-records dt { margin-bottom: 7px; font-weight: 700; color: #fff; }
.briefing-records dd { margin: 0; color: var(--text-muted); line-height: 1.45; }

/* Shopify Fall '26 Architectural Action Button (zero rounded bubble pills) */
.ed-btn {
  appearance: none;
  background: rgba(2, 6, 23, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.ed-btn:hover { background: #fff; color: #050a18; border-color: #fff; }
.ed-btn.primary { border-color: rgba(255, 255, 255, 0.58); color: #fff; }
.ed-btn.primary:hover { background: #fff; color: #050a18; }

/* Unboxed Monospace Metadata Status (zero background pill!) */
.meta-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
}
.meta-status.ok   { color: #86efac; border-bottom-color: rgba(134, 239, 172, 0.55); }
.meta-status.warn { color: #fca5a5; border-bottom-color: rgba(252, 165, 165, 0.55); }
.meta-status.gold { color: #fde68a; border-bottom-color: rgba(253, 230, 138, 0.55); }

.meta-inline {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.meta-inline.ok { color: #86efac; }

/* Live 3D Diorama Centerpiece (sharp 4px architectural frame) */
.diorama-stage {
  position: relative;
  width: 100%;
  height: 390px;
  border-radius: 4px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(30, 58, 138, 0.24) 0%, rgba(2, 6, 23, 0.86) 72%),
    #020617;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.45);
  margin-bottom: 16px;
}

.tile-3d {
  display: block;
  width: 100%;
  height: 100%;
}

.diorama-stage-battery {
  height: 430px;
}

.sketchfab-embed {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;
}

/* Compact Slide Controls & Panels beneath 3D Diorama */
.slide-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 4px;
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.slide-controls.flash { animation: keyFlash 0.6s ease; }

.control-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.control-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Unboxed Hairline Spec Strip (replaces rounded route-chip & mini-badge bubbles) */
.spec-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.spec-item {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}
.spec-item:first-child { border-left: none; padding-left: 0; }
.spec-item.warn { color: #fca5a5; }
.spec-item.ok   { color: #86efac; }

.slide-caption {
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.key-inline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.key-issuer {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.key-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.compact-panel {
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}


.unmasked-stage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #5b667b;
  background: #151e31;
}
.unmasked-provider, .unmasked-hacker, .unmasked-hud { position: relative; min-width: 0; }
.unmasked-provider {
  display: grid;
  align-content: center;
  grid-template-rows: auto 142px auto;
  padding: clamp(12px, 2.4vw, 32px);
  background: #142137;
}
.unmasked-provider h3, .unmasked-hud h3 {
  margin: 0;
  font: 600 clamp(.97rem, 1.45vw, 1.35rem) var(--font-sans);
}
.unmasked-specimen { margin: 12px 0 0; min-width: 0; }
.unmasked-specimen img { display: block; width: 100%; height: auto; border-radius: 5px; }
.unmasked-specimen figcaption { margin-top: 8px; font-size: .72rem; color: #d6e0f0; }
.chapter-title.identity-title {
  min-height: 1.07em;
  font-size: clamp(2.05rem, 5.65vw, 5.8rem);
  line-height: 1.07;
}
.identity-title[data-identity="decoding"] { color: #cbdcf8; -webkit-text-stroke-color: transparent; }
.identity-title-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.unmasked-specimen, .unmasked-identity-details { transition: opacity 240ms ease-out; }
.unmasked-stage:not([data-identity="revealed"]) :is(.unmasked-specimen, .unmasked-identity-details) {
  opacity: 0;
  visibility: hidden;
}
.unmasked-hacker {
  min-height: 330px;
  background: radial-gradient(ellipse at 50% 55%, #566789, #1b2438 67%, #151e31);
  border-inline: 1px solid #5b667b;
}
.unmasked-hacker canvas { position: absolute; inset: 0; }
.unmasked-hud { padding: clamp(10px, 1.6vw, 24px); background: #101726; }
.unmasked-name { margin: 9px 0; display: flex; gap: 7px; align-items: baseline; font: 650 1.1rem var(--font-sans); }
.unmasked-name small { color: #b3c6df; font: .68rem var(--font-mono); }
.unmasked-records { display: grid; grid-template-columns: 1.12fr 1fr; gap: clamp(5px, .9vw, 14px); align-items: start; }
.unmasked-fields { margin: 0; }
.unmasked-fields > div { padding: 7px 0; border-top: 1px solid #45526b; }
.unmasked-fields dt { margin-bottom: 4px; color: #bccee7; font: .68rem var(--font-mono); }
.unmasked-fields dd { margin: 0; color: #fff; overflow-wrap: anywhere; font: 600 clamp(.7rem, 1vw, .95rem)/1.25 var(--font-sans); }
.unmasked-feed-square {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  background: radial-gradient(ellipse, #3d4e6b, #202b3d 68%);
  border: 1px solid #51617c;
}
.unmasked-feed-phone {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: auto;
  height: 94%;
  aspect-ratio: 9 / 19.5;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 3px solid #24263a;
  outline: 1px solid #7c889d;
  border-radius: 8px;
  background: #fbfbfc;
  color: #172134;
  box-shadow: 4px 6px 12px #0a0f19;
}
.unmasked-feed-brand { padding: 4px 5px; border-bottom: 1px solid #d4dce7; font-size: clamp(7px, .7vw, 11px); font-weight: 700; }
.unmasked-feed-profile {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 3px;
  font: 650 clamp(6px, .59vw, 9px)/1.1 var(--font-sans);
  white-space: nowrap;
}
.unmasked-feed-profile img { width: 12px; height: 12px; flex: none; border-radius: 50%; object-fit: cover; }
.unmasked-feed-scroll { position: relative; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; padding-bottom: 12px; }
.unmasked-post { margin: 0 0 6px; }
.unmasked-post img { display: block; width: 100%; height: auto; }
.unmasked-post figcaption { padding: 3px 4px; font-size: clamp(6px, .63vw, 10px); line-height: 1.25; }
.unmasked-feed-controls { display: grid; gap: 8px; margin-top: 6px; justify-items: start; }
.unmasked-feed-controls span { font-size: .62rem; color: #cdd8e8; overflow-wrap: anywhere; }
.unmasked-feed-controls .ed-btn { padding: 5px 6px; min-height: 30px; font-size: .68rem; }
.unmasked-feed-scroll:focus-visible { outline-offset: -2px; outline: 2px solid #145dda; }

.device-demo { grid-column: 1 / -1; }
.device-demo + .col-rail { grid-column: 1 / -1; }
.device-demo .device-runway {
  height: clamp(260px, 41vw, 485px);
  border-radius: 0;
  border-color: #ffffff64;
  background: radial-gradient(ellipse at 50% 75%, #263faf, #172f89 65%, #13265d);
  box-shadow: none;
}
#ch-11 .device-runway { background: radial-gradient(ellipse at 50% 75%, #543a8d, #372368 65%, #22183e); }
.device-demo .ledger-panel { border-radius: 0; }

.circuit-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(173px, 22%);
  gap: 10px;
}
.circuit-phone-panel {
  display: grid;
  grid-template-rows: auto minmax(210px, 1fr) auto auto auto;
  min-width: 0;
  padding: 10px;
  gap: 6px;
  background: #111737;
  box-shadow: inset 0 1px #394573;
}
.circuit-phone-header { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 5px; }
.circuit-phone-header h3 { font-size: 1rem; }
#circuit-phone-mode, #circuit-phone-status, .circuit-phone-panel label { color: #cad5f7; font: .68rem/1.3 var(--font-mono); }
#circuit-phone-status { min-height: 2.6em; }
.circuit-phone-stage { position: relative; background: radial-gradient(ellipse, #6d79a4, #344368 58%, #1a2547); }
.circuit-phone-stage canvas { position: absolute; inset: 0; }
#circuit-phone-app, .investigator-select {
  min-width: 0;
  color: #fff;
  background: #152639;
  border: 1px solid #6a819b;
  font: inherit;
  padding: 6px;
}
@media (max-width: 920px) {
  .unmasked-stage { grid-template-columns: 1fr 1fr; }
  .unmasked-hacker { border-right: 0; }
  .unmasked-hud { grid-column: 1 / -1; border-top: 1px solid #5b667b; }
  .unmasked-records { grid-template-columns: minmax(0, 1fr) minmax(95px, 160px); }
  .unmasked-fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .unmasked-feed-brand { font-size: 10px; }
  .unmasked-post figcaption { font-size: 9px; }
}
@media (max-width: 630px) {
  .unmasked-provider { grid-template-rows: auto 82px auto; }
  .unmasked-hacker { min-height: 220px; }
  .circuit-stage { grid-template-columns: minmax(0, 1fr); }
  .circuit-phone-panel { grid-template-rows: auto 260px auto auto auto; }
}
@media (prefers-reduced-motion: reduce) {
  .unmasked-specimen, .unmasked-identity-details { transition: none; }
}

/* Ch 01: Mobile OS Market Share (Larger 1.75fr Line Graph : 1fr Percentile) */
.market-share-grid {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}

.share-card-graph .share-trend-svg {
  min-height: 260px;
  max-height: 300px;
}

.share-card-percentile {
  padding: 12px 14px;
  gap: 8px;
}

.share-card-percentile .duopoly-hero-num {
  font-size: clamp(2.6rem, 4.2vw, 3.8rem);
}

/* Ch 01: Two Push Notification Protocols (APNs / FCM) */
.protocol-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 4px;
}

.protocol-card {
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 2px solid #60A5FA;
  border-radius: 3px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.protocol-card.android-proto { border-left-color: #34A853; }

.protocol-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.protocol-code {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: #FFFFFF;
}

.protocol-route {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
}
.protocol-route span { color: rgba(255, 255, 255, 0.45); margin: 0 4px; }
.protocol-route code {
  font-family: var(--font-mono);
  color: #fde68a;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  padding: 1px 5px;
}

.share-card {
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.share-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.leg-item i {
  display: inline-block;
  width: 8px;
  height: 2px;
}

.share-trend-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Huge Animated 99.4% Duopoly Hero Callout (#ch-01) */
.duopoly-hero {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 4px 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.duopoly-hero-num {
  font-family: var(--font-sans);
  font-size: clamp(3rem, 5.5vw, 4.8rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #86efac;
}

.duopoly-hero-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.82);
}

.share-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}

.share-bar-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.share-bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.share-bar-meta span { color: rgba(255, 255, 255, 0.86); }
.share-bar-meta strong { font-family: var(--font-mono); font-size: 0.8rem; color: #fff; }

.share-bar-track {
  height: 5px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.share-dot {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.2);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.share-dot.popped {
  opacity: 1;
  transform: scale(1);
}

.share-bar-fill {
  height: 100%;
  border-radius: 1px;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.share-bar-fill.android { background: #34A853; }
.share-bar-fill.ios     { background: #60A5FA; }
.share-bar-fill.other   { background: #94A3B8; }

/* Ch 03 & Ch 04: Crisp Inline SVG Brand Marks & Unboxed Token Text */
.app-cell {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
}

.brand-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.token-mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding-left: 9px;
  border-left: 2px solid currentColor;
}

/* Ch 04: Architectural App Tabs (zero rounded bubble chips!) */
.app-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 10px;
}

.app-tab {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 6px 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.app-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.app-tab.active {
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.34);
}

/* Ch 06: Multi-Beat Case File Strip (sharp 3px corners) */
.case-beats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.case-beat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left-width: 2px;
  border-radius: 3px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-beat.refused-beat { border-left-color: #f87171; }
.case-beat.pivot-beat   { border-left-color: #60a5fa; }
.case-beat.route-beat   { border-left-color: #4ade80; }

.beat-step {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.case-beat strong { font-size: 0.88rem; }
.case-beat small  { font-size: 0.76rem; color: rgba(255, 255, 255, 0.8); line-height: 1.35; }

/* Sharp Editorial Callout Rule (replaces rounded stamp-banner bubble) */
.case-callout {
  display: none;
  padding: 10px 14px;
  border-radius: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(2, 6, 23, 0.45);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-align: left;
}
.case-callout.show { display: block; animation: stampIn 0.25s ease; }
.case-callout.refused  { border-left-color: #f87171; color: #fecaca; }
.case-callout.approved { border-left-color: #4ade80; color: #bbf7d0; }

.pill-action {
  appearance: none; background: var(--surface-dark); border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff; font-family: var(--font-sans); font-size: 0.84rem; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s ease;
}
.pill-action:hover { background: #fff; color: #050a18; border-color: #fff; }
.pill-action.primary { background: #fff; color: #050a18; font-weight: 700; }
.pill-action.primary:hover { opacity: 0.92; transform: translateY(-1px); }

/* Folded-Corner Notes Card */
.notes-card {
  position: relative;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid var(--border);
  padding: 18px 18px 18px 20px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}
.notes-card::after {
  content: ""; position: absolute; top: 0; right: 0; width: 18px; height: 18px;
  background: linear-gradient(225deg, transparent 50%, rgba(255, 255, 255, 0.24) 50%);
}
.notes-header { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 12px; display: flex; align-items: center; }
.notes-list { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.notes-list li { font-size: 0.86rem; line-height: 1.52; color: rgba(255, 255, 255, 0.88); }
.note-idx { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); margin-right: 6px; }
.inline-link { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.55); }
.inline-link:hover { text-decoration-color: #fff; }

.stat-callout { padding: 12px 4px; font-family: var(--font-sans); font-size: 1.08rem; font-weight: 500; line-height: 1.45; color: #fff; }

.micro-strip { grid-column: span 12; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-top: 16px; }
.micro-item { border-top: 1px solid var(--border-soft); padding-top: 14px; font-size: 0.9rem; line-height: 1.55; color: rgba(255, 255, 255, 0.86); }
.micro-item strong { color: #fff; font-weight: 600; }

/* =========================================================================
   HUMAN-FRIENDLY VISUAL INTERACTIVE STAGES (ZERO RAW JSON!)
   ========================================================================= */
.visual-stage {
  margin-top: 20px;
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 22px;
  align-items: center;
}
.visual-stage.single { grid-template-columns: 1fr; }

/* Visual Comparison Lanes (Ch 01) */
.lane-stack { display: flex; flex-direction: column; gap: 12px; }
.lane-box {
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}
.lane-box.blocked { border-color: rgba(248, 113, 113, 0.45); background: rgba(220, 38, 38, 0.14); }
.lane-box.allowed { border-color: rgba(74, 222, 128, 0.45); background: rgba(22, 163, 74, 0.14); }
.lane-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.82; margin-bottom: 6px; }
.lane-flow { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.92rem; flex-wrap: wrap; }
.lane-explain { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; line-height: 1.4; }

/* Permission Prompt Mockup (Ch 01) */
.perm-mock {
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 20px;
  max-width: 340px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
}
.perm-mock h4 { margin: 8px 0 6px; font-size: 0.98rem; font-weight: 700; }
.perm-mock p  { margin: 0 0 16px; font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }
.perm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.perm-btn {
  padding: 9px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 0.84rem; font-weight: 600; cursor: pointer;
}
.perm-btn.allow { background: #2563eb; border-color: #3b82f6; }
.perm-btn:hover { filter: brightness(1.15); }

/* Visual Delivery Key Card (Ch 02) */
.key-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  border: 1px solid rgba(253, 224, 71, 0.45);
  border-radius: 12px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
  overflow: hidden;
}
.key-card.flash { animation: keyFlash 0.6s ease; }
@keyframes keyFlash {
  0%   { box-shadow: 0 0 0 rgba(253, 224, 71, 0); }
  50%  { box-shadow: 0 0 36px rgba(253, 224, 71, 0.65); }
  100% { box-shadow: 0 0 0 rgba(253, 224, 71, 0); }
}
.key-string {
  font-family: var(--font-mono);
  font-size: 1.08rem;
  font-weight: 700;
  color: #fde68a;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  background: rgba(2, 6, 23, 0.65);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.human-facts { display: flex; flex-direction: column; gap: 10px; }
.human-fact {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px; padding: 11px 14px; font-size: 0.88rem; line-height: 1.45;
}

/* Status Pill Badges */
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans); font-size: 0.76rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.08);
}
.status-badge.ok   { border-color: #4ade80; color: #86efac; background: rgba(22, 163, 74, 0.22); }
.status-badge.warn { border-color: #f87171; color: #fca5a5; background: rgba(220, 38, 38, 0.24); }
.status-badge.gold { border-color: #fbbf24; color: #fde68a; background: rgba(217, 119, 6, 0.24); }

/* Clean Account Directory Table (Ch 03) */
.ledger-panel { overflow-x: auto; }
.ledger-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.ledger-table caption {
  caption-side: top;
  padding: 4px 12px 10px;
  color: #fff;
  text-align: left;
  font-weight: 700;
}
.ledger-table .meta-inline { text-transform: none; }
.ledger-table th, .ledger-table td { text-align: left; padding: 12px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.ledger-table th { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; }
.ledger-row-retired { opacity: 0.45; text-decoration: line-through; }

/* Pipeline Journey + Lock Screen Phone Banner (Ch 04) */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  appearance: none; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff; font-family: var(--font-body); font-size: 0.82rem; font-weight: 500;
  padding: 6px 13px; border-radius: 999px; cursor: pointer;
}
.chip.active { background: #fff; color: #050a18; font-weight: 700; }

.pipe-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.pipe-node {
  border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.04);
  border-radius: 3px; padding: 12px 10px; text-align: center; font-size: 0.82rem;
  transition: all 0.28s ease;
}
.pipe-node strong { display: block; margin-bottom: 3px; font-size: 0.84rem; }
.pipe-node span { color: var(--text-muted); font-size: 0.74rem; font-family: var(--font-mono); }
.pipe-node.lit {
  border-color: #4ade80; background: rgba(34, 197, 94, 0.18);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.25); transform: translateY(-1px);
}

.push-architecture { margin: 0 0 16px; padding: 18px; }
.architecture-reasons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.architecture-reasons h4, .lifecycle-header h4 { margin: 0; font-size: 1rem; }
.architecture-reasons p, .lifecycle-steps p, #lifecycle-detail {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.lifecycle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 10px;
}
.lifecycle-header button { display: none; min-height: 44px; touch-action: manipulation; }
.lifecycle-ready .lifecycle-header button { display: inline-flex; }
.lifecycle-progress { width: 100%; height: 6px; margin-bottom: 8px; accent-color: #9bf2df; }
.lifecycle-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lifecycle-steps button {
  appearance: none;
  width: 100%;
  min-height: 0;
  padding: 2px 0 6px;
  text-align: left;
  font: 400 0.72rem var(--font-mono);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0;
  transition: color 160ms ease, border-color 160ms ease;
}
.lifecycle-steps button:hover {
  color: #fff;
  background: none;
  border-bottom-color: rgba(255, 255, 255, 0.55);
}
.lifecycle-steps button[aria-current="step"] {
  color: #fff;
  background: rgba(155, 242, 223, 0.14);
  border-bottom-color: #9bf2df;
}
.lifecycle-steps button:focus-visible, .lifecycle-header button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.lifecycle-ready .lifecycle-steps p { display: none; }
#lifecycle-detail { min-height: 3em; margin-top: 10px; }
#ch-05 .control-label { text-transform: none; }

.glossary-card { padding: clamp(16px, 3vw, 32px); }
.glossary-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 34px;
  margin: 0;
}
.glossary-list > div { padding: 13px 0 15px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.glossary-list dt { color: #fff; font-weight: 700; }
.glossary-list dd { margin: 5px 0 0; color: var(--text-muted); font-size: 1rem; line-height: 1.55; }
.glossary-list > div[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }
.glossary-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.95rem;
}
.glossary-sources .inline-link { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 620px) {
  .architecture-reasons, .glossary-list { grid-template-columns: 1fr; }
  .architecture-reasons { gap: 15px; }
  .lifecycle-steps { display: flex; flex-wrap: wrap; }
  .lifecycle-steps button { width: auto; }
  #lifecycle-detail { min-height: 7em; }
}

.phone-banner-preview {
  display: flex; align-items: center; gap: 14px;
  background: rgba(15, 23, 42, 0.88); border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px; padding: 12px 16px; max-width: 460px; margin: 0 auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.phone-banner-preview.ping { transform: scale(1.02); box-shadow: 0 0 24px rgba(74, 222, 128, 0.35); border-color: #4ade80; }
.phone-banner-icon { width: 38px; height: 38px; border-radius: 3px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.76rem; font-weight: 700; flex-shrink: 0; }

/* Forensic Dossier Cards (Ch 05, 06, 07) */
.dossier-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
}

.dossier-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.14); padding-bottom: 9px; font-size: 0.9rem;
}
.dossier-row:last-child { border-bottom: none; padding-bottom: 0; }
.dossier-row span:first-child { color: var(--text-muted); font-size: 0.82rem; }
.dossier-row strong { text-align: right; }

.stamp-banner {
  display: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-align: center;
}
.stamp-banner.show { display: block; animation: stampIn 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
.stamp-banner.refused { border: 2px solid #f87171; background: rgba(220, 38, 38, 0.25); color: #fecaca; }
.stamp-banner.approved { border: 2px solid #4ade80; background: rgba(22, 163, 74, 0.24); color: #bbf7d0; }

@keyframes stampIn {
  from { transform: scale(1.08); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.timeline-compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.time-pill {
  padding: 12px 14px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}
.time-pill small { display: block; color: var(--text-muted); font-size: 0.76rem; margin-bottom: 4px; }
.time-pill strong { font-size: 1.05rem; }

.ed-footer {
  padding: 64px 0 110px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 20px; color: var(--text-muted); font-size: 0.88rem;
}

@media (max-width: 1120px) {
  .chapter-rail, #rail-wire-svg { display: none; }
  .editions-main { padding-left: 24px; padding-right: 24px; }
  .col-hero, .col-rail, .col-6 { grid-column: span 12; }
  .micro-strip { grid-template-columns: repeat(2, 1fr); }
  .visual-stage { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .hero { padding: calc(var(--nav-h) + 24px) 20px 36px; min-height: 60svh; }
  .hero-intro { min-height: 60svh; padding-block: 36px; }
  .hero-stats-bar, .timeline-compare, .micro-strip, .market-share-grid, .protocol-grid, .case-beats { grid-template-columns: 1fr; }
  .diorama-stage { height: 290px; }
  .pipe-track { grid-template-columns: repeat(2, 1fr); }
  .brand-tag { display: none; }
}

@media (max-width: 640px) {
  :root { --nav-h: 88px; }
  html { overflow-x: hidden; }
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 6px;
    padding-inline: 12px;
  }
  .topbar-left, .expo-nav { min-width: 0; gap: 6px; }
  .brand-link { white-space: nowrap; font-size: 0.8rem; }
  .search-input-box { width: min(300px, calc(100vw - 160px)); }
  .search-results { position: fixed; inset: var(--nav-h) 12px auto; width: auto; }
  .expo-nav { overflow-x: auto; scrollbar-width: none; }
  .expo-nav > * { flex-shrink: 0; white-space: nowrap; }
  .expo-nav-rule { margin: 0 10px; }
  .mode-toggle, .os-toggle { gap: 10px; }
  .mode-toggle button, .os-toggle button, .topbar .cta-link {
    font-size: 0.65rem;
  }
}

/* ---------------- Faint RCMP Crest Line-Art Watermark ---------------- */
.rcmp-bg-watermark {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('../assets/images/rcmp_crest_lineart.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: min(500px, 64vw) auto;
  opacity: 0.04;
  mix-blend-mode: screen;
}
.hero, .editions-main {
  position: relative;
  z-index: 1;
}

/* ---------------- Editorial INSET + QRT Team Credits ---------------- */
.credit-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}
.inset-logo-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.86;
}
.credit-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.credit-authors {
  font-size: 0.86rem;
  font-weight: 500;
  color: rgba(248, 250, 252, 0.88);
  letter-spacing: 0.005em;
}
.credit-units {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}


.expo-circuit-actions {
  position: absolute;
  z-index: 83;
  top: calc(var(--nav-h) + 16px);
  right: 24px;
}

.expo-circuit-actions:not([hidden]) { display: flex; gap: 6px; }

.expo-circuit-open {
  padding: 10px 14px;
  background: #10163e;
  border: 1px solid #a9baff;
  color: #f1f2ff;
  font: 600 0.78rem var(--font-mono);
  cursor: pointer;
}

.proton-replay { white-space: nowrap; }

.circuit-chapter { padding-top: clamp(42px, 5vw, 72px); }
.circuit-chapter .chapter-opener { min-height: 0; margin-bottom: 24px; }

.circuit-intro {
  max-width: 52ch;
  margin: 10px 0 0;
  color: #d1d6ed;
  line-height: 1.55;
}

.circuit-panel {
  --signal: #d2daff;
  --circuit-rule: #424e86;
  display: block;
  padding: 0;
  background: #0d1238;
  border: 1px solid var(--circuit-rule);
  border-radius: 0;
  color: #edf0ff;
}

.circuit-toolbar,
.circuit-routes {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.circuit-toolbar { justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--circuit-rule); }

.circuit-toolbar button {
  min-height: 36px;
  padding: 6px 13px;
  font: 600 0.73rem var(--font-mono);
  color: #c5cdef;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
}

.circuit-toolbar button:hover,
.circuit-toolbar button[aria-pressed="true"] {
  color: var(--signal);
  background: #1c2555;
  border-color: #59679d;
}

.circuit-toolbar .circuit-play {
  min-width: 90px;
  color: #080d2a;
  background: #edf0ff;
  border-color: #edf0ff;
}

.circuit-toolbar .circuit-play:hover { color: #080d2a; background: var(--signal); }

.circuit-board {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 340px;
  max-height: 405px;
  aspect-ratio: 2.1;
  overflow: hidden;
  isolation: isolate;
  perspective: 1050px;
  background-color: #080c2e;
  background-image: radial-gradient(#323b78 0.7px, transparent 0.9px);
  background-size: 18px 18px;
  box-shadow: inset 0 1px #394573, inset 0 0 32px rgba(0, 0, 0, .24);
}

.circuit-diagram {
  position: absolute;
  inset: 0;
  transform: translateZ(4px);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .circuit-diagram {
    transform: translate3d(var(--circuit-x, 0px), var(--circuit-y, 0px), 4px)
      rotateX(var(--circuit-pitch, 0deg)) rotateY(var(--circuit-yaw, 0deg));
    transition: transform 150ms ease-out;
  }
}
.circuit-wiring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0.8px 2.3px 1.25px rgba(1, 3, 16, .85));
}
.circuit-wire { fill: none; stroke: #404979; stroke-width: 1; vector-effect: non-scaling-stroke; }
.circuit-wire.is-route { stroke: var(--signal); stroke-opacity: 0.65; stroke-width: 1.5; }
.circuit-wire.is-current { stroke-opacity: 1; stroke-width: 2.15; }
.circuit-panel.is-flowing .circuit-wire.is-current { stroke-width: 2.8; filter: drop-shadow(0 0 5px var(--signal)); }
#circuit-packet { fill: #fff; filter: drop-shadow(0 0 4px var(--signal)); }

.circuit-terminal {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 24.2222%;
  height: 16.3866%;
  padding: 4px;
  color: #c1c7e7;
  background: #10163e;
  border: 1px solid #56639a;
  box-shadow: 0 1px 0 #364677, 0 4px 6px rgba(1, 3, 16, .72);
  font: 600 clamp(0.72rem, 1.35vw, 1.08rem) / 1.12 var(--font-sans);
  cursor: pointer;
}

.circuit-terminal svg {
  display: block;
  flex-shrink: 0;
  width: clamp(14px, 1.65vw, 24px);
  height: clamp(14px, 1.65vw, 24px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1.5px 1px rgba(1, 3, 16, .75));
}

.circuit-terminal[data-terminal="company"] {
  z-index: 2;
  color: #fff;
  background: #202965;
  overflow: hidden;
  isolation: isolate;
}

.circuit-company-art {
  position: absolute;
  z-index: -1;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-content: space-around;
  gap: 3px;
  padding: 3px;
  opacity: 0.76;
  pointer-events: none;
}

.circuit-company-art img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; filter: saturate(0.8) blur(0.3px); }
.circuit-company-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(#0d123a48, #0d123a 48%, #0d123a 52%, #0d123a48); }
.circuit-company-label { padding: 2px 5px; color: #fff; text-shadow: 0 1px 5px #05071b; }

.circuit-terminal:has(.circuit-platforms) { flex-direction: column; gap: 5px; }
.circuit-platforms { display: flex; justify-content: center; gap: 10px; }
.circuit-platforms > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #a3aed7;
  font: 600 0.65rem var(--font-mono);
}
.circuit-platforms img { width: 13px; height: 13px; filter: invert(1) drop-shadow(0 1.5px 1px rgba(1, 3, 16, .75)); opacity: 0.58; }
[data-os="ios"] [data-platform="ios"], [data-os="android"] [data-platform="android"] { color: #fff; }
[data-os="ios"] [data-platform="ios"] img, [data-os="android"] [data-platform="android"] img { opacity: 1; }
.circuit-terminal.is-connected { color: #ecf0ff; border-color: #7a8ed0; }
.circuit-terminal.is-current,
.circuit-terminal:hover { color: #fff; background: #202a62; border-color: var(--signal); }
.circuit-panel.is-flowing .circuit-terminal.is-current {
  box-shadow: 0 4px 6px rgba(1, 3, 16, .72), 0 0 10px color-mix(in srgb, var(--signal) 30%, transparent);
}

.circuit-chart {
  position: absolute;
  z-index: 1;
  bottom: 7px;
  left: 0;
  right: 0;
  width: fit-content;
  margin-inline: auto;
  color: #b7c1ed;
  font: 400 clamp(0.59rem, 1vw, 0.7rem) var(--font-mono);
  text-align: center;
}

.circuit-chart a {
  color: #d2dbff;
  margin-inline-start: 6px;
  text-underline-offset: 3px;
}

.circuit-readout { border-top: 1px solid var(--circuit-rule); }
.circuit-steps { list-style: none; margin: 0; padding: 0 10px; display: flex; gap: 3px; }
.circuit-steps button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 12px;
  color: #c2c9e7;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font: 600 0.76rem var(--font-sans);
  cursor: pointer;
}

.circuit-steps button[aria-current="step"],
.circuit-steps button:hover { color: #fff; border-color: var(--signal); }
.circuit-steps button span { color: #a1b2e0; font: 400 0.67rem var(--font-mono); }
.circuit-detail { display: flex; flex-wrap: wrap; gap: 4px 20px; min-height: 58px; padding: 12px 16px; border-top: 1px solid #303c73; color: #e1e6fc; font-size: 0.84rem; line-height: 1.4; }
#circuit-direction { color: var(--signal); font: 600 0.73rem / 1.55 var(--font-mono); }
.circuit-panel button:focus-visible,
.circuit-panel a:focus-visible,
.expo-circuit-open:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.investigator-chapter { padding-bottom: clamp(70px, 8vw, 110px); }
.investigator-panel, .investigator-library, .ito-reference {
  border-color: #577c78;
  background: #102b2b;
}
.investigator-workspace {
  display: grid;
  grid-template-columns: minmax(180px, .83fr) minmax(0, 1.1fr) minmax(0, 1.15fr);
  gap: 15px;
  margin-top: 18px;
}
.investigator-workspace > * { min-width: 0; padding: 14px; border-top: 1px solid #739c95; background: #0c2224; }
.investigator-setup p { font-size: .84rem; }
.investigator-choice, .investigator-fact { display: grid; gap: 6px; margin-bottom: 11px; font-size: .84rem; color: #e0f3ee; }
.investigator-fact { grid-template-columns: auto 1fr; align-items: start; }
.investigator-fact input { margin-top: 3px; accent-color: #8ee2c6; }
.investigator-select { width: 100%; background: #183334; }
.investigator-workspace h4, .investigator-log h4, .investigator-workspace h5, .investigator-source h4 {
  margin: 0 0 9px;
  font-family: var(--font-sans);
  line-height: 1.3;
}
.investigator-workspace h4, .investigator-log h4 { font-size: 1.1rem; }
.investigator-workspace h5, .investigator-source h4 { font-size: .96rem; }
.investigator-route-view h5, .investigator-inspector h5 { color: #c3f0e2; }
.investigator-panel p, .investigator-library p { font-size: .85rem; }
.investigator-actions, .investigator-panel .ed-btn { margin: 5px 4px 5px 0; }
.investigator-panel .ed-btn { text-align: left; white-space: normal; }
.investigator-panel .ed-btn:disabled { opacity: .55; cursor: default; }
.investigator-panel summary { cursor: pointer; padding: 8px 0; font-weight: 650; font-size: .84rem; }
.investigator-conventional { padding: 9px 0; border-block: 1px solid #426966; }
.investigator-conventional p { margin: 5px 0; }
.investigator-status, .investigator-conventional > span { font: .75rem/1.5 var(--font-mono); color: #b3d2c9; }
.investigator-paths { list-style: none; padding: 0; margin: 9px 0; }
.investigator-paths li + li { margin-top: 8px; }
.investigator-paths li span { display: block; font-size: .75rem; color: #c5e4dd; }
.investigator-graph-row { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin: 8px 0; font-size: .75rem; }
.investigator-arrow { color: #9be8cd; font-size: 1.1rem; }
.investigator-details { margin: 0 0 14px; }
.investigator-details > div { border-top: 1px solid #365955; padding: 7px 0; }
.investigator-details dt { font: .74rem/1.4 var(--font-mono); color: #a6d3c6; }
.investigator-details dd { margin: 3px 0 0; font-size: .84rem; line-height: 1.4; }
.investigator-panel .investigator-outcome, .investigator-panel .investigator-feedback {
  border-left: 2px solid #9be8cd;
  background: #17423a;
  margin: 11px 0;
  padding: 8px 10px;
}
.investigator-log { margin-top: 17px; border-top: 1px solid #527773; padding-top: 13px; }
.investigator-log ol { margin: 5px 0; padding-left: 18px; font-size: .82rem; }
.investigator-library, .ito-reference { margin-top: 15px; }
.investigator-library h3, .ito-reference h3 { margin-bottom: 10px; }
.investigator-source-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 10px; }
.investigator-source { background: #11292a; border-top: 1px solid #507974; padding: 11px; }
.investigator-source h4, .investigator-source h5 { margin: 0 0 6px; }
.investigator-source p { margin: 0 0 5px; }
.investigator-reference-date { margin-top: 12px !important; color: #a9c9c2 !important; }
.ito-reference { scroll-margin-top: calc(var(--nav-h) + 28px); }
.ito-reference p { max-width: 94ch; }
#evidence-decisions, #ito-reference-title { scroll-margin-top: calc(var(--nav-h) + 24px); }
.investigator-chapter :focus-visible { outline: 2px solid #c8f7e9; outline-offset: 3px; }
@media (max-width: 980px) {
  .investigator-workspace { grid-template-columns: minmax(160px, .8fr) minmax(0, 1.2fr); }
  .investigator-inspector { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
  .investigator-workspace { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .circuit-chapter { padding-bottom: 64px; }
  .circuit-terminal { flex-direction: column; gap: 3px; padding: 3px; }
  .circuit-terminal svg { width: 14px; height: 14px; }
  .circuit-terminal[data-terminal="portal"] { gap: 2px; font-size: 0.65rem; }
  .circuit-terminal[data-terminal="portal"] svg { width: 12px; height: 12px; }
  .circuit-terminal:has(.circuit-platforms) { gap: 3px; }
  .circuit-platforms { flex-direction: column; align-items: flex-start; gap: 2px; }
  .circuit-platforms > span { font-size: 0.55rem; gap: 2px; }
  .circuit-platforms img { width: 10px; height: 10px; }
  .circuit-toolbar { padding-inline: 4px; }
  .circuit-toolbar button { min-height: 42px; padding-inline: 6px; font-size: 0.66rem; }
  .circuit-toolbar .circuit-play { min-width: 57px; }
  .circuit-company-art { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; padding: 1px; }
  .circuit-steps { flex-wrap: wrap; padding-inline: 4px; gap: 0; }
  .circuit-steps button { padding-inline: 6px; gap: 4px; font-size: 0.7rem; }
  .expo-circuit-actions { right: 12px; top: calc(var(--nav-h) + 8px); }
  .proton-replay { margin-top: 4px; }
}

.notes-header { margin-top: 0; }
.track-footer-heading { margin: 0 0 6px; font: 600 1.38rem/1.3 var(--font-sans); }
