/* ========================================================
   STARTUP DECISION OS — Premium Dark OS Stylesheet
   DSP Framework: Demand | Supply | Processing
   ======================================================== */

:root {
  --bg-base: #080B14;
  --bg-surface: #0D1220;
  --bg-elevated: #111827;
  --bg-card: #141d2e;
  --bg-input: #0f1623;

  --border: rgba(255,255,255,0.07);
  --border-active: rgba(99,102,241,0.5);

  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99,102,241,0.2);

  --demand: #f59e0b;
  --supply: #10b981;
  --process: #6366f1;
  --founder: #ec4899;

  --red: #ef4444;
  --red-glow: rgba(239,68,68,0.15);
  --green: #10b981;
  --green-glow: rgba(16,185,129,0.15);
  --yellow: #f59e0b;
  --yellow-glow: rgba(245,158,11,0.15);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

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

  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.15);

  --sidebar-w: 280px;
  --topbar-h: 60px;

  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── BOOT SCREEN ─────────────────────────────────────────── */
.boot-screen {
  position: fixed; inset: 0;
  background: var(--bg-base);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease;
}

.boot-screen.fade-out { opacity: 0; pointer-events: none; }

.boot-content {
  text-align: center;
  animation: fadeUp 0.6s ease;
}

.boot-logo .boot-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: pulse-glow 2s infinite;
}

.boot-logo h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #818cf8, #6366f1, #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.boot-logo p {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.25rem;
  font-family: var(--mono);
}

.boot-progress {
  margin-top: 3rem;
  width: 320px;
}

.boot-bar {
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.boot-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #a78bfa);
  border-radius: 99px;
  transition: width 0.3s ease;
  box-shadow: 0 0 12px rgba(99,102,241,0.6);
}

.boot-status {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--mono);
}

/* ── OS SHELL ──────────────────────────────────────────────── */
.os-shell {
  display: flex;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  font-size: 1.5rem;
  width: 36px; height: 36px;
  background: var(--accent-glow);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.brand-name {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.brand-version {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-top: 2px;
}

/* Context Card */
.context-card {
  margin: 1rem;
  padding: 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.context-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-bottom: 0.5rem;
}

.context-company {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.context-meta {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.ctx-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  background: var(--accent-glow);
  border: 1px solid var(--border-active);
  border-radius: 99px;
  color: var(--accent-light);
  font-family: var(--mono);
}

.ctx-badge.ctx-industry {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.3);
  color: var(--green);
}

/* DSP Bars */
.context-dsp { display: flex; flex-direction: column; gap: 0.4rem; }

.dsp-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
}

.dsp-label {
  font-family: var(--mono);
  font-weight: 700;
  width: 14px;
  color: var(--text-muted);
}

.dsp-track {
  flex: 1;
  height: 4px;
  background: var(--bg-base);
  border-radius: 99px;
  overflow: hidden;
}

.dsp-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.dsp-fill.demand { background: var(--demand); }
.dsp-fill.supply { background: var(--supply); }
.dsp-fill.process { background: var(--process); }

.dsp-score {
  font-family: var(--mono);
  font-size: 0.65rem;
  width: 20px;
  text-align: right;
  color: var(--text-muted);
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0.75rem;
}

.nav-section-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  padding: 0.75rem 0.5rem 0.25rem;
  font-family: var(--mono);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-glow);
  border: 1px solid var(--border-active);
  color: var(--accent-light);
}

.nav-icon { font-size: 1rem; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  font-family: var(--mono);
}

