/* ═══════════════════════════════════════════════════════════
   CLIFF · SPARK — Design System
   Dark terminal aesthetic · IBM Plex Mono + Sans
   Spark green (#C8F04A) · Blush red (#FF5A5A)
═══════════════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --black:   #0A0A0A;
  --grey1:   #111111;
  --grey2:   #1A1A1A;
  --grey3:   #242424;
  --grey4:   #555555;
  --grey5:   #888888;
  --grey6:   #AAAAAA;
  --white:   #F0F0F0;

  --lime:    #C8F04A;
  --lime-dim: #8AAF2A;
  --blush:   #FF5A5A;
  --amber:   #F0A030;
  --sky:     #5AB4FF;
  --teal:    #3ECFB2;

  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;

  --shadow: 0 2px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);

  --transition: 0.18s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input  { font-family: inherit; }
a      { color: var(--lime); text-decoration: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--grey1); }
::-webkit-scrollbar-thumb { background: var(--grey3); border-radius: 2px; }

/* ── Utility ── */
.section-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--grey4);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 100px;
  text-transform: uppercase;
}
.badge-lime  { background: var(--lime); color: var(--black); }
.badge-blush { background: var(--blush); color: var(--white); }
.badge-amber { background: var(--amber); color: var(--black); }

/* ── Buttons ── */
.btn-primary {
  background: var(--lime);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border: none;
}
.btn-primary:hover:not(:disabled) { background: #d8ff5a; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--grey6);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--grey3);
  transition: var(--transition);
}
.btn-ghost:hover { border-color: var(--grey5); color: var(--white); }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.72rem; }

/* ══════════════════════════════════════════════════════
   SCREENS
══════════════════════════════════════════════════════ */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  overflow: hidden;
}
.screen.active { display: flex; flex-direction: column; }

/* ══════════════════════════════════════════════════════
   SPLASH
══════════════════════════════════════════════════════ */
#screen-splash {
  background: var(--black);
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.spark-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.spark-particle {
  position: absolute;
  background: var(--lime);
  border-radius: 50%;
  opacity: 0;
  animation: sparkFloat var(--dur, 3s) var(--delay, 0s) ease-in-out infinite;
}

@keyframes sparkFloat {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  30%  { opacity: 0.6; }
  70%  { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-120px) scale(1.2); }
}

.splash-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  padding: 2rem;
}

.splash-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--grey4);
  margin-bottom: 1rem;
}

.splash-logo {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 1rem;
}
.logo-cliff { color: var(--white); }
.logo-dot   { color: var(--grey4); margin: 0 0.2em; }
.logo-spark { color: var(--lime); }

.splash-tagline {
  font-size: 1rem;
  color: var(--grey5);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.splash-pillars {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.pillar {
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
  min-width: 160px;
  flex: 1;
  max-width: 180px;
}
.pillar-icon  { font-size: 1.5rem; margin-bottom: 0.4rem; }
.pillar-label { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; color: var(--white); margin-bottom: 0.3rem; }
.pillar-desc  { font-size: 0.72rem; color: var(--grey5); line-height: 1.4; }

.btn-launch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--lime);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  border: none;
  transition: var(--transition);
  margin-bottom: 1.5rem;
}
.btn-launch:hover { background: #d8ff5a; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,240,74,0.25); }
.btn-arrow { font-size: 1.1rem; }

.splash-footnote {
  font-size: 0.7rem;
  color: var(--grey4);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════
   ONBOARDING
══════════════════════════════════════════════════════ */
#screen-onboarding {
  background: var(--black);
  flex-direction: row;
}

.onboarding-layout {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Sidebar */
.onboarding-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--grey1);
  border-right: 1px solid var(--grey2);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.ob-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lime);
  letter-spacing: 0.05em;
}

.ob-progress {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.progress-step .ps-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--grey3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--grey4);
  flex-shrink: 0;
  transition: var(--transition);
}
.progress-step .ps-label {
  font-size: 0.8rem;
  color: var(--grey4);
  transition: var(--transition);
}
.progress-step.active .ps-num  { border-color: var(--lime); background: var(--lime); color: var(--black); }
.progress-step.active .ps-label { color: var(--white); font-weight: 600; }
.progress-step.done .ps-num    { border-color: var(--lime-dim); background: transparent; color: var(--lime-dim); }
.progress-step.done .ps-label  { color: var(--grey5); }

.ob-footnote {
  font-size: 0.72rem;
  color: var(--grey4);
  line-height: 1.5;
  margin-top: auto;
}

/* Main */
.onboarding-main {
  flex: 1;
  overflow-y: auto;
  padding: 3rem 3.5rem;
  max-width: 720px;
}

