:root {
  --bg: #07070b;
  --bg-elev: #0e0d15;
  --surface: rgba(18, 17, 27, 0.86);
  --surface-solid: #12111b;
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(167, 139, 250, 0.28);
  --text: #f4f2fa;
  --muted: #9b95ad;
  --dim: #665f7a;
  --violet: #a78bfa;
  --violet-bright: #c4b5fd;
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --emerald: #34d399;
  --rose: #fb7185;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse 900px 420px at 78% -4%, rgba(124, 58, 237, 0.14), transparent 65%),
    radial-gradient(ellipse 680px 360px at 14% 18%, rgba(34, 211, 238, 0.06), transparent 65%),
    var(--bg);
  color: var(--text);
  overflow-x: clip;
}

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

button, input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--violet-bright);
  outline-offset: 3px;
}

h1, h2, h3, p, dl, dt, dd, ul {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  background: var(--violet);
  color: #0b0714;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 200;
}

.skip-link:focus {
  left: 14px;
}

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

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(8, 8, 13, 0.82);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  width: min(1260px, calc(100% - 40px));
  margin-inline: auto;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--violet-bright);
  background: rgba(167, 139, 250, 0.11);
  border: 1px solid var(--border-accent);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--muted);
}

.topnav a {
  transition: color 0.18s ease;
  white-space: nowrap;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.24);
  padding: 6px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.dot-live {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

/* Intro Band */
.intro-band {
  padding: 44px 0 28px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--violet);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.intro-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.intro-copy h1 span {
  background: linear-gradient(96deg, #e9d5ff 0%, #a78bfa 45%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 56ch;
}

.intro-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn.primary {
  background: linear-gradient(120deg, #7c3aed, #a78bfa);
  color: #fff;
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.28);
}

.btn.primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-accent);
}

.spec-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.spec-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.spec-cell dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.spec-cell dd {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.spec-cell span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

/* Section Headers */
.lab-section {
  padding: 58px 0 24px;
}

.section-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.section-top h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 64ch;
}

/* Scrollytelling Exploded Lab */
.scrolly-section {
  padding-top: 22px;
}

.scrolly-track {
  position: relative;
}

.scrolly-sticky {
  position: sticky;
  top: 66px;
  z-index: 10;
  padding: 12px 0 18px;
}

.scrolly-steps {
  display: grid;
  grid-template-rows: repeat(4, 24vh);
  pointer-events: none;
}

.exploded-shell {
  background: linear-gradient(165deg, rgba(18, 16, 29, 0.94), rgba(10, 10, 16, 0.96));
  border: 1px solid var(--border-accent);
  border-radius: 22px;
  padding: 20px 22px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.55);
}

.explode-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.preset-group {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
}

.chip-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.chip-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.chip-btn.active {
  color: #fff;
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(167, 139, 250, 0.42);
}

.chip-btn.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}

.slider-control {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
}

.slider-control strong {
  font-family: var(--font-mono);
  color: var(--cyan);
  min-width: 38px;
  text-align: right;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--violet-bright);
  border: 2px solid #09080f;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.7);
}

.stage-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.viewport-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 50% 42%, rgba(124, 58, 237, 0.15), transparent 62%),
    radial-gradient(circle at 50% 62%, rgba(34, 211, 238, 0.06), transparent 55%),
    linear-gradient(180deg, rgba(13, 12, 20, 0.98), rgba(7, 7, 11, 0.99));
  overflow: hidden;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.viewport-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(167, 139, 250, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

#earCanvas {
  width: 100%;
  height: 490px;
  display: block;
  touch-action: pan-y;
  cursor: grab;
}

#earCanvas:active {
  cursor: grabbing;
}

.viewport-hud-top,
.viewport-hud-bottom {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  pointer-events: none;
}

.viewport-hud-bottom > *,
.viewport-hud-top > button {
  pointer-events: auto;
}

.hud-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  background: rgba(9, 11, 18, 0.86);
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 5px 10px;
  border-radius: 6px;
}

.hud-hint {
  font-size: 11px;
  color: var(--dim);
}

.layer-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(9, 9, 14, 0.78);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

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

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

/* Hotspots & Leader Lines */
.hotspot-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.hotspot-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 7px;
  min-height: 30px;
  border-radius: 999px;
  background: rgba(11, 10, 18, 0.9);
  border: 1px solid rgba(167, 139, 250, 0.45);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  white-space: nowrap;
}

