/* styles.css — shared visual tokens + shell + side panel + modal styling.
   Extracted from WIP/Navigation.html. v1 keeps the existing aesthetic; a
   later pass will refine. */

:root {
  color-scheme: light dark;
  --paper: #F5F1EA;
  --paper-2: #EFEAE0;
  --ink: #141414;
  --ink-2: #2A2620;
  --muted: #6B6358;
  --rule-soft: rgba(20,20,20,0.14);
  --accent: #B85C2E;          /* terracotta */
  --moss: #3A4A3F;
  --gold: #C9A961;
  --client-color: #E84A1F;
  --client-glow:  #FFB347;
  --dept-color:   var(--accent);
  --func-color:   #2F7A4A;
  --tribe-color:  #3D7BC9;
  --node-default: rgba(20,20,20,0.55);
  --node-dim:     rgba(20,20,20,0.18);
  --edge:         rgba(20,20,20,0.22);
  --edge-hi:      var(--accent);
  --panel-bg:     rgba(245,241,234,0.92);
  /* Glass / chrome elevation tokens */
  --inset-hi:    rgba(255,255,255,0.55);   /* inset top highlight on glass surfaces */
  --inset-edge:  rgba(255,255,255,0.35);   /* inset hairline on cards/badges */
  --shadow-1:    0 1px 2px rgba(20,20,20,0.06);
  --shadow-2:    0 6px 18px rgba(20,20,20,0.10);
  --shadow-3:    0 16px 48px rgba(20,20,20,0.14);
}
body[data-theme="dark"] {
  /* Warm dark — slight terracotta undertone instead of cool gray. */
  --paper: #11100E;
  --paper-2: #1A1814;
  --ink: #EAE6DC;
  --ink-2: #C9C2B4;
  --muted: #8A8576;
  --rule-soft: rgba(234,230,220,0.14);
  --accent: #D87A4A;
  --moss: #8FA88F;
  --gold: #E0C48A;
  --client-color: #FF6A3A;
  --client-glow:  #FFC773;
  --dept-color:   var(--accent);
  --func-color:   #5FA37A;
  --tribe-color:  #6FA1DC;
  --node-default: rgba(234,230,220,0.6);
  --node-dim:     rgba(234,230,220,0.18);
  --edge:         rgba(234,230,220,0.18);
  --panel-bg:     rgba(20,18,14,0.82);
  --inset-hi:    rgba(255,245,220,0.05);
  --inset-edge:  rgba(255,245,220,0.04);
  --shadow-1:    0 1px 2px rgba(0,0,0,0.35);
  --shadow-2:    0 6px 18px rgba(0,0,0,0.45);
  --shadow-3:    0 16px 48px rgba(0,0,0,0.55);
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; height:100%; overflow:hidden; background: var(--paper); color: var(--ink); font-family: 'Geist', system-ui, sans-serif; transition: background .3s ease, color .3s ease; }
.hide { display: none !important; }

