/* ==========================================================================
   NeckLink v3.0 — Documentary Optical-Bench & Bare-Metal Hardware Design
   100% Locked-Boundary Layout: Zero scale, zero translate, zero reflow on click
   ========================================================================== */

:root {
  --bg: #08090b;
  --bg-elev: #0d0f13;
  --bg-panel: #0e1015;
  --bg-inset: #090b0e;
  --bg-glass: rgba(11, 12, 16, 0.80);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(228, 180, 92, 0.42);
  --text: #f8fafc;
  --text-soft: #d2d6de;
  --text-muted: #8b92a0;

  --accent: #e4b45c;
  --sight: #67b7c9;
  --compass: #e4b45c;
  --cord: #d87a68;
  --sense: #5fb490;
  --nltp: #9ba5c9;
  --ok: #5fb490;
  --warn: #e4b45c;

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
  --shadow-panel: 0 18px 44px rgba(0, 0, 0, 0.55);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: clip;
}

code, pre, .mono-tag {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  font-size: 0.86em;
  padding: 0.12em 0.38em;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #f0d59c;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: min(1220px, calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  left: -9999px;
  top: 12px;
  z-index: 9999;
  padding: 10px 16px;
  background: var(--accent);
  color: #090a0c;
  font-weight: 600;
  border-radius: 8px;
}
.skip-link:focus { left: 12px; }

.icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}
.icon-fill {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   1. FIXED HARDWARE NAVIGATION (60px Locked Height)
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 900;
  display: flex;
  align-items: center;
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.nav.scrolled {
  background: rgba(8, 9, 11, 0.92);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.04rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand-mark {
  width: 25px;
  height: 25px;
}
.brand-word span { color: var(--accent); }
.brand-beta {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(228, 180, 92, 0.12);
  border: 1px solid rgba(228, 180, 92, 0.32);
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a {
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-soft);
  border: 1px solid transparent;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}
.nav-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}
.nav-links a[aria-current="true"] {
  color: #ffffff;
  background: rgba(228, 180, 92, 0.10);
  border-color: rgba(228, 180, 92, 0.28);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.menu-btn { display: none; }
.nav .icon-close { display: none; }
.nav.open .icon-menu { display: none; }
.nav.open .icon-close { display: block; }

/* Buttons — Zero transform/scale/translate on hover or click */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn-sm { height: 34px; padding: 0 13px; font-size: 0.81rem; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 0.75rem; }

.btn-primary {
  background: #e4b45c;
  border-color: #e4b45c;
  color: #090a0c;
}
.btn-primary:hover {
  background: #efd593;
  border-color: #efd593;
}
.btn-secondary {
  background: #14171e;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
}
.btn-secondary:hover {
  background: #1d212b;
  border-color: rgba(228, 180, 92, 0.45);
}
.btn-glass {
  background: rgba(228, 180, 92, 0.11);
  color: #f4deb0;
  border-color: rgba(228, 180, 92, 0.30);
}
.btn-glass:hover {
  background: rgba(228, 180, 92, 0.19);
  border-color: rgba(228, 180, 92, 0.50);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}
.btn-ghost code {
  background: none;
  border: 0;
  padding: 0;
  color: #f0d59c;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #14171e;
  color: var(--text-soft);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.icon-btn:hover { color: #fff; border-color: var(--border-strong); }
.icon-btn.menu-btn { display: none; }

/* --------------------------------------------------------------------------
   2. RAY-TRACED 3D SCROLLYTELLING DIVE (#dive)
   -------------------------------------------------------------------------- */
.scroll-dive {
  position: relative;
  min-height: 500vh;
}
.dive-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  width: 100%;
  overflow: hidden;
  background: #08090b;
}
#scroll-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.dive-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 58% 48%, transparent 48%, rgba(8, 9, 11, 0.36) 100%),
    linear-gradient(180deg, rgba(8, 9, 11, 0.42) 0%, transparent 14%, transparent 84%, rgba(8, 9, 11, 0.90) 100%);
}

/* Fixed-Width Chapter Rail — Zero horizontal shift when active */
.dive-rail {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 132px;
}
.rail-step {
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px;
  border-radius: 7px;
  background: rgba(10, 12, 16, 0.68);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.rail-step:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
}
.rail-step .rail-idx {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.69rem;
  color: var(--accent);
}
.rail-step.active {
  background: rgba(228, 180, 92, 0.15);
  border-color: rgba(228, 180, 92, 0.50);
  color: #ffffff;
}

.scroll-cue {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--text-soft);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.scroll-chevron {
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(45deg);
}

/* Scrolling Narrative Cards */
.dive-steps {
  position: relative;
  z-index: 5;
  margin-top: -100vh;
  margin-top: -100svh;
  pointer-events: none;
}
.dive-step {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 88px 0;
}
.dive-step-hero {
  min-height: 102vh;
  align-items: flex-end;
  padding-bottom: 64px;
}
.dive-step-left { justify-content: flex-start; }
.dive-step-right { justify-content: flex-end; padding-right: 152px; }

.glass-card {
  pointer-events: auto;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.hero-glass {
  width: min(615px, 100%);
  padding: 28px 30px;
}
.hero-glass h1 {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.gradient-text {
  color: var(--accent);
}
.hero-lead {
  margin: 0 0 20px;
  font-size: 0.96rem;
  color: var(--text-soft);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.story-card {
  width: min(440px, 100%);
  padding: 24px 26px;
  border-top: 2px solid var(--accent-line, var(--accent));
}
.story-kicker {
  margin: 0 0 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-line, var(--accent));
}
.story-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.1vw, 1.7rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}
.story-card p {
  margin: 0;
  font-size: 0.91rem;
  color: var(--text-soft);
}
.story-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.story-metrics strong {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.04rem;
  color: #ffffff;
}
.story-metrics span {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.story-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   3. SHARED SECTIONS & HARDWARE PANELS
   -------------------------------------------------------------------------- */
.section {
  padding: 76px 0;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.section-head {
  max-width: 740px;
  margin-bottom: 28px;
}
.kicker {
  margin: 0 0 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
}
.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 2.9vw, 2.3rem);
  line-height: 1.14;
  letter-spacing: -0.03em;
}
.muted-inline { color: var(--text-muted); font-weight: 600; }
.section-head p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--text-soft);
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.text-link {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.84rem;
  white-space: nowrap;
}
.text-link:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   4. 18-SECOND DOCUMENTARY FILM SHOWCASE & MODAL (#film)
   -------------------------------------------------------------------------- */
.film-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.32fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-panel);
}
.film-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.4vw, 2.0rem);
  line-height: 1.15;
  letter-spacing: -0.028em;
}
.film-copy p {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 0.93rem;
}
.film-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.film-meta-note {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.73rem !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
}
.film-frame-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #050608;
  aspect-ratio: 16 / 9;
}
.inline-promo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.unmute-pill {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 162px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 7px;
  background: rgba(8, 9, 11, 0.86);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(228, 180, 92, 0.40);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}