.hotspot-pin:hover,
.hotspot-pin.active {
  background: rgba(34, 211, 238, 0.18);
  border-color: var(--cyan);
  color: #fff;
  transform: translate(-50%, -50%) scale(1.06);
  z-index: 6;
}

.hotspot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 10px var(--violet);
  flex-shrink: 0;
}

.hotspot-pin.active .hotspot-dot {
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

/* Inspector Panel */
.inspector-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.inspector-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.comp-pill {
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: all 0.16s ease;
}

.comp-pill:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.comp-pill.active {
  background: rgba(34, 211, 238, 0.13);
  border-color: rgba(34, 211, 238, 0.48);
  color: #ecfeff;
}

.inspector-card {
  flex: 1;
  background: rgba(17, 16, 26, 0.92);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.insp-head {
  display: flex;
  gap: 14px;
  align-items: center;
}

.insp-photo {
  width: 96px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #09090d;
  flex-shrink: 0;
}

.insp-photo.is-cutout {
  object-fit: contain;
  padding: 5px;
  background: radial-gradient(circle at 50% 50%, rgba(167, 139, 250, 0.16), rgba(9, 9, 14, 0.98));
}

.insp-badge-svg {
  width: 96px;
  height: 72px;
  border-radius: 10px;
  border: 1px solid var(--border-accent);
  background: rgba(167, 139, 250, 0.08);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--violet-bright);
}

.insp-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan);
  letter-spacing: 0.1em;
}

.insp-title {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
}

.insp-desc {
  font-size: 13px;
  line-height: 1.58;
  color: var(--muted);
}

.insp-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.insp-kv {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 11px;
}

.insp-kv span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
}

.insp-kv strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--text);
}

.insp-pinout {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--violet-bright);
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 9px;
  padding: 10px 12px;
}

/* Tail Lab */
.tail-mode-switch {
  display: inline-flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 10px;
}

.tail-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.tail-viewport {
  min-height: 410px;
}

#tailCanvas {
  width: 100%;
  height: 300px;
  display: block;
}

.tail-cable-meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border);
  background: rgba(9, 9, 15, 0.72);
}

.cable-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.cable-meter span {
  color: var(--muted);
  white-space: nowrap;
}

.cable-meter strong {
  font-family: var(--font-mono);
  font-size: 11px;
  min-width: 54px;
  text-align: right;
}

.meter-track {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 50%;
  border-radius: 999px;
  transition: width 0.06s linear;
}

.meter-fill.cyan {
  background: linear-gradient(90deg, #0891b2, #22d3ee);
}

.meter-fill.violet {
  background: linear-gradient(90deg, #7c3aed, #c4b5fd);
}

.tail-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.glass-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.glass-box h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pattern-btn,
.emotion-btn {
  text-align: left;
  padding: 11px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: all 0.16s ease;
}

.pattern-btn:hover,
.emotion-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.pattern-btn.active,
.emotion-btn.active {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.48);
}

.pattern-btn strong,
.emotion-btn strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}

.pattern-btn span,
.emotion-btn span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.slider-full {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.slider-full > div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.slider-full strong {
  font-family: var(--font-mono);
  color: var(--cyan);
}

.slider-full input {
  width: 100%;
}

.arch-note {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 10px;
  padding: 11px 12px;
}

/* Modes Lab */
.modes-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.modes-stage {
  min-height: 410px;
}

.servo-readout {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--violet-bright);
}

#liveSimCanvas {
  width: 100%;
  height: 255px;
  display: block;
}

.fft-strip {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  background: rgba(8, 8, 14, 0.78);
}

#fftCanvas {
  width: 100%;
  height: 54px;
  display: block;
}

.fft-labels {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dim);
}

.modes-dock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mode-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--border);
}

.mode-tab {
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.16s ease;
}

.mode-tab.active {
  background: rgba(167, 139, 250, 0.2);
  color: #fff;
}

.mode-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.mode-panel.active {
  display: flex;
}

.panel-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.panel-desc code {
  font-family: var(--font-mono);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.09);
  padding: 1px 6px;
  border-radius: 5px;
}

.audio-controls,
.preset-tracks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.beat-meter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
  padding-top: 8px;
}

.beat-meter-row strong {
  font-family: var(--font-mono);
  color: var(--cyan);
}

.emotion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.imu-pad-wrap {
  display: flex;
  gap: 16px;
  align-items: center;
}

.imu-pad {
  position: relative;
  width: 170px;
  height: 170px;
  border-radius: 16px;
  background: radial-gradient(circle at center, rgba(167, 139, 250, 0.14), rgba(10, 10, 16, 0.96));
  border: 1px solid var(--border-accent);
  touch-action: none;
  cursor: crosshair;
  flex-shrink: 0;
}

