:root {
  --bg: #eef0f4;
  --surface: #ffffff;
  --surface-alt: #f6f7fa;
  --surface-subtle: #ebedf2;
  --viewport: #11141c;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --c-30: #dc2626;
  --c-40: #d97706;
  --c-interp: #7c3aed;
  --c-60: #059669;

  --stage-w: 70vw;
  --top-offset: 12px;
  --lbl-h: clamp(26px, 3.34vh, 36px);
  --top-clearance: clamp(134px, 14.8vh, 158px);

  --radius-xl: 18px;
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 8px;

  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.03), 0 6px 16px rgba(15, 23, 42, 0.04), 0 16px 36px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --shadow-float: 0 2px 6px rgba(15, 23, 42, 0.05), 0 16px 40px rgba(15, 23, 42, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.9);

  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(15, 23, 42, 0.065) 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.label {
  font-size: clamp(11.5px, 1.35vh, 14px);
  font-weight: 650;
  line-height: var(--lbl-h);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

/* ============================================================================
   FLOATING ANCHORED TOP BAR (70vw, ROUNDED CORNERS)
   ============================================================================ */
.top-chrome {
  position: fixed;
  top: var(--top-offset);
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.top-bar-shell {
  pointer-events: auto;
  position: relative;
  width: var(--stage-w);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(15, 23, 42, 0.11);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  overflow: visible;
}

.desktop-console-tab,
.desktop-console-close {
  display: none;
}

@media (min-width: 821px) {
  .top-bar-shell {
    transition: border-bottom-left-radius 0.2s ease;
  }

  html:not(.is-console-open) .top-bar-shell {
    border-bottom-left-radius: 0;
  }

  .topbar {
    transition: border-color 0.22s ease;
  }

  html:not(.is-console-open) .topbar {
    border-bottom-color: transparent;
  }

  .control-pane {
    max-height: 84px;
    opacity: 1;
    transition: max-height 0.24s cubic-bezier(0.22, 1, 0.36, 1), padding 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
  }

  html:not(.is-console-open) .control-pane {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .desktop-console-tab {
    appearance: none;
    position: absolute;
    top: calc(100% - 1px);
    left: -1px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px 6px 14px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(15, 23, 42, 0.11);
    border-top: none;
    border-radius: 0 0 14px var(--radius-xl);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: clamp(13px, 1.4vh, 15px);
    line-height: 20px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.14s ease, background 0.14s ease, padding 0.16s ease, box-shadow 0.16s ease;
  }

  .desktop-console-tab::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.94);
    pointer-events: none;
  }

  .desktop-console-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.98);
    padding-bottom: 8px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.11);
  }

  .desktop-console-tab:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
  }

  .desktop-console-tab .console-tab-load {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: clamp(11px, 1.2vh, 12.5px);
    line-height: 17px;
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  }

  .desktop-console-tab .console-tab-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
    transition: background 0.2s ease;
  }

  .desktop-console-tab[data-tier="mid"] .console-tab-load {
    background: #fffbeb;
    border-color: rgba(217, 119, 6, 0.42);
    color: #b45309;
  }

  .desktop-console-tab[data-tier="mid"] .console-tab-dot {
    background: #d97706;
  }

  .desktop-console-tab[data-tier="high"] .console-tab-load {
    background: #fef2f2;
    border-color: rgba(220, 38, 38, 0.42);
    color: #b91c1c;
  }

  .desktop-console-tab[data-tier="high"] .console-tab-dot {
    background: #dc2626;
  }

  .desktop-console-tab.is-load-pulse {
    animation: consoleTabLoadPulse 0.68s cubic-bezier(0.22, 1, 0.36, 1);
  }

  @keyframes consoleTabLoadPulse {
    0% {
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08), 0 0 0 0 rgba(16, 185, 129, 0.35);
    }
    40% {
      box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12), 0 0 0 5px rgba(16, 185, 129, 0.18);
    }
    100% {
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08), 0 0 0 0 rgba(16, 185, 129, 0);
    }
  }

  .desktop-console-tab .console-tab-chev {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.14s ease, transform 0.16s ease;
  }

  .desktop-console-tab:hover .console-tab-chev {
    opacity: 1;
    transform: translateY(1px);
  }

  html.is-console-open .desktop-console-tab {
    display: none;
  }

  .desktop-console-close {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
  }

  .desktop-console-close:hover {
    background: var(--surface-subtle);
    color: var(--text);
    border-color: var(--border-strong);
  }

  .desktop-console-close:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
  }
}

.topbar {
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.brand-mark {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--text);
}

.brand h1 {
  margin: 0;
  font-size: clamp(15px, 1.65vh, 18px);
  line-height: var(--lbl-h);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
}

.step-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
}

.step-pill {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: clamp(11.8px, 1.28vh, 13.2px);
  line-height: var(--lbl-h);
  font-weight: 600;
  padding: 1px 6.5px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.step-pill:hover {
  color: var(--text);
}

.step-pill.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.step-idx {
  font-family: var(--font-mono);
  font-size: clamp(11.5px, 1.25vh, 13px);
  line-height: var(--lbl-h);
  color: var(--text-dim);
}

.step-pill.active .step-idx {
  color: var(--c-60);
  font-weight: 700;
}

.topbar-right-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-model-guide {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(12px, 1.3vh, 13.5px);
  line-height: var(--lbl-h);
  font-weight: 650;
  padding: 2px 8px 2px 6px;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.btn-model-guide:hover {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.model-q-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.08);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-model-guide:hover .model-q-dot {
  background: rgba(255, 255, 255, 0.22);
}

.btn-share-top {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(12px, 1.3vh, 13.5px);
  line-height: var(--lbl-h);
  font-weight: 650;
  padding: 2px 9px 2px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.1s ease;
}

.btn-share-top:hover {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.btn-share-top:active,
.btn-mob-share:active {
  transform: translateY(0.5px);
}

.btn-share-top:focus-visible,
.btn-mob-share:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.btn-mob-share {
  display: none;
  appearance: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.1s ease;
}

.share-ico {
  flex: 0 0 auto;
}

.share-ico-check {
  display: none;
}

.share-lbl-stack {
  display: inline-grid;
  align-items: center;
  justify-items: center;
}

.share-lbl-stack .lbl-default,
.share-lbl-stack .lbl-copied {
  grid-area: 1 / 1;
  transition: opacity 0.14s ease;
}

.share-lbl-stack .lbl-copied {
  opacity: 0;
  pointer-events: none;
}

.btn-share-top.is-copied,
.btn-share-top.is-copied:hover,
.btn-mob-share.is-copied,
.btn-mob-share.is-copied:hover {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.48);
  color: #059669;
}

.btn-share-top.is-copied .share-ico-link,
.btn-mob-share.is-copied .share-ico-link {
  display: none;
}

.btn-share-top.is-copied .share-ico-check,
.btn-mob-share.is-copied .share-ico-check {
  display: block;
}

.btn-share-top.is-copied .lbl-default,
.btn-mob-share.is-copied .lbl-default {
  opacity: 0;
}

.btn-share-top.is-copied .lbl-copied,
.btn-mob-share.is-copied .lbl-copied {
  opacity: 1;
}

/* Floating confirmation toast for copied setup link */
.share-toast {
  position: fixed;
  top: calc(var(--top-clearance) + 4px);
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.94);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.share-toast[hidden] {
  display: none;
}

.share-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.share-toast-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

/* Non-blocking floating Load change / refresh status pill */
.load-status-toast {
  position: fixed;
  top: calc(var(--top-clearance) + 4px);
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 118;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 28px);
  padding: 6px 13px 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f8fafc;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), top 0.2s ease;
}

@media (min-width: 821px) {
  html:not(.is-console-open) .load-status-toast {
    top: 68px;
  }
}

.load-status-toast[hidden] {
  display: none;
}

.load-status-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.load-toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.24);
}

.load-status-toast[data-tone="mid"] .load-toast-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.26);
}

.load-status-toast[data-tone="high"] .load-toast-dot {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.28);
}

.load-toast-txt {
  overflow: hidden;
  text-overflow: ellipsis;
}

.detector-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 2px 5px 2px 11px;
  flex-shrink: 0;
}

.detector-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-60);
  flex-shrink: 0;
}

.hz-num {
  font-family: var(--font-mono);
  font-size: clamp(13.5px, 1.45vh, 15.5px);
  line-height: var(--lbl-h);
  font-weight: 750;
  color: var(--text);
}

.hz-meta {
  display: none;
}

.btn-remeasure {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(13px, 1.4vh, 14.5px);
  line-height: var(--lbl-h);
  font-weight: 600;
  padding: 0 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.14s ease;
}

.btn-remeasure:hover {
  background: var(--surface-subtle);
}

.detector-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 13px;
  box-shadow: var(--shadow-float);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 90;
}

.detector-pill:hover .detector-popover,
.detector-pill:focus-within .detector-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.detector-note {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--text);
}

.detector-subnote {
  margin: 6px 0 0;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  line-height: 16px;
  color: var(--text-muted);
}

.control-pane {
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.dock-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.dock-label {
  font-size: clamp(13px, 1.4vh, 15px);
  line-height: var(--lbl-h);
  font-weight: 650;
  color: var(--text-muted);
  white-space: nowrap;
}

.dock-sep {
  width: 1px;
  height: 24px;
  background: var(--border-strong);
  flex-shrink: 0;
}

.dock-spacer {
  display: none;
}

.segmented {
  display: inline-flex;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}

.seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: clamp(13px, 1.45vh, 15px);
  line-height: var(--lbl-h);
  font-weight: 650;
  padding: 0 7px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn.active {
  background: var(--text);
  color: #ffffff;
}

/* ============================================================================
   MODERN TACTILE LOAD LEVEL POD (COLOR-REACTIVE SLIDER + TICKS + RESET)
   ============================================================================ */
.load-pod {
  --load-color: #059669;
  --load-tint: rgba(5, 150, 105, 0.14);
  position: relative;
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 2px 5px 2px 7px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

/* Glossy left-to-right sheen sweep on Load pod heartbeat (mirrors Simulation level update sheen) */
.load-pod::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 44%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 18%,
    rgba(255, 255, 255, 0.88) 48%,
    var(--load-tint) 66%,
    transparent 100%
  );
  transform: translate3d(-125%, 0, 0) skewX(-20deg);
  pointer-events: none;
  opacity: 0;
  z-index: 4;
}

.load-pod.is-heartbeat {
  animation: loadPodBeat 0.96s cubic-bezier(0.22, 1, 0.36, 1);
}

.load-pod.is-heartbeat::after {
  animation: loadPodSheen 0.96s cubic-bezier(0.22, 1, 0.36, 1);
}

.load-pod.is-heartbeat .load-slider-wrap::after {
  animation: loadTrackSweep 0.92s cubic-bezier(0.22, 1, 0.36, 1);
}

.load-pod.is-heartbeat .load-slider-wrap input[type="range"]::-webkit-slider-thumb {
  transform: scale(1.16);
  box-shadow: 0 0 0 5px var(--load-tint), 0 2px 6px rgba(15, 23, 42, 0.24);
}

.load-pod.is-heartbeat .load-slider-wrap input[type="range"]::-moz-range-thumb {
  transform: scale(1.16);
  box-shadow: 0 0 0 5px var(--load-tint), 0 2px 6px rgba(15, 23, 42, 0.24);
}

@keyframes loadPodBeat {
  0%   { border-color: var(--border-strong); box-shadow: 0 0 0 0 var(--load-tint); }
  28%  { border-color: var(--load-color);    box-shadow: 0 0 0 4px var(--load-tint), 0 4px 12px rgba(15, 23, 42, 0.08); }
  65%  { border-color: var(--load-color);    box-shadow: 0 0 0 2px var(--load-tint); }
  100% { border-color: var(--border-strong); box-shadow: 0 0 0 0 transparent; }
}

@keyframes loadPodSheen {
  0%   { transform: translate3d(-125%, 0, 0) skewX(-20deg); opacity: 0; }
  18%  { opacity: 1; }
  85%  { opacity: 0.95; }
  100% { transform: translate3d(285%, 0, 0) skewX(-20deg); opacity: 0; }
}

@keyframes loadTrackSweep {
  0%   { transform: scaleX(0); opacity: 0; }
  14%  { opacity: 0.95; }
  68%  { transform: scaleX(1); opacity: 0.9; }
  100% { transform: scaleX(1); opacity: 0; }
}

.load-pod:hover,
.load-pod:focus-within {
  border-color: var(--load-color);
  box-shadow: 0 0 0 3px var(--load-tint);
}

.load-pod[data-tier="mid"] {
  --load-color: #d97706;
  --load-tint: rgba(217, 119, 6, 0.16);
  background: #fffbeb;
  border-color: rgba(217, 119, 6, 0.45);
}

.load-pod[data-tier="high"] {
  --load-color: #dc2626;
  --load-tint: rgba(220, 38, 38, 0.16);
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.45);
}

.load-pod-head {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
}

.load-icon {
  color: var(--load-color);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.load-pod-lbl {
  font-size: clamp(12.5px, 1.35vh, 14px);
  line-height: var(--lbl-h);
  font-weight: 700;
  color: var(--text);
}

.load-scope-tag {
  font-size: 9.5px;
  line-height: 16px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0 5px;
  border-radius: 5px;
  white-space: nowrap;
  background: var(--load-tint);
  color: var(--load-color);
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.load-scope-tag[hidden] {
  display: none;
}

.load-scope-tag[data-scope="motion"] {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.24);
}

.load-scope-tag[data-scope="global"] {
  background: var(--load-tint);
  color: var(--load-color);
  border-color: rgba(15, 23, 42, 0.1);
}

.load-slider-wrap {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: auto;
  min-width: 24px;
  height: var(--lbl-h);
}

/* Luminous left-to-right track highlight suggesting a slide gesture */
.load-slider-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--load-color) 0%, rgba(255, 255, 255, 0.92) 72%, var(--load-color) 100%);
  transform-origin: left center;
  transform: scaleX(0);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.load-slider-wrap input[type="range"] {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--load-color) var(--range-pct, 0%), #cbd5e1 var(--range-pct, 0%));
  cursor: grab;
  margin: 0;
  z-index: 2;
}

.load-slider-wrap input[type="range"]:active {
  cursor: grabbing;
}

.load-slider-wrap input[type="range"]::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  border: 2.5px solid var(--load-color);
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.28);
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.14s ease, border-color 0.2s ease;
}

.load-slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.16);
  box-shadow: 0 0 0 4px var(--load-tint), 0 2px 6px rgba(15, 23, 42, 0.24);
}

.load-slider-wrap input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 0 0 6px var(--load-tint), 0 2px 6px rgba(15, 23, 42, 0.28);
}

.load-slider-wrap input[type="range"]::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 2.5px solid var(--load-color);
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.28);
}

/* 5 subtle detent ticks etched under the slider track (Levels 1..5) */
.load-ticks {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 1;
}

.load-ticks span {
  width: 1.5px;
  height: 4px;
  border-radius: 1px;
  background: rgba(15, 23, 42, 0.24);
}