.nav-badge.new {
  background: rgba(99,102,241,0.2);
  color: var(--accent-light);
  border: 1px solid var(--border-active);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.system-health {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.health-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: blink 2s infinite;
}

.decision-count {
  font-family: var(--mono);
  font-size: 0.7rem;
}

/* ── TOP BAR ────────────────────────────────────────────── */
.top-bar {
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  display: none;
}

.breadcrumb {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.system-clock {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* ── MAIN CONTENT ─────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.module-panel {
  display: none;
  flex-direction: column;
  padding: 1.5rem;
  gap: 0;
  flex: 1;
}

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

.module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.module-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.module-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.module-badge {
  font-size: 0.7rem;
  font-family: var(--mono);
  color: var(--accent-light);
  background: var(--accent-glow);
  border: 1px solid var(--border-active);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  white-space: nowrap;
  align-self: flex-start;
}

/* ── PANELS ─────────────────────────────────────────────── */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.panel:last-child { margin-bottom: 0; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.panel-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.panel-tag {
  font-size: 0.65rem;
  font-family: var(--mono);
  color: var(--text-muted);
  padding: 0.15rem 0.5rem;
  background: var(--bg-card);
  border-radius: 99px;
  border: 1px solid var(--border);
}

/* ── LAYOUT ────────────────────────────────────────────── */
.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .two-col-layout { grid-template-columns: 1fr; }
}

/* ── FORMS ──────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-group label small {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.875rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder { color: var(--text-muted); }

textarea.form-input { resize: vertical; }

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

option { background: var(--bg-elevated); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-group.half { margin-bottom: 0; }

/* Slider */
.slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--bg-card);
  border-radius: 99px;
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-glow);
  cursor: pointer;
}

.slider-val {
  font-family: var(--mono);
  font-size: 0.8rem;
  width: 30px;
  text-align: right;
  color: var(--accent-light);
  font-weight: 600;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(99,102,241,0.4);
  width: 100%;
  justify-content: center;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.5);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary .btn-icon { font-size: 1rem; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.875rem;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.4rem 0.875rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-ghost:hover {
  border-color: var(--border-active);
  color: var(--accent-light);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.875rem;
  background: var(--red-glow);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-danger:hover {
  background: rgba(239,68,68,0.25);
}

.action-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ── PRE-MORTEM ANALYSIS OUTPUT ──────────────────────────────── */
.confidence-badge {
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--accent-glow);
  border: 1px solid var(--border-active);
  color: var(--accent-light);
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.empty-state span {
  font-size: 0.8rem;
}

.empty-mini {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.result-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.result-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.result-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  font-family: var(--mono);
}

/* Failure Map */
.failure-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.83rem;
}

.failure-item.demand {
  background: rgba(245,158,11,0.07);
  border-color: rgba(245,158,11,0.2);
}
.failure-item.supply {
  background: rgba(16,185,129,0.07);
  border-color: rgba(16,185,129,0.2);
}
.failure-item.process {
  background: rgba(99,102,241,0.07);
  border-color: rgba(99,102,241,0.2);
}
.failure-item.founder {
  background: rgba(236,72,153,0.07);
  border-color: rgba(236,72,153,0.2);
}

.failure-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.failure-dot.demand { background: var(--demand); }
.failure-dot.supply { background: var(--supply); }
.failure-dot.process { background: var(--process); }
.failure-dot.founder { background: var(--founder); }

.failure-content { flex: 1; }
.failure-label {
  font-size: 0.7rem;
  font-family: var(--mono);
  margin-bottom: 0.2rem;
  opacity: 0.7;
}
.failure-text { line-height: 1.4; }

/* Simulation Cases */
.sim-cases { display: flex; flex-direction: column; gap: 0.5rem; }

.sim-case {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.sim-case.correct {
  background: var(--green-glow);
  border-color: rgba(16,185,129,0.25);
}
.sim-case.wrong {
  background: var(--red-glow);
  border-color: rgba(239,68,68,0.25);
}
.sim-case.edge {
  background: var(--yellow-glow);
  border-color: rgba(245,158,11,0.25);
}

.sim-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.sim-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--mono);
}
.sim-case.correct .sim-title { color: var(--green); }
.sim-case.wrong .sim-title { color: var(--red); }
.sim-case.edge .sim-title { color: var(--yellow); }

.sim-row { font-size: 0.8rem; margin-bottom: 0.25rem; color: var(--text-secondary); }
.sim-row strong { color: var(--text-primary); }

/* Risk Signals */
.risk-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.risk-item.high {
  background: var(--red-glow);
  border: 1px solid rgba(239,68,68,0.2);
  color: #fca5a5;
}
.risk-item.medium {
  background: var(--yellow-glow);
  border: 1px solid rgba(245,158,11,0.2);
  color: #fde68a;
}
.risk-item.low {
  background: var(--green-glow);
  border: 1px solid rgba(16,185,129,0.2);
  color: #6ee7b7;
}