.imu-crosshair {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, transparent 49.5%, rgba(255, 255, 255, 0.12) 50%, transparent 50.5%),
    linear-gradient(to bottom, transparent 49.5%, rgba(255, 255, 255, 0.12) 50%, transparent 50.5%);
  pointer-events: none;
}

.imu-puck {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.8);
  border: 3px solid #090910;
  pointer-events: none;
}

.imu-readout {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.imu-readout > div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
}

.imu-readout span {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dim);
}

.imu-readout strong {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}

/* Ecosystem Pipeline */
.eco-scenarios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.eco-pipeline {
  display: grid;
  grid-template-columns: 1fr 44px 1fr 44px 1fr 44px 1fr;
  align-items: stretch;
  gap: 8px;
}

.eco-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.eco-node.active {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.1);
  transform: translateY(-2px);
}

.node-step {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 0.1em;
}

.eco-node h3 {
  font-family: var(--font-display);
  font-size: 17px;
}

.eco-node p {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  flex: 1;
}

.eco-node code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  padding: 6px 8px;
  border-radius: 7px;
}

.eco-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eco-link::before {
  content: "";
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.25), rgba(34, 211, 238, 0.7));
}

.packet-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: packetSlide 1.8s infinite linear;
}

@keyframes packetSlide {
  0% { transform: translateX(-16px); opacity: 0; }
  25% { opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translateX(16px); opacity: 0; }
}

/* BOM & Ergonomics */
.bom-section {
  padding-bottom: 64px;
}

.bom-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(52, 211, 153, 0.09);
  border: 1px solid rgba(52, 211, 153, 0.28);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
}

.bom-summary-pill strong {
  color: var(--emerald);
}

.bom-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
}

.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

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

.table-head h3 {
  font-family: var(--font-display);
  font-size: 16px;
}

.table-head span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

th, td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td:last-child {
  font-family: var(--font-mono);
  color: var(--cyan);
  white-space: nowrap;
}

.ergonomics-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  font-size: 12px;
}

.bar-row strong {
  font-family: var(--font-mono);
  color: var(--violet-bright);
}

.bar-row i {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  display: block;
}

.bar-row i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 40%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}

.ergo-foot {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.clean-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12.5px;
  color: var(--muted);
}

.highlight-li {
  color: var(--emerald);
}

/* Footer & Mobile Dock */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0 36px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--dim);
}

.footer-links {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: var(--muted);
}

.mobile-dock {
  display: none;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .intro-grid,
  .stage-grid,
  .tail-grid,
  .modes-grid,
  .bom-layout {
    grid-template-columns: 1fr;
  }

  .eco-pipeline {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .eco-link {
    height: 24px;
  }

  .eco-link::before {
    width: 2px;
    height: 100%;
  }

  .packet-dot {
    animation: packetSlideV 1.6s infinite linear;
  }

  @keyframes packetSlideV {
    0% { transform: translateY(-10px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(10px); opacity: 0; }
  }

  .scrolly-sticky {
    position: relative;
    top: 0;
  }

  .scrolly-steps {
    display: none;
  }
}

@media (max-width: 720px) {
  .container,
  .topbar-inner {
    width: calc(100% - 24px);
  }

  .topnav,
  .brand-tag,
  .hud-hint {
    display: none;
  }

  .intro-band {
    padding: 24px 0 18px;
  }

  .exploded-shell {
    padding: 14px;
    border-radius: 16px;
  }

  #earCanvas {
    height: 370px;
  }

  .viewport-card {
    min-height: 380px;
  }

  .hotspot-pin {
    font-size: 9px;
    padding: 4px 8px 4px 6px;
  }

  .pattern-grid,
  .emotion-grid,
  .tail-cable-meters {
    grid-template-columns: 1fr;
  }

  .imu-pad-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .imu-pad {
    width: 100%;
    height: 160px;
  }

  .mode-switcher {
    grid-template-columns: 1fr;
  }

  body {
    padding-bottom: 68px;
  }

  .mobile-dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 110;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(12, 11, 19, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border-accent);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.65);
  }

  .mobile-dock a {
    min-height: 44px;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    border-radius: 9px;
  }

  .mobile-dock a:hover,
  .mobile-dock a:active {
    background: rgba(167, 139, 250, 0.16);
    color: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .packet-dot {
    animation: none;
  }
}