/* ── Top bar ─────────────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 24px; gap: 24px;
  border-bottom: 1px solid var(--rule-soft);
  background: rgba(245,241,234,0.82);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: inset 0 1px 0 var(--inset-hi), 0 1px 0 var(--rule-soft);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
body[data-theme="dark"] .topbar { background: rgba(20,18,14,0.72); }

.brand { display:flex; align-items:center; gap: 12px; font: 500 13px/1 'JetBrains Mono', monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.brand .glyph {
  width: 14px; height: 14px; background: var(--accent); border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 1px 1px rgba(20,20,20,0.18);
}
.brand strong { color: var(--ink); font-weight: 600; letter-spacing: 0.08em; }

.center-title { font: 500 13px/1 'JetBrains Mono', monospace; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.center-title b { color: var(--ink); font-weight: 600; }
.intro-pill {
  appearance: none; border: 1px solid var(--rule-soft); background: transparent; color: var(--accent);
  font: 500 10px/1 'JetBrains Mono', monospace; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 100px; cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.intro-pill:hover { background: rgba(184,92,46,0.08); border-color: var(--accent); }

.right-tools { justify-self: end; display:flex; align-items:center; gap: 8px; }
.search-input {
  appearance: none; border: 1px solid var(--rule-soft);
  background: rgba(255,255,255,0.35);
  color: var(--ink); font: 400 13px/1 'JetBrains Mono', monospace;
  padding: 8px 12px; width: 220px; border-radius: 6px; outline: none;
  box-shadow: inset 0 1px 1px rgba(20,20,20,0.04);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
body[data-theme="dark"] .search-input { background: rgba(255,255,255,0.04); }
.search-input::placeholder { color: var(--muted); letter-spacing: 0.04em; }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: inset 0 1px 1px rgba(20,20,20,0.04), 0 0 0 3px rgba(184,92,46,0.12);
}

.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--rule-soft); background: rgba(255,255,255,0.25); color: var(--ink);
  cursor: pointer; display:flex; align-items:center; justify-content:center;
  box-shadow: inset 0 1px 0 var(--inset-hi);
  transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
body[data-theme="dark"] .icon-btn { background: rgba(255,245,220,0.04); }
.icon-btn:hover {
  background: rgba(184,92,46,0.10); border-color: var(--accent); transform: scale(1.04);
  box-shadow: inset 0 1px 0 var(--inset-hi), 0 4px 12px rgba(20,20,20,0.10);
}
.icon-btn:active { transform: scale(0.98); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .icon-moon { display: none; }
body[data-theme="dark"] .icon-btn .icon-moon { display: block; }
body[data-theme="dark"] .icon-btn .icon-sun  { display: none; }

/* ── Canvas ──────────────────────────────────────────────────────────── */
#graph {
  position: fixed; inset: 64px 0 0 220px;
  width: calc(100vw - 220px); height: calc(100vh - 64px);
  cursor: grab; touch-action: none; display: block;
  animation: graph-fade-in .55s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes graph-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
#graph.grabbing { cursor: grabbing; }
#graph.linking  { cursor: pointer; }
.lm.collapsed ~ #graph { left: 56px; width: calc(100vw - 56px); }

/* ── Side panel ──────────────────────────────────────────────────────── */
.side-panel {
  position: fixed; top: 80px; right: 16px; bottom: 16px;
  width: 380px; max-width: calc(100vw - 32px);
  background: var(--panel-bg);
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--rule-soft);
  border-radius: 10px;
  display: flex; flex-direction: column;
  transform: translateX(420px); opacity: 0; pointer-events: none;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
  z-index: 40;
  box-shadow: inset 0 1px 0 var(--inset-hi), var(--shadow-3);
}
.side-panel.open { transform: translateX(0); opacity: 1; pointer-events: auto; }