/* Validation */
.validation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.val-item {
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.val-label {
  font-size: 0.65rem;
  font-family: var(--mono);
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.val-content {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Decision list */
.decision-list { display: flex; flex-direction: column; gap: 0.5rem; }

.decision-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  animation: slideIn 0.3s ease;
}

.decision-card:hover {
  border-color: var(--border-active);
  background: var(--bg-elevated);
}

.decision-card-icon { font-size: 1.1rem; }

.decision-card-info { flex: 1; min-width: 0; }

.decision-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.decision-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.decision-card-score {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
}

/* ── ASSUMPTIONS ────────────────────────────────────────── */
.assumption-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stat-card {
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}

.stat-card.danger { border-color: rgba(239,68,68,0.3); background: var(--red-glow); }
.stat-card.warning { border-color: rgba(245,158,11,0.25); background: var(--yellow-glow); }
.stat-card.success { border-color: rgba(16,185,129,0.25); background: var(--green-glow); }

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-family: var(--mono);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-glow);
  border-color: var(--border-active);
  color: var(--accent-light);
}

.assumptions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.assumption-card {
  padding: 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  animation: slideIn 0.3s ease;
}

.assumption-card:hover { border-color: var(--border-active); }

.assumption-card.critical { border-left: 3px solid var(--red); }
.assumption-card.high { border-left: 3px solid var(--yellow); }
.assumption-card.medium { border-left: 3px solid var(--accent); }
.assumption-card.low { border-left: 3px solid var(--green); }

.assump-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.assump-statement {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
}

.assump-risk-badge {
  font-size: 0.6rem;
  font-family: var(--mono);
  padding: 0.15rem 0.4rem;
  border-radius: 99px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.assump-risk-badge.critical { background: var(--red-glow); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.assump-risk-badge.high { background: var(--yellow-glow); color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); }
.assump-risk-badge.medium { background: var(--accent-glow); color: var(--accent-light); border: 1px solid var(--border-active); }
.assump-risk-badge.low { background: var(--green-glow); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }

.assump-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.assump-domain-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  font-family: var(--mono);
  background: var(--bg-base);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.assump-validation {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.assump-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.assump-date {
  font-size: 0.65rem;
  font-family: var(--mono);
  color: var(--text-muted);
}

.assump-actions { display: flex; gap: 0.3rem; }

.assump-btn {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  transition: all var(--transition);
}

.assump-btn.validate {
  border-color: rgba(16,185,129,0.3);
  color: var(--green);
  background: var(--green-glow);
}

.assump-btn.invalidate {
  border-color: rgba(239,68,68,0.3);
  color: var(--red);
  background: var(--red-glow);
}

.assump-btn:hover { opacity: 0.8; }

/* ── BRIEFING ──────────────────────────────────────────── */
.briefing-container { padding-top: 1rem; }

.briefing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.briefing-week {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.briefing-health {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  border-radius: 99px;
  background: var(--accent-glow);
  border: 1px solid var(--border-active);
  color: var(--accent-light);
}

.briefing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.briefing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  animation: slideIn 0.4s ease;
}

.briefing-card.full-width {
  grid-column: 1 / -1;
  margin-top: 0;
}

.briefing-card-title {
  font-size: 0.7rem;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.briefing-card-content {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.briefing-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.briefing-item:last-child { border-bottom: none; }

.briefing-item-icon { flex-shrink: 0; font-size: 0.9rem; }
.briefing-item-text { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; }

/* ── MEMORY ──────────────────────────────────────────────── */
.memory-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.memory-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  transition: all var(--transition);
}

.memory-stat-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.mem-stat-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }

.mem-stat-num {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--text-primary);
  line-height: 1;
}

.mem-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-input {
  width: 240px;
  padding: 0.4rem 0.875rem;
}

.memory-log { display: flex; flex-direction: column; gap: 0.625rem; }

.memory-entry {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  animation: slideIn 0.3s ease;
}

.memory-entry:hover {
  border-color: var(--border-active);
}

.memory-entry-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 24px;
}

.memory-entry-info { min-width: 0; }