.load-readout {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 5px;
  height: calc(var(--lbl-h) - 4px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.load-val {
  font-size: clamp(12.5px, 1.4vh, 14.5px);
  line-height: 1;
  font-weight: 750;
  min-width: 22px;
  text-align: right;
  color: var(--text);
}

.load-val.mid { color: #b45309; }
.load-val.high { color: #dc2626; }

.load-dot {
  color: var(--text-dim);
  font-weight: 700;
  font-size: 11px;
}

.load-ms {
  font-size: clamp(11.5px, 1.3vh, 13.5px);
  line-height: 1;
  color: var(--text-muted);
  min-width: 48px;
  text-align: right;
}

.load-ms.spike {
  color: #dc2626;
  font-weight: 750;
}

.load-reset-btn {
  appearance: none;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.load-reset-btn[hidden] {
  display: none;
}

.load-reset-btn:hover {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.dock-actions {
  gap: 8px;
}

/* Tactile hardware-style Load Spike trigger button with live decay bar & keycap */
.btn-explode {
  position: relative;
  overflow: hidden;
  appearance: none;
  background: #dc2626;
  border: 1px solid #991b1b;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: clamp(13px, 1.4vh, 14.5px);
  line-height: var(--lbl-h);
  font-weight: 700;
  padding: 0 9px 0 11px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 0 #991b1b, 0 4px 10px rgba(220, 38, 38, 0.24);
  transform: translateY(-1px);
  transition: background 0.12s ease, transform 0.08s ease, box-shadow 0.08s ease;
}

/* Live spike decay fill bar inside the button */
.btn-explode::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--spike-pct, 0%);
  background: rgba(255, 255, 255, 0.26);
  pointer-events: none;
  z-index: 0;
}

.btn-explode > * {
  position: relative;
  z-index: 1;
}

.spike-icon {
  flex-shrink: 0;
}

.spike-kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 16px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.95);
}

.btn-explode:hover {
  background: #c81e1e;
}

.btn-explode:active,
.btn-explode.active {
  background: #b91c1c;
  transform: translateY(1px);
  box-shadow: 0 0 0 #991b1b, 0 0 0 3px rgba(220, 38, 38, 0.2);
}

/* Heartbeat discovery nudge on Load Spike button (double-beat pulse + glossy glint) */
.btn-explode::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 48%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
  transform: translate3d(-135%, 0, 0) skewX(-20deg);
  pointer-events: none;
  opacity: 0;
  z-index: 0;
}

.btn-explode.is-heartbeat {
  animation: spikeHeartbeat 1.05s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-explode.is-heartbeat::after {
  animation: spikeHeartbeatSheen 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.mob-spike-btn.is-heartbeat {
  animation: spikeHeartbeat 1.05s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes spikeHeartbeat {
  0% {
    transform: translateY(-1px) scale(1);
    box-shadow: 0 2px 0 #991b1b, 0 4px 10px rgba(220, 38, 38, 0.24), 0 0 0 0 rgba(220, 38, 38, 0.55);
  }
  15% {
    transform: translateY(-1.5px) scale(1.06);
    box-shadow: 0 3px 0 #991b1b, 0 6px 18px rgba(220, 38, 38, 0.48), 0 0 0 6px rgba(220, 38, 38, 0.22);
  }
  30% {
    transform: translateY(-1px) scale(1);
    box-shadow: 0 2px 0 #991b1b, 0 4px 10px rgba(220, 38, 38, 0.28), 0 0 0 11px rgba(220, 38, 38, 0);
  }
  46% {
    transform: translateY(-1.5px) scale(1.045);
    box-shadow: 0 3px 0 #991b1b, 0 5px 16px rgba(220, 38, 38, 0.42), 0 0 0 5px rgba(220, 38, 38, 0.18);
  }
  72% {
    transform: translateY(-1px) scale(1);
    box-shadow: 0 2px 0 #991b1b, 0 4px 10px rgba(220, 38, 38, 0.24), 0 0 0 11px rgba(220, 38, 38, 0);
  }
  100% {
    transform: translateY(-1px) scale(1);
    box-shadow: 0 2px 0 #991b1b, 0 4px 10px rgba(220, 38, 38, 0.24), 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

@keyframes spikeHeartbeatSheen {
  0%   { transform: translate3d(-135%, 0, 0) skewX(-20deg); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate3d(280%, 0, 0) skewX(-20deg); opacity: 0; }
}

.btn-pause {
  appearance: none;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(13px, 1.4vh, 14.5px);
  line-height: var(--lbl-h);
  font-weight: 650;
  padding: 0 8px 0 11px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.pause-kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 16px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}

.btn-pause.is-paused {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.btn-pause.is-paused .pause-kbd {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.btn-pause:hover {
  background: var(--surface-subtle);
  border-color: var(--text);
}

/* ============================================================================
   SLIDERS & TOGGLE SWITCHES (24px TEXT HEIGHT)
   ============================================================================ */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--text) var(--range-pct, 0%), #d0d7e2 var(--range-pct, 0%));
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--text);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--text);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  cursor: pointer;
}

.slider-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1px 11px;
  font-size: clamp(13px, 1.45vh, 15px);
  line-height: var(--lbl-h);
  font-weight: 600;
  color: var(--text);
}

.slider-pill input[type="range"] {
  width: 84px;
}

.slider-readout {
  font-size: clamp(12.5px, 1.4vh, 14.5px);
  line-height: var(--lbl-h);
  font-weight: 650;
  color: var(--text-muted);
  min-width: 64px;
  text-align: right;
}

.switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1px 11px 1px 8px;
  font-size: clamp(13px, 1.45vh, 15px);
  line-height: var(--lbl-h);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.14s ease;
}

.switch-pill:hover {
  border-color: var(--text);
}

.switch-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #cbd5e1;
  flex-shrink: 0;
  transition: background 0.16s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.switch-pill input:checked + .switch-track {
  background: var(--text);
}

.switch-pill input:checked + .switch-track::after {
  transform: translateX(14px);
}

/* ============================================================================
   FLOATING SIMULATION NOTICE
   ============================================================================ */
.notice-host {
  position: fixed;
  bottom: 16px;
  right: 20px;
  max-width: min(520px, calc(100vw - 32px));
  z-index: 80;
  pointer-events: none;
}

.notice {
  pointer-events: auto;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid #f0c97a;
  background: rgba(255, 251, 235, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #78350f;
  font-size: 13.5px;
  line-height: 20px;
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notice[hidden] {
  display: none;
}

.notice.info {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.97);
  color: var(--text);
}

.notice button {
  appearance: none;
  background: var(--text);
  border: none;
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 13px;
  line-height: 24px;
  font-weight: 650;
  cursor: pointer;
  flex-shrink: 0;
}

/* ============================================================================
   ZERO-TRACKING COOKIE NOTICE
   ============================================================================ */
.detector-pill.is-power-save {
  background: #fffbeb;
  border-color: rgba(217, 119, 6, 0.45);
}

.detector-pill.is-power-save .detector-dot {
  background: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.22);
}

/* Anchored bottom notification when browser throttles rAF (Chrome Energy Saver / Low Power Mode) */
.power-save-banner {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(780px, calc(100vw - 36px));
  z-index: 88;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px 9px 13px;
  border-radius: 14px;
  border: 1.5px solid rgba(217, 119, 6, 0.46);
  background: rgba(255, 251, 235, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(217, 119, 6, 0.12);
  color: #78350f;
}

.power-save-banner[hidden] {
  display: none;
}

.power-save-ico {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.power-save-text {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.38;
  color: #78350f;
}

.power-save-text strong {
  color: #451a03;
  font-weight: 750;
}

.power-save-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.power-save-recheck {
  appearance: none;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(217, 119, 6, 0.42);
  background: #ffffff;
  color: #92400e;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.power-save-recheck:hover {
  background: #d97706;
  border-color: #d97706;
  color: #ffffff;
}

.power-save-close {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(217, 119, 6, 0.3);
  background: transparent;
  color: #92400e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.power-save-close:hover {
  background: rgba(217, 119, 6, 0.16);
  color: #451a03;
}

.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 20px;
  max-width: min(440px, calc(100vw - 40px));
  z-index: 85;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-float);
  color: var(--text);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

html.is-cookie-ok .cookie-banner {
  display: none;
}

.cookie-banner.is-dismissing {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.cookie-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cookie-title {
  font-size: 12.5px;
  line-height: 18px;
  font-weight: 750;
  color: var(--text);
}

.cookie-text {
  margin: 0;
  font-size: 12px;
  line-height: 17px;
  color: var(--text-muted);
}

.cookie-text strong {
  color: var(--text);
  font-weight: 700;
}

.cookie-ok-btn {
  appearance: none;
  flex-shrink: 0;
  background: var(--text);
  border: 1px solid var(--text);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 28px;
  font-weight: 700;
  padding: 0 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.14s ease, transform 0.1s ease;
}

.cookie-ok-btn:hover {
  opacity: 0.88;
}

.cookie-ok-btn:active {
  transform: scale(0.97);
}

/* ============================================================================
   CENTERED 70vw FULL-VIEWPORT STAGE (ONE UNIFIED PACKED CARD PER VIEW)
   ============================================================================ */
.stage-scroller {
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.stage-scroller::-webkit-scrollbar {
  display: none;
}

.stage-slide {
  height: 100dvh;
  width: 100%;
  padding: var(--top-clearance) 0 18px;
  display: flex;
  justify-content: center;
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: auto 100dvh;
}

.slide-inner {
  width: var(--stage-w);
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  will-change: opacity, transform;
}

.stage-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-head {
  flex: 0 0 auto;
  padding: clamp(8px, 1vh, 12px) 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-kicker {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.35vh, 14px);
  line-height: var(--lbl-h);
  font-weight: 750;
  color: #ffffff;
  background: var(--text);
  padding: 0 9px;
  border-radius: 6px;
}

h2 {
  margin: 0;
  font-size: clamp(18px, 2vh, 22px);
  line-height: var(--lbl-h);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================================
   VIEW 1: MOTION & FRAME PACING (PACKED UNIFIED LANES)
   ============================================================================ */
/* ============================================================================
   VIEW 1: MOTION & FRAME PACING (SIMPLIFIED SCENARIOS ↔ DETAILED TELEMETRY)
   ============================================================================ */
.motion-stack {
  justify-content: center;
  gap: clamp(10px, 1.5vh, 16px);
}

.motion-card {
  height: auto;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.motion-view-switch {
  flex-shrink: 0;
}

.motion-view-switch .seg-btn {
  font-size: clamp(11.5px, 1.25vh, 13px);
  line-height: 24px;
  padding: 0 9px;
}

.motion-body {
  flex: 0 0 auto;
  height: clamp(336px, 46vh, 476px);
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface-alt);
}

#motionSection[data-motion-view="simplified"] .motion-body {
  grid-template-columns: minmax(0, 1fr) clamp(310px, 30vw, 415px);
}

.lanes {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  padding: clamp(8px, 1vh, 12px) 16px clamp(10px, 1.1vh, 14px);
  gap: clamp(6px, 0.85vh, 10px);
  background: var(--surface-alt);
}

#motionSection[data-motion-view="simplified"] .lanes {
  padding-right: 12px;
}

.lane {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Three separate floating rounded containers side-by-side: Track | 60% Info | 40% Live Chart */
.lane-track-unit {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(370px, 33vw, 490px);
  gap: 10px;
}

#motionSection[data-motion-view="simplified"] .lane-track-unit {
  grid-template-columns: 1fr;
}

#motionSection[data-motion-view="simplified"] .lane-telemetry-split {
  display: none;
}

#motionSection[data-motion-view="simplified"] .motion-card .view-controls {
  display: none;
}

#motionSection[data-motion-view="detailed"] .motion-scenarios-pane,
#motionSection[data-motion-view="detailed"] .lane-sim-tag {
  display: none;
}

/* Live compact status tag anchored top-right inside each canvas (Simplified mode only) */
.lane-sim-tag {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  font-size: clamp(10.5px, 1.15vh, 12px);
  line-height: 22px;
  font-weight: 750;
  padding: 1px 8px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.lane-sim-tag.good {
  background: rgba(6, 78, 59, 0.86);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
}

.lane-sim-tag.warn {
  background: rgba(127, 29, 29, 0.88);
  border: 1px solid rgba(248, 113, 113, 0.52);
  color: #fca5a5;
}

.lane-sim-tag.judder {
  background: rgba(120, 53, 15, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.52);
  color: #fde68a;
}

.lane-sim-tag.interp {
  background: rgba(76, 29, 149, 0.86);
  border: 1px solid rgba(167, 139, 250, 0.52);
  color: #ddd6fe;
}

/* Right-hand Load & Stability Scenarios pane (Simplified view) */
.motion-scenarios-pane {
  height: 100%;
  min-height: 0;
  padding: clamp(8px, 1vh, 12px) 16px clamp(10px, 1.1vh, 14px) 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.motion-scenarios-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.motion-scenarios-eyebrow {
  font-size: 10.5px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.motion-scenarios-hint {
  font-size: 11px;
  line-height: 16px;
  color: var(--text-dim);
  font-weight: 550;
}

.motion-scenarios-list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.motion-scenario-btn {
  appearance: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, transform 0.12s ease;
}

.motion-scenario-btn:hover {
  border-color: rgba(15, 23, 42, 0.28);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.ms-row-top {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.ms-idx {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 5px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, color 0.14s ease;
}

.ms-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(12px, 1.3vh, 13.5px);
  line-height: 1.2;
  font-weight: 750;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-load {
  flex-shrink: 0;
  font-size: 10.5px;
  line-height: 17px;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--surface-subtle);
  color: var(--text-muted);
}

.ms-summary {
  padding-left: 25px;
  font-size: clamp(10.5px, 1.15vh, 12px);
  line-height: 1.25;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.motion-scenario-btn.active[data-tier="low"] {
  background: #ecfdf5;
  border-color: rgba(5, 150, 105, 0.55);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.16);
}
.motion-scenario-btn.active[data-tier="low"] .ms-idx {
  background: #059669;
  color: #ffffff;
}
.motion-scenario-btn.active[data-tier="low"] .ms-load {
  background: rgba(5, 150, 105, 0.14);
  color: #047857;
}

.motion-scenario-btn.active[data-tier="mid"] {
  background: #fffbeb;
  border-color: rgba(217, 119, 6, 0.55);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.16);
}
.motion-scenario-btn.active[data-tier="mid"] .ms-idx {
  background: #d97706;
  color: #ffffff;
}
.motion-scenario-btn.active[data-tier="mid"] .ms-load {
  background: rgba(217, 119, 6, 0.15);
  color: #b45309;
}

.motion-scenario-btn.active[data-tier="warn"] {
  background: #fff7ed;
  border-color: rgba(234, 88, 12, 0.58);
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.16);
}
.motion-scenario-btn.active[data-tier="warn"] .ms-idx {
  background: #ea580c;
  color: #ffffff;
}
.motion-scenario-btn.active[data-tier="warn"] .ms-load {
  background: rgba(234, 88, 12, 0.15);
  color: #c2410c;
}

.motion-scenario-btn.active[data-tier="high"] {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.58);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.16);
}
.motion-scenario-btn.active[data-tier="high"] .ms-idx {
  background: #dc2626;
  color: #ffffff;
}
.motion-scenario-btn.active[data-tier="high"] .ms-load {
  background: rgba(220, 38, 38, 0.15);
  color: #b91c1c;
}

.motion-scenario-btn.active .ms-summary {
  color: var(--text-muted);
  font-weight: 550;
}

/* Mobile-only scenario pill row hidden on desktop/tablet */
.motion-mob-scenarios {
  display: none;
}

/* Motion bottom footer right group + quick 1–5 buttons in Detailed view */
.motion-footer-right {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.motion-footer-btns {
  display: none;
  align-items: center;
  gap: 4px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}

#motionSection[data-motion-view="detailed"] .motion-footer-btns {
  display: inline-flex;
}

.mf-btn {
  appearance: none;
  width: 26px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
}

.mf-btn:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.06);
}

.mf-btn.active {
  background: var(--text);
  color: #ffffff;
}

.lane-canvas-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--viewport);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.22);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.lane-badge {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(17, 20, 28, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  padding: 2px 10px;
  pointer-events: none;
}

.lane-badge h3 {
  margin: 0;
  font-size: clamp(12.5px, 1.45vh, 15px);
  line-height: var(--lbl-h);
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
}

.swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}

.swatch-30 { background: var(--c-30); }
.swatch-40 { background: var(--c-40); }
.swatch-interp { background: var(--c-interp); }
.swatch-60 { background: var(--c-60); }

.lane-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--viewport);
}

/* Right telemetry section split into 2 floating cards: 60% stacked info + 40% full-height live chart */
.lane-telemetry-split {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 4fr);
  gap: 8px;
}

.ft-info-card {
  height: 100%;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: clamp(5px, 0.65vh, 8px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(4px, 0.55vh, 6px);
  overflow: hidden;
}

/* 2×2 floating feature cards stacked above the cadence/timing row */
.lane-meta {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(4px, 0.5vh, 6px);
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.2vh, 13px);
  line-height: 1.2;
}

.meta-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface-alt);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  color: var(--text);
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-item.warn {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
  font-weight: 700;
}

.meta-item.good {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
  font-weight: 700;
}

.ft-top {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: clamp(10px, 1.15vh, 11.5px);
  line-height: 15px;
  color: var(--text-dim);
  gap: 6px;
  padding-top: 3px;
  border-top: 1px solid var(--border);
}

.ft-top .mono {
  color: var(--text);
  font-weight: 700;
  font-size: clamp(10px, 1.15vh, 11.5px);
  flex-shrink: 0;
}

/* Separate floating 40% live frame-time bar chart container */
.ft-chart-card {
  height: 100%;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: clamp(6px, 0.8vh, 10px) 8px clamp(4px, 0.6vh, 8px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ft-canvas {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: block;
}

.ft-note {
  font-size: clamp(10px, 1.15vh, 11.5px);
  line-height: 15px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.ft-note.judder {
  color: #b91c1c;
  font-weight: 700;
}

/* ============================================================================
   VIEW 2: EXPONENTIAL SIMULATION LOAD (4 AREAS + INTERACTIVE EXPONENT CURVE)
   ============================================================================ */
.sim-stack {
  justify-content: center;
  gap: 0;
}

.sim-row {
  width: 100%;
  height: clamp(460px, 64vh, 600px);
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(240px, 1fr);
  gap: clamp(12px, 1.4vw, 18px);
  align-items: stretch;
}

.sim-quad {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.1vh, 14px);
}

.sim-area {
  height: 100%;
  min-height: 0;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.sim-area.is-blast-locked {
  border-color: rgba(5, 150, 105, 0.72);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.24), var(--shadow-card);
}

.sim-area.is-blast-stutter {
  border-color: rgba(220, 38, 38, 0.78);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.28), var(--shadow-card);
}

.sim-area.is-blast-interp {
  border-color: rgba(124, 58, 237, 0.65);
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.24), var(--shadow-card);
}

.sim-area-head {
  flex: 0 0 auto;
  padding: clamp(4px, 0.6vh, 8px) 12px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sim-area-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.sim-area-title h3 {
  margin: 0;
  font-size: clamp(12px, 1.35vh, 14.5px);
  line-height: clamp(18px, 2.2vh, 24px);
  font-weight: 750;
  color: var(--text);
  white-space: nowrap;
}

.sim-area-stat {
  font-size: clamp(10.5px, 1.2vh, 12.5px);
  line-height: 18px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
}

.sim-area-stat.good {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.sim-area-stat.warn {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.sim-canvas-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  background: var(--viewport);
}

.sim-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Right-hand Exponential Load Controller Card */
.sim-curve-card {
  height: 100%;
  min-height: 0;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: clamp(10px, 1.3vh, 16px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(8px, 1vh, 12px);
}

.sim-curve-head {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sim-curve-head h2 {
  font-size: clamp(16px, 1.75vh, 20px);
}

.sim-curve-sub {
  margin: 0;
  font-size: clamp(11.5px, 1.25vh, 13.5px);
  line-height: 1.4;
  color: var(--text-muted);
}

.sim-kpis {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.sim-kpi {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: clamp(4px, 0.55vh, 7px) 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.sim-kpi-lbl {
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.sim-kpi-val {
  font-size: clamp(12px, 1.4vh, 15px);
  line-height: 20px;
  font-weight: 750;
  color: var(--text);
}

.sim-kpi-val.mid { color: #b45309; }
.sim-kpi-val.high { color: #dc2626; }

.exp-curve-wrap {
  flex: 1 1 auto;
  min-height: 120px;
  width: 100%;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: ew-resize;
  touch-action: none;
  position: relative;
}

.exp-curve-wrap:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

#expCurveCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sim-level-btns {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.sim-lvl-btn {
  appearance: none;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: clamp(12.5px, 1.4vh, 14.5px);
  line-height: clamp(24px, 2.8vh, 32px);
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.sim-lvl-btn:hover {
  color: var(--text);
  border-color: var(--text);
}

.sim-lvl-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

/* Performance Simplified ↔ Detailed view division */
.sim-curve-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.sim-curve-title-row .card-title-group {
  gap: 8px;
  min-width: 0;
}

.sim-curve-title-row h2 {
  font-size: clamp(14.5px, 1.55vh, 17px);
  white-space: nowrap;
}

.sim-curve-title-row h2 .lbl-compact {
  display: none;
}

.sim-view-switch {
  flex-shrink: 0;
}

.sim-view-switch .seg-btn {
  font-size: clamp(11px, 1.15vh, 12px);
  line-height: 22px;
  padding: 0 7px;
}

/* Contextual section Load quick-trigger pill (02 Performance, 03 Simulation, 04 Latency) */
.sec-load-btn {
  --sec-load-color: #059669;
  --sec-load-tint: rgba(5, 150, 105, 0.14);
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-alt);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 11.5px;
  line-height: 1;
  font-weight: 650;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.18s ease, transform 0.1s ease;
}

.sec-load-btn:hover {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.sec-load-btn:active {
  transform: scale(0.97);
}

.sec-load-btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.sec-load-ico {
  color: var(--sec-load-color);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.sec-load-btn:hover .sec-load-ico {
  color: #34d399;
}

.sec-load-val {
  font-weight: 750;
}

.sec-load-ms {
  font-size: 11px;
  color: var(--text-muted);
  padding-left: 4px;
  border-left: 1px solid var(--border-strong);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.sec-load-btn:hover .sec-load-ms {
  color: #cbd5e1;
  border-left-color: rgba(255, 255, 255, 0.22);
}

.sec-load-btn[data-tier="mid"] {
  --sec-load-color: #d97706;
  --sec-load-tint: rgba(217, 119, 6, 0.18);
  background: #fffbeb;
  border-color: rgba(217, 119, 6, 0.45);
  color: #92400e;
}

.sec-load-btn[data-tier="mid"] .sec-load-ms {
  color: #b45309;
  border-left-color: rgba(217, 119, 6, 0.28);
}

.sec-load-btn[data-tier="high"] {
  --sec-load-color: #dc2626;
  --sec-load-tint: rgba(220, 38, 38, 0.18);
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.45);
  color: #991b1b;
}

.sec-load-btn[data-tier="high"] .sec-load-ms {
  color: #b91c1c;
  border-left-color: rgba(220, 38, 38, 0.28);
}

.sec-load-btn[data-tier="mid"]:hover,
.sec-load-btn[data-tier="high"]:hover {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.sec-load-btn[data-tier="mid"]:hover .sec-load-ms,
.sec-load-btn[data-tier="high"]:hover .sec-load-ms {
  color: #cbd5e1;
  border-left-color: rgba(255, 255, 255, 0.22);
}

.sec-load-btn.is-refresh-pulse {
  animation: secLoadRefreshPulse 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes secLoadRefreshPulse {
  0% {
    box-shadow: 0 0 0 0 var(--sec-load-tint);
  }
  38% {
    box-shadow: 0 0 0 5px var(--sec-load-tint);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.sec-load-sim {
  order: 3;
  width: 100%;
  height: 26px;
  justify-content: space-between;
  padding: 0 9px;
  border-radius: 8px;
}

.sec-load-prefix {
  font-size: 11px;
  font-weight: 650;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.sec-load-sim:hover .sec-load-prefix {
  color: #e2e8f0;
}

.sec-load-sim[data-tier="mid"] .sec-load-prefix {
  color: #b45309;
}

.sec-load-sim[data-tier="high"] .sec-load-prefix {
  color: #b91c1c;
}

.sec-load-sim[data-tier="mid"]:hover .sec-load-prefix,
.sec-load-sim[data-tier="high"]:hover .sec-load-prefix {
  color: #e2e8f0;
}

.sec-load-pill-body {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.latency-head-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

#simSection[data-sim-view="detailed"] .sim-scenarios-list {
  display: none;
}

#simSection[data-sim-view="simplified"] .sim-curve-sub,
#simSection[data-sim-view="simplified"] .sim-kpis,
#simSection[data-sim-view="simplified"] .exp-curve-wrap,
#simSection[data-sim-view="simplified"] .sim-level-btns {
  display: none;
}

@media (min-width: 821px) {
  #simSection .sim-footer-card {
    max-height: 120px;
    margin-top: clamp(12px, 1.8vh, 20px);
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: max-height 0.36s cubic-bezier(0.22, 1, 0.36, 1),
      margin-top 0.36s cubic-bezier(0.22, 1, 0.36, 1),
      padding-top 0.36s cubic-bezier(0.22, 1, 0.36, 1),
      padding-bottom 0.36s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.26s ease 0.06s,
      transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
      border-color 0.24s ease,
      visibility 0s linear 0s;
  }

  #simSection[data-sim-view="simplified"] .sim-footer-card {
    max-height: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-width: 0;
    border-bottom-width: 0;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    box-shadow: none;
    visibility: hidden;
    transition: max-height 0.34s cubic-bezier(0.22, 1, 0.36, 1),
      margin-top 0.34s cubic-bezier(0.22, 1, 0.36, 1),
      padding-top 0.34s cubic-bezier(0.22, 1, 0.36, 1),
      padding-bottom 0.34s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.2s ease,
      transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
      border-color 0.2s ease,
      visibility 0s linear 0.34s;
  }
}

@media (max-width: 820px) {
  #simSection[data-sim-view="simplified"] .sim-footer-card {
    display: none;
  }
}

#simSection[data-sim-view="simplified"] .sim-curve-card {
  justify-content: flex-start;
  gap: 10px;
}

.sim-scenarios-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.sim-scenario-btn {
  appearance: none;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, transform 0.12s ease;
}

.sim-scenario-btn:hover {
  border-color: rgba(15, 23, 42, 0.28);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.sim-sc-desc {
  padding-left: 25px;
  font-size: clamp(10.5px, 1.15vh, 11.8px);
  line-height: 1.32;
  color: var(--text-dim);
  white-space: normal;
}

.sim-scenario-btn.active .sim-sc-desc {
  color: var(--text-muted);
  font-weight: 500;
}

.sim-scenario-btn.active[data-tier="low"] {
  background: #ecfdf5;
  border-color: rgba(5, 150, 105, 0.55);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.16);
}
.sim-scenario-btn.active[data-tier="low"] .ms-idx {
  background: #059669;
  color: #ffffff;
}
.sim-scenario-btn.active[data-tier="low"] .ms-load {
  background: rgba(5, 150, 105, 0.14);
  color: #047857;
}

.sim-scenario-btn.active[data-tier="mid"] {
  background: #fffbeb;
  border-color: rgba(217, 119, 6, 0.55);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.16);
}
.sim-scenario-btn.active[data-tier="mid"] .ms-idx {
  background: #d97706;
  color: #ffffff;
}
.sim-scenario-btn.active[data-tier="mid"] .ms-load {
  background: rgba(217, 119, 6, 0.15);
  color: #b45309;
}

.sim-scenario-btn.active[data-tier="warn"] {
  background: #fff7ed;
  border-color: rgba(234, 88, 12, 0.58);
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.16);
}
.sim-scenario-btn.active[data-tier="warn"] .ms-idx {
  background: #ea580c;
  color: #ffffff;
}
.sim-scenario-btn.active[data-tier="warn"] .ms-load {
  background: rgba(234, 88, 12, 0.15);
  color: #c2410c;
}

.sim-scenario-btn.active[data-tier="high"] {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.58);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.16);
}
.sim-scenario-btn.active[data-tier="high"] .ms-idx {
  background: #dc2626;
  color: #ffffff;
}
.sim-scenario-btn.active[data-tier="high"] .ms-load {
  background: rgba(220, 38, 38, 0.15);
  color: #b91c1c;
}

/* Modern eye-catching floating scenario notification banner */
.sim-footer-card {
  --sim-accent: #059669;
  --sim-tint: rgba(5, 150, 105, 0.12);
  --sim-bg: #ffffff;
  --sim-border: rgba(5, 150, 105, 0.28);
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  width: 100%;
  background: var(--sim-bg);
  border: 1.5px solid var(--sim-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06), 0 0 0 0 var(--sim-tint);
  padding: clamp(10px, 1.3vh, 15px) clamp(14px, 1.6vw, 20px) clamp(10px, 1.3vh, 15px) clamp(18px, 1.8vw, 24px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 18px);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.sim-footer-card[data-tier="mid"] {
  --sim-accent: #d97706;
  --sim-tint: rgba(217, 119, 6, 0.16);
  --sim-bg: #fffdf7;
  --sim-border: rgba(217, 119, 6, 0.42);
}

.sim-footer-card[data-tier="warn"] {
  --sim-accent: #ea580c;
  --sim-tint: rgba(234, 88, 12, 0.18);
  --sim-bg: #fffaf5;
  --sim-border: rgba(234, 88, 12, 0.46);
}

.sim-footer-card[data-tier="high"] {
  --sim-accent: #dc2626;
  --sim-tint: rgba(220, 38, 38, 0.2);
  --sim-bg: #fff8f8;
  --sim-border: rgba(220, 38, 38, 0.5);
}

/* Left severity accent bar */
.sim-footer-accent {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--sim-accent);
  transition: background 0.25s ease;
}

/* Diagonal sheen sweep when level updates */
.sim-footer-card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 35%;
  background: linear-gradient(90deg, transparent, var(--sim-tint), transparent);
  transform: translate3d(-115%, 0, 0) skewX(-18deg);
  pointer-events: none;
  opacity: 0;
}

.sim-footer-card.is-updating {
  animation: simCardPop 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.sim-footer-card.is-updating::after {
  animation: simSheenSweep 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

.sim-footer-card.is-updating .sim-footer-badge {
  animation: simBadgePop 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.sim-footer-card.is-updating .sim-footer-title,
.sim-footer-card.is-updating .sim-footer-desc,
.sim-footer-card.is-updating .sim-impact-pill {
  animation: simTextEnter 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes simCardPop {
  0%   { transform: scale(0.994); box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06), 0 0 0 0 var(--sim-tint); }
  38%  { transform: scale(1.012); box-shadow: 0 10px 28px rgba(15, 23, 42, 0.11), 0 0 0 6px var(--sim-tint); }
  100% { transform: scale(1);     box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06), 0 0 0 0 transparent; }
}

@keyframes simSheenSweep {
  0%   { transform: translate3d(-115%, 0, 0) skewX(-18deg); opacity: 0; }
  25%  { opacity: 1; }
  100% { transform: translate3d(340%, 0, 0) skewX(-18deg); opacity: 0; }
}

@keyframes simBadgePop {
  0%   { transform: scale(0.88); }
  55%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes simTextEnter {
  0%   { opacity: 0.2; transform: translateY(6px); }
  100% { opacity: 1;   transform: translateY(0); }
}

.sim-footer-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 11px;
  padding-right: clamp(12px, 1.4vw, 18px);
  border-right: 1px solid var(--border-strong);
}

.sim-footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(11px, 1.25vh, 12.5px);
  line-height: 24px;
  font-weight: 750;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--sim-accent);
  color: #ffffff;
  white-space: nowrap;
  transition: background 0.25s ease;
}

.sim-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  animation: simDotPulse 1.6s ease-in-out infinite;
}

@keyframes simDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.75); }
}

.sim-footer-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sim-footer-title {
  font-size: clamp(13.5px, 1.5vh, 15.5px);
  line-height: 20px;
  font-weight: 750;
  color: var(--text);
  white-space: nowrap;
}

.sim-meter {
  display: flex;
  gap: 3px;
}

.sim-meter span {
  width: 14px;
  height: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.14);
  transition: background 0.2s ease, transform 0.2s ease;
}

