/* ═══════════════════════════════════════════════════
   MSCIP — Institutional Intelligence Terminal Theme
   ═══════════════════════════════════════════════════ */
:root {
  --bg-base:      #080a0c;
  --bg-panel:     #0d1117;
  --bg-card:      #111820;
  --bg-card-alt:  #0f1419;
  --bg-hover:     #161e28;
  --bg-input:     #0d1117;
  --border:       #1e2730;
  --border-dim:   #141b22;
  --border-hi:    #2a3a4a;

  --text-pri:     #cdd9e5;
  --text-sec:     #768a9a;
  --text-dim:     #3d4f5c;
  --text-inv:     #080a0c;

  --accent:       #e8a020;
  --accent-dim:   rgba(232,160,32,0.12);
  --accent-glow:  rgba(232,160,32,0.25);
  --green:        #2ea043;
  --green-dim:    rgba(46,160,67,0.12);
  --red:          #e05252;
  --red-dim:      rgba(224,82,82,0.12);
  --blue:         #4a9eff;
  --purple:       #8b73d4;
  --teal:         #2ab7ca;

  --radius:       3px;
  --radius-lg:    5px;

  --font-sans:  "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:  "JetBrains Mono", "Fira Code", ui-monospace, "Cascadia Code", monospace;

  --chart-bg:    #0d1117;
  --chart-grid:  #1a2230;
  --chart-text:  #5a7080;
  --chart-cross: rgba(232,160,32,0.3);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 13px; -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg-base);
  color: var(--text-pri);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Shell ── */
.shell { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Topbar ── */
.topbar {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: 28px;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-svg {
  width: 18px; height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-pri);
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.nav {
  display: flex;
  gap: 2px;
  flex: 1;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-sec);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.12s, background 0.12s;
  border: 1px solid transparent;
}
.nav-link:hover {
  color: var(--text-pri);
  background: var(--bg-hover);
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(232,160,32,0.2);
}
.nav-icon {
  width: 14px; height: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  opacity: 0.7;
}
.nav-link.active .nav-icon { opacity: 1; }
.nav-icon svg,
.nav-icon .section-svg { width: 14px; height: 14px; display: block; }

/* ── Edge node status ── */
.edge-status {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: default;
}
.edge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}
.edge-dot.online  { background: var(--green); box-shadow: 0 0 4px var(--green); }
.edge-dot.offline { background: var(--red); }
.edge-dot.unknown { background: var(--text-dim); }
.edge-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.edge-label.online  { color: var(--green); }
.edge-label.offline { color: var(--red); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 12px;
}
.clock {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  min-width: 72px;
  text-align: right;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}
.status-dot.ok   { background: var(--green); box-shadow: 0 0 5px var(--green); }
.status-dot.warn { background: var(--accent); box-shadow: 0 0 5px var(--accent); }
.status-dot.err  { background: var(--red); box-shadow: 0 0 5px var(--red); }

/* ── Main content ── */
.main-content {
  flex: 1;
  padding: 20px 16px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-dim);
}
.page-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-pri);
  letter-spacing: -0.01em;
}
.page-subtitle {
  color: var(--text-dim);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ── Dashboard grid ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 12px;
}
.dashboard-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.dashboard-grid.three-col { grid-template-columns: repeat(3, 1fr); }
.dashboard-grid.full { grid-template-columns: 1fr; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-dim);
  background: var(--bg-card-alt);
}
.card-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.card-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--bg-base);
  letter-spacing: 0.04em;
  min-width: 40px;
  text-align: right;
}
.card-badge.live { color: var(--green); border-color: rgba(46,160,67,0.3); background: var(--green-dim); }
.card-badge.warn { color: var(--accent); border-color: rgba(232,160,32,0.3); background: var(--accent-dim); }
.card-badge.err  { color: var(--red); border-color: rgba(224,82,82,0.3); background: var(--red-dim); }

.card-body { padding: 14px; }
.card-body-tight { padding: 10px 14px; }

/* ── KPI row ── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.kpi {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 10px 12px;
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border);
}
.kpi.pos::before { background: var(--green); }
.kpi.neg::before { background: var(--red); }
.kpi.neu::before { background: var(--accent); }
.kpi-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-pri);
  line-height: 1;
  letter-spacing: -0.02em;
}
.kpi-value.sm { font-size: 16px; }
.kpi-change {
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.kpi-change.pos { color: var(--green); }
.kpi-change.neg { color: var(--red); }
.kpi-change.neu { color: var(--text-dim); }

/* ── Chart containers ── */
.chart-container {
  position: relative;
  width: 100%;
  height: 220px;
}
.chart-container.tall  { height: 300px; }
.chart-container.short { height: 160px; }
.chart-container.mini  { height: 130px; margin-top: 8px; }
.chart-container > div { width: 100% !important; height: 100% !important; }