.memory-entry-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-entry-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.memory-entry-domain {
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-family: var(--mono);
  border: 1px solid var(--border);
  background: var(--bg-base);
  color: var(--text-muted);
}

.memory-score {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  min-width: 50px;
  text-align: center;
}

.memory-score.high { background: var(--green-glow); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.memory-score.medium { background: var(--yellow-glow); color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); }
.memory-score.low { background: var(--red-glow); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.pattern-card {
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: slideIn 0.3s ease;
}

.pattern-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.pattern-title { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.pattern-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }

/* ── TOAST ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9000;
  padding: 0.75rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  transform: translateY(120%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 320px;
}

.toast.show { transform: translateY(0); }

/* ── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 20px rgba(99,102,241,0.5); }
  50% { text-shadow: 0 0 40px rgba(99,102,241,0.9); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .menu-toggle { display: block; }
  .memory-stats-row { grid-template-columns: repeat(2, 1fr); }
  .briefing-grid { grid-template-columns: 1fr; }
  .assumption-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── ONBOARDING WIZARD ───────────────────────────────────── */
.onboarding-overlay {
  position: fixed; inset: 0;
  background: rgba(8,11,20,0.98);
  backdrop-filter: blur(20px);
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeUp 0.5s ease;
}

.onboarding-shell {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  max-width: 680px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(99,102,241,0.08);
  animation: slideInUp 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Progress bar */
.ob-progress-track {
  height: 3px;
  background: var(--bg-card);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.ob-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a78bfa);
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 12px rgba(99,102,241,0.5);
  width: 20%;
}

/* Step dots */
.ob-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
}

.ob-step {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.ob-step.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 16px rgba(99,102,241,0.5);
  transform: scale(1.15);
}

.ob-step.done {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.ob-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  max-width: 60px;
  transition: background 0.3s ease;
}

.ob-step-line.done { background: var(--green); }

/* Step panels */
.ob-step-panel {
  display: none;
  animation: fadeUp 0.35s ease;
}

.ob-step-panel.active { display: block; }

.ob-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.ob-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.ob-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.ob-form { margin-top: 0; }

/* Role buttons */
.ob-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.ob-role-btn {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.ob-role-btn:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.ob-role-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
  box-shadow: 0 0 10px rgba(99,102,241,0.2);
}

/* Stage cards */
.ob-stage-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.625rem;
  margin-top: 0.5rem;
}

.ob-stage-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1rem 0.5rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  text-align: center;
}

.ob-stage-card:hover {
  border-color: rgba(99,102,241,0.3);
  background: var(--bg-elevated);
  transform: translateY(-2px);
}

.ob-stage-card.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 20px rgba(99,102,241,0.25);
  transform: translateY(-3px);
}

.stage-icon { font-size: 1.5rem; }
.stage-name { font-size: 0.8rem; font-weight: 700; color: var(--text-primary); }
.stage-desc { font-size: 0.65rem; color: var(--text-muted); line-height: 1.3; }
.stage-risk {
  font-size: 0.6rem;
  font-family: var(--mono);
  color: var(--accent-light);
  background: var(--accent-glow);
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  border: 1px solid var(--border-active);
  display: none;
}
.ob-stage-card.active .stage-risk { display: block; }

/* DSP choice rows */
.ob-dsp-form { display: flex; flex-direction: column; gap: 1.25rem; }


.ob-dsp-label {
  font-size: 0.65rem;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  display: inline-block;
}

.demand-label { background: rgba(245,158,11,0.12); color: var(--demand); border: 1px solid rgba(245,158,11,0.3); }
.supply-label { background: rgba(16,185,129,0.12); color: var(--supply); border: 1px solid rgba(16,185,129,0.3); }
.process-label { background: rgba(99,102,241,0.12); color: var(--process); border: 1px solid rgba(99,102,241,0.3); }

.ob-dsp-question {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.4rem 0 0.6rem;
}

.ob-choice-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.ob-choice {
  padding: 0.4rem 0.75rem;
  border-radius: 99px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.ob-choice:hover {
  border-color: var(--border-active);
  color: var(--text-secondary);
}

.ob-choice.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
  font-weight: 600;
}