.sim-meter span.is-lit {
  background: var(--sim-accent);
}

.sim-footer-desc {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: clamp(12.5px, 1.4vh, 14.5px);
  line-height: clamp(18px, 2.1vh, 22px);
  color: var(--text);
}

.sim-impact-pill {
  flex: 0 0 auto;
  font-size: clamp(11px, 1.2vh, 12.5px);
  line-height: 24px;
  font-weight: 750;
  padding: 2px 10px;
  border-radius: 7px;
  background: var(--sim-tint);
  color: var(--sim-accent);
  border: 1px solid var(--sim-border);
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* ============================================================================
   VIEW 3: CONSTANT 30 HZ SIMULATION STEP ACROSS ENVIRONMENTS
   ============================================================================ */
.phys-card {
  flex: 1 1 auto;
  min-height: 0;
}

.phys-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.44fr) minmax(248px, 0.84fr);
  gap: 0;
}

.phys-tracks-col {
  height: 100%;
  min-height: 0;
  padding: clamp(8px, 1vh, 12px) 16px clamp(10px, 1.1vh, 14px);
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1vh, 12px);
}

.phys-chamber {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phys-chamber[data-tier="mid"] {
  border-color: rgba(217, 119, 6, 0.34);
}

.phys-chamber[data-tier="warn"] {
  border-color: rgba(234, 88, 12, 0.42);
}

.phys-chamber[data-tier="high"] {
  border-color: rgba(220, 38, 38, 0.44);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.1);
}

.phys-chamber-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.phys-chamber-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.phys-chamber-title h3 {
  margin: 0;
  font-size: clamp(12px, 1.3vh, 13.5px);
  line-height: 20px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phys-pill {
  flex: 0 0 auto;
  font-size: clamp(10.5px, 1.15vh, 11.5px);
  line-height: 20px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.phys-pill.good {
  background: rgba(16, 185, 129, 0.11);
  border-color: rgba(16, 185, 129, 0.28);
  color: #047857;
}

.phys-pill.mid {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.32);
  color: #b45309;
}

.phys-pill.warn {
  background: rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.34);
  color: #c2410c;
}

.phys-pill.bad {
  background: rgba(220, 38, 38, 0.11);
  border-color: rgba(220, 38, 38, 0.32);
  color: #b91c1c;
}

.phys-canvas-wrap {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  background: var(--viewport);
}

.phys-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Footer anchor & expandable educational More pane (Desktop: expands up from More btn, no backdrop) */
.phys-footer-anchor {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
}

.phys-footer-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.phys-more-btn {
  appearance: none;
  flex: 0 0 auto;
  height: 30px;
  padding: 0 9px 0 11px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.1s ease;
}