.onboard-step { display: none; }
.onboard-step.active { display: block; }

.step-header { margin-bottom: 2rem; }
.step-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--grey4);
  margin-bottom: 0.5rem;
}
.step-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.step-desc {
  font-size: 0.875rem;
  color: var(--grey5);
  line-height: 1.6;
}

/* Form */
.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--grey5);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.form-input {
  width: 100%;
  background: var(--grey1);
  border: 1px solid var(--grey3);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: var(--transition);
}
.form-input:focus { border-color: var(--lime); }
.form-input::placeholder { color: var(--grey4); }

/* Choice Cards */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.choice-grid-3 { grid-template-columns: repeat(3, 1fr); }

.choice-card {
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.choice-card:hover { border-color: var(--grey4); background: var(--grey2); }
.choice-card.selected { border-color: var(--lime); background: rgba(200,240,74,0.06); }
.cc-icon { font-size: 1.5rem; margin-bottom: 0.4rem; }
.cc-name { font-weight: 600; font-size: 0.9rem; color: var(--white); margin-bottom: 0.2rem; }
.cc-desc { font-size: 0.72rem; color: var(--grey5); line-height: 1.4; }

/* Jurisdiction Grid */
.juris-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.juris-card {
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}
.juris-card:hover { border-color: var(--grey4); }
.juris-card.selected { border-color: var(--lime); background: rgba(200,240,74,0.04); }

.jc-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}
.jc-flag { font-size: 1.1rem; }
.jc-name { font-weight: 600; font-size: 0.9rem; flex: 1; }
.jc-spark { font-family: var(--font-mono); font-size: 0.8rem; color: var(--lime); }
.jc-lever { font-size: 0.78rem; color: var(--teal); margin-bottom: 0.2rem; }
.jc-cost  { font-size: 0.78rem; color: var(--blush); margin-bottom: 0.5rem; }
.jc-tags  { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.jc-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 2px 7px;
  border-radius: 100px;
  background: var(--grey2);
  color: var(--grey5);
  border: 1px solid var(--grey3);
}

/* Launch Summary */
.launch-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.ls-item {}
.ls-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--grey4); text-transform: uppercase; margin-bottom: 0.2rem; }
.ls-value { font-size: 0.9rem; font-weight: 600; color: var(--white); }
.ls-spark { color: var(--lime); font-family: var(--font-mono); font-size: 1rem; }

.launch-warning {
  display: flex;
  gap: 0.75rem;
  background: rgba(255,90,90,0.06);
  border: 1px solid rgba(255,90,90,0.2);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1.5rem;
}
.warning-icon { color: var(--blush); font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.warning-text { font-size: 0.8rem; color: var(--grey5); line-height: 1.6; }

.step-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 2rem;
}

.btn-launch-sm {
  background: var(--lime);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  transition: var(--transition);
}
.btn-launch-sm:hover:not(:disabled) { background: #d8ff5a; }
.btn-launch-sm:disabled { opacity: 0.5; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════
   GAME SCREEN
══════════════════════════════════════════════════════ */
#screen-game {
  background: var(--black);
  flex-direction: column;
}

.game-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* ── Top Nav ── */
.game-nav {
  height: 52px;
  min-height: 52px;
  background: var(--grey1);
  border-bottom: 1px solid var(--grey2);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 1rem;
  z-index: 100;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 180px;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lime);
  letter-spacing: 0.05em;
}
.nav-company {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey5);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-meters {
  display: flex;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}
.nav-meter {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--grey2);
  border: 1px solid var(--grey3);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.7rem;
}
.nm-icon  { font-size: 0.75rem; color: var(--grey5); }
.nm-value { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; color: var(--white); }
.nm-label { font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.1em; color: var(--grey4); }

.nav-right { min-width: 160px; display: flex; justify-content: flex-end; }

.btn-market-open {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--lime);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  transition: var(--transition);
}
.btn-market-open:hover { background: #d8ff5a; }

.mo-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--black);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

/* ── Body ── */
.game-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── Side Nav ── */
.game-sidenav {
  width: 80px;
  min-width: 80px;
  background: var(--grey1);
  border-right: 1px solid var(--grey2);
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.65rem 0.5rem;
  border-radius: 0;
  color: var(--grey4);
  font-size: 0.6rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  transition: var(--transition);
  border-left: 2px solid transparent;
}
.nav-item:hover { color: var(--grey6); background: var(--grey2); }
.nav-item.active { color: var(--lime); border-left-color: var(--lime); background: rgba(200,240,74,0.04); }
.ni-icon  { font-size: 1rem; }
.ni-label { font-size: 0.55rem; text-align: center; }