/* Hint text */
.ob-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Launch preview */
.ob-launch-preview {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  background: var(--accent-glow);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.ob-launch-preview .preview-label {
  font-size: 0.65rem;
  font-family: var(--mono);
  color: var(--accent-light);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

.ob-launch-preview .preview-row {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.ob-launch-preview .preview-key {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 80px;
}

.ob-launch-preview .preview-val {
  color: var(--text-primary);
  font-weight: 500;
}

/* Navigation bar */
.ob-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.ob-step-label {
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .onboarding-shell { padding: 1.5rem; }
  .ob-stage-grid { grid-template-columns: repeat(3, 1fr); }
  .ob-role-grid { grid-template-columns: 1fr; }
  .ob-title { font-size: 1.3rem; }
}

/* ── AI INTELLIGENCE LAYER ───────────────────────────────── */

/* Status pill in module header */
.ai-status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.875rem;
  border-radius: 99px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.ai-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.ai-status-dot.active {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: blink 2s infinite;
}

.ai-status-dot.error { background: var(--red); }

/* Nav badge variants */
.ai-status-badge {
  background: rgba(100,100,100,0.15);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.ai-status-badge.on {
  background: rgba(16,185,129,0.15);
  color: var(--green);
  border-color: rgba(16,185,129,0.3);
}

/* Provider selection grid */
.ai-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
  margin-top: 0.25rem;
}

.ai-provider-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.875rem 0.5rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  text-align: center;
}

.ai-provider-btn:hover {
  border-color: rgba(99,102,241,0.3);
  background: var(--bg-elevated);
  transform: translateY(-2px);
}

.ai-provider-btn.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 16px rgba(99,102,241,0.2);
}

.provider-logo { font-size: 1.4rem; }
.provider-name { font-size: 0.78rem; font-weight: 700; color: var(--text-primary); }
.provider-models { font-size: 0.62rem; color: var(--text-muted); font-family: var(--mono); }

/* API key input row */
.api-key-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.api-key-row .form-input { flex: 1; font-family: var(--mono); letter-spacing: 0.05em; }

.api-key-toggle {
  padding: 0.5rem 0.6rem;
  flex-shrink: 0;
  font-size: 1rem;
}

/* AI action row */
.ai-action-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

/* Test result */
.ai-test-result {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: var(--mono);
  line-height: 1.5;
  margin-top: 0.5rem;
}

.ai-test-result.success {
  background: var(--green-glow);
  border: 1px solid rgba(16,185,129,0.3);
  color: var(--green);
}

.ai-test-result.error {
  background: var(--red-glow);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--red);
}

/* Toggle switches */
.ai-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}

.ai-setting-row:last-of-type { border-bottom: none; }

.ai-setting-info { flex: 1; }

.ai-setting-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.ai-setting-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  transition: all 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: white;
}

/* Security note */
.ai-security-note {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(99,102,241,0.05);
  border: 1px solid rgba(99,102,241,0.15);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 1rem;
}

.ai-security-note code {
  font-family: var(--mono);
  background: var(--bg-card);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.72rem;
}

/* Usage stats */
.ai-usage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.ai-usage-item { text-align: center; }

.ai-usage-num {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--accent-light);
}

.ai-usage-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-top: 0.15rem;
}

/* Prompt preview */
.ai-prompt-preview {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  line-height: 1.6;
  max-height: 220px;
  overflow-y: auto;
}

/* AI Insight block in Pre-Mortem output */
.ai-insight-block {
  margin-top: 0.25rem;
}

.ai-insight-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: var(--mono);
}

.ai-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ai-insight-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.83rem;
  line-height: 1.5;
}

.ai-insight-card.critical-insight {
  background: rgba(99,102,241,0.07);
  border-color: rgba(99,102,241,0.2);
}

.ai-insight-card.blind-spot {
  background: rgba(245,158,11,0.07);
  border-color: rgba(245,158,11,0.2);
}

.ai-insight-card.pattern {
  background: rgba(16,185,129,0.07);
  border-color: rgba(16,185,129,0.2);
}

.ai-insight-card.key-question {
  background: rgba(236,72,153,0.07);
  border-color: rgba(236,72,153,0.2);
}