.sp-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--rule-soft);
  display:flex; align-items:flex-start; justify-content:space-between; gap: 12px;
}
.sp-head .sp-eyebrow {
  font: 500 11px/1 'JetBrains Mono', monospace;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px;
}
.sp-head .sp-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400; font-size: 26px; line-height: 1.08;
  letter-spacing: -0.012em;
  font-variation-settings: 'opsz' 36;
  font-feature-settings: 'ss01';
  text-wrap: balance;
  color: var(--ink);
}
.sp-breadcrumb {
  margin-top: 8px;
  font: 500 10px/1.4 'JetBrains Mono', monospace;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.sp-breadcrumb .bc-seg { cursor: pointer; }
.sp-breadcrumb .bc-seg:hover { color: var(--accent); }
.sp-breadcrumb .bc-current { color: var(--ink); cursor: default; }
.sp-breadcrumb .bc-sep { margin: 0 6px; opacity: 0.5; }

.sp-close {
  width: 24px; height: 24px; border-radius: 4px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0;
}
.sp-close:hover { background: rgba(20,20,20,0.06); color: var(--ink); }

.sp-body {
  padding: 16px 20px 20px;
  overflow-y: auto;
  flex: 1; min-height: 0;
  scrollbar-width: thin; scrollbar-color: var(--rule-soft) transparent;
}
.sp-body::-webkit-scrollbar { width: 6px; }
.sp-body::-webkit-scrollbar-thumb { background: var(--rule-soft); border-radius: 3px; }

.sp-section { margin-top: 18px; }
.sp-section:first-child { margin-top: 0; }
.sp-section-label {
  font: 500 10px/1 'JetBrains Mono', monospace;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 8px;
}
.sp-desc { font-size: 14px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.sp-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.sp-stat { font: 500 12px/1 'JetBrains Mono', monospace; color: var(--accent); margin-top: 8px; letter-spacing: 0.05em; }

.sp-meta-row { display:flex; gap: 14px; margin-top: 4px; flex-wrap: wrap; }
.sp-tag {
  display:inline-flex; align-items:center; gap: 6px;
  font: 500 10px/1 'JetBrains Mono', monospace; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 8px;
  border: 1px solid var(--rule-soft); border-radius: 3px;
  color: var(--muted);
}

.sp-bullet { list-style: none; padding: 0; margin: 6px 0 0; }
.sp-bullet li {
  position: relative; padding: 6px 0 6px 18px;
  font-size: 13.5px; line-height: 1.5; color: var(--ink-2);
  border-bottom: 1px solid var(--rule-soft);
}
.sp-bullet li:last-child { border-bottom: 0; }
.sp-bullet li::before {
  content: '·'; position: absolute; left: 4px; top: 4px;
  color: var(--accent); font-weight: 700;
}

.sp-subsec { margin-top: 12px; }
.sp-subsec:first-child { margin-top: 0; }
.sp-subsec-label {
  font: 500 11px/1 'Geist', sans-serif;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink);
  margin-bottom: 4px;
}

.sp-list { list-style: none; padding: 0; margin: 0; }
.sp-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px;
  align-items: center; cursor: pointer;
  transition: padding-left .15s ease;
}
.sp-list li:hover { padding-left: 6px; }
.sp-list li:last-child { border-bottom: 0; }
.sp-list .sl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--node-default); }
.sp-list .sl-name { font-weight: 500; font-size: 14px; color: var(--ink); }
.sp-list .sl-rel { font: 500 10px/1 'JetBrains Mono', monospace; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.sp-conn-desc {
  font-size: 12px; color: var(--muted); margin-top: 4px;
  grid-column: 2 / 4; line-height: 1.4;
}

.sp-jane { padding: 12px 14px; background: rgba(61,123,201,0.08); border-radius: 6px; }
.sp-jane .sp-section-label { color: var(--tribe-color); }
.sp-jane-verb { font-size: 14px; line-height: 1.4; color: var(--ink); margin: 4px 0 8px; }
.sp-jane-arrow { color: var(--tribe-color); font-weight: 700; margin-right: 4px; }

/* ── Edge tooltip ────────────────────────────────────────────────────── */
.edge-tip {
  position: fixed; z-index: 60; pointer-events: none;
  background: var(--ink); color: var(--paper);
  padding: 10px 14px; border-radius: 6px;
  font-size: 12px; line-height: 1.4; max-width: 280px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  opacity: 0; transition: opacity .12s ease;
  transform: translate(-50%, calc(-100% - 10px));
}
.edge-tip.show { opacity: 1; }
.edge-tip .et-label {
  font: 500 10px/1 'JetBrains Mono', monospace;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}

/* ── Legend ──────────────────────────────────────────────────────────── */
.legend {
  position: fixed; left: 16px; bottom: 16px; z-index: 30;
  background: var(--panel-bg);
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--rule-soft); border-radius: 10px;
  padding: 12px 14px;
  font: 500 10.5px/1.45 'JetBrains Mono', monospace;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2);
  box-shadow: inset 0 1px 0 var(--inset-hi), var(--shadow-2);
}
.legend .lg-row { display:flex; align-items:center; gap: 10px; padding: 3px 0; }
.legend .lg-dot {
  width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 1px 2px rgba(20,20,20,0.18);
}

.footer-meta {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
  font: 500 10px/1.4 'JetBrains Mono', monospace; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-align: right;
  pointer-events: none;
}
.side-panel.open ~ .footer-meta { opacity: 0; }

.hint {
  position: fixed; left: 50%; top: 80px; transform: translateX(-50%); z-index: 25;
  font: 500 10px/1 'JetBrains Mono', monospace; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
  background: var(--panel-bg);
  padding: 8px 16px; border-radius: 100px;
  border: 1px solid var(--rule-soft);
  pointer-events: none;
  -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--inset-hi), var(--shadow-1);
  transition: opacity .3s ease;
}
.hint.fade { opacity: 0; }

/* ── Toast (matches paper-card style) ────────────────────────────────── */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translate(-50%, 0);
  background: rgba(20,18,14,0.92); color: var(--paper);
  padding: 10px 18px; border-radius: 8px;
  font: 500 12px/1.3 'JetBrains Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase;
  z-index: 9999;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), var(--shadow-3);
  border: 1px solid rgba(255,245,220,0.06);
  animation: toast-rise .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes toast-rise {
  from { transform: translate(-50%, 8px); opacity: 0; }
  to   { transform: translate(-50%, 0);   opacity: 1; }
}