.phys-more-btn:hover {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.phys-more-btn[aria-expanded="true"] {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.phys-more-chev {
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.phys-more-btn[aria-expanded="true"] .phys-more-chev {
  transform: rotate(180deg);
}

.phys-more-backdrop {
  display: none;
}

.phys-more-pane {
  --more-accent: #059669;
  --more-tint: rgba(5, 150, 105, 0.1);
  --more-border: rgba(5, 150, 105, 0.28);
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 100%;
  z-index: 95;
  background: var(--surface);
  border: 1.5px solid var(--more-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18), 0 4px 14px rgba(15, 23, 42, 0.08);
  padding: 13px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform-origin: bottom right;
  opacity: 0;
  transform: translateY(14px) scale(0.92);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.2s;
}

.phys-more-pane[data-tier="mid"] {
  --more-accent: #d97706;
  --more-tint: rgba(217, 119, 6, 0.12);
  --more-border: rgba(217, 119, 6, 0.38);
}

.phys-more-pane[data-tier="warn"] {
  --more-accent: #ea580c;
  --more-tint: rgba(234, 88, 12, 0.12);
  --more-border: rgba(234, 88, 12, 0.42);
}

.phys-more-pane[data-tier="high"] {
  --more-accent: #dc2626;
  --more-tint: rgba(220, 38, 38, 0.12);
  --more-border: rgba(220, 38, 38, 0.42);
}

.phys-more-pane::after {
  content: "";
  position: absolute;
  right: 26px;
  bottom: -6px;
  width: 11px;
  height: 11px;
  background: var(--surface);
  border-right: 1.5px solid var(--more-border);
  border-bottom: 1.5px solid var(--more-border);
  transform: rotate(45deg);
}

.phys-more-pane.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
}

.phys-more-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}

.phys-more-title-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.phys-more-pane .sim-footer-badge {
  background: var(--more-accent);
  color: #ffffff;
  font-size: 10.5px;
  line-height: 20px;
  padding: 1px 8px;
}

.phys-more-title {
  margin: 0;
  font-size: 14.5px;
  line-height: 20px;
  font-weight: 750;
  color: var(--text);
}

.phys-more-close {
  appearance: none;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-alt);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.phys-more-close:hover {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.phys-more-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.phys-more-block {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.phys-more-takeaway {
  background: var(--more-tint);
  border-color: var(--more-border);
}

.phys-more-kicker {
  font-size: 10px;
  line-height: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--more-accent);
}

.phys-more-block p {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.44;
  color: var(--text);
}

/* ============================================================================
   VIEW 4: INPUT LATENCY & TRACKING (SEPARATED FLOATING STACK, 50vh SIGHT, 5vh GAPS)
   ============================================================================ */
.latency-stack {
  justify-content: center;
  gap: 5vh;
}

.latency-top-card {
  flex: 0 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.tabs-bar {
  flex: 0 0 auto;
  padding: clamp(6px, 0.85vh, 10px) 18px;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 1480px) {
  .tabs-bar .inline-tip {
    display: none;
  }
}

.tabs {
  display: inline-flex;
  gap: 3px;
  flex-wrap: wrap;
  background: var(--surface-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.tab {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: clamp(13px, 1.45vh, 15px);
  line-height: var(--lbl-h);
  font-weight: 650;
  padding: 1px 12px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.14s ease, color 0.14s ease;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  background: var(--text);
  color: #ffffff;
}

.tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.inline-tip {
  margin: 0;
  font-size: clamp(13px, 1.45vh, 15px);
  line-height: var(--lbl-h);
  color: var(--text-muted);
}

.arena-checks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.arena-wrap.latency-sight-card {
  flex: 0 0 auto;
  height: 40vh;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: var(--viewport);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(15, 23, 42, 0.22);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
}

#arenaCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

#arenaCanvas.hide-cursor {
  cursor: none;
}

.arena-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 20, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 2px 16px;
  border-radius: 999px;
  font-size: clamp(13px, 1.45vh, 15px);
  line-height: var(--lbl-h);
  color: #f1f5f9;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.arena-hint.hidden {
  opacity: 0;
}

.metrics-strip.latency-footer-card {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1.32fr 0.82fr 1.38fr 1.32fr 0.82fr;
  background: var(--border);
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.metric-cell {
  background: var(--surface-alt);
  padding: clamp(6px, 0.9vh, 12px) clamp(10px, 1.2vw, 18px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}

.metric-cell .label {
  font-size: clamp(11.5px, 1.35vh, 14px);
  line-height: var(--lbl-h);
  white-space: nowrap;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.5vh, 16px);
  line-height: var(--lbl-h);
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-val.warn { color: #dc2626; }
.metric-val.good { color: #047857; }

/* ============================================================================
   VIEW 4: ANIMATED FRAME PIPELINE PRESENTATION
   ============================================================================ */
.pipe-stack {
  justify-content: center;
}

.pipe-card {
  width: 100%;
  height: clamp(460px, 58vh, 620px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pipe-mode-tabs {
  display: inline-flex;
  gap: 3px;
  background: var(--surface-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.pipe-mode-tab {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: clamp(11.5px, 1.3vh, 13.5px);
  line-height: clamp(22px, 2.6vh, 30px);
  font-weight: 650;
  padding: 1px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.14s ease, color 0.14s ease;
}

.pipe-mode-tab:hover {
  color: var(--text);
}

.pipe-mode-tab.active {
  background: var(--text);
  color: #ffffff;
}

.pipe-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pipe-status {
  font-size: clamp(11.5px, 1.3vh, 13px);
  line-height: var(--lbl-h);
  font-weight: 700;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-alt);
  color: var(--text);
}

.pipe-status.good {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.pipe-status.warn {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.pipe-total {
  font-size: clamp(11.5px, 1.3vh, 13.5px);
  line-height: var(--lbl-h);
  font-weight: 700;
  color: var(--text);
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0 10px;
}

.pipe-nav-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pipe-btn {
  appearance: none;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(12.5px, 1.35vh, 14px);
  line-height: var(--lbl-h);
  font-weight: 650;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.pipe-btn:hover:not(:disabled) {
  background: var(--surface-subtle);
  border-color: var(--text);
}

.pipe-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pipe-btn.is-finish {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.pipe-btn.is-finish:hover:not(:disabled) {
  background: #1e293b;
  border-color: #1e293b;
}

.pipe-step-counter {
  font-size: clamp(12px, 1.3vh, 13.5px);
  font-weight: 700;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
}

/* Center Hardware Pipeline Stage */
.pipe-stage-area {
  flex: 1 1 auto;
  min-height: 0;
  padding: clamp(14px, 2vh, 24px) clamp(16px, 2vw, 28px);
  background: var(--surface-alt);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(14px, 2vh, 22px);
}

.pipe-diagram {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.2fr 0.65fr 1.2fr 0.85fr 1.2fr 0.65fr 1.2fr;
  align-items: center;
  gap: 6px;
}

.pipe-node {
  height: clamp(128px, 18vh, 186px);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(8px, 1.1vh, 12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0.52;
  transform: translateY(2px);
  cursor: pointer;
  transition: opacity 0.26s cubic-bezier(0.22, 1, 0.36, 1), transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.26s ease, box-shadow 0.26s ease;
}

.pipe-node:hover:not(.is-active) {
  opacity: 0.85;
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, 0.35);
}

.pipe-node.is-done {
  opacity: 0.88;
  transform: translateY(0);
  border-color: rgba(5, 150, 105, 0.45);
}

.pipe-node.is-active {
  opacity: 1;
  transform: translateY(-4px);
  border-color: var(--text);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12), 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.pipe-node-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.pipe-node-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 18px;
  font-weight: 750;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--surface-subtle);
  color: var(--text);
}

.pipe-node.is-active .pipe-node-badge {
  background: var(--text);
  color: #ffffff;
}

.pipe-node.is-done .pipe-node-badge {
  background: #ecfdf5;
  color: #047857;
}

.pipe-node-ms {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.pipe-node.is-active .pipe-node-ms {
  color: var(--text);
}

.pipe-node-lbl {
  font-size: clamp(11.5px, 1.3vh, 13.5px);
  line-height: 18px;
  font-weight: 650;
  color: var(--text-muted);
  text-align: center;
}

.pipe-node.is-active .pipe-node-lbl {
  color: var(--text);
}

/* Visual Boxes Inside Each Hardware Node */
.pipe-visual {
  flex: 1 1 auto;
  margin: 6px 0;
  border-radius: var(--radius-sm);
  background: var(--viewport);
  position: relative;
  overflow: hidden;
  contain: layout paint;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CPU Bars Animation */
.pipe-vis-cpu {
  gap: 6px;
  align-items: flex-end;
  padding: 10px 14px;
}

.cpu-bar {
  width: 10px;
  height: 92%;
  transform-origin: bottom;
  transform: scaleY(0.38);
  border-radius: 3px;
  background: #38bdf8;
  opacity: 0.45;
  will-change: transform;
}

.pipe-node.is-active .cpu-bar,
.intro-tile.is-active .cpu-bar {
  opacity: 1;
  animation: cpuPulse 0.85s ease-in-out infinite alternate;
}

.pipe-node.is-active .cpu-bar.b2,
.intro-tile.is-active .cpu-bar.b2 { animation-delay: 0.18s; }
.pipe-node.is-active .cpu-bar.b3,
.intro-tile.is-active .cpu-bar.b3 { animation-delay: 0.36s; }
.pipe-node.is-active .cpu-bar.b4,
.intro-tile.is-active .cpu-bar.b4 { animation-delay: 0.54s; }

@keyframes cpuPulse {
  0%   { transform: scaleY(0.24); background: #38bdf8; }
  100% { transform: scaleY(1); background: #0ea5e9; }
}

/* GPU Framebuffer Raster Sweep */
.pipe-vis-gpu {
  padding: 8px;
}

.gpu-frame {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  position: relative;
}

.gpu-tile {
  border-radius: 3px;
  background: rgba(124, 58, 237, 0.25);
  border: 1px solid rgba(167, 139, 250, 0.35);
}

.pipe-node.is-active .gpu-tile,
.intro-tile.is-active .gpu-tile {
  animation: gpuTileLit 1.2s ease-in-out infinite;
}

.pipe-node.is-active .gpu-tile.t2,
.intro-tile.is-active .gpu-tile.t2 { animation-delay: 0.2s; }
.pipe-node.is-active .gpu-tile.t3,
.intro-tile.is-active .gpu-tile.t3 { animation-delay: 0.4s; }
.pipe-node.is-active .gpu-tile.t4,
.intro-tile.is-active .gpu-tile.t4 { animation-delay: 0.6s; }

.gpu-sweep {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.65), transparent);
  transform: translate3d(-110%, 0, 0);
  will-change: transform;
  opacity: 0;
}

.pipe-node.is-active .gpu-sweep,
.intro-tile.is-active .gpu-sweep {
  opacity: 1;
  animation: gpuSweep 1.2s linear infinite;
}

@keyframes gpuTileLit {
  0%, 100% { background: rgba(124, 58, 237, 0.22); }
  50%      { background: rgba(167, 139, 250, 0.72); }
}

@keyframes gpuSweep {
  0%   { transform: translate3d(-110%, 0, 0); }
  100% { transform: translate3d(475%, 0, 0); }
}

/* HDMI Signal Stream */
.pipe-vis-hdmi {
  flex-direction: column;
  gap: 7px;
  padding: 10px 10px;
}

.hdmi-pulse {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  position: relative;
  overflow: hidden;
}

.hdmi-pulse::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 42%;
  border-radius: 999px;
  background: #f59e0b;
  transform: translate3d(-108%, 0, 0);
  will-change: transform;
  opacity: 0.4;
}

.pipe-node.is-active .hdmi-pulse::after,
.intro-tile.is-active .hdmi-pulse::after {
  opacity: 1;
  animation: hdmiStream 0.75s linear infinite;
}

.pipe-node.is-active .hdmi-pulse.h2::after,
.intro-tile.is-active .hdmi-pulse.h2::after { animation-delay: 0.22s; }
.pipe-node.is-active .hdmi-pulse.h3::after,
.intro-tile.is-active .hdmi-pulse.h3::after { animation-delay: 0.44s; }

@keyframes hdmiStream {
  0%   { transform: translate3d(-108%, 0, 0); }
  100% { transform: translate3d(250%, 0, 0); }
}

/* Display Top-to-Bottom Scanout */
.pipe-vis-disp {
  padding: 7px;
}

.disp-screen {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0b0e14;
  position: relative;
  overflow: hidden;
}

.disp-lit {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  transform-origin: top;
  transform: scaleY(0);
  will-change: transform;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.42), rgba(16, 185, 129, 0.18));
}

.disp-scanbeam {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  border-top: 3px solid #10b981;
  background: transparent;
  box-shadow: inset 0 6px 10px -4px #10b981;
  transform: translate3d(0, 0%, 0);
  will-change: transform;
  opacity: 0;
}

.pipe-node.is-active .disp-lit,
.intro-tile.is-active .disp-lit {
  animation: screenFill 1.15s linear infinite;
}

.pipe-node.is-active .disp-scanbeam,
.intro-tile.is-active .disp-scanbeam {
  opacity: 1;
  animation: scanoutBeam 1.15s linear infinite;
}

@keyframes screenFill {
  0%   { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}

@keyframes scanoutBeam {
  0%   { transform: translate3d(0, 0%, 0); }
  100% { transform: translate3d(0, 96%, 0); }
}

/* Links Between Nodes (PCIe, V-Sync Gate, TCON) */
.pipe-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  opacity: 0.45;
  transition: opacity 0.25s ease;
}

.pipe-link.is-active,
.pipe-link.is-done {
  opacity: 1;
}

.pipe-link-lbl,
.pipe-link-ms {
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
}

.pipe-link.is-active .pipe-link-lbl,
.pipe-link.is-active .pipe-link-ms {
  color: var(--text);
}

.pipe-wire {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #dce2ec;
  position: relative;
  overflow: hidden;
  contain: layout paint;
}

.pipe-packet {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 0;
  width: 28%;
  border-radius: 999px;
  background: var(--text);
  transform: translate3d(-108%, 0, 0);
  will-change: transform;
  opacity: 0;
}

.pipe-link.is-active .pipe-packet,
.intro-tile.is-active .pipe-packet {
  opacity: 1;
  animation: packetSlide 0.85s linear infinite;
}

.pipe-link.is-active .pipe-packet.p2,
.intro-tile.is-active .pipe-packet.p2 {
  animation-delay: 0.42s;
}

@keyframes packetSlide {
  0%   { transform: translate3d(-108%, 0, 0); }
  100% { transform: translate3d(375%, 0, 0); }
}

.pipe-gate {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  background: #d97706;
  border-radius: 2px;
}

.pipe-link-vsync.is-active .pipe-gate,
.intro-tile.is-active .pipe-gate {
  animation: vsyncGate 0.9s ease-in-out infinite;
}

@keyframes vsyncGate {
  0%, 40%  { opacity: 1; background: #dc2626; }
  60%, 100% { opacity: 0.2; background: #059669; }
}

/* Proportional Millisecond Breakdown Bar */
.pipe-timeline-bar {
  flex: 0 0 auto;
  height: clamp(26px, 3.2vh, 34px);
  display: flex;
  gap: 3px;
  width: 100%;
}

.pipe-seg {
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.15vh, 12px);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  padding: 0 6px;
  opacity: 0.5;
  cursor: pointer;
  transition: flex-grow 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease, transform 0.22s ease;
}

.pipe-seg:hover:not(.is-active) {
  opacity: 0.85;
}

.pipe-seg.is-done { opacity: 0.78; }
.pipe-seg.is-active { opacity: 1; transform: scaleY(1.06); }

.pipe-node.is-missed {
  border-color: #dc2626;
  background: #fffafa;
}

.pipe-node.is-missed .pipe-node-ms {
  color: #dc2626;
}

.seg-vsync.is-interp {
  background: #f5f3ff;
  border-color: #7c3aed;
  border-style: dashed;
  color: #5b21b6;
}

.seg-gpu.is-missed,
.seg-vsync.is-missed {
  background: #fef2f2;
  border-color: #dc2626;
  color: #991b1b;
}

.seg-cpu   { background: #e0f2fe; border: 1.5px solid #0284c7; color: #0c4a6e; }
.seg-gpu   { background: #ede9fe; border: 1.5px solid #7c3aed; color: #4c1d95; }
.seg-vsync { background: #fef3c7; border: 1.5px solid #d97706; color: #78350f; }
.seg-hdmi  { background: #ffedd5; border: 1.5px solid #ea580c; color: #7c2d12; }
.seg-disp  { background: #d1fae5; border: 1.5px solid #059669; color: #064e3b; }

/* Narrative Footer & Step Pills */
.pipe-footer {
  flex: 0 0 auto;
  padding: clamp(10px, 1.4vh, 16px) 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1vh, 12px);
}

.pipe-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pipe-stage-title {
  font-size: clamp(14.5px, 1.6vh, 17px);
  line-height: 24px;
  font-weight: 750;
  color: var(--text);
}

.pipe-stage-desc {
  margin: 0;
  font-size: clamp(13px, 1.4vh, 14.5px);
  line-height: 21px;
  color: var(--text-muted);
}

.pipe-steps-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pipe-step-pill {
  appearance: none;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: clamp(11.5px, 1.25vh, 13px);
  line-height: clamp(22px, 2.6vh, 28px);
  font-weight: 650;
  padding: 0 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.pipe-step-pill:hover {
  color: var(--text);
  border-color: var(--text);
}

.pipe-step-pill.active {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.pipe-scroll-hint {
  margin-left: auto;
  font-size: clamp(11.5px, 1.25vh, 13px);
  font-weight: 600;
  color: var(--text-dim);
}

/* ============================================================================
   VIEW 5: REFRESH CYCLE MAPPING (50vh SIDE-BY-SIDE ROW: MAP + 4 COMMENTS)
   ============================================================================ */
.timeline-stack {
  justify-content: center;
}

.timeline-row {
  width: 100%;
  height: 50vh;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(240px, 1fr);
  gap: clamp(12px, 1.4vw, 18px);
  align-items: stretch;
}

.timeline-main-card {
  height: 100%;
  min-height: 0;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.timeline-meta {
  font-size: clamp(11.5px, 1.3vh, 14px);
  line-height: var(--lbl-h);
  font-weight: 650;
  color: var(--text-muted);
}

.timeline-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: clamp(8px, 1.1vh, 14px) 16px clamp(10px, 1.3vh, 16px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.timeline-board {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 0.9vh, 12px);
}

.tl-axis-row {
  display: grid;
  grid-template-columns: clamp(128px, 11.5vw, 176px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.tl-axis-label {
  font-family: var(--font-mono);
  font-size: clamp(10.5px, 1.2vh, 12.5px);
  line-height: 18px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tl-axis-ticks {
  position: relative;
  height: 18px;
}

.tl-tick-lbl {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 18px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.tl-tick-lbl.is-start {
  transform: translateX(0);
}

.tl-tick-lbl.is-end {
  transform: translateX(-100%);
}

.tl-row {
  display: grid;
  grid-template-columns: clamp(128px, 11.5vw, 176px) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  min-height: 0;
  border-radius: var(--radius-sm);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.tl-row.is-highlighted {
  background: rgba(15, 23, 42, 0.04);
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.04);
}

.tl-row-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}

.tl-row-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: clamp(12px, 1.4vh, 14.5px);
  line-height: 20px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.tl-row-sub {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.15vh, 12px);
  line-height: 16px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-row-sub.warn {
  color: #b91c1c;
}

.tl-track {
  position: relative;
  height: 100%;
  min-height: 0;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
}

.tl-gridline {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 0;
  border-left: 1px dashed #d8dee8;
  pointer-events: none;
}

.lbl-compact {
  display: none;
}

@media (max-width: 1180px) {
  .lbl-wide {
    display: none;
  }

  .lbl-compact {
    display: inline;
  }
}

.tl-block {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.15vh, 12px);
  font-weight: 700;
  overflow: visible;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  cursor: default;
}

.tl-block:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 1px;
  z-index: 8;
}

.tl-block[data-tip]:hover,
.tl-block[data-tip]:focus-visible {
  z-index: 9;
}

.tl-block[data-tip]:hover::after,
.tl-block[data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  line-height: 15px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
}

.tl-txt {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-short {
  display: none;
}

@media (max-width: 1520px) {
  .tl-block.is-narrow .tl-dur {
    display: none;
  }
  .tl-full {
    display: none;
  }
  .tl-short {
    display: inline;
  }
}

.tl-block:hover {
  z-index: 5;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
}

.tl-block.mode-30 {
  background: rgba(220, 38, 38, 0.1);
  border-color: #dc2626;
  color: #7f1d1d;
}

.tl-block.mode-40 {
  background: rgba(217, 119, 6, 0.12);
  border-color: #d97706;
  color: #78350f;
}

.tl-block.mode-60 {
  background: rgba(5, 150, 105, 0.11);
  border-color: #059669;
  color: #064e3b;
}

.tl-block.is-missed,
.tl-block.is-judder-long {
  background: #fef2f2;
  border-color: #dc2626;
  color: #991b1b;
}

.tl-block.is-judder-short {
  background: #fffbeb;
  border-color: #d97706;
  color: #92400e;
}

.tl-block.interp-buf {
  background: #f5f3ff;
  border: 1.5px dashed #8b5cf6;
  color: #5b21b6;
}

.tl-block.interp-real {
  background: #ede9fe;
  border-color: #7c3aed;
  color: #4c1d95;
}

.tl-block.interp-fake {
  background: #faf5ff;
  border: 1.5px dashed #c4b5fd;
  color: #6d28d9;
}

/* 4 stacked comment cards matching the exact 50vh height of .timeline-main-card */
.notes-strip {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1vh, 12px);
  background: transparent;
  border-top: none;
}

.note-item {
  height: 100%;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(6px, 0.9vh, 12px) clamp(12px, 1.2vw, 16px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.note-item:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* ============================================================================
   FLOATING RIGHT-MARGIN PROGRESS RAIL + SCROLL CAPSULE (OUTSIDE 70vw STAGE)
   ============================================================================ */
.rail-cluster {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 65;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 10px 6px;
  box-shadow: var(--shadow-card);
}

.rail-dot {
  position: relative;
  appearance: none;
  border: none;
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.22);
  cursor: pointer;
  transition: height 0.24s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
}

.rail-dot:hover {
  background: rgba(15, 23, 42, 0.55);
}

/* ============================================================================
   DESKTOP FIRST-VISIT SCROLL DOWN CAPSULE (INTEGRATED BELOW .rail-nav)
   ============================================================================ */
.scroll-next-hint {
  display: none;
}

@media (min-width: 1181px) and (min-height: 641px) {
  .scroll-next-hint {
    appearance: none;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 32px;
    max-height: 64px;
    padding: 7px 0 8px;
    background: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22), 0 0 0 0 rgba(16, 185, 129, 0);
    color: #ffffff;
    font-family: var(--font-sans);
    cursor: pointer;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: max-height 0.32s cubic-bezier(0.22, 1, 0.36, 1),
      padding 0.32s cubic-bezier(0.22, 1, 0.36, 1),
      margin 0.32s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.24s ease,
      transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      background 0.14s ease,
      box-shadow 0.16s ease;
    animation: scrollHintHeartbeat 2.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  }

  .scroll-next-hint:hover {
    background: #1e293b;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.3);
    animation-play-state: paused;
    transform: translateY(1px) scale(1.04);
  }

  .scroll-next-hint:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
  }

  .scroll-next-step {
    font-size: 9px;
    line-height: 11px;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: #e2e8f0;
  }

  .scroll-next-chevrons {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: #34d399;
  }

  .scroll-chev {
    display: block;
  }

  .scroll-chev-1 {
    animation: scrollChevWave 1.5s ease-in-out infinite;
  }

  .scroll-chev-2 {
    animation: scrollChevWave 1.5s ease-in-out 0.22s infinite;
  }

  .scroll-next-callout {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    background: var(--text);
    color: #ffffff;
    font-size: 11px;
    line-height: 20px;
    font-weight: 650;
    padding: 2px 9px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  html:not(.has-scrolled-once):not(.is-scroll-hint-done) .scroll-next-callout,
  .scroll-next-hint:hover .scroll-next-callout,
  .scroll-next-hint:focus-visible .scroll-next-callout {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

  html.is-scroll-hint-done .scroll-next-hint,
  html.is-intro-replay .scroll-next-hint {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: -10px;
    border-width: 0;
    opacity: 0;
    transform: translateY(8px) scale(0.92);
    pointer-events: none;
    overflow: hidden;
    animation: none;
  }

  @keyframes scrollHintHeartbeat {
    0%, 56%, 100% {
      transform: translateY(0) scale(1);
      box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22), 0 0 0 0 rgba(16, 185, 129, 0);
    }
    64% {
      transform: translateY(0) scale(1.06);
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28), 0 0 0 5px rgba(16, 185, 129, 0.28);
    }
    72% {
      transform: translateY(0) scale(1);
      box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22), 0 0 0 10px rgba(16, 185, 129, 0);
    }
    80% {
      transform: translateY(0) scale(1.045);
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.26), 0 0 0 6px rgba(16, 185, 129, 0.22);
    }
    92% {
      transform: translateY(0) scale(1);
      box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22), 0 0 0 13px rgba(16, 185, 129, 0);
    }
  }

  @keyframes scrollChevWave {
    0%, 100% {
      opacity: 0.32;
      transform: translateY(-1px);
    }
    50% {
      opacity: 1;
      transform: translateY(1.5px);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-next-hint,
  .scroll-chev-1,
  .scroll-chev-2,
  .desktop-console-tab.is-load-pulse,
  .mob-console-btn.is-load-pulse,
  .sec-load-btn.is-refresh-pulse {
    animation: none !important;
  }
}

.rail-dot.active {
  height: 22px;
  background: var(--text);
}

.rail-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(4px);
  background: var(--text);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 20px;
  font-weight: 650;
  padding: 2px 9px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.rail-dot:hover .rail-tooltip,
.rail-dot:focus-visible .rail-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.note-tag {
  font-family: var(--font-mono);
  font-size: clamp(10.5px, 1.25vh, 13.5px);
  line-height: clamp(16px, 2vh, 24px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-item p {
  margin: 0;
  font-size: clamp(11px, 1.28vh, 13.5px);
  line-height: clamp(15px, 1.8vh, 20px);
  color: var(--text);
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */
@media (max-width: 1420px) {
  .control-pane {
    gap: 6px;
    padding: 7px 10px;
  }
  .dock-sep {
    display: none;
  }
  .load-pod {
    gap: 5px;
    padding: 2px 5px 2px 7px;
  }
  .load-slider-wrap {
    width: 56px;
  }
  .load-readout {
    padding: 0 5px;
  }
  .load-ms {
    min-width: 44px;
  }
}

@media (max-width: 1180px) {
  :root {
    --stage-w: min(86vw, 1020px);
  }
  .rail-cluster {
    display: none;
  }
}

@media (max-width: 1020px) {
  :root {
    --stage-w: calc(100vw - 28px);
  }
  .control-pane {
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .dock-sep {
    display: none;
  }
}

@media (max-width: 820px), (max-height: 640px) {
  html, body {
    overflow: auto;
  }
  .stage-scroller {
    height: auto;
    overflow: visible;
  }
  .stage-slide {
    height: auto;
    min-height: 100dvh;
    padding: 152px 0 36px;
  }
  .slide-inner,
  .stage-card {
    height: auto;
  }
  .step-nav {
    display: none;
  }
  .lane-track-unit {
    grid-template-columns: 1fr;
  }
  .lane-canvas {
    height: 96px;
  }
  .lane-telemetry-split {
    height: 96px;
  }
  .arena-wrap {
    height: 272px;
  }
  .lanes {
    height: auto;
  }
  .sim-row {
    height: auto;
    grid-template-columns: 1fr;
  }
  .sim-quad {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .sim-canvas-wrap {
    height: 180px;
  }
  .exp-curve-wrap {
    height: 180px;
  }
  .timeline-row {
    height: auto;
    grid-template-columns: 1fr;
  }
  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .notes-strip {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
}

/* Pause CSS animations inside completely off-screen slides */
.stage-slide[data-visible="false"] *,
.stage-slide[data-visible="false"] *::before,
.stage-slide[data-visible="false"] *::after {
  animation-play-state: paused !important;
}

/* ============================================================================
   FIRST-VISIT / REPLAY PROGRESSIVE PIPELINE INTRO (50vh x 70vw)
   ============================================================================ */
.pipe-replay-btn {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  font-weight: 700;
}

.pipe-replay-btn:hover {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.pipe-intro-card {
  display: none;
  width: 100%;
  height: clamp(360px, 50vh, 540px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  flex-direction: column;
  overflow: hidden;
}

html.is-intro-replay .pipe-intro-card {
  display: flex;
}

html.is-intro-replay .pipe-card {
  display: none;
}

.intro-head {
  flex: 0 0 auto;
  padding: clamp(8px, 1.1vh, 13px) 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.intro-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.intro-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-subtle);
}

.intro-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.2);
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.22s ease;
}

.intro-dot.is-done {
  background: #059669;
}

.intro-dot.is-active {
  width: 18px;
  background: var(--text);
}

.intro-exit-btn {
  display: none;
}

html.is-intro-replay .intro-exit-btn {
  display: inline-flex;
  align-items: center;
}

.intro-stage {
  flex: 1 1 auto;
  min-height: 0;
  padding: clamp(14px, 2vh, 24px) clamp(14px, 1.8vw, 24px);
  background: var(--surface-alt);
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(232px, 30%, 340px);
  gap: clamp(14px, 1.6vw, 24px);
  align-items: center;
}

.intro-tiles-track {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  overflow: visible;
}

.intro-tile {
  flex: 0 0 auto;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(8px, 1.1vh, 14px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  cursor: pointer;
  transition:
    width 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    margin-right 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.45s ease,
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease,
    box-shadow 0.35s ease;
}

/* Future tiles: collapsed & invisible until reached */
.intro-tile.is-upcoming {
  width: 0;
  height: clamp(114px, 16.5vh, 158px);
  padding: 0;
  border-width: 0;
  margin-right: 0;
  opacity: 0;
  transform: translateX(22px) scale(0.84);
  pointer-events: none;
}

/* Active spotlight tile: ~50% bigger than original (and ~2x bigger on Stage 1 CPU) */
.intro-tile.is-active {
  width: clamp(152px, 13.5vw, 224px);
  height: clamp(192px, 27.5vh, 272px);
  margin-right: 0;
  opacity: 1;
  filter: grayscale(0);
  transform: translateY(-3px) scale(1);
  border-color: var(--text);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14), 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.pipe-intro-card[data-stage="0"] .intro-tile.is-active {
  width: clamp(220px, 20vw, 304px);
  height: clamp(232px, 33vh, 316px);
}

.intro-tile.is-active .pipe-node-badge {
  background: var(--text);
  color: #ffffff;
  font-size: 12px;
  padding: 2px 9px;
}

.intro-tile.is-active .pipe-node-ms {
  color: var(--text);
  font-size: 12.5px;
}

.intro-tile.is-active .pipe-node-lbl {
  color: var(--text);
  font-size: clamp(13px, 1.5vh, 15px);
  font-weight: 700;
}

.intro-tile.is-active .cpu-bar {
  width: 14px;
}

.intro-tile.is-active .hdmi-pulse {
  height: 7px;
}

/* Minimized completed tiles: gently grayed out & shrunk to compact original size */
.intro-tile.is-done {
  width: clamp(66px, 5.6vw, 102px);
  height: clamp(114px, 16.5vh, 158px);
  padding: clamp(6px, 0.8vh, 9px);
  margin-right: clamp(6px, 0.7vw, 12px);
  opacity: 0.56;
  filter: grayscale(0.85);
  transform: translateY(0) scale(1);
  border-color: var(--border-strong);
  box-shadow: none;
}

.intro-tile.is-done:hover {
  opacity: 0.86;
  filter: grayscale(0.25);
  transform: translateY(-2px);
}

.intro-tile.is-done .pipe-node-ms {
  display: none;
}

.intro-tile.is-done .pipe-node-top {
  justify-content: center;
}

.intro-tile.is-done .pipe-node-badge {
  font-size: 10px;
  padding: 0 6px;
}

.intro-tile.is-done .pipe-node-lbl {
  display: none;
}

/* Reused V-Sync wire+gate graphic inside tile viewport */
.pipe-vis-vsync {
  padding: 0 14px;
}

.intro-vsync-wire {
  height: 12px;
  background: rgba(255, 255, 255, 0.14);
}

.intro-vsync-wire .pipe-packet {
  background: #f8fafc;
}

.intro-tile.is-done .pipe-vis-vsync {
  padding: 0 7px;
}

.intro-tile.is-done .intro-vsync-wire {
  height: 7px;
}

/* Right-hand Description Panel */
.intro-copy-pane {
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 2.2vh, 26px) clamp(16px, 1.8vw, 24px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(8px, 1.2vh, 14px);
  box-shadow: var(--shadow-card);
}

.intro-stage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.intro-stage-kicker {
  font-size: 11px;
  line-height: 20px;
  font-weight: 750;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.intro-stage-ms {
  font-size: 12px;
  line-height: 20px;
  font-weight: 750;
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--text);
}

.intro-stage-title {
  margin: 0;
  font-size: clamp(16px, 2vh, 21px);
  line-height: 1.28;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: var(--text);
}

.intro-stage-desc {
  margin: 0;
  font-size: clamp(13px, 1.48vh, 15px);
  line-height: 1.55;
  color: var(--text-muted);
}

.intro-copy-foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.intro-mob-nav {
  display: none;
  align-items: center;
  gap: 6px;
}

@keyframes introCopySwap {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-copy-pane.is-swapping .intro-stage-title,
.intro-copy-pane.is-swapping .intro-stage-desc {
  animation: introCopySwap 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Replay global chrome hiding */
html.is-intro-replay .top-chrome {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-20px);
}

html.is-intro-replay .top-bar-shell {
  pointer-events: none;
}

html.is-intro-replay .rail-cluster {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) translateX(20px);
}

html.is-intro-replay .notice-host {
  display: none;
}

html.is-intro-replay .stage-slide:not(#pipelineSection) {
  display: none;
}

html.is-intro-replay #pipelineSection {
  padding: 28px 0;
}

html.is-intro-vanishing #pipelineSection .slide-inner {
  opacity: 0 !important;
  transform: translate3d(0, -26px, 0) scale(0.985) !important;
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

html.is-intro-revealed .top-chrome {
  transition: opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.48s ease;
}

html.is-intro-revealed .rail-cluster {
  transition: opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
              transform 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
              visibility 0.48s ease 0.08s;
}

@keyframes introMotionReveal {
  0% {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

html.is-intro-revealed #motionSection .slide-inner {
  animation: introMotionReveal 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ============================================================================
   MOBILE PIPELINE INTRO (<= 820px: SINGLE 45vh TILE + DESCRIPTION BELOW)
   ============================================================================ */
@keyframes mobileIntroTileUp {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mobileIntroTileDown {
  0% {
    opacity: 0;
    transform: translateY(-22px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================================================
   VIEW 6: FURTHER READING & DEMO DISCLAIMER
   ============================================================================ */
.reading-stack {
  justify-content: center;
}

.reading-shell {
  height: auto;
}

.reading-meta {
  font-size: clamp(11px, 1.2vh, 12.5px);
  color: var(--text-dim);
  font-weight: 650;
}

.reading-note {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: clamp(10px, 1.2vh, 14px) 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.reading-note-badge {
  flex-shrink: 0;
  font-size: 10.5px;
  line-height: 20px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0 8px;
  border-radius: 5px;
  background: #e2e8f0;
  color: var(--text);
}

.reading-note p {
  margin: 0;
  font-size: clamp(12px, 1.35vh, 13.5px);
  line-height: 1.48;
  color: var(--text-muted);
}

.reading-grid {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 18px);
  padding: clamp(14px, 1.8vh, 20px) 18px clamp(16px, 2vh, 22px);
  background: var(--surface-alt);
}

/* Tile with exact 50% vertical top heading image & 50% bottom title + description */
.reading-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  height: clamp(320px, 44vh, 420px);
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.16s ease,
              border-color 0.16s ease;
}

.reading-card:hover,
.reading-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(15, 23, 42, 0.3);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.11), 0 2px 6px rgba(15, 23, 42, 0.06);
  outline: none;
}

.reading-card-media {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--viewport);
  border-bottom: 1px solid var(--border);
}

.reading-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.reading-card:hover .reading-art {
  transform: scale(1.03);
}

.reading-source-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 9.5px;
  line-height: 18px;
  font-weight: 750;
  letter-spacing: 0.05em;
  padding: 0 7px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}

.reading-card-body {
  min-height: 0;
  padding: clamp(12px, 1.5vh, 16px) 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.reading-card-body h3 {
  margin: 0;
  font-size: clamp(14px, 1.55vh, 16px);
  line-height: 1.28;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: var(--text);
}

.reading-card-body p {
  margin: 0;
  font-size: clamp(11.5px, 1.25vh, 13px);
  line-height: 1.45;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reading-link-cta {
  margin-top: auto;
  padding-top: 4px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reading-card:hover .reading-link-cta {
  text-decoration: underline;
}

/* ============================================================================
   TABLET / IPAD PRO ADJUSTMENTS (821px – 1180px, e.g. 1024x1366)
   ============================================================================ */
@media (min-width: 821px) and (max-width: 1180px) {
  .topbar {
    padding: 7px 10px;
    gap: 6px;
  }

  .brand {
    gap: 6px;
  }

  .brand h1 {
    font-size: 14px;
  }

  .step-nav {
    gap: 1px;
    padding: 2px;
  }

  .step-pill {
    font-size: 11.5px;
    padding: 1px 5px;
    gap: 3px;
  }

  .step-idx {
    display: none;
  }

  .topbar-right-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-model-guide {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(12px, 1.3vh, 13.5px);
  line-height: var(--lbl-h);
  font-weight: 650;
  padding: 2px 8px 2px 6px;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.btn-model-guide:hover {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.model-q-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.08);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-model-guide:hover .model-q-dot {
  background: rgba(255, 255, 255, 0.22);
}

.detector-pill {
    padding: 2px 4px 2px 8px;
    gap: 6px;
  }

  .btn-share-top {
    font-size: 12px;
    padding: 2px 8px;
    gap: 5px;
  }

  .hz-num {
    font-size: 12.5px;
  }

  .btn-remeasure {
    font-size: 12px;
    padding: 0 8px;
  }

  .control-pane {
    padding: 7px 8px;
    gap: 4px;
  }

  .dock-group {
    gap: 4px;
  }

  .dock-label {
    font-size: 11.5px;
  }

  .seg-btn {
    font-size: 11.5px;
    padding: 0 5px;
  }

  .load-pod {
    gap: 4px;
    padding: 2px 4px 2px 6px;
  }

  .load-pod-lbl {
    font-size: 11.5px;
  }

  .load-slider-wrap {
    min-width: 24px;
  }

  .load-val {
    font-size: 11.5px;
  }

  .load-ms {
    font-size: 11px;
    min-width: 38px;
  }

  .dock-actions {
    gap: 4px;
  }

  .btn-explode,
  .btn-pause {
    font-size: 11.5px;
    padding: 0 6px;
    gap: 4px;
  }

  /* Motion section tablet adjustments */
  #motionSection .card-head {
    padding: 8px 14px;
    gap: 8px;
  }

  #motionSection .card-head h2 {
    font-size: 16.5px;
  }

  #motionSection[data-motion-view="simplified"] .motion-body {
    grid-template-columns: minmax(0, 1fr) 292px;
  }

  #motionSection .motion-scenarios-pane {
    padding-right: 12px;
  }

  #motionSection .motion-scenario-btn {
    padding: 5px 8px;
  }

  /* Latency footer: Option 3 asymmetric 2fr / 1fr 3-row grid (zero truncation) */
  #inputSection .metrics-strip.latency-footer-card {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }

  #inputSection .metrics-strip.latency-footer-card .metric-cell {
    padding: 8px 14px;
    gap: 3px;
  }

  #inputSection .metrics-strip.latency-footer-card .metric-cell .label {
    font-size: 11px;
    line-height: 15px;
  }

  #inputSection .metrics-strip.latency-footer-card .metric-val {
    font-size: 14px;
    line-height: 20px;
  }

  #inputSection .metrics-strip.latency-footer-card .metric-cell:nth-child(3) {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }
}

.remeasure-ico,
.kicker-mob,
.mob-console-toggle,
.mob-spike-btn,
.mob-pause-btn,
.mob-bar-sep,
.mob-console-btn,
.mob-menu-btn,
.mob-nav-menu {
  display: none;
}

@media (max-width: 820px) {
  :root {
    --stage-w: calc(100vw - 32px);
  }

  /* Mobile bottom-anchored 2026 floating dock (3-zone quiet chrome) */
  .top-chrome {
    top: auto;
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .top-bar-shell {
    position: relative;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
  }

  /* Subtle top drag handle when expanded as a bottom sheet */
  .top-bar-shell::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3.5px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.16);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .top-bar-shell:has(.mob-console-toggle:checked)::before {
    opacity: 1;
  }

  .topbar {
    padding: 6px 8px;
    gap: 4px;
    justify-content: flex-start;
    border-bottom: 1px solid transparent;
    transition: border-color 0.22s ease, padding-top 0.22s ease;
  }

  .mob-console-toggle:checked ~ .topbar {
    padding-top: 14px;
    border-bottom-color: var(--border);
  }

  /* Drop non-interactive FPS Lab label from mobile thumb dock (kept in #mobNavMenu) */
  .topbar > .brand {
    display: none;
  }

  .brand {
    gap: 6px;
  }

  .brand-mark {
    width: 9px;
    height: 9px;
  }

  /* Zone 1 (Left): Unified 60 Hz ↻ status pill + quiet ? Model icon */
  .topbar-right-tools {
    margin-left: 0;
    gap: 2px;
    min-width: 0;
  }

  .detector-pill {
    order: 1;
    margin-left: 0;
    height: 34px;
    padding: 0 4px 0 9px;
    gap: 3px;
    border-radius: 999px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
  }

  .detector-dot {
    width: 6.5px;
    height: 6.5px;
  }

  .hz-num {
    font-size: 11.5px;
    line-height: 22px;
    white-space: nowrap;
  }

  /* De-nested borderless recheck icon inside the unified status pill */
  .btn-remeasure {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 999px;
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
    transition: background 0.14s ease, color 0.14s ease, transform 0.14s ease;
  }

  .btn-remeasure:active {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text);
    transform: rotate(90deg);
  }

  .remeasure-lbl {
    display: none;
  }

  .remeasure-ico {
    display: block;
    width: 12px;
    height: 12px;
  }

  /* Zone 2 (Center): Clean flat Spike pill + borderless Pause icon */
  .mob-spike-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-left: auto;
    height: 34px;
    padding: 0 12px;
    flex-shrink: 0;
    border-radius: 999px;
    background: #dc2626;
    border: none;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.26);
    transform: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s ease, transform 0.1s ease, box-shadow 0.12s ease;
  }

  .mob-spike-btn:active {
    background: #b91c1c;
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
  }

  .mob-pause-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    flex-shrink: 0;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.14s ease, color 0.14s ease, transform 0.1s ease;
  }

  .mob-pause-btn:active {
    background: var(--surface-subtle);
    transform: scale(0.94);
  }

  .mob-pause-btn .icon-resume {
    display: none;
  }

  .top-bar-shell:has(#pauseBtn.is-paused) .mob-pause-btn {
    background: var(--text);
    border-color: var(--text);
    color: #ffffff;
  }

  .top-bar-shell:has(#pauseBtn.is-paused) .mob-pause-btn .icon-pause {
    display: none;
  }

  .top-bar-shell:has(#pauseBtn.is-paused) .mob-pause-btn .icon-resume {
    display: block;
  }

  .mob-console-toggle:checked ~ .topbar .mob-spike-btn,
  .mob-console-toggle:checked ~ .topbar .mob-pause-btn,
  .mob-console-toggle:checked ~ .topbar .mob-bar-sep {
    display: none;
  }

  /* Subtle hairline separating Live Actions (Zone 2) from Tune & Navigate (Zone 3) */
  .mob-bar-sep {
    display: block;
    width: 1px;
    height: 18px;
    background: var(--border-strong);
    margin: 0 2px 0 auto;
    flex-shrink: 0;
  }

  /* Zone 3 (Right): Sliders console toggle + Sections burger menu */
  .mob-console-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.16s ease, color 0.16s ease, transform 0.1s ease, box-shadow 0.16s ease;
  }

  .mob-console-toggle:not(:checked) ~ .topbar .mob-console-btn[data-load-tier="mid"]::after,
  .mob-console-toggle:not(:checked) ~ .topbar .mob-console-btn[data-load-tier="high"]::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    border: 1.5px solid #ffffff;
    pointer-events: none;
  }

  .mob-console-toggle:not(:checked) ~ .topbar .mob-console-btn[data-load-tier="mid"]::after {
    background: #d97706;
    box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.28);
  }

  .mob-console-toggle:not(:checked) ~ .topbar .mob-console-btn[data-load-tier="high"]::after {
    background: #dc2626;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.3);
  }

  .mob-console-btn.is-load-pulse {
    animation: mobConsoleLoadPulse 0.68s cubic-bezier(0.22, 1, 0.36, 1);
  }

  @keyframes mobConsoleLoadPulse {
    0% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.35);
    }
    40% {
      transform: scale(1.08);
      box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.22);
    }
    100% {
      transform: scale(1);
      box-shadow: 0 0 0 9px rgba(16, 185, 129, 0);
    }
  }

  .mob-console-btn:active {
    background: var(--surface-subtle);
    transform: scale(0.94);
  }

  .mob-console-sliders {
    display: block;
  }

  .mob-console-chevron {
    display: none;
  }

  .mob-console-toggle:checked ~ .topbar .mob-console-btn {
    margin-left: auto;
    background: var(--text);
    border-color: var(--text);
    color: #ffffff;
  }

  .mob-console-toggle:checked ~ .topbar .mob-console-sliders {
    display: none;
  }

  .mob-console-toggle:checked ~ .topbar .mob-console-chevron {
    display: block;
  }

  .mob-menu-btn {
    appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    margin-left: 0;
    flex-shrink: 0;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.14s ease, color 0.14s ease, transform 0.1s ease;
  }

  .mob-menu-btn:active {
    background: var(--surface-subtle);
    transform: scale(0.94);
  }

  .mob-menu-btn[aria-expanded="true"] {
    background: var(--text);
    border-color: var(--text);
    color: #ffffff;
  }

  /* First-visit mobile burger indicator: emerald dot + calm periodic 2-beat heartbeat until pressed */
  html:not(.is-mob-menu-seen):not(.is-intro-replay) .mob-menu-btn[aria-expanded="false"] {
    animation: mobMenuHeartbeat 3.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  }

  html:not(.is-mob-menu-seen):not(.is-intro-replay) .mob-menu-btn[aria-expanded="false"]::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #10b981;
    border: 1.5px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
    pointer-events: none;
  }

  @keyframes mobMenuHeartbeat {
    0%, 62%, 100% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
    70% {
      transform: scale(1.08);
      box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.3);
    }
    78% {
      transform: scale(1);
      box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    85% {
      transform: scale(1.06);
      box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.22);
    }
    95% {
      transform: scale(1);
      box-shadow: 0 0 0 9px rgba(16, 185, 129, 0);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    html:not(.is-mob-menu-seen):not(.is-intro-replay) .mob-menu-btn[aria-expanded="false"] {
      animation: none;
    }
  }

  /* Mobile section progress badges: 01/07 .. 07/07 (desktop & MODEL modal unaffected) */
  .stage-slide .card-head .view-kicker::after,
  .stage-slide .sim-curve-head .view-kicker::after,
  html:not(.is-intro-replay) .intro-head .view-kicker::after {
    content: "/07";
    opacity: 0.65;
    font-weight: 600;
    margin-left: 1px;
  }

  html:not(.is-intro-replay) .intro-head .kicker-desk {
    display: none;
  }

  html:not(.is-intro-replay) .intro-head .kicker-mob {
    display: inline;
  }

  @media (max-width: 384px) {
    .topbar {
      padding: 6px 6px;
      gap: 3px;
    }

    .mob-spike-btn {
      padding: 0 10px;
      font-size: 11.5px;
    }

    .motion-card .card-head h2 {
      font-size: 13px;
    }
  }

  /* Full-screen mobile sections menu */
  .mob-nav-menu {
    position: fixed;
    inset: 0;
    z-index: 165;
    display: flex;
    flex-direction: column;
    background: rgba(238, 240, 244, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
    overflow-y: auto;
    animation: mobMenuFadeIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .mob-nav-menu[hidden] {
    display: none;
  }

  @keyframes mobMenuFadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .mob-nav-inner {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1 1 auto;
  }

  .mob-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-strong);
  }

  .mob-nav-head h2 {
    margin: 0;
    font-size: 18px;
    line-height: 24px;
    font-weight: 750;
    color: var(--text);
  }

  .mob-nav-close {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  }

  .mob-nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    justify-content: center;
  }

  .mob-nav-item {
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    text-align: left;
    font-family: var(--font-sans);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: background 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
  }

  .mob-nav-item:active {
    transform: scale(0.985);
  }

  .mob-nav-idx {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--surface-subtle);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mob-nav-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .mob-nav-title {
    font-size: 14.5px;
    line-height: 1.25;
    font-weight: 750;
    color: var(--text);
  }

  .mob-nav-sub {
    font-size: 11.5px;
    line-height: 1.3;
    color: var(--text-muted);
  }

  .mob-nav-arrow {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dim);
  }

  .mob-nav-item.active {
    background: var(--text);
    border-color: var(--text);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
  }

  .mob-nav-item.active .mob-nav-idx {
    background: rgba(255, 255, 255, 0.14);
    color: #34d399;
  }

  .mob-nav-item.active .mob-nav-title {
    color: #ffffff;
  }

  .mob-nav-item.active .mob-nav-sub {
    color: #cbd5e1;
  }

  .mob-nav-item.active .mob-nav-arrow {
    color: #34d399;
  }

  .control-pane {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 0;
    padding: 0 10px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition:
      max-height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      padding 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.2s ease;
  }

  .mob-console-toggle:checked ~ .control-pane {
    max-height: 295px;
    padding: 8px 10px 10px;
    opacity: 1;
    pointer-events: auto;
  }

  .dock-spacer {
    display: none;
  }

  .control-pane .dock-group:not(.load-pod):not(.dock-actions) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-width: 0;
  }

  .control-pane .dock-label {
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    padding-left: 2px;
  }

  .control-pane .segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    padding: 2px;
    border-radius: 9px;
  }

  .control-pane .seg-btn {
    width: 100%;
    min-height: 30px;
    line-height: 30px;
    font-size: 12.5px;
    padding: 0 4px;
    text-align: center;
    border-radius: 7px;
  }

  .control-pane .load-pod {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
    padding: 4px 8px 4px 10px;
    min-height: 38px;
    border-radius: 10px;
  }

  .control-pane .load-pod-lbl {
    font-size: 12.5px;
    line-height: 1;
  }

  .control-pane .load-slider-wrap {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 30px;
  }

  .control-pane .load-slider-wrap input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
  }

  .control-pane .load-slider-wrap input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
  }

  .control-pane .load-readout {
    height: 26px;
    padding: 0 7px;
    flex-shrink: 0;
  }

  .control-pane .load-val {
    font-size: 12.5px;
  }

  .control-pane .load-ms {
    font-size: 11.5px;
    min-width: 44px;
  }

  .control-pane .load-reset-btn {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
  }

  .control-pane .dock-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .spike-kbd,
  .pause-kbd {
    display: none;
  }

  .control-pane .btn-mob-share,
  .control-pane .btn-explode,
  .control-pane .btn-pause {
    display: inline-flex;
    width: 100%;
    min-height: 38px;
    line-height: 36px;
    justify-content: center;
    padding: 0 8px;
    gap: 5px;
    font-size: 12px;
    border-radius: 10px;
  }

  .control-pane .btn-mob-share {
    grid-column: 1 / -1;
  }

  .control-pane .btn-pause.is-paused,
  .control-pane .btn-pause.is-paused:hover {
    background: var(--text);
    border-color: var(--text);
    color: #ffffff;
  }

  html.is-intro-replay .top-chrome {
    transform: translateY(20px);
  }

  .detector-popover {
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateY(4px);
  }

  .notice-host {
    top: 12px;
    bottom: auto;
    left: 16px;
    right: 16px;
    max-width: none;
  }

  .power-save-banner {
    left: 14px;
    right: 14px;
    bottom: calc(64px + env(safe-area-inset-bottom));
    transform: none;
    width: auto;
    max-width: none;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 11px;
    border-radius: 13px;
  }

  .power-save-text {
    font-size: 11.5px;
    line-height: 1.36;
  }

  .power-save-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
  }

  .power-save-recheck {
    height: 26px;
    padding: 0 8px;
    font-size: 11px;
  }

  .power-save-close {
    width: 26px;
    height: 26px;
  }

  .cookie-banner {
    left: 16px;
    right: 16px;
    bottom: calc(64px + env(safe-area-inset-bottom));
    max-width: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 14px;
  }

  html.is-intro-replay .cookie-banner {
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  .cookie-ok-btn {
    width: 100%;
    line-height: 34px;
    font-size: 13px;
  }

  /* Mobile vertical section scroll snapping */
  html,
  body {
    height: 100dvh;
    overflow: hidden;
  }

  .stage-scroller {
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y mandatory;
  }

  .stage-slide {
    padding: 16px 0 24px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .stage-slide:last-child {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  /* Mobile Motion card controls bar */
  #motionSection {
    height: 100svh;
    height: 100dvh;
    min-height: 0;
    padding: max(8px, env(safe-area-inset-top)) 0 calc(66px + env(safe-area-inset-bottom));
  }

  #motionSection .motion-stack {
    justify-content: flex-start;
    min-height: 0;
    gap: 7px;
  }

  #motionSection .motion-card {
    flex: 1 1 auto;
    min-height: 0;
  }

  .motion-card .card-head {
    padding: 8px 12px;
    gap: 7px;
  }

  .motion-card .card-title-row {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .motion-card .card-title-group {
    gap: 6px;
    min-width: 0;
  }

  .motion-card .card-title-group .view-kicker {
    font-size: 11px;
    line-height: 22px;
    padding: 0 6px;
  }

  .motion-card .card-head h2 {
    font-size: 14px;
    line-height: 22px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .motion-view-switch .seg-btn {
    font-size: 11px;
    line-height: 22px;
    padding: 0 7px;
  }

  .motion-body {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr !important;
  }

  .motion-scenarios-pane {
    display: none !important;
  }

  .motion-card .view-controls {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .motion-card .slider-pill {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    padding: 2px 10px;
    min-height: 32px;
    font-size: 13px;
  }

  .motion-card .slider-pill label {
    flex-shrink: 0;
  }

  .motion-card .slider-pill input[type="range"] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .motion-card .slider-readout {
    flex-shrink: 0;
    min-width: 58px;
    font-size: 12px;
  }

  .motion-card .switch-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 32px;
    padding: 2px 10px;
    gap: 8px;
    font-size: 13px;
  }

  /* Mobile Motion lanes: slim header above unobstructed canvas + 4 feature squares + compact chart */
  .lanes {
    flex: 1 1 auto;
    height: auto;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    padding: 7px 10px 8px;
    gap: 7px;
  }

  .lane-track-unit {
    position: relative;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto minmax(36px, 63fr) minmax(22px, 37fr);
    gap: 3px 8px;
  }

  /* Unwrap canvas container and telemetry containers so grid places header, canvas, chips, and chart cleanly */
  .lane-canvas-wrap,
  .lane-telemetry-split,
  .ft-info-card {
    display: contents;
  }

  .lane-badge {
    position: static;
    grid-row: 1;
    grid-column: 1;
    justify-self: start;
    align-self: center;
    padding: 0;
    gap: 5px;
    background: transparent;
    border: none;
    border-radius: 0;
    pointer-events: auto;
  }

  .lane-badge h3 {
    font-size: 11.5px;
    line-height: 18px;
    color: var(--text);
  }

  .lane-badge .swatch {
    width: 8px;
    height: 8px;
  }

  /* Cadence description right-aligned on the slim header row above the canvas */
  .ft-top {
    position: static;
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
    align-self: center;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    gap: 0;
  }

  .ft-top .ft-note {
    font-size: 10.5px;
    line-height: 18px;
    color: var(--text-muted);
  }

  .ft-top .ft-note.judder {
    color: #b91c1c;
  }

  .ft-top .mono {
    display: none;
  }

  /* 100% unobstructed full-width animation canvas */
  .lane-canvas {
    grid-row: 2;
    grid-column: 1 / -1;
    contain: size;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 36px;
    border-radius: 9px;
    border: 1px solid rgba(15, 23, 42, 0.22);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.1);
  }

  /* Hide the 4 small feature labels on mobile; split freed height 50/50 between canvas and live chart */
  .lane-meta {
    display: none;
  }

  /* Full-width frame-time chart stretched by 50% of freed space */
  .ft-chart-card {
    grid-row: 3;
    grid-column: 1 / -1;
    width: 100%;
    height: 100%;
    min-height: 22px;
    padding: 3px 6px;
    border-radius: 8px;
  }

  .ft-canvas {
    contain: size;
    width: 100%;
    height: 100%;
  }

  /* Mobile Motion Simplified view: hide 4 charts to give taller canvases + mobile scenarios + footer */
  #motionSection[data-motion-view="simplified"] .lanes {
    padding: 7px 10px 8px;
    gap: 6px;
  }

  #motionSection[data-motion-view="simplified"] .lane-track-unit {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto minmax(44px, 1fr);
    gap: 3px 8px;
  }

  #motionSection[data-motion-view="simplified"] .ft-top,
  #motionSection[data-motion-view="simplified"] .ft-chart-card {
    display: none;
  }

  #motionSection[data-motion-view="simplified"] .lane-sim-tag {
    position: static;
    top: auto;
    right: auto;
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
    align-self: center;
    font-size: 9.5px;
    line-height: 16px;
    padding: 0 6px;
    border-radius: 4px;
  }

  #motionSection[data-motion-view="simplified"] .lane-sim-tag.good {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
  }

  #motionSection[data-motion-view="simplified"] .lane-sim-tag.warn {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
  }

  #motionSection[data-motion-view="simplified"] .lane-sim-tag.judder {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
  }

  #motionSection[data-motion-view="simplified"] .lane-sim-tag.interp {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #6d28d9;
  }

  /* Mobile 5-pill scenario strip (Simplified view) */
  #motionSection[data-motion-view="simplified"] .motion-mob-scenarios {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
  }

  .mob-scen-btn {
    appearance: none;
    padding: 0 3px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
  }

  .mob-scen-btn.active {
    background: var(--text);
    border-color: var(--text);
    color: #ffffff;
  }

  /* Mobile Motion footer: matches Simulation 2-row compact footer in Simplified view */
  #motionSection .motion-footer-card {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 3px 8px;
    padding: 6px 10px 6px 13px;
    border-radius: 12px;
  }

  #motionSection .motion-footer-card .sim-footer-left {
    grid-row: 1;
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 0;
    border-right: none;
    min-width: 0;
  }

  #motionSection .motion-footer-card .sim-footer-badge {
    font-size: 9px;
    line-height: 16px;
    padding: 1px 6px;
    gap: 4px;
  }

  #motionSection .motion-footer-card .sim-pulse-dot {
    width: 5px;
    height: 5px;
  }

  #motionSection .motion-footer-card .sim-footer-title-wrap {
    flex-direction: row;
    align-items: center;
    min-width: 0;
  }

  #motionSection .motion-footer-card .sim-footer-title {
    font-size: 11.5px;
    line-height: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #motionSection .motion-footer-card .sim-meter {
    display: none;
  }

  #motionSection .motion-footer-right {
    grid-row: 1;
    grid-column: 2;
    gap: 5px;
  }

  #motionSection .motion-footer-card .sim-impact-pill {
    font-size: 9px;
    line-height: 16px;
    padding: 1px 6px;
    border-radius: 5px;
  }

  #motionSection .motion-footer-card .sim-footer-desc {
    grid-row: 2;
    grid-column: 1 / -1;
    font-size: 10.5px;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Mobile Detailed view: condense footer to single compact row with 1–5 quick buttons */
  #motionSection[data-motion-view="detailed"] .motion-footer-card {
    grid-template-rows: auto;
    padding: 5px 8px 5px 12px;
  }

  #motionSection[data-motion-view="detailed"] .motion-footer-card .sim-footer-desc,
  #motionSection[data-motion-view="detailed"] .motion-footer-card .sim-impact-pill {
    display: none;
  }

  #motionSection[data-motion-view="detailed"] .mf-btn {
    width: 24px;
    height: 22px;
    font-size: 11px;
  }

  /* Mobile Simulation section: flexible 2x2 canvases + interactive curve + snug 2-row description */
  #simSection {
    height: 100svh;
    height: 100dvh;
    min-height: 0;
    padding: max(8px, env(safe-area-inset-top)) 0 calc(66px + env(safe-area-inset-bottom));
  }

  #simSection .sim-stack {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 52fr) minmax(0, 48fr) auto;
    gap: 8px;
  }

  #simSection .sim-row {
    display: contents;
  }

  #simSection .sim-quad {
    height: 100%;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  #simSection .sim-area {
    height: 100%;
    min-height: 0;
    border-radius: 10px;
  }

  #simSection .sim-area-head {
    flex-direction: column;
    align-items: stretch;
    padding: 5px 7px;
    gap: 3px;
  }

  #simSection .sim-area-title {
    gap: 5px;
  }

  #simSection .sim-area-title .swatch {
    width: 8px;
    height: 8px;
  }

  #simSection .sim-area-title h3 {
    font-size: 12px;
    line-height: 16px;
    letter-spacing: -0.01em;
  }

  #simSection .sim-area-stat {
    font-size: 10px;
    line-height: 16px;
    padding: 1px 6px;
    letter-spacing: -0.01em;
    text-align: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #simSection .sim-canvas-wrap {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  #simSection .sim-canvas {
    contain: size;
    width: 100%;
    height: 100%;
  }

  #simSection .sim-curve-card {
    height: 100%;
    min-height: 0;
    padding: 8px 10px;
    gap: 6px;
    border-radius: 14px;
  }

  #simSection .sim-curve-head {
    gap: 2px;
  }

  #simSection .sim-curve-head .card-title-group {
    gap: 7px;
  }

  #simSection .sim-curve-head .view-kicker {
    font-size: 10.5px;
    line-height: 20px;
    padding: 0 7px;
  }

  #simSection .sim-curve-head h2 {
    font-size: 15px;
    line-height: 20px;
  }

  #simSection .sim-curve-sub {
    display: none;
  }

  #simSection .sim-kpis {
    grid-template-columns: 0.85fr 0.80fr 1.35fr;
    gap: 5px;
  }

  #simSection .sim-kpi {
    padding: 4px 6px;
    flex-direction: row;
    justify-content: center;
    gap: 5px;
  }

  #simSection .sim-kpi-lbl {
    font-size: 9px;
    line-height: 16px;
    white-space: nowrap;
  }

  #simSection .sim-kpi-val {
    font-size: 11px;
    line-height: 16px;
    white-space: nowrap;
  }

  #simSection .exp-curve-wrap {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    border-radius: 10px;
  }

  #simSection #expCurveCanvas {
    contain: size;
    width: 100%;
    height: 100%;
  }

  #simSection .sim-lvl-btn {
    font-size: 12px;
    line-height: 26px;
  }

  /* Mobile Simplified Performance view: 2-row grid (quad expands + snug workload level pane), footer hidden */
  #simSection[data-sim-view="simplified"] .sim-stack {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  #simSection[data-sim-view="simplified"] .sim-row {
    display: contents;
    height: auto;
  }

  #simSection[data-sim-view="simplified"] .sim-curve-card {
    height: auto;
    padding: 9px 10px;
    gap: 7px;
  }

  #simSection .sim-curve-title-row {
    width: 100%;
    flex-wrap: nowrap;
    gap: 5px;
  }

  #simSection .sim-curve-title-row h2 .lbl-wide {
    display: none;
  }

  #simSection .sim-curve-title-row h2 .lbl-compact {
    display: inline;
  }

  #simSection .sim-curve-head h2 {
    font-size: 13.5px;
    line-height: 20px;
  }

  #simSection .sim-view-switch {
    order: 3;
  }

  #simSection .sim-view-switch .seg-btn {
    font-size: 10px;
    line-height: 20px;
    padding: 0 5.5px;
  }

  .sec-load-btn {
    height: 22px;
    padding: 0 7px 0 6px;
    gap: 4px;
    font-size: 10.5px;
  }

  .sec-load-btn .sec-load-ico {
    width: 11px;
    height: 11px;
  }

  .sec-load-btn .sec-load-ms {
    display: none;
  }

  #simSection .sec-load-sim {
    order: 2;
    width: auto;
    height: 22px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 999px;
    justify-content: center;
  }

  #simSection .sec-load-sim .sec-load-prefix,
  #simSection .sec-load-sim .sec-load-lbl {
    display: none;
  }

  #simSection .sec-load-sim .sec-load-pill-body {
    gap: 3px;
  }

  #simSection[data-sim-view="simplified"] .sim-scenarios-list {
    gap: 5px;
    overflow-y: visible;
  }

  #simSection[data-sim-view="simplified"] .sim-scenario-btn {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 10px;
    gap: 4px;
  }

  #simSection[data-sim-view="simplified"] .sim-scenario-btn .ms-title {
    font-size: 12px;
  }

  #simSection[data-sim-view="simplified"] .sim-scenario-btn .ms-load {
    font-size: 10px;
    line-height: 16px;
    padding: 0 6px;
  }

  #simSection[data-sim-view="simplified"] .sim-scenario-btn:not(.active) .sim-sc-desc {
    display: none;
  }

  #simSection[data-sim-view="simplified"] .sim-scenario-btn.active {
    flex: 0 0 auto;
    padding: 9px 10px;
  }

  #simSection[data-sim-view="simplified"] .sim-scenario-btn.active .sim-sc-desc {
    font-size: 11px;
    line-height: 1.32;
  }

  /* 2-row description container: Row 1 = LEVEL badge + title (+ impact pill), Row 2 = full-width description */
  #simSection .sim-footer-card {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: center;
    gap: 3px 8px;
    padding: 6px 10px 6px 13px;
    border-radius: 12px;
  }

  #simSection .sim-footer-left {
    grid-row: 1;
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    padding-right: 0;
    border-right: none;
    min-width: 0;
  }

  #simSection .sim-footer-badge {
    font-size: 9.5px;
    line-height: 16px;
    padding: 1px 7px;
    gap: 4px;
  }

  #simSection .sim-pulse-dot {
    width: 5px;
    height: 5px;
  }

  #simSection .sim-footer-title-wrap {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  #simSection .sim-footer-title {
    font-size: 12px;
    line-height: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #simSection .sim-meter {
    display: none;
  }

  #simSection .sim-impact-pill {
    grid-row: 1;
    grid-column: 2;
    font-size: 9.5px;
    line-height: 16px;
    padding: 1px 6px;
    border-radius: 5px;
  }

  #simSection .sim-footer-desc {
    grid-row: 2;
    grid-column: 1 / -1;
    font-size: 10.5px;
    line-height: 1.28;
    align-self: start;
    overflow-y: auto;
    max-height: 100%;
  }

  /* Mobile 03 Simulation (30 Hz Physics Step) 100dvh layout */
  #physicsSection {
    height: 100svh;
    height: 100dvh;
    min-height: 0;
    padding: max(8px, env(safe-area-inset-top)) 0 calc(66px + env(safe-area-inset-bottom));
  }

  #physicsSection .phys-stack {
    gap: 7px;
  }

  #physicsSection .phys-card {
    flex: 1 1 auto;
    height: auto;
    max-height: none;
    min-height: 0;
  }

  #physicsSection .phys-card .card-head {
    padding: 7px 10px;
    gap: 6px;
    flex-wrap: nowrap;
  }

  #physicsSection .phys-card .card-head .card-title-group {
    min-width: 0;
  }

  #physicsSection .phys-card .card-head h2 {
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #physicsSection .phys-body {
    grid-template-columns: 1fr;
  }

  #physicsSection .phys-tracks-col {
    padding: 6px 8px 8px;
    gap: 6px;
  }

  #physicsSection .phys-chamber-head {
    padding: 4px 8px;
    gap: 6px;
  }

  #physicsSection .phys-chamber-title h3 {
    font-size: 11px;
    line-height: 16px;
  }

  #physicsSection .phys-pill {
    font-size: 9.5px;
    line-height: 16px;
    padding: 0 5px;
  }

  #physicsSection .phys-mob-envs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    flex: 0 0 auto;
  }

  #physicsSection .phys-footer-anchor {
    flex: 0 0 auto;
    min-height: 0;
    display: flex;
  }

  #physicsSection .phys-footer-card {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: start;
    align-content: start;
    gap: 4px 8px;
    padding: 8px 11px 7px 13px;
    border-radius: 12px;
  }

  #physicsSection .phys-footer-actions {
    display: contents;
  }

  #physicsSection .phys-footer-card .sim-footer-left {
    grid-row: 1;
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 0;
    border-right: none;
    min-width: 0;
  }

  #physicsSection .phys-footer-card .sim-footer-badge {
    font-size: 9.5px;
    line-height: 17px;
    padding: 1px 7px;
    gap: 4px;
  }

  #physicsSection .phys-footer-card .sim-pulse-dot {
    width: 5px;
    height: 5px;
  }

  #physicsSection .phys-footer-card .sim-footer-title-wrap {
    flex-direction: row;
    align-items: center;
    gap: 5px;
    min-width: 0;
  }

  #physicsSection .phys-footer-card .sim-footer-title {
    font-size: 12px;
    line-height: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #physicsSection .phys-footer-card .sim-meter {
    display: none;
  }

  #physicsSection .phys-footer-card .sim-impact-pill {
    grid-row: 1;
    grid-column: 2;
    font-size: 9.5px;
    line-height: 17px;
    padding: 1px 6px;
    border-radius: 5px;
    align-self: center;
  }

  #physicsSection .phys-footer-card .sim-footer-desc {
    grid-row: 2;
    grid-column: 1 / -1;
    font-size: 11.5px;
    line-height: 1.35;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
    overflow: hidden;
    align-self: start;
  }

  #physicsSection .phys-more-btn {
    grid-row: 3;
    grid-column: 1 / -1;
    justify-self: end;
    height: 24px;
    padding: 0 8px 0 9px;
    font-size: 11px;
    border-radius: 6px;
  }

  /* Mobile single-screen no-scroll educational popup */
  .phys-more-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 145;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0s linear 0.2s;
  }

  .phys-more-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.2s ease, visibility 0s linear 0s;
  }

  .phys-more-pane {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: auto;
    top: 50%;
    width: auto;
    max-height: calc(100dvh - 32px);
    z-index: 150;
    padding: 13px 14px 14px;
    gap: 8px;
    transform-origin: center center;
    transform: translateY(-46%) scale(0.95);
    overflow: hidden;
  }

  .phys-more-pane::after {
    display: none;
  }

  .phys-more-pane.is-open {
    transform: translateY(-50%) scale(1);
  }

  .phys-more-head {
    padding-bottom: 7px;
  }

  .phys-more-title {
    font-size: 13.5px;
    line-height: 18px;
  }

  .phys-more-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .phys-more-block {
    padding: 8px 10px;
    gap: 2px;
  }

  .phys-more-kicker {
    font-size: 9.5px;
    line-height: 13px;
  }

  .phys-more-block p {
    font-size: 12px;
    line-height: 1.38;
  }

  /* Mobile Latency section top interactive bar */
  #inputSection {
    height: 100svh;
    height: 100dvh;
    min-height: 0;
    padding: max(8px, env(safe-area-inset-top)) 0 calc(66px + env(safe-area-inset-bottom));
  }

  #inputSection .latency-stack {
    height: 100%;
    min-height: 0;
    justify-content: flex-start;
    gap: 8px;
  }

  #inputSection .latency-top-card {
    border-radius: 14px;
  }

  #inputSection .latency-top-card .card-head {
    padding: 10px 12px;
    gap: 8px;
  }

  #inputSection .latency-head-main {
    width: 100%;
    gap: 6px;
  }

  #inputSection .latency-top-card .card-title-group {
    gap: 7px;
    min-width: 0;
  }

  #inputSection .latency-top-card .view-kicker {
    font-size: 10.5px;
    line-height: 22px;
    padding: 0 7px;
  }

  #inputSection .latency-top-card h2 {
    font-size: 14.5px;
    line-height: 22px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #inputSection .arena-checks {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  #inputSection .arena-checks .switch-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 32px;
    padding: 2px 8px;
    gap: 6px;
    font-size: 11.5px;
    line-height: 24px;
    white-space: nowrap;
  }

  #inputSection .tabs-bar {
    padding: 8px 10px;
  }

  #inputSection .tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
  }

  #inputSection .tab {
    width: 100%;
    justify-content: center;
    min-height: 32px;
    line-height: 30px;
    padding: 0 6px;
    gap: 5px;
    font-size: 11.5px;
    white-space: nowrap;
    border-radius: 7px;
  }

  #inputSection .tab-dot {
    width: 7px;
    height: 7px;
  }

  #inputSection .arena-wrap.latency-sight-card {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    border-radius: 14px;
  }

  #inputSection #arenaCanvas {
    contain: size;
    width: 100%;
    height: 100%;
  }

  #inputSection .arena-hint {
    bottom: 10px;
    padding: 4px 12px;
    font-size: 11.5px;
    line-height: 1.3;
    text-align: center;
    max-width: calc(100% - 24px);
  }

  /* Mobile Latency footer: asymmetric 2fr / 1fr 3-row grid (all 5 fields, zero truncation) */
  #inputSection .metrics-strip.latency-footer-card {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    border-radius: 14px;
  }

  #inputSection .metrics-strip.latency-footer-card .metric-cell {
    padding: 6px 9px;
    gap: 2px;
  }

  #inputSection .metrics-strip.latency-footer-card .metric-cell .label {
    font-size: 9.5px;
    line-height: 12px;
  }

  #inputSection .metrics-strip.latency-footer-card .metric-val {
    font-size: 11.5px;
    line-height: 15px;
  }

  #inputSection .metrics-strip.latency-footer-card .metric-cell:nth-child(3) {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }

  /* Mobile Pipeline: always show the progressive intro presentation card */
  #pipelineSection {
    height: 100svh;
    height: 100dvh;
    min-height: 0;
    padding: max(8px, env(safe-area-inset-top)) 0 calc(66px + env(safe-area-inset-bottom));
    align-items: center;
  }

  #pipelineSection .slide-inner {
    width: min(var(--stage-w), 520px);
    height: 100%;
    justify-content: center;
  }

  .pipe-intro-card {
    display: flex;
    height: 100%;
    max-height: 100%;
    touch-action: pan-y;
  }

  .pipe-card {
    display: none;
  }

  html:not(.is-intro-replay) #introScrollHint {
    display: none;
  }

  html:not(.is-intro-replay) .intro-mob-nav {
    margin-left: auto;
  }

  html:not(.is-intro-replay) #pipeIntroCard[data-stage="4"] #introMobNextBtn {
    opacity: 0.4;
    pointer-events: none;
    font-size: 0;
  }

  html:not(.is-intro-replay) #pipeIntroCard[data-stage="4"] #introMobNextBtn::after {
    content: "Next →";
    font-size: 12.5px;
  }

  html.is-intro-replay,
  html.is-intro-replay body {
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  html.is-intro-replay .stage-scroller {
    height: 100dvh;
    overflow: hidden;
  }

  html.is-intro-replay #pipelineSection {
    height: 100dvh;
    min-height: 100dvh;
    padding: 16px 0;
    align-items: center;
  }

  html.is-intro-replay #pipelineSection .slide-inner {
    width: min(var(--stage-w), 520px);
    height: 100%;
    justify-content: center;
  }

  html.is-intro-replay .pipe-intro-card {
    max-height: calc(100dvh - 32px);
    touch-action: none;
  }

  .intro-head {
    padding: 10px 14px;
    gap: 8px;
  }

  .intro-head .card-title-group {
    gap: 7px;
    min-width: 0;
  }

  .intro-head .view-kicker {
    font-size: 10px;
    line-height: 20px;
    padding: 0 7px;
  }

  .intro-head h2 {
    font-size: 15px;
    line-height: 22px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .intro-head .pipe-nav-btns {
    display: none;
  }

  .intro-head-right {
    gap: 6px;
    flex-shrink: 0;
  }

  .intro-dots {
    padding: 4px 7px;
    gap: 4px;
  }

  .intro-dot {
    width: 5px;
    height: 5px;
  }

  .intro-dot.is-active {
    width: 14px;
  }

  .intro-head .pipe-step-counter {
    min-width: auto;
    font-size: 11.5px;
  }

  .intro-stage {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 50%) minmax(0, 50%);
    padding: 12px;
    gap: 12px;
    align-items: stretch;
  }

  .intro-tiles-track {
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: stretch;
  }

  /* Mobile shows only the active tile — no side-docked cards */
  .intro-tile.is-done,
  .intro-tile.is-upcoming {
    display: none;
  }

  .intro-tile.is-active,
  .pipe-intro-card[data-stage="0"] .intro-tile.is-active {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 14px;
    transform: none;
    border-color: var(--text);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), 0 0 0 2px rgba(15, 23, 42, 0.06);
    animation: mobileIntroTileUp 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .pipe-intro-card[data-dir="down"] .intro-tile.is-active {
    animation-name: mobileIntroTileDown;
  }

  .intro-tile.is-active .pipe-visual {
    margin: 10px 0;
    border-radius: var(--radius-md);
  }

  .intro-tile.is-active .cpu-bar {
    width: 18px;
    border-radius: 5px;
  }

  .intro-tile.is-active .pipe-vis-cpu {
    gap: 12px;
    padding: 18px 26px;
  }

  .intro-tile.is-active .pipe-vis-gpu {
    padding: 14px;
  }

  .intro-tile.is-active .gpu-frame {
    gap: 8px;
  }

  .intro-tile.is-active .pipe-vis-vsync {
    padding: 0 22px;
  }

  .intro-tile.is-active .intro-vsync-wire {
    height: 16px;
  }

  .intro-tile.is-active .pipe-vis-hdmi {
    gap: 14px;
    padding: 18px 20px;
  }

  .intro-tile.is-active .hdmi-pulse {
    height: 10px;
  }

  .intro-tile.is-active .pipe-vis-disp {
    padding: 14px;
  }

  .intro-copy-pane {
    padding: 14px 16px;
    gap: 8px;
    justify-content: flex-start;
    overflow-y: auto;
  }

  .intro-stage-title {
    font-size: 16px;
    line-height: 1.28;
  }

  .intro-stage-desc {
    font-size: 13.5px;
    line-height: 1.5;
  }

  .intro-mob-nav {
    display: inline-flex;
  }

  .intro-mob-nav .pipe-btn {
    font-size: 12.5px;
    line-height: 28px;
    padding: 0 10px;
  }

  /* Mobile Refresh Map (Section 06): single-screen vertical 0..100ms timeline + 4 note cards */
  #timelineSection {
    height: 100svh;
    height: 100dvh;
    min-height: 0;
    padding: max(8px, env(safe-area-inset-top)) 0 calc(66px + env(safe-area-inset-bottom));
  }

  #timelineSection .timeline-stack {
    height: 100%;
    min-height: 0;
    justify-content: flex-start;
  }

  #timelineSection .timeline-row {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    gap: 8px;
  }

  #timelineSection .timeline-main-card {
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 14px;
  }

  #timelineSection .timeline-main-card .card-head {
    padding: 8px 11px;
    gap: 4px;
  }

  #timelineSection .timeline-main-card .card-title-group {
    gap: 7px;
  }

  #timelineSection .timeline-main-card .view-kicker {
    font-size: 10.5px;
    line-height: 20px;
    padding: 0 7px;
  }

  #timelineSection .timeline-main-card h2 {
    font-size: 14.5px;
    line-height: 20px;
  }

  #timelineSection .timeline-meta {
    font-size: 10.5px;
    line-height: 15px;
  }

  #timelineSection .timeline-wrap {
    flex: 1 1 auto;
    min-height: 0;
    padding: 8px 8px 9px;
  }

  #timelineSection .timeline-board {
    display: grid;
    grid-template-columns: 38px repeat(4, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    gap: 5px;
    align-items: stretch;
  }

  #timelineSection .tl-axis-row,
  #timelineSection .tl-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    min-height: 0;
    height: 100%;
  }

  #timelineSection .tl-axis-label {
    flex: 0 0 auto;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8.5px;
    line-height: 11px;
    text-align: center;
    white-space: normal;
  }

  #timelineSection .tl-axis-ticks {
    position: relative;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    width: 100%;
  }

  #timelineSection .tl-tick-lbl {
    left: auto !important;
    right: 2px;
    top: var(--p);
    transform: translateY(-50%);
    font-size: 9.5px;
    line-height: 12px;
    text-align: right;
  }

  #timelineSection .tl-tick-lbl.is-start {
    transform: translateY(0);
  }

  #timelineSection .tl-tick-lbl.is-end {
    transform: translateY(-100%);
  }

  #timelineSection .tl-row-head {
    flex: 0 0 auto;
    height: 32px;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 2px;
  }

  #timelineSection .tl-row-title {
    font-size: 10px;
    line-height: 13px;
    gap: 4px;
    justify-content: center;
  }

  #timelineSection .tl-row-title .swatch {
    width: 7px;
    height: 7px;
  }

  #timelineSection .tl-row-sub {
    width: 100%;
    font-size: 8px;
    line-height: 11px;
    text-align: center;
  }

  #timelineSection .tl-track {
    position: relative;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    width: 100%;
    border-radius: 8px;
  }

  #timelineSection .tl-gridline {
    left: 0 !important;
    right: 0;
    top: var(--p);
    bottom: auto;
    width: auto;
    height: 0;
    border-left: none;
    border-top: 1px dashed #d8dee8;
  }

  #timelineSection .tl-block {
    left: 2px !important;
    right: 2px;
    width: auto !important;
    top: calc(var(--p) + 1.5px);
    bottom: auto;
    height: calc(var(--s) - 3px);
    padding: 2px 3px;
    flex-direction: column;
    text-align: center;
    font-size: 9.5px;
    line-height: 1.15;
    border-radius: 6px;
  }

  #timelineSection .tl-txt {
    white-space: normal;
    word-break: break-word;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
  }

  #timelineSection .tl-dur {
    display: block;
    font-size: 8.5px;
    font-weight: 600;
    opacity: 0.85;
  }

  #timelineSection .tl-block.is-narrow .tl-dur {
    display: block;
  }

  #timelineSection .notes-strip {
    flex: 0 0 auto;
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 6px;
  }

  #timelineSection .note-item {
    height: auto;
    padding: 7px 9px;
    border-radius: 10px;
  }

  #timelineSection .note-tag {
    font-size: 9.5px;
    line-height: 13px;
  }

  #timelineSection .note-item p {
    font-size: 10px;
    line-height: 1.3;
  }

  /* Mobile Section 06: Articles stacked as a vertical list (each card 50% image / 50% text) */
  #readingSection {
    height: auto;
    min-height: 100dvh;
    padding: 12px 0 calc(84px + env(safe-area-inset-bottom));
  }

  #readingSection .reading-stack {
    justify-content: flex-start;
    height: auto;
  }

  #readingSection .reading-shell .card-head {
    padding: 9px 12px;
  }

  #readingSection .reading-shell .card-head h2 {
    font-size: 15px;
    line-height: 22px;
  }

  #readingSection .reading-note {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 12px;
  }

  #readingSection .reading-note p {
    font-size: 11.5px;
    line-height: 1.42;
  }

  #readingSection .reading-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 12px 12px;
  }

  #readingSection .reading-card {
    height: 224px;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    border-radius: 12px;
  }

  #readingSection .reading-card-body {
    padding: 9px 12px;
    gap: 4px;
  }

  #readingSection .reading-card-body h3 {
    font-size: 13.5px;
    line-height: 1.24;
  }

  #readingSection .reading-card-body p {
    font-size: 11px;
    line-height: 1.36;
    -webkit-line-clamp: 2;
  }

  #readingSection .reading-link-cta {
    font-size: 11px;
    padding-top: 2px;
  }

  .topbar-right-tools {
    gap: 4px;
  }

  .btn-model-guide {
    order: 2;
    padding: 0;
    width: 32px;
    height: 34px;
    justify-content: center;
    border-radius: 999px;
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
  }

  .btn-model-guide:hover,
  .btn-model-guide:active {
    background: var(--surface-subtle);
    border-color: transparent;
    color: var(--text);
  }

  .btn-share-top {
    display: none;
  }

  .share-toast {
    top: max(14px, env(safe-area-inset-top));
    bottom: auto;
    transform: translate(-50%, -8px);
    font-size: 12px;
  }

  .share-toast.is-visible {
    transform: translate(-50%, 0);
  }

  .load-status-toast {
    top: auto;
    bottom: calc(64px + env(safe-area-inset-bottom));
    transform: translate(-50%, 8px);
    font-size: 11.5px;
    padding: 5.5px 12px 5.5px 9px;
  }

  .load-status-toast.is-visible {
    transform: translate(-50%, 0);
  }

  body:has(#mobileConsoleToggle:checked) .load-status-toast {
    bottom: auto;
    top: max(12px, env(safe-area-inset-top));
    transform: translate(-50%, -8px);
  }

  body:has(#mobileConsoleToggle:checked) .load-status-toast.is-visible {
    transform: translate(-50%, 0);
  }

  .model-btn-lbl {
    display: none;
  }

  .model-q-dot {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1.5px solid currentColor;
    background: transparent;
    font-size: 11px;
    line-height: 17px;
  }

  .model-modal-card {
    padding: 14px;
    border-radius: 14px;
  }

  .model-assumptions-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ============================================================================
   HOW THIS MODEL WORKS MODAL
   ============================================================================ */