/* ── Mini KPI grid (used in Macro Brief sector panels) ── */
.mini-kpi-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.mini-kpi-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-dim);
}
.mini-kpi-row:last-child { border-bottom: none; }
.mini-kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  width: 52px;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.mini-kpi-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-pri);
  flex: 1;
}
.mini-kpi-chg {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}
.mini-kpi-chg.pos { color: var(--green); }
.mini-kpi-chg.neg { color: var(--red); }
.mini-kpi-chg.neu { color: var(--text-dim); }

/* ── Map container ── */
.map-container {
  width: 100%;
  height: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  position: relative;
}
.map-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(8,10,12,0.88);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 10px 14px;
  backdrop-filter: blur(4px);
}
.map-overlay-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}
.map-overlay-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-sec);
  letter-spacing: 0.04em;
}
.map-overlay-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--accent); }
  50%       { opacity: 0.4; box-shadow: none; }
}

/* ── Data table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.data-table th {
  text-align: left;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-sec);
  white-space: nowrap;
}
.data-table td:first-child { color: var(--text-pri); font-size: 12px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }
.num-pos { color: var(--green) !important; }
.num-neg { color: var(--red) !important; }

/* ── Macro Brief composite ── */
.macro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto;
  gap: 12px;
}
.macro-grid .span-2 { grid-column: span 2; }
.macro-grid .span-3 { grid-column: span 3; }

.ticker-strip {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card-alt);
  padding: 0;
}
.ticker-strip::-webkit-scrollbar { display: none; }
.ticker-item {
  flex-shrink: 0;
  padding: 8px 14px;
  border-right: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 100px;
}
.ticker-item:last-child { border-right: none; }
.ticker-sym {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ticker-price {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-pri);
  letter-spacing: -0.01em;
}
.ticker-chg {
  font-family: var(--font-mono);
  font-size: 10px;
}
.ticker-chg.pos { color: var(--green); }
.ticker-chg.neg { color: var(--red); }
.ticker-chg.neu { color: var(--text-dim); }

.anomaly-list { display: flex; flex-direction: column; gap: 6px; }
.anomaly-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-base);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
}
.anomaly-dir {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  width: 28px;
  text-align: center;
  padding: 2px 4px;
  border-radius: var(--radius);
}
.anomaly-dir.up   { color: var(--green); background: var(--green-dim); }
.anomaly-dir.down { color: var(--red);   background: var(--red-dim); }
.anomaly-name {
  flex: 1;
  font-size: 12px;
  color: var(--text-pri);
  font-weight: 500;
}
.anomaly-val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-sec);
}
.anomaly-mag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  min-width: 48px;
  text-align: right;
}
.anomaly-mag.up   { color: var(--green); }
.anomaly-mag.down { color: var(--red); }

.synthesis-panel {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.synthesis-title {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.synthesis-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.synthesis-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-dim);
  gap: 12px;
}
.synthesis-row:last-child { border-bottom: none; }
.synthesis-label {
  font-size: 12px;
  color: var(--text-sec);
  flex: 1;
}
.synthesis-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-pri);
  text-align: right;
}
.synthesis-val.pos { color: var(--green); }
.synthesis-val.neg { color: var(--red); }

/* ── Home page module grid ── */
.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 0 32px;
}
.hero-wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.hero-brand-svg {
  width: 32px; height: 32px;
  color: var(--accent);
}
.hero-brand-text {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-pri);
}
.hero-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 40px;
  text-align: center;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 860px;
}
.module-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.module-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-hi);
}
.module-icon {
  width: 32px; height: 32px;
  color: var(--accent);
  opacity: 0.8;
  display: flex; align-items: center; justify-content: center;
}
.module-icon .section-svg { width: 28px; height: 28px; }
.module-name {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-pri);
  text-align: center;
  line-height: 1.3;
}
.module-status {
  display: flex;
  align-items: center;
  gap: 5px;
}
.module-status-text {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-pending { background: var(--text-dim); }
.dot-ok      { background: var(--green); box-shadow: 0 0 4px var(--green); }
.dot-warn    { background: var(--accent); }
.dot-err     { background: var(--red); }

/* ── OSINT reports ── */
.report-list { display: flex; flex-direction: column; gap: 6px; }
.report-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.12s;
}
.report-item:hover { border-color: var(--border-hi); }
.report-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  padding-top: 2px;
  min-width: 80px;
}
.report-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-pri);
  line-height: 1.4;
}
.report-tags {
  display: flex;
  gap: 5px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.report-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 2px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ── Pending / phase placeholder ── */
.phase-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--border-hi);
  border-radius: var(--radius-lg);
  gap: 14px;
}
.phase-placeholder-icon {
  width: 40px; height: 40px;
  color: var(--text-dim);
}
.phase-placeholder-icon svg { width: 40px; height: 40px; }
.phase-placeholder-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sec);
  letter-spacing: 0.06em;
}
.phase-placeholder-body {
  font-size: 12px;
  color: var(--text-dim);
  max-width: 480px;
  line-height: 1.6;
}
.phase-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  background: var(--accent-dim);
  letter-spacing: 0.08em;
}

/* ── Loading / error ── */
.loading-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 60px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
}
.spinner {
  width: 20px; height: 20px;
  border: 1.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-state {
  grid-column: 1 / -1;
  padding: 16px;
  background: var(--red-dim);
  border: 1px solid rgba(224,82,82,0.25);
  border-radius: var(--radius);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ── Divider label ── */
.section-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
  margin-top: 4px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-dim);
}