.ai-insight-icon { font-size: 1.1rem; flex-shrink: 0; }
.ai-insight-label {
  font-size: 0.65rem;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.ai-insight-text { color: var(--text-primary); }

.ai-powered-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6rem;
  font-family: var(--mono);
  color: var(--accent-light);
  background: var(--accent-glow);
  border: 1px solid var(--border-active);
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
  margin-top: 0.5rem;
}

/* ── DATABASE STATUS ──────────────────────────────────────── */
.db-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}
.db-status-dot.connected {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: blink 2s infinite;
}
.db-status-mini {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0;
}
.empty-mini {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 2rem 1rem;
  font-family: var(--mono);
}

/* ── LOGIN OVERLAY ────────────────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease;
}

.login-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Radial glow behind card */
.login-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 440px;
  padding: 2rem 1rem;
}

.login-shell::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Brand */
.login-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.login-logo {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--accent) 0%, rgba(99,102,241,0.5) 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 30px rgba(99,102,241,0.4);
}

.login-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.login-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--mono);
  margin: 0.15rem 0 0;
}

/* Card */
.login-card {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.4), 0 0 0 1px rgba(99,102,241,0.1);
}

/* Tabs */
.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  margin-bottom: 1.75rem;
}

.login-tab {
  padding: 0.6rem;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-tab.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

/* Form groups */
.login-form-group {
  margin-bottom: 1rem;
}

.login-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.login-label small {
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.login-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.login-input {
  width: 100%;
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: all var(--transition);
  box-sizing: border-box;
}

.login-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.login-input::placeholder { color: var(--text-muted); }

.login-eye-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Error */
.login-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.875rem;
  font-size: 0.8rem;
  color: var(--red);
  margin-bottom: 0.75rem;
}

/* Primary button */
.login-btn {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 8px 24px rgba(99,102,241,0.35);
  margin-top: 0.25rem;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99,102,241,0.45);
}

.login-btn:active { transform: translateY(0); }

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.login-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.875rem 0 0;
}

.login-hint a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 600;
}

.login-hint a:hover { text-decoration: underline; }

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Offline button */
.login-offline-btn {
  width: 100%;
  padding: 0.65rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.login-offline-btn:hover {
  border-color: var(--border-active);
  color: var(--text-secondary);
  background: var(--bg-card);
}

/* Footer note */
.login-footer-note {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   [LEVEL 6] — Forced Reflection Gate Modal
   Hard blocks saving irreversible + low quality + overconfident
   ═══════════════════════════════════════════════════════════ */

.forced-reflection-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 6, 15, 0.92);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}