/* ── Main ── */
.game-main {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ── Panels ── */
.panel {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 1.5rem 2rem;
}
.panel.active { display: block; }

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--grey2);
}
.panel-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.2rem;
}
.panel-meta {
  font-size: 0.78rem;
  color: var(--grey5);
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════════════
   DASHBOARD
══════════════════════════════════════════════════════ */
.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* KPI Row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.kpi-card {
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.kpi-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--grey4); text-transform: uppercase; margin-bottom: 0.4rem; }
.kpi-value { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; color: var(--white); }
.kpi-sub   { font-size: 0.7rem; color: var(--grey5); margin-top: 0.2rem; }

/* Row 2 */
.dash-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.dash-card {
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}

/* Meters */
.meter-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.meter-label { font-size: 0.72rem; color: var(--grey5); width: 70px; flex-shrink: 0; }
.meter-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--grey3);
  border-radius: 2px;
  overflow: hidden;
}
.meter-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.runway-bar     { background: var(--lime); }
.reliability-bar { background: var(--teal); }
.capacity-bar   { background: var(--sky); }
.meter-val { font-family: var(--font-mono); font-size: 0.7rem; color: var(--grey5); width: 36px; text-align: right; flex-shrink: 0; }

/* Market Index */
.market-index-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.mi-big { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--white); }
.mi-status { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.1em; color: var(--grey5); }

/* Season */
.season-bar-wrap {
  height: 4px;
  background: var(--grey3);
  border-radius: 2px;
  overflow: hidden;
}
.season-bar-fill {
  height: 100%;
  background: var(--amber);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* Allocation */
.alloc-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.alloc-label { font-size: 0.78rem; color: var(--grey5); width: 60px; flex-shrink: 0; }
.alloc-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 3px;
  background: var(--grey3);
  border-radius: 2px;
  outline: none;
}
.alloc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lime);
  cursor: pointer;
  transition: var(--transition);
}
.alloc-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.alloc-val { font-family: var(--font-mono); font-size: 0.75rem; color: var(--white); width: 36px; text-align: right; flex-shrink: 0; }
.alloc-total { font-family: var(--font-mono); font-size: 0.7rem; color: var(--grey5); text-align: right; margin-top: 0.25rem; }
.alloc-total.over { color: var(--blush); }

/* Row 3 */
.dash-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Event Feed */
.event-feed {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 200px;
  overflow-y: auto;
}
.event-item {
  display: flex;
  gap: 0.6rem;
  font-size: 0.78rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  line-height: 1.4;
}
.event-time { font-family: var(--font-mono); font-size: 0.65rem; color: var(--grey4); flex-shrink: 0; padding-top: 1px; }
.event-text { color: var(--grey5); }
.event-success { border-left-color: var(--lime); background: rgba(200,240,74,0.04); }
.event-danger  { border-left-color: var(--blush); background: rgba(255,90,90,0.04); }
.event-warning { border-left-color: var(--amber); background: rgba(240,160,48,0.04); }
.event-info    { border-left-color: var(--grey3); }

/* Notifications */
.notification-list { display: flex; flex-direction: column; gap: 0.4rem; max-height: 200px; overflow-y: auto; }
.notif-item {
  font-size: 0.78rem;
  color: var(--grey5);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--grey3);
  line-height: 1.4;
}
.notif-item.urgent   { border-left-color: var(--blush); color: var(--blush); background: rgba(255,90,90,0.04); }
.notif-item.positive { border-left-color: var(--lime); color: var(--grey6); background: rgba(200,240,74,0.04); }
.notif-empty { font-size: 0.78rem; color: var(--grey4); }

/* ══════════════════════════════════════════════════════
   WORKBENCH
══════════════════════════════════════════════════════ */
.workbench-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  height: calc(100% - 80px);
}

.wb-catalog { overflow-y: auto; }
.wb-canvas  { overflow-y: auto; }

.component-catalog { display: flex; flex-direction: column; gap: 0.4rem; }

.component-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}
.component-item:hover:not(.built) { border-color: var(--grey4); background: var(--grey2); }
.component-item.built { opacity: 0.5; cursor: default; border-color: var(--grey2); }
.comp-info { flex: 1; }
.comp-name { font-size: 0.85rem; font-weight: 600; color: var(--white); margin-bottom: 0.15rem; }
.comp-meta { font-size: 0.7rem; color: var(--grey5); }
.comp-cost { font-family: var(--font-mono); font-size: 0.78rem; flex-shrink: 0; }