/* ── Deck modal ──────────────────────────────────────────────────────── */
.deck-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
}
.deck-modal.open { display: flex; }
.deck-modal-stage {
  position: relative;
  width: min(96vw, 1820px);
  height: min(94vh, 1024px);
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}
.deck-modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 200;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.4); color: #fff; cursor: pointer; font-size: 22px; line-height: 1;
}
.deck-modal-close:hover { background: rgba(0,0,0,0.7); }

/* ── Calculator modal ────────────────────────────────────────────────── */
.calc-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.6);
  display: none; align-items: center; justify-content: center;
}
.calc-modal.open { display: flex; }
.calc-modal-stage {
  position: relative;
  width: min(92vw, 720px);
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  border-radius: 8px;
  padding: 36px 40px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.4);
}
.calc-modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 4px; border: 0;
  background: transparent; color: var(--muted); font-size: 18px; cursor: pointer;
}
.calc-modal-close:hover { background: rgba(20,20,20,0.06); color: var(--ink); }

/* ── Pricing slider widget (extracted from Tribe Deck.html slide 12) ── */
.pricing-widget {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px; row-gap: 20px;
  font-family: 'Geist', system-ui, sans-serif;
}
.pricing-widget .pw-fullrow { grid-column: 1 / -1; }
.pricing-widget .pw-label {
  font: 500 11px/1 'JetBrains Mono', monospace;
  letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase;
}
.pricing-widget .pw-num {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 300; font-size: 64px; line-height: 1; letter-spacing: -0.02em;
  color: var(--ink);
}
.pricing-widget .pw-num .pw-unit {
  font-size: 0.32em; vertical-align: super; color: var(--accent); margin-left: 0.05em;
}
.pricing-widget .pw-units {
  display: flex; gap: 10px; align-items: baseline;
  font-family: 'Fraunces', serif; font-weight: 300;
}
.pricing-widget .pw-units .u-count { font-size: 56px; line-height: 1; }
.pricing-widget .pw-units .u-label { font-size: 14px; color: var(--muted); letter-spacing: 0.04em; }
.pricing-widget input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; background: transparent; height: 28px;
}
.pricing-widget input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; background: var(--ink); border-radius: 0;
}
.pricing-widget input[type="range"]::-moz-range-track {
  height: 6px; background: var(--ink); border-radius: 0;
}
.pricing-widget input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px; background: var(--accent);
  border: 2px solid var(--ink); border-radius: 0;
  margin-top: -9px; cursor: pointer;
}
.pricing-widget input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; background: var(--accent);
  border: 2px solid var(--ink); border-radius: 0; cursor: pointer;
}
.pricing-widget .pw-tickrow {
  display: flex; justify-content: space-between;
  font: 500 11px/1 'JetBrains Mono', monospace; color: var(--muted); letter-spacing: 0.08em;
  margin-top: 6px;
}
.pricing-widget .pw-bar {
  display: grid; grid-template-columns: 50fr 25fr 25fr;
  height: 14px; gap: 0; border-radius: 1px; overflow: hidden;
}
.pricing-widget .pw-bar .seg-1 { background: var(--accent); }
.pricing-widget .pw-bar .seg-2 { background: var(--moss); }
.pricing-widget .pw-bar .seg-3 { background: var(--ink); }
.pricing-widget .pw-alloc {
  display: grid; grid-template-columns: 50fr 25fr 25fr;
  margin-top: 12px;
  font: 500 13px/1.4 'JetBrains Mono', monospace; color: var(--ink-2);
}
.pricing-widget .pw-alloc .pw-alloc-sub { color: var(--muted); display: block; margin-top: 2px; font-size: 12px; }

/* ── Left menu ───────────────────────────────────────────────────────── */
.lm {
  position: fixed;
  top: 64px; left: 0; bottom: 0;
  width: 220px;
  background: var(--paper-2);
  border-right: 1px solid var(--rule-soft);
  display: flex; flex-direction: column;
  z-index: 35;
  transition: width .25s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}
.lm.collapsed { width: 56px; }
.lm-toggle {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px;
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 0;
  z-index: 2;
}
.lm-toggle:hover { border-color: var(--accent); }
.lm-toggle-line {
  display: block; width: 14px; height: 1.5px; background: var(--ink);
  border-radius: 1px;
}
.lm.collapsed .lm-toggle { right: 14px; }