.forced-reflection-shell {
  background: var(--bg-surface);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 540px;
  width: 90%;
  box-shadow: 0 0 60px rgba(239, 68, 68, 0.15), 0 24px 64px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fr-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.fr-icon {
  font-size: 2.25rem;
  width: 52px;
  height: 52px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fr-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.fr-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.fr-alert {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.fr-question-block {
  margin-bottom: 0.75rem;
}

.fr-question-label {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-family: var(--mono);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.fr-question {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
}

.fr-answer {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.875rem;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.875rem;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 90px;
}

.fr-answer:focus {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.fr-answer::placeholder {
  color: var(--text-muted);
}

.fr-char-count {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-family: var(--mono);
  color: var(--text-muted);
}

.fr-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  gap: 0.75rem;
}

.fr-footer {
  margin-top: 1rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--mono);
  text-align: center;
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════
   [LEVEL 6] — Calibration Score (Sidebar + Briefing)
   ═══════════════════════════════════════════════════════════ */

.calibration-badge {
  padding: 0.625rem 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: opacity 0.4s ease;
}

/* Calibration card in Briefing gets a faint green tint via inline style */
#brief-calibration {
  transition: opacity 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════════════════════
   [LEVEL 9] — Founder Nervous System
   ═══════════════════════════════════════════════════════════ */

/* Priority Engine Cards */
.priority-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
  position: relative;
}

.priority-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.priority-card.critical { border-left-color: var(--red); }
.priority-card.high { border-left-color: var(--yellow); }
.priority-card.medium { border-left-color: var(--accent); }

.priority-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.priority-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.priority-badge {
  font-size: 0.6rem;
  font-family: var(--mono);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-base);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.priority-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  font-size: 0.75rem;
}
.priority-block-col {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.priority-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.priority-val {
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Metabolism Timeline */
.metabolism-timeline {
  position: relative;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.metabolism-timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}

.timeline-node {
  position: relative;
}

.timeline-node::before {
  content: '';
  position: absolute;
  top: 4px;
  left: -24px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-active);
  z-index: 1;
}

.timeline-node.decision-node::before { border-color: var(--accent); }
.timeline-node.outcome-node::before { border-color: var(--green); }
.timeline-node.outcome-node.fail::before { border-color: var(--red); }
.timeline-node.signal-node::before { border-color: var(--yellow); }

.timeline-content {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.timeline-type {
  font-size: 0.65rem;
  font-family: var(--mono);
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.timeline-date {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.timeline-desc {
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.timeline-causal-link {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

/* DSP Radar Visualization */
.dsp-radar-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem 0;
}

.dsp-radar-poly {
  position: absolute;
  inset: 10%;
  z-index: 1;
}

.dsp-radar-poly svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

#radar-shape {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.radar-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  z-index: 2;
  text-shadow: 0 2px 4px var(--bg-body);
}

.radar-val {
  font-size: 0.85rem;
  font-family: var(--mono);
  color: var(--text-primary);
}

.radar-trend {
  font-size: 0.7rem;
  line-height: 1;
}

.radar-demand { top: -10px; left: 50%; transform: translateX(-50%); }
.radar-supply { bottom: 0; right: -15px; }
.radar-process { bottom: 0; left: -15px; }

/* ── EXPERIENCE + VISUALIZATION (PHASE 2) ─────────────────────────── */

.decision-inbox-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .decision-inbox-grid { grid-template-columns: 1fr; }
}

.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.inbox-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.inbox-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.inbox-card.active {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.inbox-card-indicator {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}
.inbox-card-indicator.low { background: var(--green); }
.inbox-card-indicator.medium { background: var(--yellow); }
.inbox-card-indicator.high { background: var(--demand); }
.inbox-card-indicator.critical { background: var(--red); }

.inbox-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.inbox-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--text-primary);
  flex: 1;
}

.inbox-card-score {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  margin-left: 0.5rem;
}

.inbox-card-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  padding-left: 0.5rem;
}

.inbox-card-hazard {
  margin-top: 0.75rem;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  padding: 0.5rem;
  border-radius: 6px;
  background: var(--red-glow);
  color: var(--text-primary);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.decision-detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 120px);
}

.detail-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-score-ring {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 800;
  border: 4px solid var(--border);
}

.detail-score-ring.low { border-color: var(--green); color: var(--green); }
.detail-score-ring.medium { border-color: var(--yellow); color: var(--yellow); }
.detail-score-ring.high { border-color: var(--demand); color: var(--demand); }
.detail-score-ring.critical { border-color: var(--red); color: var(--red); }

.detail-body {
  padding: 1.5rem;
  flex-grow: 1;
  overflow-y: auto;
}

.progressive-friction-layer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
}

.friction-step {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  background: rgba(255,255,255,0.02);
  transition: opacity 0.3s ease;
}

.friction-step.locked {
  opacity: 0.4;
  pointer-events: none;
}

.friction-step-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.friction-checkbox {
  width: 18px; height: 18px;
  accent-color: var(--accent);
}

.friction-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem;
  color: var(--text-primary);
  font-size: 0.8rem;
  resize: vertical;
  min-height: 60px;
}

.cooldown-banner {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--yellow);
  padding: 0.75rem;
  border-radius: 6px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-top: 1rem;
  font-weight: 700;
}

.detail-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1rem;
}

/* Timeline */
.behavior-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
  margin-top: 1rem;
}

.timeline-event {
  position: relative;
  padding-left: 1.5rem;
}

.timeline-event::before {
  content: '';
  position: absolute;
  left: -22px; 
  top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
}

.timeline-event.critical::before { border-color: var(--red); }
.timeline-event.high::before { border-color: var(--demand); }
.timeline-event.medium::before { border-color: var(--yellow); }

.timeline-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.timeline-reason {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  background: rgba(255,255,255,0.03);
  padding: 0.5rem;
  border-radius: 6px;
  margin-top: 0.4rem;
}