.product-canvas {
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 1.25rem;
  height: 100%;
}
.pc-header { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--grey2); }
.pc-name    { font-size: 1rem; font-weight: 600; color: var(--white); margin-bottom: 0.2rem; }
.pc-quality { font-family: var(--font-mono); font-size: 0.75rem; color: var(--lime); }

.built-components { display: flex; flex-direction: column; gap: 0.4rem; }
.built-comp-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.7rem;
  background: rgba(200,240,74,0.06);
  border: 1px solid rgba(200,240,74,0.15);
  border-radius: var(--radius-sm);
}
.built-comp-name    { font-size: 0.82rem; color: var(--white); }
.built-comp-quality { font-family: var(--font-mono); font-size: 0.7rem; color: var(--lime); }
.empty-bench { font-size: 0.8rem; color: var(--grey4); padding: 1rem 0; }

/* ══════════════════════════════════════════════════════
   THE FLOOR
══════════════════════════════════════════════════════ */
.floor-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--grey2);
  padding-bottom: 0;
}
.floor-tab {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--grey4);
  padding: 0.5rem 1rem;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  margin-bottom: -1px;
}
.floor-tab:hover  { color: var(--grey6); }
.floor-tab.active { color: var(--lime); border-bottom-color: var(--lime); }

.floor-content { display: flex; flex-direction: column; gap: 0.75rem; }

.floor-product-card {
  display: flex;
  gap: 1rem;
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: var(--transition);
}
.floor-product-card:hover { border-color: var(--grey3); }
.fp-info { flex: 1; }
.fp-company { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--grey4); text-transform: uppercase; margin-bottom: 0.2rem; }
.fp-name    { font-size: 0.95rem; font-weight: 600; color: var(--white); margin-bottom: 0.2rem; }
.fp-pitch   { font-size: 0.78rem; color: var(--grey5); margin-bottom: 0.5rem; line-height: 1.4; }
.fp-meta    { display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.7rem; color: var(--grey4); font-family: var(--font-mono); }
.fp-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; flex-shrink: 0; }
.fp-price   { font-family: var(--font-mono); font-size: 0.78rem; color: var(--lime); }

/* ══════════════════════════════════════════════════════
   INVESTORS
══════════════════════════════════════════════════════ */
.investor-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.investor-card {
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}
.investor-card:hover { border-color: var(--grey4); transform: translateY(-1px); }
.investor-card.funded  { border-color: rgba(200,240,74,0.3); }
.investor-card.declined { opacity: 0.5; }

.inv-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}
.inv-name    { font-size: 0.95rem; font-weight: 600; color: var(--white); margin-bottom: 0.2rem; }
.inv-thesis  { font-size: 0.78rem; color: var(--grey5); margin-bottom: 0.6rem; line-height: 1.4; }
.inv-meta    { display: flex; gap: 0.6rem; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.65rem; color: var(--grey4); }
.inv-blind-spot { font-size: 0.72rem; color: var(--amber); margin-top: 0.5rem; }

/* Term Sheet */
.term-sheet { display: flex; flex-direction: column; gap: 0.5rem; }
.term-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--grey2);
}
.term-label { font-size: 0.8rem; color: var(--grey5); }
.term-value { font-family: var(--font-mono); font-size: 0.82rem; color: var(--white); font-weight: 600; }
.term-value.danger { color: var(--blush); }

/* ══════════════════════════════════════════════════════
   TEAM
══════════════════════════════════════════════════════ */
.team-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ts-item {
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  flex: 1;
}
.ts-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--grey4); text-transform: uppercase; margin-bottom: 0.3rem; }
.ts-value { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; color: var(--white); }

.hire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.hire-card {
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.hire-card:hover { border-color: var(--grey4); background: var(--grey2); }
.hire-role    { font-size: 0.85rem; font-weight: 600; color: var(--white); margin-bottom: 0.2rem; }
.hire-cost    { font-family: var(--font-mono); font-size: 0.7rem; color: var(--lime); margin-bottom: 0.3rem; }
.hire-benefit { font-size: 0.7rem; color: var(--grey5); line-height: 1.3; }

.team-list { display: flex; flex-direction: column; gap: 0.4rem; }
.team-member {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius-sm);
}
.tm-name { font-size: 0.85rem; color: var(--white); flex: 1; }
.tm-role { font-size: 0.75rem; color: var(--grey5); flex: 1; }
.tm-cost { font-family: var(--font-mono); font-size: 0.72rem; color: var(--grey4); }

/* ══════════════════════════════════════════════════════
   MARKET
══════════════════════════════════════════════════════ */
.market-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  height: calc(100% - 80px);
}

.market-index-card {
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-y: auto;
}