.lm-brand {
  padding: 16px 20px 16px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--rule-soft);
  min-height: 56px;
}
.lm-brand-glyph {
  width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 2px;
  flex: 0 0 auto;
}
.lm-brand-text {
  font: 500 11px/1.3 'JetBrains Mono', monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: opacity .15s ease;
}
.lm-brand-text strong { color: var(--ink); font-weight: 600; }
.lm-slug { color: var(--accent); font-size: 9px; letter-spacing: 0.08em; }
.lm.collapsed .lm-brand-text { opacity: 0; pointer-events: none; }

.lm-list {
  list-style: none; padding: 12px 0; margin: 0;
  flex: 1; overflow-y: auto;
}
.lm-item { padding: 0; }
.lm-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  border: 0; background: transparent;
  width: 100%; text-align: left;
  color: var(--ink-2);
  font: 500 13px/1 'Geist', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  border-left: 2px solid transparent;
}
.lm-link:hover { background: rgba(184,92,46,0.06); color: var(--ink); }
.lm-item.active .lm-link {
  background: rgba(184,92,46,0.10);
  color: var(--accent);
  border-left-color: var(--accent);
}
.lm-icon {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  color: currentColor;
}
.lm-icon svg { width: 16px; height: 16px; }
.lm-label {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity .15s ease;
}
.lm.collapsed .lm-label { opacity: 0; pointer-events: none; }
.lm-badge {
  font: 500 9px/1 'JetBrains Mono', monospace;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
  padding: 3px 6px;
  border: 1px solid var(--rule-soft);
  border-radius: 3px;
}
.lm.collapsed .lm-badge { display: none; }

.lm-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--rule-soft);
  font: 500 9px/1.4 'JetBrains Mono', monospace;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.lm-footer-label { display: block; color: var(--ink-2); }
.lm-footer-meta  { display: block; opacity: 0.7; }
.lm.collapsed .lm-footer { opacity: 0; pointer-events: none; }

/* Push topbar / legend / hint to right of menu */
.legend { left: 236px; }
.hint   { left: calc(50% + 110px); transform: translateX(-50%); }
.lm.collapsed ~ .legend { left: 72px; }
.lm.collapsed ~ .hint   { left: calc(50% + 28px); }

/* ── Video modal ─────────────────────────────────────────────────────── */
.video-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
}
.video-modal.open { display: flex; }
.video-modal-stage {
  position: relative;
  width: min(96vw, 1200px);
  background: #000;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
  border-radius: 4px;
  overflow: hidden;
}
.video-modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.4); color: #fff;
  cursor: pointer; font-size: 20px; line-height: 1;
}
.video-modal-close:hover { background: rgba(0,0,0,0.7); }
.video-empty {
  padding: 60px 40px; color: rgba(255,255,255,0.7); text-align: center;
  font-size: 14px; line-height: 1.5;
}

/* Side-panel hint block */
.sp-hint {
  margin-top: 24px;
  padding: 10px 12px;
  background: rgba(184,92,46,0.06);
  border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0;
}

/* ── Intro band ──────────────────────────────────────────────────────── */
.intro-band {
  position: fixed; top: 64px; left: 0; right: 0; z-index: 35;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule-soft);
  padding: 16px 24px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease, max-height .35s ease;
  max-height: 360px;
  overflow: hidden;
}
.intro-band.collapsed { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; pointer-events: none; }
.intro-band ~ #graph { top: calc(64px + 96px); height: calc(100vh - 64px - 96px); }
.intro-band video, .intro-band .intro-poster {
  width: 320px; height: 180px; object-fit: cover; background: #000; cursor: pointer;
  border-radius: 4px;
}
.intro-band .intro-copy { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.intro-band .intro-copy strong { color: var(--ink); display: block; margin-bottom: 4px; font-weight: 600; }
.intro-band .intro-skip {
  appearance: none; border: 1px solid var(--rule-soft); background: transparent; color: var(--muted);
  padding: 8px 14px; border-radius: 4px; cursor: pointer;
  font: 500 11px/1 'JetBrains Mono', monospace; letter-spacing: 0.1em; text-transform: uppercase;
}
.intro-band .intro-skip:hover { color: var(--ink); border-color: var(--accent); }