/* ── Footer / status strip ── */
.footer {
  border-top: 1px solid var(--border-dim);
  background: var(--bg-panel);
}
.status-strip {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 5px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-dim);
}
.status-strip::-webkit-scrollbar { display: none; }
.status-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 12px;
  border-right: 1px solid var(--border-dim);
  flex-shrink: 0;
}
.status-item:first-child { padding-left: 0; }
.status-item:last-child  { border-right: none; }
.status-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
  flex-shrink: 0;
}
.status-val {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-sec);
  letter-spacing: 0.02em;
}
.status-dot-sm {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
  transition: background 0.3s;
}
.status-dot-sm.ok      { background: var(--green); box-shadow: 0 0 3px var(--green); }
.status-dot-sm.warn    { background: var(--accent); }
.status-dot-sm.err     { background: var(--red); }
.status-dot-sm.unknown { background: var(--text-dim); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 4px 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* ── Prose ── */
.prose { max-width: 720px; color: var(--text-sec); line-height: 1.7; }
.prose h2, .prose h3 { color: var(--text-pri); margin: 20px 0 6px; font-size: 13px; }

/* ── Phase placeholder spec table ── */
.phase-placeholder-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 560px;
  margin-top: 8px;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  overflow: hidden;
}
.spec-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--border-dim);
}
.spec-row:last-child { border-bottom: none; }
.spec-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  width: 80px;
  flex-shrink: 0;
}
.spec-val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-sec);
}
.spec-pending {
  color: var(--accent);
}

/* ── Provenance badges ── */
.prov-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 1px 5px;
  border-radius: 2px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.prov-obs      { background: rgba(46,160,67,0.15);  color: #2ea043; border: 1px solid rgba(46,160,67,0.3); }
.prov-inferred { background: rgba(74,158,255,0.12); color: #4a9eff; border: 1px solid rgba(74,158,255,0.25); }
.prov-parsed   { background: rgba(139,115,212,0.12);color: #8b73d4; border: 1px solid rgba(139,115,212,0.25); }

/* ── Chokepoint status strip ── */
.choke-strip {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
  grid-column: 1 / -1;
}
.choke-strip::-webkit-scrollbar { display: none; }
.choke-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-right: 1px solid var(--border-dim);
  flex-shrink: 0;
}
.choke-item:last-child { border-right: none; }
.choke-name {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-pri);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.choke-coords {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}
.choke-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
}
.choke-badge.monitoring { background: rgba(232,160,32,0.15); color: var(--accent); border: 1px solid rgba(232,160,32,0.3); }
.choke-badge.clear      { background: var(--green-dim); color: var(--green);   border: 1px solid rgba(46,160,67,0.3); }
.choke-badge.alert      { background: var(--red-dim);   color: var(--red);     border: 1px solid rgba(224,82,82,0.3); }
.choke-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
}

/* ── Agriculture section dividers ── */
.agri-section-hdr {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 4px 0 2px;
}
.agri-section-hdr::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-dim);
}

/* ── Map AOI markers ── */
.aoi-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: default;
}
.aoi-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid rgba(232,160,32,0.4);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-aoi 2.5s ease-in-out infinite;
}
@keyframes pulse-aoi {
  0%, 100% { box-shadow: 0 0 8px rgba(232,160,32,0.8); }
  50%       { box-shadow: 0 0 2px rgba(232,160,32,0.2); }
}
.aoi-label {
  background: rgba(8,10,12,0.88);
  border: 1px solid var(--border-hi);
  border-radius: 2px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  white-space: nowrap;
  backdrop-filter: blur(3px);
}

/* ── Macro Brief KPI hero row ── */
.macro-hero-kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  grid-column: 1 / -1;
}
.macro-hero-kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.macro-hero-kpi.pos { border-top: 2px solid var(--green); }
.macro-hero-kpi.neg { border-top: 2px solid var(--red); }
.macro-hero-kpi-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.macro-hero-kpi-val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-pri);
  letter-spacing: -0.02em;
  line-height: 1;
}
.macro-hero-kpi-chg {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}
.macro-hero-kpi-chg.pos { color: var(--green); }
.macro-hero-kpi-chg.neg { color: var(--red); }
.macro-hero-kpi-src {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .macro-grid { grid-template-columns: 1fr 1fr; }
  .macro-grid .span-3 { grid-column: span 2; }
}
@media (max-width: 900px) {
  .module-grid { grid-template-columns: repeat(3, 1fr); }
  .brand-tag { display: none; }
  .macro-grid { grid-template-columns: 1fr; }
  .macro-grid .span-2, .macro-grid .span-3 { grid-column: span 1; }
}
@media (max-width: 640px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-label { display: none; }
  .nav-icon { width: 16px; height: 16px; }
  .nav-icon .section-svg { width: 16px; height: 16px; }
  .dashboard-grid.two-col { grid-template-columns: 1fr; }
}