.mi-display { margin-bottom: 1.25rem; }
.mi-big-num { font-family: var(--font-mono); font-size: 2.5rem; font-weight: 700; color: var(--white); line-height: 1; }
.mi-trend   { font-family: var(--font-mono); font-size: 0.75rem; color: var(--grey5); margin-top: 0.3rem; }

.mi-bands { display: flex; flex-direction: column; gap: 0.4rem; }
.mi-band {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--grey2);
  transition: var(--transition);
}
.mi-band.active { border-color: var(--lime); background: rgba(200,240,74,0.06); }
.mib-label { font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; color: var(--grey5); width: 60px; flex-shrink: 0; }
.mi-band.active .mib-label { color: var(--lime); }
.mib-range { font-family: var(--font-mono); font-size: 0.65rem; color: var(--grey4); width: 60px; flex-shrink: 0; }
.mib-desc  { font-size: 0.72rem; color: var(--grey5); }

.market-right { overflow-y: auto; }

.sector-table { display: flex; flex-direction: column; gap: 0.4rem; }
.sector-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius-sm);
}
.sector-name     { flex: 1; font-size: 0.82rem; color: var(--white); }
.sector-multiple { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 700; color: var(--lime); width: 36px; text-align: right; }
.sector-trend    { font-size: 0.7rem; color: var(--grey5); width: 80px; text-align: right; }

/* ══════════════════════════════════════════════════════
   EXIT
══════════════════════════════════════════════════════ */
.exit-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
}

.exit-valuation-card {
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.ev-formula { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.ev-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
}
.ev-label { font-size: 0.82rem; color: var(--grey5); }
.ev-val   { font-family: var(--font-mono); font-size: 0.85rem; color: var(--white); font-weight: 600; }
.ev-divider { height: 1px; background: var(--grey2); margin: 0.25rem 0; }
.ev-total .ev-label { color: var(--white); font-weight: 600; }
.ev-total .ev-val   { color: var(--lime); font-size: 1rem; }

.exit-options { display: flex; flex-direction: column; gap: 0.75rem; }
.exit-option-card {
  background: var(--grey1);
  border: 1px solid var(--grey2);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.eo-title { font-size: 1rem; font-weight: 600; color: var(--white); margin-bottom: 0.4rem; }
.eo-desc  { font-size: 0.8rem; color: var(--grey5); line-height: 1.6; }

/* ══════════════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  backdrop-filter: blur(4px);
}

.modal-box {
  background: var(--grey1);
  border: 1px solid var(--grey3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow: hidden;
}

.modal-market   { width: 420px; }
.modal-investor { width: 480px; }
.modal-event    { width: 400px; }

.modal-header {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--grey2);
}
.modal-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--lime);
  margin-bottom: 0.4rem;
}
.modal-title { font-size: 1.1rem; font-weight: 600; color: var(--white); }
.modal-sub   { font-size: 0.8rem; color: var(--grey5); margin-top: 0.2rem; }

.modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--grey2);
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

/* Market Open Modal */
.mo-section { margin-bottom: 1.25rem; }
.mo-section-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--grey4);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.mo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--grey2);
}
.mo-label { font-size: 0.8rem; color: var(--grey5); }
.mo-value { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; }
.mo-value.positive { color: var(--lime); }
.mo-value.negative { color: var(--blush); }
.mo-value.neutral  { color: var(--grey6); }
.mo-net {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--grey2);
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
}
.mo-net-label { font-size: 0.82rem; color: var(--grey5); font-weight: 600; }
.mo-net-value { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; }
.mo-net-value.positive { color: var(--lime); }
.mo-net-value.negative { color: var(--blush); }

/* ══════════════════════════════════════════════════════
   SPARK ANIMATION
══════════════════════════════════════════════════════ */
.spark-coin {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  animation: sparkCoin var(--dur, 0.8s) ease-out forwards;
}

@keyframes sparkCoin {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx, 0), var(--ty, -60px)) scale(0.5); }
}

@keyframes sparkFly {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(var(--ty, -40px)); }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dash-row-2 { grid-template-columns: 1fr; }
  .dash-row-3 { grid-template-columns: 1fr; }
  .workbench-layout { grid-template-columns: 1fr; }
  .market-layout { grid-template-columns: 1fr; }
  .exit-layout { grid-template-columns: 1fr; }
  .onboarding-sidebar { display: none; }
  .onboarding-main { padding: 2rem 1.5rem; }
  .choice-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .nav-meters { display: none; }
  .game-sidenav { width: 52px; min-width: 52px; }
  .ni-label { display: none; }
  .panel { padding: 1rem; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .splash-pillars { flex-direction: column; align-items: center; }
}