.model-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.model-modal[hidden] {
  display: none;
}

.model-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(4px);
}

.model-modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: 86dvh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.model-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.model-modal-head .pipe-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.model-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.model-modal-lead {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}

.model-assumptions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.model-assumption-item {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.model-assumption-item h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 750;
  color: var(--text);
}

.model-assumption-item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.model-assumption-item code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(15, 23, 42, 0.06);
  padding: 1px 4px;
  border-radius: 4px;
  color: var(--text);
}

@media (min-width: 821px) and (max-width: 1580px) {
  .step-idx {
    display: none;
  }
}

@media (min-width: 821px) and (max-width: 920px) {
  .btn-model-guide {
    padding: 0;
    width: 28px;
    height: 28px;
    justify-content: center;
  }

  .btn-model-guide .model-btn-lbl {
    display: none;
  }

  .btn-share-top {
    padding: 0;
    width: 28px;
    height: 28px;
    gap: 0;
  }

  .btn-share-top .share-lbl-stack {
    display: none;
  }
}

@media (max-width: 820px) {
  .model-modal-card {
    padding: 14px;
    border-radius: 14px;
  }

  .model-modal-head h2 {
    font-size: 16.5px;
  }

  .model-assumptions-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Short real-phone viewports (e.g. iPhone 13 Safari ~664px visible height, iPhone SE/mini) */
@media (max-width: 820px) and (max-height: 730px) {
  #motionSection .motion-stack,
  #physicsSection .phys-stack,
  #inputSection .latency-stack {
    gap: 5px;
  }

  .motion-card .card-head {
    padding: 6px 10px;
    gap: 5px;
  }

  .motion-card .slider-pill,
  .motion-card .switch-pill {
    min-height: 28px;
    font-size: 11.5px;
  }

  #motionSection[data-motion-view="simplified"] .lanes {
    padding: 5px 8px 6px;
    gap: 4px;
  }

  .lanes {
    padding: 5px 8px 6px;
    gap: 5px;
  }

  #motionSection .motion-footer-card {
    padding: 5px 9px 5px 11px;
  }

  #simSection .sim-stack {
    gap: 6px;
  }

  #simSection .sim-area-head {
    padding: 3px 6px;
    gap: 2px;
  }

  #simSection .sim-area-title h3 {
    font-size: 11px;
    line-height: 14px;
  }

  #simSection .sim-area-stat {
    font-size: 9.5px;
    line-height: 14px;
  }

  #simSection[data-sim-view="simplified"] .sim-curve-card {
    padding: 7px 9px;
    gap: 5px;
  }

  #simSection[data-sim-view="simplified"] .sim-scenarios-list {
    gap: 4px;
  }

  #simSection[data-sim-view="simplified"] .sim-scenario-btn {
    min-height: 33px;
    padding: 6px 9px;
    gap: 2px;
  }

  #simSection[data-sim-view="simplified"] .sim-scenario-btn.active {
    padding: 7px 9px;
  }

  #simSection[data-sim-view="simplified"] .sim-scenario-btn.active .sim-sc-desc {
    font-size: 10.5px;
    line-height: 1.26;
  }

  #physicsSection .phys-footer-card {
    padding: 6px 10px 6px 12px;
    gap: 3px 8px;
  }

  #inputSection .latency-top-card .card-head {
    padding: 7px 10px;
    gap: 5px;
  }

  #inputSection .arena-checks .switch-pill,
  #inputSection .tab {
    min-height: 28px;
    line-height: 26px;
  }

  #inputSection .tabs-bar {
    padding: 6px 8px;
  }

  #timelineSection .timeline-row {
    gap: 6px;
  }

  #timelineSection .note-item {
    padding: 5px 8px;
  }

  #timelineSection .note-item p {
    font-size: 9.5px;
    line-height: 1.24;
  }
}