.unmute-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.unmute-pill.sound-on .unmute-dot {
  background: var(--ok);
}

/* Cinema Modal */
.film-modal[hidden] { display: none; }
.film-modal {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: grid;
  place-items: center;
  padding: 20px;
}
.film-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 8, 0.90);
  backdrop-filter: blur(16px);
}
.film-modal-dialog {
  position: relative;
  width: min(1100px, 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #08090b;
  border: 1px solid var(--border-strong);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.85);
}
.film-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--text-soft);
}
.film-modal-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.film-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.film-modal-stage {
  background: #000;
  aspect-ratio: 16 / 9;
}
.film-modal-stage video {
  width: 100%;
  height: 100%;
  display: block;
}

/* --------------------------------------------------------------------------
   5. INTERACTIVE 3D "SCRAMBLE THE CONNECTOME" PROOF (#proof)
      100% Locked Panel Heights — Zero resize on mode switch
   -------------------------------------------------------------------------- */
.mode-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.mode-btn {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 0 16px;
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-soft);
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}
.mode-btn:hover { border-color: rgba(255, 255, 255, 0.22); }
.mode-text {
  min-width: 0;
  overflow: hidden;
}
.mode-btn strong {
  display: block;
  font-size: 0.90rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mode-btn small {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mode-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mode-real { background: var(--compass); }
.mode-shuf { background: var(--cord); }
.mode-analytic { background: var(--sight); }

.mode-btn.active[data-wiring="real"] {
  background: rgba(228, 180, 92, 0.10);
  border-color: rgba(228, 180, 92, 0.55);
}
.mode-btn.active[data-wiring="shuffled"] {
  background: rgba(216, 122, 104, 0.11);
  border-color: rgba(216, 122, 104, 0.55);
}
.mode-btn.active[data-wiring="analytic"] {
  background: rgba(103, 183, 201, 0.11);
  border-color: rgba(103, 183, 201, 0.55);
}

.proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.14fr);
  gap: 16px;
  align-items: stretch;
}
.stage3d-panel,
.scoreboard-panel {
  height: 492px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stage3d-header {
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.stage3d-titles {
  min-width: 0;
  overflow: hidden;
}
.stage3d-badge {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--compass);
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stage3d-sub {
  margin: 2px 0 0;
  font-size: 0.81rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drag-hint {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.69rem;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.stage3d-canvas-wrap {
  position: relative;
  height: 326px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  cursor: grab;
}
.stage3d-canvas-wrap:active { cursor: grabbing; }
#scramble-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.stage3d-readouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  height: 58px;
  flex-shrink: 0;
}
.readout-box {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.readout-box span {
  display: block;
  font-size: 0.69rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.readout-box strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.80rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Scoreboard Fixed Table */
.scoreboard-head {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.scoreboard-head h3 {
  margin: 0;
  font-size: 1.02rem;
}
.score-table-wrap {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-inset);
}
.score-table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.80rem;
}
.score-table th,
.score-table td {
  padding: 0 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.score-table th:nth-child(1),
.score-table td:nth-child(1) { width: 34%; }
.score-table th:nth-child(2),
.score-table td:nth-child(2),
.score-table th:nth-child(3),
.score-table td:nth-child(3),
.score-table th:nth-child(4),
.score-table td:nth-child(4),
.score-table th:nth-child(5),
.score-table td:nth-child(5) { width: 13.5%; font-family: "JetBrains Mono", monospace; font-size: 0.77rem; }
.score-table th:nth-child(6),
.score-table td:nth-child(6) { width: 12%; text-align: right; }

.score-table thead th {
  height: 36px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}
.score-table tbody tr:last-child td { border-bottom: 0; }
.score-table th.active-col,
.score-table td.active-col {
  background: rgba(228, 180, 92, 0.09);
  color: #ffffff;
  font-weight: 600;
}
.task-organ {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--accent);
}
.task-name {
  display: block;
  font-size: 0.78rem;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
}
.sub-lbl {
  display: block;
  font-size: 0.63rem;
  color: var(--text-muted);
}

.verdict-pill {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}
.verdict-PASS { background: rgba(95, 180, 144, 0.14); color: #86d3b3; border: 1px solid rgba(95, 180, 144, 0.32); }
.verdict-MARGINAL { background: rgba(228, 180, 92, 0.14); color: #f3d285; border: 1px solid rgba(228, 180, 92, 0.32); }
.verdict-NULL { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.26); }

.audit-footnote {
  margin: 10px 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   6. 24 KB SILICON DIE EXPLORER (#silicon)
      100% Locked Panel Heights (516px) — Zero resize when switching organs
   -------------------------------------------------------------------------- */
.explorer {
  display: grid;
  grid-template-columns: minmax(0, 0.90fr) minmax(0, 1.10fr);
  gap: 16px;
  align-items: stretch;
}
.die-panel,
.detail-panel {
  height: 516px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.die-header {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.mono-tag {
  font-size: 0.69rem;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.tag-gold {
  color: var(--accent);
  border-color: rgba(228, 180, 92, 0.32);
  background: rgba(228, 180, 92, 0.08);
}

.die-wafer {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--bg-inset);
  border: 1px solid rgba(228, 180, 92, 0.32);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.die-quadrants {
  flex: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
}
.die-block {
  text-align: left;
  padding: 11px 14px;
  border-radius: 8px;
  background: #11141b;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}
.die-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--c, var(--accent));
}
.die-block:hover {
  background: #161a23;
  border-color: rgba(255, 255, 255, 0.24);
}
.die-block.active {
  background: rgba(228, 180, 92, 0.10);
  border-color: var(--c, var(--accent));
}
.die-block-kicker {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: var(--c, var(--accent));
  letter-spacing: 0.05em;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.die-block strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.die-bytes {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.71rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.die-sight { grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }

/* Locked-Height Right Organ Inspector */
.detail-panel {
  border-top: 2px solid var(--c, var(--accent));
}
.detail-top {
  height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
  overflow: hidden;
}
.badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.69rem;
  padding: 3px 9px;
  border-radius: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge-accent {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.badge-ok {
  background: rgba(95, 180, 144, 0.12);
  color: #8fd8b8;
  border: 1px solid rgba(95, 180, 144, 0.28);
}
.detail-title {
  height: 32px;
  margin: 0 0 6px;
  font-size: 1.38rem;
  line-height: 32px;
  letter-spacing: -0.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.detail-desc {
  height: 44px;
  margin: 0 0 12px;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
}
.spec-row {
  height: 58px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  flex-shrink: 0;
}
.spec {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.spec dt {
  font-size: 0.69rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  white-space: nowrap;
}
.spec dd {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.80rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tradeoff {
  height: 68px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(228, 180, 92, 0.06);
  border: 1px solid rgba(228, 180, 92, 0.22);
  margin-bottom: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.tradeoff-label {
  margin: 0 0 2px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.tradeoff-text {
  margin: 0;
  font-size: 0.80rem;
  line-height: 18px;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.code-block {
  height: 148px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.code-bar {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
#det-code {
  flex: 1;
  margin: 0;
  padding: 10px 12px;
  overflow: auto;
  font-size: 0.77rem;
  line-height: 1.5;
  color: #e2e8f0;
}
.detail-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  flex-shrink: 0;
}

.copy-btn {
  width: 28px;
  height: 24px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 5px;
  padding: 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.copy-btn:hover { color: #fff; border-color: var(--border-strong); }
.copy-btn .icon { width: 14px; height: 14px; }
.copy-btn .icon-check { display: none; stroke: var(--ok); }
.copy-btn.copied .icon-copy { display: none; }
.copy-btn.copied .icon-check { display: block; }

/* --------------------------------------------------------------------------
   7. LIVE C99 WASM + WEBCAM HARDWARE COCKPIT (#simulator)
      Locked Button Widths & Locked Status Bar Height
   -------------------------------------------------------------------------- */
.sim {
  padding: 20px;
}
.sim-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.sim-btn {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 8px;
  background: #13161d;
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.81rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.sim-btn svg { stroke: var(--c, var(--accent)); }
.sim-btn:hover {
  border-color: var(--c, var(--accent));
  color: #ffffff;
  background: #1a1e28;
}
.sim-btn-cam {
  width: 156px;
}
.sim-btn-cam.active {
  background: rgba(95, 180, 144, 0.16);
  border-color: var(--ok);
  color: #ecfdf5;
}
.sim-btn-reset { margin-left: auto; }
.sim-canvas-wrap {
  height: 340px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-inset);
}
#reflex-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.sim-status {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 0 12px;
  border-radius: 7px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.77rem;
  color: var(--text-soft);
  overflow: hidden;
}
#sim-status {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   8. INSTALL TERMINAL (#install) — Locked 1-Line Terminal Body
   -------------------------------------------------------------------------- */
.install-box {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-panel);
}
.install-head {
  max-width: 680px;
  margin-bottom: 20px;
}
.install-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 2.5vw, 2.0rem);
  letter-spacing: -0.028em;
}
.install-head p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-soft);
}

.terminal {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-inset);
  border: 1px solid rgba(228, 180, 92, 0.30);
}
.terminal-bar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.terminal-dots {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}
.terminal-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.terminal-tabs {
  display: flex;
  gap: 4px;
}
.terminal-tab {
  height: 28px;
  padding: 0 11px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.terminal-tab:hover { color: var(--text); }
.terminal-tab.active {
  background: rgba(228, 180, 92, 0.13);
  border-color: rgba(228, 180, 92, 0.38);
  color: #ffffff;
}
.terminal-body {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
}
.terminal-cmd {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.86rem;
  color: #f8fafc;
  white-space: nowrap;
  overflow-x: auto;
}
.prompt { color: var(--accent); margin-right: 6px; }

/* --------------------------------------------------------------------------
   9. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  background: #060709;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.8fr;
  gap: 28px;
  margin-bottom: 32px;
}
.footer-brand p {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 350px;
}
.footer-col h4 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-soft);
}
.footer-col a {
  display: block;
  padding: 3px 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.footer-col a:hover { color: #ffffff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1040px) {
  #nav-watch-btn { display: none; }
  .film-showcase,
  .proof-grid,
  .explorer {
    grid-template-columns: 1fr;
  }
  .dive-step-right { padding-right: 0; }
  .dive-rail { display: none; }
}

@media (max-width: 860px) {
  .icon-btn.menu-btn { display: inline-grid; }
  .nav-links {
    position: fixed;
    top: 60px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border-radius: 12px;
    background: #0d0f14;
    border: 1px solid var(--border-strong);
    display: none;
  }
  .nav.open .nav-links { display: flex; }
  .stage3d-panel,
  .scoreboard-panel,
  .die-panel,
  .detail-panel {
    height: auto;
  }
  .mode-switcher { grid-template-columns: 1fr; }
  .spec-row, .stage3d-readouts { grid-template-columns: 1fr; height: auto; }
  .sim-canvas-wrap { height: 560px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .hide-xs { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