/* ============================================================================
   HIGH-RESOLUTION DISPLAY SCALING (1440p QHD, > 1440p, 4K UHD 2160p & 5K)
   ============================================================================ */
@media (min-width: 2200px) and (min-height: 1120px) {
  :root {
    --s: 1.32;
    --stage-w: min(72vw, 158vh);
    --top-offset: calc(12px * var(--s));
    --lbl-h: calc(32px * var(--s));
    --top-clearance: calc(138px * var(--s));
    --radius-xl: calc(18px * var(--s));
    --radius-lg: calc(12px * var(--s));
    --radius-md: calc(10px * var(--s));
    --radius-sm: calc(8px * var(--s));
  }
}

@media (min-width: 2800px) and (min-height: 1440px) {
  :root {
    --s: 1.62;
  }
}

@media (min-width: 3500px) and (min-height: 1820px) {
  :root {
    --s: 1.98;
  }
}

@media (min-width: 4500px) and (min-height: 2350px) {
  :root {
    --s: 2.55;
  }
}

@media (min-width: 2200px) and (min-height: 1120px) {
  /* Top Chrome, Navigation & Console */
  .topbar {
    padding: calc(8px * var(--s)) calc(16px * var(--s));
    gap: calc(12px * var(--s));
  }

  .brand {
    gap: calc(10px * var(--s));
  }

  .brand-mark {
    width: calc(11px * var(--s));
    height: calc(11px * var(--s));
    border-radius: calc(3px * var(--s));
  }

  .brand h1 {
    font-size: calc(15.5px * var(--s));
    line-height: calc(28px * var(--s));
  }

  .step-nav {
    padding: calc(3px * var(--s));
    gap: calc(3px * var(--s));
  }

  .step-pill {
    font-size: calc(13px * var(--s));
    line-height: calc(28px * var(--s));
    padding: 0 calc(11px * var(--s));
    gap: calc(5px * var(--s));
    border-radius: calc(8px * var(--s));
  }

  .step-idx {
    font-size: calc(10.5px * var(--s));
  }

  .topbar-right-tools {
    gap: calc(8px * var(--s));
  }

  .btn-model-guide,
  .detector-pill,
  .btn-share-top {
    height: calc(34px * var(--s));
    padding: 0 calc(11px * var(--s));
    gap: calc(6px * var(--s));
    font-size: calc(12.5px * var(--s));
    border-radius: calc(9px * var(--s));
  }

  .detector-pill {
    padding: 0 calc(5px * var(--s)) 0 calc(11px * var(--s));
  }

  .model-q-dot {
    width: calc(17px * var(--s));
    height: calc(17px * var(--s));
    font-size: calc(11px * var(--s));
  }

  .detector-dot {
    width: calc(7px * var(--s));
    height: calc(7px * var(--s));
  }

  .hz-num,
  .btn-remeasure {
    font-size: calc(12px * var(--s));
    line-height: 1;
  }

  .btn-remeasure {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: calc(24px * var(--s));
    padding: 0 calc(9px * var(--s));
    border-radius: calc(6px * var(--s));
  }

  .detector-popover {
    width: calc(310px * var(--s));
    padding: calc(12px * var(--s)) calc(14px * var(--s));
    font-size: calc(12px * var(--s));
  }

  .detector-note {
    font-size: calc(12.5px * var(--s));
  }

  .detector-subnote {
    font-size: calc(11.5px * var(--s));
  }

  .share-ico,
  .spike-icon,
  .load-icon,
  .console-tab-chev {
    width: calc(13px * var(--s));
    height: calc(13px * var(--s));
  }

  .desktop-console-tab {
    padding: calc(6px * var(--s)) calc(15px * var(--s)) calc(7px * var(--s));
    gap: calc(6px * var(--s));
    font-size: calc(13.5px * var(--s));
    line-height: calc(20px * var(--s));
    border-radius: 0 0 calc(14px * var(--s)) var(--radius-xl);
  }

  .desktop-console-tab:hover {
    padding-bottom: calc(9px * var(--s));
  }

  .control-pane {
    max-height: calc(92px * var(--s));
    padding: calc(8px * var(--s)) calc(12px * var(--s));
    gap: calc(8px * var(--s));
  }

  .dock-group {
    gap: calc(6px * var(--s));
  }

  .dock-label,
  .seg-btn,
  .load-pod-lbl,
  .load-val,
  .load-ms,
  .btn-explode,
  .btn-pause {
    font-size: calc(13.5px * var(--s));
  }

  .seg-btn {
    padding: 0 calc(11px * var(--s));
  }

  .load-pod {
    padding: calc(3px * var(--s)) calc(7px * var(--s)) calc(3px * var(--s)) calc(9px * var(--s));
    gap: calc(7px * var(--s));
  }

  .load-readout {
    padding: 0 calc(7px * var(--s));
    gap: calc(4px * var(--s));
  }

  .btn-explode,
  .btn-pause {
    padding: 0 calc(12px * var(--s));
    gap: calc(7px * var(--s));
  }

  .spike-kbd,
  .pause-kbd {
    font-size: calc(11px * var(--s));
    line-height: calc(18px * var(--s));
    padding: 0 calc(5px * var(--s));
  }

  .desktop-console-close {
    width: calc(28px * var(--s));
    height: calc(28px * var(--s));
  }

  .desktop-console-close svg {
    width: calc(12px * var(--s));
    height: calc(12px * var(--s));
  }

  /* Shared Card Chrome & Footers */
  .card-head {
    padding: calc(11px * var(--s)) calc(20px * var(--s));
    gap: calc(12px * var(--s));
  }

  .card-title-group {
    gap: calc(10px * var(--s));
  }

  .view-kicker {
    font-size: calc(13px * var(--s));
    padding: 0 calc(9px * var(--s));
    border-radius: calc(6px * var(--s));
  }

  h2 {
    font-size: calc(20px * var(--s));
  }

  .swatch {
    width: calc(9px * var(--s));
    height: calc(9px * var(--s));
  }

  .motion-view-switch .seg-btn,
  .sim-view-switch .seg-btn {
    font-size: calc(12px * var(--s));
    line-height: calc(24px * var(--s));
    padding: 0 calc(9px * var(--s));
  }

  .slider-pill,
  .switch-pill {
    font-size: calc(12.5px * var(--s));
    padding: calc(3px * var(--s)) calc(11px * var(--s));
    gap: calc(7px * var(--s));
  }

  .slider-readout {
    font-size: calc(12px * var(--s));
  }

  .switch-track {
    width: calc(28px * var(--s));
    height: calc(16px * var(--s));
  }

  .switch-track::after {
    width: calc(12px * var(--s));
    height: calc(12px * var(--s));
  }

  .switch-pill input:checked + .switch-track::after {
    transform: translateX(calc(12px * var(--s)));
  }

  .sim-footer-card {
    padding: calc(13px * var(--s)) calc(20px * var(--s)) calc(13px * var(--s)) calc(22px * var(--s));
    gap: calc(16px * var(--s));
  }

  #simSection .sim-footer-card {
    max-height: calc(130px * var(--s));
    margin-top: calc(16px * var(--s));
  }

  .sim-footer-left {
    gap: calc(12px * var(--s));
    padding-right: calc(16px * var(--s));
  }

  .sim-footer-badge {
    font-size: calc(11.5px * var(--s));
    line-height: calc(24px * var(--s));
    padding: calc(2px * var(--s)) calc(11px * var(--s));
    gap: calc(6px * var(--s));
  }

  .sim-pulse-dot {
    width: calc(6px * var(--s));
    height: calc(6px * var(--s));
  }

  .sim-footer-title {
    font-size: calc(15px * var(--s));
    line-height: calc(21px * var(--s));
  }

  .sim-meter span {
    width: calc(14px * var(--s));
    height: calc(4px * var(--s));
  }

  .sim-footer-desc {
    font-size: calc(13.5px * var(--s));
    line-height: 1.46;
  }

  .sim-impact-pill {
    font-size: calc(12px * var(--s));
    line-height: calc(25px * var(--s));
    padding: calc(2px * var(--s)) calc(11px * var(--s));
    border-radius: calc(7px * var(--s));
  }

  .mf-btn {
    width: calc(26px * var(--s));
    height: calc(26px * var(--s));
    font-size: calc(12px * var(--s));
  }

  /* 01 Motion */
  .motion-body {
    height: 48vh;
  }

  #motionSection[data-motion-view="simplified"] .motion-body {
    grid-template-columns: minmax(0, 1fr) calc(380px * var(--s));
  }

  .lanes {
    padding: calc(11px * var(--s)) calc(16px * var(--s));
    gap: calc(9px * var(--s));
  }

  #motionSection[data-motion-view="simplified"] .lanes {
    padding-right: calc(12px * var(--s));
  }

  .lane-track-unit {
    grid-template-columns: minmax(0, 1fr) calc(450px * var(--s));
    gap: calc(10px * var(--s));
  }

  .lane-badge {
    top: calc(8px * var(--s));
    left: calc(10px * var(--s));
    padding: calc(2px * var(--s)) calc(10px * var(--s));
    gap: calc(7px * var(--s));
    border-radius: calc(7px * var(--s));
  }

  .lane-badge h3 {
    font-size: calc(13.5px * var(--s));
    line-height: calc(22px * var(--s));
  }

  .lane-sim-tag {
    top: calc(8px * var(--s));
    right: calc(10px * var(--s));
    font-size: calc(11.5px * var(--s));
    line-height: calc(22px * var(--s));
    padding: calc(2px * var(--s)) calc(9px * var(--s));
    border-radius: calc(6px * var(--s));
  }

  .ft-info-card {
    padding: calc(8px * var(--s)) calc(11px * var(--s));
    gap: calc(5px * var(--s));
  }

  .lane-meta .chip {
    font-size: calc(11px * var(--s));
    line-height: calc(18px * var(--s));
    padding: calc(1px * var(--s)) calc(7px * var(--s));
  }

  .ft-top {
    font-size: calc(11.5px * var(--s));
  }

  .motion-scenarios-pane {
    padding: calc(11px * var(--s)) calc(16px * var(--s)) calc(12px * var(--s)) 0;
    gap: calc(6px * var(--s));
  }

  .motion-scenarios-eyebrow,
  .motion-scenarios-hint {
    font-size: calc(11px * var(--s));
    line-height: calc(16px * var(--s));
  }

  .motion-scenario-btn,
  .sim-scenario-btn {
    padding: calc(7px * var(--s)) calc(11px * var(--s));
    gap: calc(3px * var(--s));
  }

  .ms-row-top {
    gap: calc(7px * var(--s));
  }

  .ms-idx {
    width: calc(19px * var(--s));
    height: calc(19px * var(--s));
    font-size: calc(11px * var(--s));
    border-radius: calc(5px * var(--s));
  }

  .ms-title {
    font-size: calc(13.5px * var(--s));
  }

  .ms-load {
    font-size: calc(11px * var(--s));
    line-height: calc(18px * var(--s));
    padding: 0 calc(7px * var(--s));
    border-radius: calc(4px * var(--s));
  }

  .ms-summary,
  .sim-sc-desc {
    padding-left: calc(26px * var(--s));
    font-size: calc(11.5px * var(--s));
    line-height: 1.34;
  }

  /* 02 Performance */
  .sim-row {
    height: 62vh;
    grid-template-columns: minmax(0, 1.82fr) minmax(calc(320px * var(--s)), 1fr);
    gap: calc(16px * var(--s));
  }

  .sim-quad {
    gap: calc(12px * var(--s));
  }

  .sim-area-head {
    padding: calc(7px * var(--s)) calc(13px * var(--s));
  }

  .sim-area-title h3 {
    font-size: calc(14px * var(--s));
    line-height: calc(22px * var(--s));
  }

  .sim-area-stat {
    font-size: calc(12px * var(--s));
    line-height: calc(20px * var(--s));
    padding: calc(2px * var(--s)) calc(8px * var(--s));
  }

  .sim-curve-card {
    padding: calc(14px * var(--s));
    gap: calc(10px * var(--s));
  }

  .sim-curve-title-row h2 {
    font-size: calc(16.5px * var(--s));
  }

  .sim-curve-sub {
    font-size: calc(12.5px * var(--s));
  }

  .sim-kpis {
    gap: calc(7px * var(--s));
  }

  .sim-kpi {
    padding: calc(6px * var(--s)) calc(8px * var(--s));
  }

  .sim-kpi-lbl {
    font-size: calc(10.5px * var(--s));
    line-height: calc(15px * var(--s));
  }

  .sim-kpi-val {
    font-size: calc(14.5px * var(--s));
    line-height: calc(22px * var(--s));
  }

  .sim-lvl-btn {
    font-size: calc(14px * var(--s));
    line-height: calc(30px * var(--s));
  }

  /* 03 Simulation (Physics Update Timing) */
  .phys-body {
    grid-template-columns: minmax(0, 1.44fr) minmax(calc(320px * var(--s)), 0.84fr);
  }

  .phys-tracks-col {
    padding: calc(11px * var(--s)) calc(16px * var(--s));
    gap: calc(11px * var(--s));
  }

  .phys-chamber-head {
    padding: calc(7px * var(--s)) calc(12px * var(--s));
  }

  .phys-chamber-title h3 {
    font-size: calc(13.5px * var(--s));
    line-height: calc(22px * var(--s));
  }

  .phys-pill {
    font-size: calc(11.5px * var(--s));
    line-height: calc(20px * var(--s));
    padding: calc(2px * var(--s)) calc(9px * var(--s));
  }

  .phys-more-btn {
    height: calc(32px * var(--s));
    padding: 0 calc(11px * var(--s)) 0 calc(13px * var(--s));
    font-size: calc(12.5px * var(--s));
    gap: calc(5px * var(--s));
  }

  .phys-more-pane {
    padding: calc(15px * var(--s)) calc(18px * var(--s));
    gap: calc(12px * var(--s));
  }

  .phys-more-title {
    font-size: calc(15px * var(--s));
  }

  .phys-more-col {
    padding: calc(11px * var(--s)) calc(13px * var(--s));
    gap: calc(5px * var(--s));
  }

  .phys-more-col h4 {
    font-size: calc(10.5px * var(--s));
  }

  .phys-more-col p {
    font-size: calc(12.5px * var(--s));
    line-height: 1.45;
  }

  .phys-more-close {
    width: calc(28px * var(--s));
    height: calc(28px * var(--s));
    font-size: calc(13px * var(--s));
  }

  /* 04 Latency */
  .tabs-bar {
    padding: calc(9px * var(--s)) calc(18px * var(--s));
  }

  .tab,
  .inline-tip,
  .arena-hint {
    font-size: calc(14px * var(--s));
  }

  .tab {
    padding: calc(2px * var(--s)) calc(13px * var(--s));
    gap: calc(7px * var(--s));
  }

  .tab-dot {
    width: calc(8px * var(--s));
    height: calc(8px * var(--s));
  }

  .arena-hint {
    bottom: calc(16px * var(--s));
    padding: calc(4px * var(--s)) calc(18px * var(--s));
  }

  .metric-cell {
    padding: calc(11px * var(--s)) calc(16px * var(--s));
    gap: calc(4px * var(--s));
  }

  .metric-cell .label {
    font-size: calc(10.5px * var(--s));
    line-height: calc(15px * var(--s));
  }

  .metric-val {
    font-size: calc(14.5px * var(--s));
    line-height: calc(21px * var(--s));
  }

  /* 05 Pipeline */
  .pipe-card {
    height: 60vh;
  }

  .pipe-mode-tab,
  .pipe-status,
  .pipe-total,
  .pipe-btn,
  .pipe-step-counter,
  .pipe-step-pill,
  .pipe-scroll-hint {
    font-size: calc(13px * var(--s));
  }

  .pipe-mode-tab,
  .pipe-btn,
  .pipe-step-pill {
    padding: 0 calc(11px * var(--s));
  }

  .pipe-stage-area {
    padding: calc(20px * var(--s)) calc(24px * var(--s));
    gap: calc(18px * var(--s));
  }

  .pipe-node {
    height: 20vh;
    padding: calc(11px * var(--s));
  }

  .pipe-node-badge,
  .pipe-node-ms {
    font-size: calc(11.5px * var(--s));
    line-height: calc(19px * var(--s));
  }

  .pipe-node-lbl {
    font-size: calc(13px * var(--s));
    line-height: calc(19px * var(--s));
  }

  .pipe-timeline-bar {
    height: calc(32px * var(--s));
    gap: calc(4px * var(--s));
  }

  .pipe-seg {
    font-size: calc(11.5px * var(--s));
  }

  .pipe-footer {
    padding: calc(14px * var(--s)) calc(20px * var(--s));
    gap: calc(10px * var(--s));
  }

  .pipe-stage-title {
    font-size: calc(16.5px * var(--s));
    line-height: calc(24px * var(--s));
  }

  .pipe-stage-desc {
    font-size: calc(14px * var(--s));
    line-height: calc(22px * var(--s));
  }

  /* 06 Refresh Map */
  .timeline-row {
    height: 54vh;
    grid-template-columns: minmax(0, 1.85fr) minmax(calc(300px * var(--s)), 1fr);
    gap: calc(16px * var(--s));
  }

  .timeline-meta {
    font-size: calc(13.5px * var(--s));
  }

  .timeline-wrap {
    padding: calc(12px * var(--s)) calc(18px * var(--s)) calc(14px * var(--s));
  }

  .tl-axis-row,
  .tl-row {
    grid-template-columns: calc(172px * var(--s)) minmax(0, 1fr);
    gap: calc(12px * var(--s));
  }

  .tl-axis-ticks {
    height: calc(20px * var(--s));
  }

  .tl-axis-label,
  .tl-tick-lbl {
    font-size: calc(11.5px * var(--s));
    line-height: calc(20px * var(--s));
  }

  .tl-row-title {
    font-size: calc(14px * var(--s));
    line-height: calc(22px * var(--s));
  }

  .tl-row-sub,
  .tl-block {
    font-size: calc(11.5px * var(--s));
    line-height: calc(18px * var(--s));
  }

  .tl-block[data-tip]:hover::after,
  .tl-block[data-tip]:focus-visible::after {
    font-size: calc(11.5px * var(--s));
    line-height: calc(16px * var(--s));
    padding: calc(5px * var(--s)) calc(9px * var(--s));
  }

  .notes-strip {
    gap: calc(10px * var(--s));
  }

  .note-item {
    padding: calc(10px * var(--s)) calc(16px * var(--s));
    gap: calc(4px * var(--s));
  }

  .note-tag {
    font-size: calc(12px * var(--s));
    line-height: calc(20px * var(--s));
  }

  .note-item p {
    font-size: calc(13px * var(--s));
    line-height: calc(20px * var(--s));
  }

  /* 07 Reading */
  .reading-meta {
    font-size: calc(12.5px * var(--s));
  }

  .reading-note {
    padding: calc(12px * var(--s)) calc(20px * var(--s));
    gap: calc(12px * var(--s));
  }

  .reading-note-badge {
    font-size: calc(11px * var(--s));
    line-height: calc(22px * var(--s));
    padding: 0 calc(9px * var(--s));
  }

  .reading-note p {
    font-size: calc(13.5px * var(--s));
  }

  .reading-grid {
    gap: calc(16px * var(--s));
    padding: calc(18px * var(--s)) calc(20px * var(--s)) calc(20px * var(--s));
  }

  .reading-card {
    height: 46vh;
  }

  .reading-source-pill {
    top: calc(11px * var(--s));
    left: calc(11px * var(--s));
    font-size: calc(10.5px * var(--s));
    line-height: calc(20px * var(--s));
    padding: 0 calc(8px * var(--s));
  }

  .reading-card-body {
    padding: calc(14px * var(--s)) calc(16px * var(--s));
    gap: calc(7px * var(--s));
  }

  .reading-card-body h3 {
    font-size: calc(15.5px * var(--s));
  }

  .reading-card-body p {
    font-size: calc(13px * var(--s));
  }

  .reading-link-cta {
    font-size: calc(12.5px * var(--s));
    line-height: calc(18px * var(--s));
  }

  /* Right Rail, Scroll Capsule, Modals & Banners */
  .rail-cluster {
    right: calc(24px * var(--s));
    gap: calc(10px * var(--s));
  }

  .rail-nav {
    padding: calc(10px * var(--s)) calc(6px * var(--s));
    gap: calc(10px * var(--s));
  }

  .rail-dot {
    width: calc(8px * var(--s));
    height: calc(8px * var(--s));
  }

  .rail-dot.active {
    height: calc(22px * var(--s));
  }

  .scroll-next-hint {
    width: calc(32px * var(--s));
    max-height: calc(68px * var(--s));
    padding: calc(7px * var(--s)) 0 calc(8px * var(--s));
    gap: calc(4px * var(--s));
  }

  .scroll-next-step {
    font-size: calc(9.5px * var(--s));
    line-height: calc(12px * var(--s));
  }

  .scroll-chev {
    width: calc(11px * var(--s));
    height: calc(6px * var(--s));
  }

  .rail-tooltip,
  .scroll-next-callout {
    font-size: calc(11.5px * var(--s));
    line-height: calc(22px * var(--s));
    padding: calc(3px * var(--s)) calc(10px * var(--s));
    border-radius: calc(6px * var(--s));
  }

  .model-modal-card {
    width: min(calc(760px * var(--s)), 92vw);
    padding: calc(20px * var(--s)) calc(22px * var(--s));
    gap: calc(14px * var(--s));
  }

  .model-modal-lead {
    font-size: calc(13.5px * var(--s));
  }

  .model-assumptions-grid {
    gap: calc(12px * var(--s));
  }

  .model-assumption-item {
    padding: calc(12px * var(--s)) calc(14px * var(--s));
    gap: calc(6px * var(--s));
  }

  .model-assumption-item h3 {
    font-size: calc(13.5px * var(--s));
  }

  .model-assumption-item p {
    font-size: calc(12.5px * var(--s));
  }

  .model-assumption-item code {
    font-size: calc(11.5px * var(--s));
  }

  .share-toast,
  .load-status-toast,
  .power-save-banner,
  .cookie-banner {
    font-size: calc(13px * var(--s));
  }

  .desktop-console-tab .console-tab-load {
    font-size: calc(12px * var(--s));
    line-height: calc(18px * var(--s));
    padding: calc(1px * var(--s)) calc(8px * var(--s));
  }

  .load-scope-tag {
    font-size: calc(10px * var(--s));
    line-height: calc(17px * var(--s));
    padding: 0 calc(6px * var(--s));
  }

  .sec-load-btn {
    height: calc(27px * var(--s));
    padding: 0 calc(10px * var(--s)) 0 calc(9px * var(--s));
    gap: calc(6px * var(--s));
    font-size: calc(12px * var(--s));
  }

  .sec-load-btn .sec-load-ms {
    font-size: calc(11.5px * var(--s));
  }

  .sec-load-sim {
    height: calc(28px * var(--s));
    padding: 0 calc(10px * var(--s));
  }

  .sec-load-prefix {
    font-size: calc(11.5px * var(--s));
  }

  .cookie-banner {
    max-width: calc(460px * var(--s));
    padding: calc(13px * var(--s)) calc(16px * var(--s));
    gap: calc(14px * var(--s));
  }

  .cookie-title {
    font-size: calc(13.5px * var(--s));
  }

  .cookie-text {
    font-size: calc(12px * var(--s));
  }

  .cookie-ok-btn {
    font-size: calc(12.5px * var(--s));
    padding: calc(8px * var(--s)) calc(14px * var(--s));
  }
}
