/* ============================================================
   AstraVeris Launch Tracker
   Design: SpaceX minimalism + NASA data hierarchy + gold identity
   Typography: Space Grotesk (display) + DM Mono (data)
   ============================================================ */

/* ----- Custom Properties ----- */
:root {
  /* Core palette — dark but readable, slight warmth */
  --black:            #08080C;
  --bg-deep:          #0E0E14;
  --bg-surface:       #14141C;
  --bg-elevated:      #1A1A24;
  --bg-card:          #121219;

  /* Gold — the identity. Bloomberg meets aerospace. */
  --gold:             #D4A843;
  --gold-bright:      #E8C547;
  --gold-dim:         #8B7332;
  --gold-glow:        rgba(212, 168, 67, 0.12);
  --gold-glow-strong: rgba(212, 168, 67, 0.25);

  /* Text hierarchy */
  --text-primary:     #EDEDF0;
  --text-secondary:   #9494A4;
  --text-muted:       #5A5A6A;

  /* Status colors */
  --success:          #2ECC71;
  --success-dim:      rgba(46, 204, 113, 0.12);
  --danger:           #E74C3C;
  --danger-dim:       rgba(231, 76, 60, 0.12);
  --caution:          #D4A843;
  --caution-dim:      rgba(212, 168, 67, 0.12);
  --info:             #3498DB;
  --info-dim:         rgba(52, 152, 219, 0.12);

  /* Borders */
  --border:           rgba(255, 255, 255, 0.08);
  --border-gold:      rgba(212, 168, 67, 0.25);

  /* Typography */
  --font-display:     'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:        'DM Mono', 'SF Mono', 'Cascadia Code', monospace;

  /* Spacing scale */
  --space-xs:         4px;
  --space-sm:         8px;
  --space-md:         16px;
  --space-lg:         24px;
  --space-xl:         40px;
  --space-2xl:        64px;
  --space-3xl:        96px;

  --max-width:        1200px;
}

/* ----- Reset ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  background: var(--black);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--gold);
}

::selection {
  background: var(--gold);
  color: var(--black);
}

/* ----- Keyframes ----- */
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 8px var(--gold-glow); }
  50%      { box-shadow: 0 0 20px var(--gold-glow-strong); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes hero-fade {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ============================================================
   STARFIELD CANVAS
   ============================================================ */
.starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   1. TICKER BAR
   ============================================================ */
.ticker-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 36px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
  will-change: transform;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.ticker-item .ticker-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 500;
}

.ticker-item .ticker-value {
  color: var(--text-primary);
  font-weight: 500;
}

.ticker-item .ticker-delta-pos { color: var(--success); }
.ticker-item .ticker-delta-neg { color: var(--danger); }

.ticker-sep {
  display: inline-block;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.ticker-dot-live {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.ticker-dot-gray {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.ticker-dot-steel {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-dim);
  flex-shrink: 0;
}

.ticker-live-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--danger);
  text-transform: uppercase;
}

.ticker-next-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ============================================================
   2. HEADER — SpaceX-style minimal
   ============================================================ */
.header {
  position: fixed;
  top: 36px;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 0 var(--space-xl);
  height: 56px;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  flex-shrink: 0;
}

.logo-wordmark {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-primary);
}

.logo-accent {
  color: var(--gold);
}

/* Nav — SpaceX uppercase links */
.nav {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  padding: 4px 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--gold);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
}

/* ============================================================
   3. HERO — Full viewport countdown (SpaceX + NASA hybrid)
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--space-xl) var(--space-xl);
}

.hero-inner {
  animation: hero-fade 1.2s ease-out;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
}

.hero-mission {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.hero-meta-item {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-dim);
}

/* Countdown — NASA DM Mono style */
.hero-countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-xl);
}

.countdown-group {
  text-align: center;
  min-width: 60px;
}

.countdown-value {
  font-family: var(--font-mono);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: 0.02em;
}

.countdown-unit {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.countdown-sep {
  font-family: var(--font-mono);
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 300;
  color: var(--gold-dim);
  line-height: 1;
  padding: 0 2px;
  opacity: 0.6;
}

.hero-status {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-status-go {
  color: var(--gold);
}

.hero-status-scheduled {
  color: var(--text-muted);
}

.hero-status-live {
  color: var(--danger);
  animation: pulse 1.5s ease-in-out infinite;
}

.hero-scroll-hint {
  display: none;
}

/* ============================================================
   4. LIVE BANNER
   ============================================================ */
.live-banner {
  position: relative;
  z-index: 1;
  padding: 0 var(--space-xl);
  margin-bottom: var(--space-xl);
}

.live-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--danger-dim);
  border-left: 2px solid var(--danger);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--danger);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #fff;
  text-transform: uppercase;
  flex-shrink: 0;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.2s ease-in-out infinite;
}

.live-info { flex: 1; min-width: 0; }

.live-mission {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.live-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.live-countdown { text-align: right; flex-shrink: 0; }

.live-timer {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.live-timer-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ============================================================
   5. STATS ROW — NASA data hierarchy
   ============================================================ */
.stats-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  max-width: var(--max-width);
  margin: 0 auto var(--space-2xl);
  padding: 0 var(--space-xl);
}

.stat-card {
  background: var(--bg-deep);
  padding: var(--space-lg) var(--space-lg);
  text-align: center;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  margin-bottom: var(--space-xs);
}

.stat-context {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.stat-context-positive {
  color: var(--success);
}

/* ============================================================
   6. CONTENT SECTIONS
   ============================================================ */
.content-section {
  position: relative;
  z-index: 1;
  padding: 0 var(--space-xl);
  margin-bottom: var(--space-2xl);
  max-width: calc(var(--max-width) + var(--space-xl) * 2);
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

/* Orbital arc line as section divider */
.section-rule {
  flex: 0 0 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.section-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);
  white-space: nowrap;
}

.section-action {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 16px;
  transition: all 0.2s ease;
}

.section-action:hover {
  color: var(--gold);
  border-color: var(--border-gold);
}

/* Empty State */
.empty-state {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 12px;
  padding: var(--space-lg) 0;
  letter-spacing: 0.06em;
}

/* ============================================================
   7. LAUNCH TABLE — Mission control readout
   ============================================================ */
.table-wrap {
  overflow-x: auto;
}

.launch-table {
  width: 100%;
  border-collapse: collapse;
}

.launch-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  font-weight: 400;
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
}

.launch-table td {
  padding: var(--space-md);
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.launch-table tbody tr {
  transition: background 0.15s ease;
}

.launch-table tbody tr:hover {
  background: var(--bg-surface);
}

.launch-table tbody tr:last-child td {
  border-bottom: none;
}

.td-date-primary {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.td-date-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.td-vehicle-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.td-vehicle-operator {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.td-mission-name {
  font-size: 13px;
  color: var(--text-primary);
}
.td-mission-link {
  color: var(--accent);
  text-decoration: none;
}
.td-mission-link:hover {
  text-decoration: underline;
  color: var(--accent-bright);
}

.td-mission-payload {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.td-site {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Status indicators — LED-style */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-go {
  color: var(--gold);
}
.status-go .status-dot {
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold-glow-strong);
  animation: pulse 1.5s ease-in-out infinite;
}

.status-scheduled {
  color: var(--text-muted);
}
.status-scheduled .status-dot {
  background: var(--text-muted);
}

.status-success {
  color: var(--success);
}
.status-success .status-dot {
  background: var(--success);
  box-shadow: 0 0 4px rgba(46, 204, 113, 0.3);
}

.status-failure {
  color: var(--danger);
}
.status-failure .status-dot {
  background: var(--danger);
  box-shadow: 0 0 4px rgba(231, 76, 60, 0.3);
}

.status-partial {
  color: var(--caution);
}
.status-partial .status-dot {
  background: var(--caution);
}

.status-delayed {
  color: var(--text-muted);
}
.status-delayed .status-dot {
  background: var(--text-muted);
  opacity: 0.5;
}

.status-scrubbed {
  color: var(--text-muted);
}
.status-scrubbed .status-dot {
  background: var(--text-muted);
  opacity: 0.3;
}

/* ============================================================
   8. VEHICLE RELIABILITY — Signal-strength cards
   ============================================================ */
.reliability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.rel-card {
  background: var(--bg-deep);
  padding: var(--space-lg);
  transition: background 0.2s ease;
}

.rel-card:hover {
  background: var(--bg-surface);
}

.rel-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.rel-vehicle {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.rel-operator {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.rel-rate {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

.rel-rate-green  { color: var(--success); }
.rel-rate-gold   { color: var(--gold); }
.rel-rate-brick  { color: var(--danger); }

/* Reliability bar — thin, precise */
.rel-bar-track {
  width: 100%;
  height: 2px;
  background: var(--bg-elevated);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.rel-bar-fill {
  height: 100%;
  transition: width 0.8s ease;
}

.rel-bar-green  { background: var(--success); }
.rel-bar-gold   { background: var(--gold); }
.rel-bar-brick  { background: var(--danger); }

.rel-bottom {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.rel-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: var(--space-sm);
  opacity: 0.7;
}

/* ── Vehicle reliability drill-down ── */
.rel-card-clickable { cursor: pointer; }
.rel-card-clickable .rel-expand-chevron {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
  display: inline-block;
  margin-left: var(--space-sm);
}
.rel-card-clickable:hover .rel-expand-chevron { color: var(--gold-dim); }
.rel-card-expanded { background: rgba(212, 168, 67, 0.04); }
.rel-card-expanded .rel-expand-chevron { transform: rotate(90deg); color: var(--gold); }

.reliability-grid > .rel-drill-panel { grid-column: 1 / -1; }

.rel-drill-panel {
  padding: var(--space-md);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-dim, rgba(212,168,67,0.3));
  animation: slideDown 0.2s ease;
}
.rel-drill-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}
.rel-drill-stat {
  text-align: center;
}
.rel-drill-stat-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.2;
}
.rel-drill-stat-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}
.rel-drill-section-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}
.rel-drill-launches {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  margin-top: var(--space-xs);
}
.rel-drill-launches th {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
}
.rel-drill-launches td {
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-secondary);
}
.rel-drill-outcome-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-md);
}
.rel-drill-outcome-seg { min-width: 2px; }
.rel-drill-outcome-success { background: var(--success); }
.rel-drill-outcome-partial { background: var(--gold); }
.rel-drill-outcome-fail { background: var(--danger); }
.rel-drill-outcome-legend {
  display: flex;
  gap: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}
.rel-drill-outcome-legend span::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.rel-drill-outcome-legend .legend-success::before { background: var(--success); }
.rel-drill-outcome-legend .legend-partial::before { background: var(--gold); }
.rel-drill-outcome-legend .legend-fail::before { background: var(--danger); }

/* ── Stats card drill-down ── */
.stat-card-clickable { cursor: pointer; transition: background 0.2s ease; }
.stat-card-clickable:hover { background: var(--bg-surface); }
.stat-card-expanded { background: rgba(212, 168, 67, 0.04); }
.stat-card-clickable .stat-expand-hint {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-top: var(--space-xs);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.stat-card-clickable:hover .stat-expand-hint { opacity: 1; }

.stats-row > .stat-drill-panel { grid-column: 1 / -1; }
.stat-drill-panel {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-deep);
  border-top: 2px solid var(--gold-dim, rgba(212,168,67,0.3));
  animation: slideDown 0.2s ease;
}
.stat-drill-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-drill-close {
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  padding: 0 4px;
}
.stat-drill-close:hover { color: var(--gold); }
.stat-drill-bars { display: flex; flex-direction: column; gap: 4px; }
.stat-drill-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.72rem;
}
.stat-drill-bar-label {
  min-width: 100px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-drill-bar-track {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}
.stat-drill-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.stat-drill-bar-val {
  min-width: 40px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.stat-drill-list {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.stat-drill-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.stat-drill-list-item:last-child { border-bottom: none; }
.stat-drill-list-name { color: var(--text-primary); }
.stat-drill-list-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ── Launch table row drill-down ── */
.launch-table tbody tr.launch-row-clickable { cursor: pointer; }
.launch-table tbody tr.launch-row-expanded { background: rgba(212, 168, 67, 0.04); }
.launch-table tbody tr.launch-row-expanded td { border-bottom: none; }
.launch-detail-row td {
  padding: 0 var(--space-md) var(--space-md) !important;
  border-bottom: 1px solid var(--border) !important;
}
.launch-detail-inner {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-dim, rgba(212,168,67,0.3));
  padding: var(--space-md);
  animation: slideDown 0.2s ease;
}
.launch-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-sm);
}
.launch-detail-item {}
.launch-detail-key {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.launch-detail-val {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 1px;
}
.launch-detail-sources {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-xs);
}
.launch-detail-source {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gold-dim);
  text-decoration: none;
}
.launch-detail-source:hover { color: var(--gold); text-decoration: underline; }

/* ── History chart year drill-down ── */
.hchart-col-clickable { cursor: pointer; }
.hchart-col-clickable:hover .hchart-stack { opacity: 0.8; }
.hchart-col-active .hchart-count { color: var(--gold); }
.hchart-col-active .hchart-year { color: var(--gold); }
.hchart-col-active .hchart-bar-success { background: var(--gold-bright); opacity: 1; }

.history-year-popup {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-dim, rgba(212,168,67,0.3));
  padding: var(--space-md);
  margin-top: var(--space-md);
  animation: slideDown 0.2s ease;
}
.history-year-popup-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.history-year-popup-close {
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: 0 4px;
}
.history-year-popup-close:hover { color: var(--gold); }
.history-year-popup-stats {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.history-year-popup-stats strong { color: var(--text-primary); }
.history-year-popup-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--space-sm);
}
.history-year-popup-bar-seg { min-width: 2px; }
.history-year-popup-bar-success { background: var(--success); }
.history-year-popup-bar-partial { background: var(--gold); }
.history-year-popup-bar-fail { background: var(--danger); }
.history-year-popup-legend {
  display: flex;
  gap: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}
.history-year-popup-legend span::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.history-year-popup-legend .legend-success::before { background: var(--success); }
.history-year-popup-legend .legend-partial::before { background: var(--gold); }
.history-year-popup-legend .legend-fail::before { background: var(--danger); }

/* ============================================================
   9. NEWSLETTER HIGHLIGHTS
   ============================================================ */
.newsletter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.nl-card {
  background: var(--bg-deep);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease;
}

.nl-card:hover {
  background: var(--bg-surface);
}

.nl-section-badge {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  border: 1px solid var(--border-gold);
  margin-bottom: var(--space-md);
  align-self: flex-start;
}

.nl-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.nl-title a {
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.nl-title a:hover {
  color: var(--gold);
}

.nl-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  flex: 1;
}

.nl-footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ============================================================
   10. NEWS GRID
   ============================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
}

.news-card {
  background: var(--bg-deep);
  padding: var(--space-lg);
  transition: background 0.2s ease;
}

.news-card:hover {
  background: var(--bg-surface);
}

.news-source {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: var(--space-sm);
}

.news-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.news-title a {
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.news-title a:hover {
  color: var(--gold);
}

.news-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.news-footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* Significance badges — minimal */
.sig-badge {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sig-critical {
  color: var(--danger);
  border: 1px solid var(--danger-dim);
}

.sig-high {
  color: var(--gold);
  border: 1px solid var(--caution-dim);
}

.sig-medium {
  color: var(--info);
  border: 1px solid var(--info-dim);
}

.sig-low {
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.event-type-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ============================================================
   10b. SPACE ACCESSIBILITY INDEX
   ============================================================ */

/* SAI Hero — score ring + meta */
.sai-hero {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-lg) 0;
  justify-content: center;
}
.sai-score-ring {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}
.sai-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.sai-ring-bg {
  stroke: var(--bg-elevated);
}
.sai-ring-fill {
  stroke: var(--gold);
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s ease-out;
}
.sai-score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.sai-score-value {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 500;
  color: var(--gold-bright);
  line-height: 1;
}
.sai-score-max {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.sai-score-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sai-maturity-label {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.12em;
}
.sai-maturity-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 280px;
}
.sai-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* SAI Progress bar — Pioneering → Routine */
.sai-progress-track {
  margin: var(--space-md) 0 var(--space-lg);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.sai-progress-phases {
  display: flex;
  margin-bottom: 6px;
}
.sai-phase-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sai-phase-active {
  color: var(--gold);
  font-weight: 600;
}
.sai-progress-bar {
  position: relative;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: visible;
}
.sai-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-bright));
  border-radius: 3px;
  transition: width 1.2s ease-out;
}
.sai-progress-marker {
  position: absolute;
  top: -5px;
  width: 8px;
  height: 16px;
  background: var(--gold-bright);
  border-radius: 4px;
  transform: translateX(-4px);
  box-shadow: 0 0 8px var(--gold-glow-strong);
  transition: left 1.2s ease-out;
}

/* SAI Key metrics grid */
.sai-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.sai-metrics-grid-6 {
  grid-template-columns: repeat(3, 1fr);
}
.stat-card-gov {
  border-color: var(--gold-dim);
  position: relative;
}
.stat-card-gov::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold-dim);
  border-radius: 8px 8px 0 0;
}

/* SAI Government Funding Callout */
.sai-gov-funding { margin-bottom: var(--space-lg); }
.sai-gov-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: var(--space-md) var(--space-lg);
}
.sai-gov-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}
.sai-gov-icon { color: var(--gold); font-size: 0.85rem; }
.sai-gov-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.sai-gov-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: auto;
}
.sai-gov-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
.sai-gov-metric-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}
.sai-gov-metric-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}
.sai-gov-metric-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-primary);
}
.sai-gov-metric-delta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.sai-gov-metric-bar-track {
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 2px;
  margin-bottom: var(--space-xs);
}
.sai-gov-metric-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 2px;
  transition: width 0.8s ease-out;
}
.sai-gov-metric-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}
.sai-gov-growth {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}
.sai-gov-growth-label { color: var(--text-muted); }
.sai-gov-growth-val { color: var(--text-secondary); }

/* SAI Detail grid — trend + factors side by side */
.sai-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.sai-trend-panel,
.sai-factors-panel,
.sai-tiers-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-md);
}
.sai-panel-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}

/* SAI Trend chart (bar chart, vertical) */
.sai-trend-chart {
  position: relative;
  height: 200px;
}
.sai-trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100%;
  position: relative;
  z-index: 1;
}
.sai-trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.sai-trend-bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}
.sai-trend-bar-fill {
  width: 100%;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--gold-dim);
  position: relative;
  transition: height 0.6s ease-out;
}
.sai-trend-bar-fill.sai-bar-pioneering { background: var(--text-muted); }
.sai-trend-bar-fill.sai-bar-emerging { background: var(--gold-dim); }
.sai-trend-bar-fill.sai-bar-growth { background: var(--gold); }
.sai-trend-bar-fill.sai-bar-mature { background: var(--gold-bright); }
.sai-trend-bar-fill.sai-bar-routine { background: var(--success); }
.sai-trend-bar-tip {
  display: none;
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--gold-bright);
  white-space: nowrap;
}
.sai-trend-col:hover .sai-trend-bar-tip {
  display: block;
}
.sai-trend-year {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.sai-trend-bands {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.sai-trend-band {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.015);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.sai-trend-band-current {
  background: var(--gold-glow);
  border-bottom-color: rgba(212,168,67,0.08);
}

/* SAI Factor rows */
.sai-factor-row {
  margin-bottom: 8px;
}
.sai-factor-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.sai-factor-tier {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--gold-dim);
  background: var(--gold-glow);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.06em;
}
.sai-factor-name {
  font-size: 0.72rem;
  color: var(--text-secondary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sai-factor-score {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-primary);
}
.sai-factor-bar-track {
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 2px;
}
.sai-factor-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.8s ease-out;
}

/* SAI Tier breakdown rows */
.sai-tier-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 10px;
}
.sai-tier-label {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sai-tier-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gold);
  font-weight: 600;
}
.sai-tier-name {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sai-tier-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
}
.sai-tier-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 3px;
  transition: width 0.8s ease-out;
}
.sai-tier-value {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  width: 60px;
  text-align: right;
  flex-shrink: 0;
}

/* SAI Confidence badges */
.sai-confidence-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
  line-height: 1.4;
}
.sai-conf-reported {
  background: rgba(46, 204, 113, 0.15);
  color: #2ECC71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}
.sai-conf-derived {
  background: rgba(212, 168, 67, 0.15);
  color: var(--gold-bright);
  border: 1px solid rgba(212, 168, 67, 0.3);
}
.sai-conf-estimated {
  background: rgba(231, 76, 60, 0.15);
  color: #E88D64;
  border: 1px solid rgba(231, 76, 60, 0.25);
}

/* SAI Transparency card */
.sai-transparency-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-md);
  margin-top: var(--space-md);
}
.sai-transparency-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  margin: var(--space-sm) 0 var(--space-md);
  background: var(--bg-elevated);
}
.sai-transparency-seg {
  height: 100%;
  transition: width 0.8s ease-out;
}
.sai-transparency-seg.sai-conf-reported {
  background: #2ECC71;
  border: none;
}
.sai-transparency-seg.sai-conf-derived {
  background: var(--gold);
  border: none;
}
.sai-transparency-seg.sai-conf-estimated {
  background: #E88D64;
  border: none;
}
.sai-transparency-stats {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-sm);
}
.sai-transparency-stat {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.sai-transparency-val {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.sai-transparency-total {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* SAI Legend */
.sai-legend {
  border-top: 1px solid var(--border);
  padding-top: var(--space-sm);
  margin-top: var(--space-sm);
}
.sai-legend-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}
.sai-legend-item {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* SAI Factors needing live sources */
.sai-live-sources {
  border-top: 1px solid var(--border);
  padding-top: var(--space-sm);
  margin-top: var(--space-sm);
}
.sai-live-source-item {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* SAI Responsive */
@media (max-width: 768px) {
  .sai-hero {
    flex-direction: column;
    text-align: center;
  }
  .sai-score-meta {
    align-items: center;
  }
  .sai-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sai-metrics-grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
  .sai-detail-grid {
    grid-template-columns: 1fr;
  }
  .sai-tier-label {
    width: 140px;
  }
  .sai-transparency-stats {
    flex-direction: column;
    gap: var(--space-xs);
  }
  .sai-gov-metrics {
    grid-template-columns: 1fr;
  }
  .sai-corr-pair-header {
    font-size: 0.65rem;
  }
  .sai-corr-pair-strength {
    display: none;
  }
  .sai-scenario-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
  .sai-scenario-actions {
    flex-wrap: wrap;
  }
}

/* ── SAI DRILL-DOWN: Factor Detail Panels ───────────────────── */
.sai-factor-clickable {
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.sai-factor-clickable:hover { background: rgba(212, 168, 67, 0.06); }
/* Expand chevron for clickable rows */
.sai-expand-chevron {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
  display: inline-block;
  margin-left: auto;
  padding-left: var(--space-sm);
  flex-shrink: 0;
}
.sai-factor-clickable:hover .sai-expand-chevron,
.sai-tier-clickable:hover .sai-expand-chevron { color: var(--gold-dim); }
.expanded .sai-expand-chevron { transform: rotate(90deg); color: var(--gold); }

.sai-factor-clickable.expanded { background: rgba(212, 168, 67, 0.04); }
.sai-factor-detail {
  padding: var(--space-md);
  margin: 0 var(--space-sm) var(--space-md);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-dim);
  border-radius: 0 0 8px 8px;
  animation: slideDown 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.sai-factor-detail .sai-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}
.sai-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-md);
}
.sai-detail-card-wide { grid-column: 1 / -1; }
.sai-detail-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  font-weight: 400;
  text-transform: uppercase;
}
.sai-detail-range { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--text-secondary); }
.sai-range-floor, .sai-range-ceil { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); }
.sai-range-bar-track { flex: 1; height: 4px; background: var(--bg-elevated); border-radius: 2px; }
.sai-range-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); border-radius: 2px; }
.sai-detail-raw, .sai-detail-weight {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 6px;
}
.sai-detail-weight { color: var(--text-muted); }

/* ── SAI Factor Drill-Down: Explainer ──────────────────────── */
.sai-detail-explainer {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: rgba(212, 168, 67, 0.04);
  border-left: 2px solid var(--gold-dim);
  border-radius: 0 8px 8px 0;
}
.sai-detail-desc {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 6px;
}
.sai-detail-drivers {
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}
.sai-detail-drivers strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── SAI Factor Drill-Down: Stats Row ──────────────────────── */
.sai-detail-stats-row {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.sai-detail-stat {
  flex: 1;
  min-width: 80px;
  text-align: center;
}
.sai-detail-stat-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}
.sai-detail-stat-unit {
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 2px;
}
.sai-detail-stat-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
}

/* ── SAI Factor Drill-Down: Scoring Range (full) ───────────── */
.sai-detail-range-full {
  margin-bottom: var(--space-md);
}
.sai-detail-range-full .sai-detail-range {
  margin-bottom: 4px;
}
.sai-range-marker {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--bg-deep);
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}
.sai-range-bar-fill {
  position: relative;
}
.sai-detail-range-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
}

/* ── SAI Concentration Player Breakdown ────────────────────── */
.sai-conc-players {
  margin-top: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sai-conc-player {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
}
.sai-conc-player-rank {
  color: var(--text-muted);
  width: 12px;
  text-align: right;
  flex-shrink: 0;
}
.sai-conc-player-name {
  color: var(--text-secondary);
  min-width: 60px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.sai-conc-player-bar-track {
  flex: 1;
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}
.sai-conc-player-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.sai-conc-player-share {
  color: var(--text-muted);
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* ── SAI Factor History: Enhanced ──────────────────────────── */
.sai-detail-history-summary {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.sai-detail-history-summary strong {
  color: var(--text-primary);
  font-weight: 500;
}
.sai-detail-history-arrow {
  color: var(--gold-dim);
}
.sai-detail-history-growth {
  color: var(--success);
  font-weight: 500;
}
.sai-detail-history-cagr {
  color: var(--text-secondary);
  padding-left: var(--space-sm);
  border-left: 1px solid var(--border);
}
.sai-detail-hist-val {
  font-family: var(--font-mono);
  font-size: 0.42rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}
.sai-detail-hist-col:hover .sai-detail-hist-val {
  opacity: 1;
}
.sai-detail-hist-bar-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  min-height: 0;
}

/* ── SAI Geographic Breakdown ───────────────────────────────── */
.sai-geo-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: var(--space-sm);
  background: var(--bg-elevated);
}
.sai-geo-seg { min-width: 3px; transition: width 0.3s ease; }
.sai-geo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}
.sai-geo-legend-item { display: flex; align-items: center; gap: 4px; }
.sai-geo-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ── SAI Concentration Meter ────────────────────────────────── */
.sai-conc-meter { display: flex; align-items: center; gap: var(--space-sm); }
.sai-conc-bar-track {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}
.sai-conc-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}
.sai-conc-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}
.sai-conc-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 3px;
}
.sai-conc-low { background: rgba(46, 204, 113, 0.12); color: var(--success); }
.sai-conc-moderate { background: var(--gold-glow); color: var(--gold); }
.sai-conc-high { background: rgba(231, 76, 60, 0.12); color: var(--danger); }
.sai-conc-top {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* ── SAI Momentum Arrows ────────────────────────────────────── */
.sai-momentum-arrow { font-size: 0.6rem; margin-left: 4px; vertical-align: middle; }
.sai-momentum-up { color: var(--success); }
.sai-momentum-down { color: var(--danger); }
.sai-momentum-flat { color: var(--text-muted); }
.sai-momentum-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}
.sai-momentum-detail {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.8;
}
.sai-momentum-detail strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── SAI Factor History Mini-Chart ──────────────────────────── */
.sai-detail-history {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 72px;
}
.sai-detail-hist-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  cursor: default;
}
.sai-detail-hist-bar-wrap,
.sai-detail-hist-col > .sai-detail-hist-bar {
  flex: 1;
  display: flex;
  align-items: flex-end;
  width: 100%;
}
.sai-detail-hist-bar {
  width: 100%;
  background: var(--gold-dim);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height 0.4s ease, background 0.15s ease;
}
.sai-detail-hist-col:hover .sai-detail-hist-bar { background: var(--gold); }
.sai-detail-hist-yr {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  color: var(--text-muted);
  margin-top: 2px;
  flex-shrink: 0;
}

/* ── SAI Tier Expansion ─────────────────────────────────────── */
.sai-tier-clickable {
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.sai-tier-clickable:hover { background: rgba(212, 168, 67, 0.06); }
.sai-tier-clickable.expanded { background: rgba(212, 168, 67, 0.04); }
.sai-tier-detail {
  padding: var(--space-sm) var(--space-md);
  margin: 0 var(--space-sm) var(--space-md);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  animation: slideDown 0.2s ease;
}
.sai-tier-factors { display: flex; flex-direction: column; gap: 0; }
.sai-tier-factor-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.72rem;
  color: var(--text-secondary);
  padding: 8px var(--space-sm);
  border-bottom: 1px solid var(--border);
  transition: background 0.1s ease;
}
.sai-tier-factor-item:last-child { border-bottom: none; }
.sai-tier-factor-item:hover { background: rgba(255, 255, 255, 0.02); }
.sai-tier-factor-name { flex: 1; }
.sai-tier-factor-score {
  font-family: var(--font-mono);
  color: var(--gold);
  font-weight: 500;
  font-size: 0.7rem;
}
.sai-tier-factor-weight {
  font-family: var(--font-mono);
  width: 50px;
  text-align: right;
  color: var(--text-muted);
  font-size: 0.65rem;
}

/* ── SAI Scenario Modeling ──────────────────────────────────── */
.sai-scenario-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-md);
}
.sai-scenario-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}
.sai-scenario-actions {
  display: flex;
  gap: var(--space-xs);
}
.sai-scenario-preset,
.sai-scenario-reset {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sai-scenario-preset:hover { border-color: var(--border-gold); color: var(--gold); }
.sai-scenario-preset.active { background: var(--gold-glow); border-color: var(--gold-dim); color: var(--gold); }
.sai-scenario-reset { border-color: var(--border); }
.sai-scenario-reset:hover { color: var(--text-primary); border-color: var(--text-muted); }
.sai-scenario-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}
.sai-scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2px var(--space-lg);
  max-height: 420px;
  overflow-y: auto;
  padding-right: var(--space-xs);
}
.sai-scenario-slider {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.sai-scenario-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.sai-scenario-label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sai-scenario-weight {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
}
.sai-scenario-slider-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.sai-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}
.sai-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
}
.sai-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: none;
}
.sai-scenario-val {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold);
  width: 30px;
  text-align: right;
}
.sai-scenario-result {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}
.sai-scenario-composite {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  font-family: var(--font-mono);
}
.sai-scenario-actual-block,
.sai-scenario-projected-block { text-align: center; }
.sai-scenario-block-label {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.sai-scenario-actual-block .sai-scenario-block-score {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
}
.sai-scenario-projected-block .sai-scenario-block-score {
  font-size: 1.6rem;
  color: var(--gold-bright);
  font-weight: 600;
}
.sai-scenario-block-maturity {
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.sai-scenario-projected-block .sai-scenario-block-maturity { color: var(--gold-dim); }
.sai-scenario-arrow { color: var(--gold-dim); font-size: 0.85rem; }
.sai-scenario-delta {
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 500;
}
.sai-scenario-delta-up { background: rgba(46, 204, 113, 0.12); color: var(--success); }
.sai-scenario-delta-down { background: rgba(231, 76, 60, 0.12); color: var(--danger); }
.sai-scenario-changed-count {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}
.sai-scenario-val-changed { color: var(--gold-bright) !important; font-weight: 600; }

/* ── SAI Factor Relationships ──────────────────────────────── */
.sai-corr-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-md);
}
.sai-corr-intro {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 var(--space-lg);
}

/* Summary stats row */
.sai-corr-summary-stats {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.sai-corr-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 80px;
}
.sai-corr-stat-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.sai-corr-stat-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: center;
  margin-top: 2px;
}

/* Relationship groups */
.sai-corr-group {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.sai-corr-group:last-child { margin-bottom: 0; }
.sai-corr-group-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 500;
}
.sai-corr-group-insight {
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Pair items */
.sai-corr-pair {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.sai-corr-pair:last-child { border-bottom: none; }
.sai-corr-pair-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.sai-corr-pair-factor {
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.sai-corr-pair-vs {
  color: var(--text-muted);
  font-size: 0.6rem;
}
.sai-corr-pair-data {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.sai-corr-pair-bar-track {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}
.sai-corr-pair-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.sai-corr-pair-bar.sai-corr-weak { background: var(--text-muted); }
.sai-corr-pair-bar.sai-corr-neg { background: var(--info); }
.sai-corr-pair-bar.sai-corr-strong { background: var(--gold); }
.sai-corr-pair-val {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  width: 42px;
  text-align: right;
  flex-shrink: 0;
}
.sai-corr-pair-val.sai-corr-weak { color: var(--text-muted); }
.sai-corr-pair-val.sai-corr-neg { color: var(--info); }
.sai-corr-pair-val.sai-corr-strong { color: var(--gold); }
.sai-corr-pair-strength {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  width: 55px;
  text-align: right;
  flex-shrink: 0;
}

/* ── SAI Year Popup ─────────────────────────────────────────── */
.sai-year-popup {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: var(--space-md);
  z-index: 10;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}
.sai-year-popup-header {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sai-year-popup-header strong { color: var(--gold); }
.sai-year-popup-close {
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
  padding: 2px 4px;
}
.sai-year-popup-close:hover { color: var(--text-primary); }
.sai-year-popup-factors { font-family: var(--font-mono); font-size: 0.65rem; }
.sai-year-popup-factor {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.sai-year-popup-factor:last-child { border-bottom: none; }
.sai-year-popup-factor span:last-child { font-family: var(--font-mono); font-weight: 500; }
.sai-year-popup-score {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 2px;
}
.sai-year-popup-score-val {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--gold-bright);
  line-height: 1;
}
.sai-year-popup-score-max {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.sai-year-popup-maturity {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}
.sai-year-popup-delta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-bottom: var(--space-sm);
}
.sai-year-popup-conf {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}
.sai-year-popup-section-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--border);
}

/* ── SAI Trend Projected Bar ────────────────────────────────── */
.sai-trend-col-clickable { cursor: pointer; }
.sai-trend-col-clickable:hover .sai-trend-bar-fill { opacity: 0.8; }
.sai-trend-col-projected { opacity: 0.5; }
.sai-bar-projected {
  background: var(--gold) !important;
  border: 2px dashed var(--gold) !important;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 3px,
    rgba(212, 168, 67, 0.3) 3px,
    rgba(212, 168, 67, 0.3) 6px
  ) !important;
}
.sai-trend-chart { position: relative; }

/* ============================================================
   10c. HISTORICAL LAUNCH DATA
   ============================================================ */

.history-about {
  display: flex;
  gap: var(--space-md);
  background: rgba(212, 168, 67, 0.04);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-radius: 8px;
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.history-about-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.history-about-text {
  flex: 1;
}

.history-about-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 var(--space-xs);
}

.history-about-text p {
  margin: 0 0 var(--space-xs);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.history-about-source {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.history-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.history-chart-container {
  margin-bottom: var(--space-xl);
}

.history-chart-title {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin: 0 0 var(--space-md);
}

.hchart-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 200px;
  padding-bottom: var(--space-md);
}

.hchart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.hchart-count {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  opacity: 0.8;
}

.hchart-stack {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 2px 2px 0 0;
  overflow: hidden;
}

.hchart-bar {
  width: 100%;
  min-height: 0;
  transition: height 0.6s ease;
}

.hchart-bar-success {
  background: var(--gold);
  opacity: 0.85;
}

.hchart-bar-fail {
  background: #E05252;
  opacity: 0.9;
}

.hchart-bar-partial {
  background: #D4A843;
  opacity: 0.4;
}

.hchart-year {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 6px;
  opacity: 0.7;
}

.history-rankings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.history-ranking-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-lg);
}

.history-ranking-title {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin: 0 0 var(--space-md);
}

.ranking-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.ranking-row:last-child {
  border-bottom: none;
}

.ranking-rank {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  width: 20px;
  text-align: right;
  opacity: 0.5;
}

.ranking-name {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--text-primary);
  width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-bar-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
  overflow: hidden;
}

.ranking-bar-fill {
  height: 100%;
  background: var(--gold);
  opacity: 0.6;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.ranking-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
  width: 40px;
  text-align: right;
}

/* ============================================================
   11. EMAIL CAPTURE CTA — Ghost button style
   ============================================================ */
.cta-section {
  position: relative;
  z-index: 1;
  padding: 0 var(--space-xl);
  margin-bottom: var(--space-2xl);
  max-width: calc(var(--max-width) + var(--space-xl) * 2);
  margin-left: auto;
  margin-right: auto;
}

.cta-inner {
  position: relative;
  border: 1px solid var(--border-gold);
  padding: var(--space-xl) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  overflow: hidden;
}

/* Subtle orbital line decoration */
.cta-orbit-line {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  opacity: 0.15;
  pointer-events: none;
}

.cta-headline {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.cta-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.cta-form {
  display: flex;
  gap: 1px;
  flex-shrink: 0;
}

.cta-input {
  width: 220px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-right: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s ease;
}

.cta-input::placeholder {
  color: var(--text-muted);
}

.cta-input:focus {
  border-color: var(--gold-dim);
}

/* Ghost button — SpaceX style */
.cta-button {
  padding: 10px 20px;
  border: 1px solid var(--gold-dim);
  background: transparent;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cta-button:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

.subscribe-success {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.subscribe-success strong {
  color: var(--gold);
}

.subscribe-error {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #E8735A;
  letter-spacing: 0.04em;
  margin-top: var(--space-xs);
  width: 100%;
}

.cta-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--border);
  color: var(--text-muted);
}

.cta-button:disabled:hover {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

/* ============================================================
   12. FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 1;
  padding: var(--space-xl);
  max-width: calc(var(--max-width) + var(--space-xl) * 2);
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .reliability-grid,
  .newsletter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rel-drill-stats { grid-template-columns: repeat(3, 1fr); }
  .launch-detail-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-drill-panel > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .history-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .history-rankings {
    grid-template-columns: 1fr;
  }

  .hchart-count {
    display: none;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .launch-table {
    min-width: 640px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .header {
    height: auto;
    padding: var(--space-md) var(--space-lg);
  }

  .nav {
    gap: var(--space-md);
    overflow-x: auto;
    width: 100%;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-form {
    width: 100%;
  }

  .cta-input {
    flex: 1;
    width: auto;
  }

  .live-banner-inner {
    flex-wrap: wrap;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-meta {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  :root {
    --space-xl: 20px;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
    padding: 0 var(--space-xl);
  }

  .stat-value {
    font-size: 24px;
  }

  .reliability-grid,
  .newsletter-grid {
    grid-template-columns: 1fr;
  }

  .history-stats {
    grid-template-columns: 1fr 1fr;
  }

  .history-about {
    flex-direction: column;
  }

  .rel-drill-stats { grid-template-columns: repeat(2, 1fr); }
  .launch-detail-grid { grid-template-columns: 1fr; }
  .stat-drill-bar-label { min-width: 70px; }

  .ranking-name {
    width: 100px;
  }

  .hero {
    min-height: 45vh;
    padding: 100px var(--space-xl) var(--space-xl);
  }

  .countdown-group {
    min-width: 56px;
  }

  .countdown-value {
    font-size: 36px;
  }

  .countdown-sep {
    font-size: 28px;
  }

  .live-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .live-countdown {
    text-align: left;
  }

  .cta-form {
    flex-direction: column;
  }

  .cta-input {
    width: 100%;
    border-right: 1px solid var(--border);
  }

  .nav-link {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .nav-page-link {
    font-size: 10px;
    letter-spacing: 0.1em;
  }
}

/* ============================================================
   Multi-Page Navigation
   ============================================================ */

.nav-page-link {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-page-link:hover {
  background: var(--gold-glow);
  color: var(--gold-bright);
}

.nav-page-link.active {
  background: var(--gold-glow-strong);
  color: var(--gold-bright);
}

.nav-divider {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 8px;
  vertical-align: middle;
}

/* ============================================================
   Newsletter Teaser (Home Page)
   ============================================================ */

.teaser-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.teaser-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s ease;
}

.teaser-item:hover {
  border-color: var(--border-gold);
}

.teaser-title {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  text-decoration: none;
}

.teaser-title:hover {
  color: var(--gold);
}

.teaser-section {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.teaser-cta {
  display: inline-block;
  margin-top: var(--space-md);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-decoration: none;
  padding: 10px 24px;
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.teaser-cta:hover {
  background: var(--gold-glow);
  color: var(--gold-bright);
}

/* ============================================================
   Newsletter Page
   ============================================================ */

.nl-hero {
  padding: var(--space-3xl) var(--space-xl) var(--space-xl);
  text-align: center;
}

.nl-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.nl-hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.nl-hero-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.nl-hero-sub {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto var(--space-md);
  line-height: 1.5;
}

.nl-hero-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

/* Deep Dive container on newsletter page */
.deep-dive-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.deep-dive-wrap {
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
}

.deep-dive-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  background: var(--gold-glow);
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: var(--space-md);
}

.deep-dive-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.deep-dive-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.deep-dive-title a:hover {
  color: var(--gold);
}

.deep-dive-content {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.deep-dive-content h3 {
  font-size: 18px;
  margin: 20px 0 8px;
  color: var(--text-primary);
}

.deep-dive-content p {
  margin: 0 0 14px;
}

/* Newsletter embed via Shadow DOM */
.newsletter-embed-container {
  max-width: 720px;
  margin: 0 auto;
}

.newsletter-shadow-host {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Inline CTA variant */
.cta-inline {
  margin-top: 0;
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

/* Deal Flow table */
.deal-table {
  max-width: var(--max-width);
}

.deal-table .td-vehicle-operator {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Archive */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
}

.archive-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-md);
  transition: border-color 0.2s ease;
}

.archive-item:hover {
  border-color: var(--border-gold);
}

.archive-item-current {
  border-color: var(--gold-dim);
}

.archive-issue {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: var(--space-xs);
}

.archive-date {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.archive-topic {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.archive-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Editorial Intro (web-native) ── */
.nl-editorial {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.nl-editorial-text {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-secondary);
  font-style: italic;
  max-width: 720px;
  margin: 0 auto;
}

/* ── AstraVeris View (web-native) ── */
.av-view-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-xl);
}

.av-view-content {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-lg);
  border-left: 4px solid var(--gold);
  background: linear-gradient(180deg, rgba(212, 168, 67, 0.06) 0%, rgba(212, 168, 67, 0.02) 100%);
  border-radius: 0 4px 4px 0;
}

.av-view-content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0 0 var(--space-md);
}

.av-view-content p:last-child {
  margin-bottom: 0;
}

/* ── Deal Commentary (web-native) ── */
.deal-commentary-web {
  max-width: var(--max-width);
  margin: var(--space-md) auto 0;
  padding: var(--space-md) var(--space-lg);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  font-style: italic;
  border-top: 1px solid var(--border);
}

/* ── What We're Watching (web-native) ── */
.watching-section {
  max-width: var(--max-width);
  margin: 0 auto;
}

.watching-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.watching-list-item {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.watching-list-item:last-child {
  border-bottom: none;
}

.watching-chevron {
  color: var(--gold);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

/* ── Deep Dive pull quotes (web-native) ── */
.deep-dive-content blockquote {
  border-left: 3px solid var(--gold);
  margin: var(--space-lg) 0;
  padding: var(--space-md) var(--space-lg);
  background: var(--gold-glow);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  font-style: italic;
  border-radius: 0 4px 4px 0;
}

.deep-dive-content blockquote p {
  margin: 0;
}

/* ── Top Stories (web-native) ── */
.top-story-card {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.top-story-card:last-child {
  border-bottom: none;
}

.top-story-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.top-story-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.35;
  flex: 1;
}

.top-story-title:hover {
  color: var(--gold);
}

.top-story-summary {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Curated Section Items (web-native) ── */
.curated-item {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.curated-item:last-child {
  border-bottom: none;
}

.curated-item-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 4px;
}

.curated-item-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.35;
  flex: 1;
}

.curated-item-title:hover {
  color: var(--gold);
}

.curated-item-summary {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

/* ── News Meta Row (section tag + source) ── */
.news-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.news-section-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 500;
  background: var(--gold-glow);
  padding: 2px 8px;
  border-radius: 3px;
}

.news-meta-row .news-source {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 0;
}

/* ============================================================
   Government Grants Page
   ============================================================ */

.grants-intro {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 var(--space-lg);
  max-width: 680px;
}

/* --- Shared Panel Card --- */
.grants-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-md);
}

/* --- Agency Cards --- */
.grants-agency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.grants-agency-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-md);
  transition: border-color 0.2s;
}
.grants-agency-card:hover {
  border-color: var(--border-gold);
}
.grants-agency-card-top {
  border-color: var(--gold-dim);
  position: relative;
}
.grants-agency-card-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 8px 8px 0 0;
}
.grants-agency-name {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  margin-bottom: var(--space-sm);
}
.grants-agency-total {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.grants-agency-meta {
  display: flex;
  gap: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* --- Coverage Note --- */
.grants-coverage-note {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: var(--space-sm);
}
.grants-coverage-icon {
  color: var(--gold-dim);
  margin-right: 4px;
}

/* --- Trend Chart (bar chart) --- */
.grants-trend-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-md);
}
.grants-trend-panel-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}
.grants-trend-chart {
  position: relative;
  min-height: 220px;
  margin-bottom: var(--space-md);
}
.grants-trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 200px;
  position: relative;
  z-index: 1;
}
.grants-trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.grants-trend-bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}
.grants-trend-bar-fill {
  width: 100%;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--gold);
  position: relative;
  transition: height 0.6s ease-out;
}
.grants-trend-col:hover .grants-trend-bar-fill {
  background: var(--gold-bright);
}
.grants-trend-bar-tip {
  display: none;
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--gold-bright);
  white-space: nowrap;
}
.grants-trend-col:hover .grants-trend-bar-tip {
  display: block;
}
.grants-trend-year {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.grants-trend-summary {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}
.grants-trend-summary strong {
  color: var(--text-primary);
}
.grants-trend-arrow {
  color: var(--gold-dim);
}
.grants-trend-growth {
  color: var(--success);
}
.grants-trend-cagr {
  color: var(--text-muted);
}

/* --- Awards Table --- */
.grants-award-table th {
  white-space: nowrap;
}
.grants-sort-header {
  cursor: pointer;
  user-select: none;
}
.grants-sort-header:hover {
  color: var(--gold);
}
.grants-amount-cell {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--gold-bright);
  text-align: right;
  white-space: nowrap;
}
.grants-award-large {
  border-left: 3px solid var(--gold) !important;
}
.grants-type-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

/* --- FY Filter --- */
.grants-fy-filter {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.grants-fy-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.grants-fy-select {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
  background: var(--bg-card, #111827);
  border: 1px solid var(--gold-dim, rgba(212,168,67,0.3));
  padding: 5px 12px;
  border-radius: 3px;
  cursor: pointer;
  appearance: auto;
}
.grants-fy-select:focus {
  outline: 1px solid var(--gold);
}

/* --- Awards pagination --- */
.grants-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-md) 0 var(--space-xs);
}
.grants-page-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold-dim, rgba(212,168,67,0.3));
  padding: 4px 14px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.grants-page-btn:hover:not([disabled]) {
  background: var(--gold);
  color: var(--bg-deep);
}
.grants-page-btn[disabled] {
  opacity: 0.3;
  cursor: default;
}
.grants-page-info {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.grants-page-count {
  opacity: 0.6;
}

/* --- Programs (horizontal bars) --- */
.grants-program-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}
.grants-program-row:last-child {
  border-bottom: none;
}
.grants-program-rank {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}
.grants-program-info {
  flex: 1;
  min-width: 0;
}
.grants-program-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grants-program-bar-track {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}
.grants-program-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.6s ease-out;
}
.grants-program-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 2px;
}
.grants-program-total {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gold-bright);
}
.grants-program-count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* --- Recipients Table --- */
.grants-rank {
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: center;
  width: 32px;
}
.grants-bar-cell {
  width: 120px;
  padding: 0 var(--space-sm) !important;
}
.grants-inline-bar {
  height: 6px;
  background: var(--gold);
  border-radius: 3px;
  min-width: 2px;
  transition: width 0.4s ease-out;
}

/* --- SBIR/STTR Pathways --- */
.grants-pathways-intro {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}
.grants-pathways-intro p {
  margin: 0;
}
.grants-pathways-intro strong {
  color: var(--text-secondary);
}
.grants-pathways-phases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
@media (max-width: 640px) {
  .grants-pathways-phases { grid-template-columns: 1fr; }
}
.grants-pathway-phase {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-md);
  text-align: center;
}
.grants-pathway-phase-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: var(--space-xs);
}
.grants-pathway-phase-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.grants-pathway-phase-desc {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.grants-sbir-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin-bottom: var(--space-md);
}
@media (max-width: 640px) {
  .grants-sbir-summary { grid-template-columns: 1fr; }
}
.grants-sbir-recent-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}
.grants-sbir-recent {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.grants-sbir-item {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-sm) var(--space-md);
}
.grants-sbir-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.grants-sbir-recipient {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}
.grants-sbir-amount {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gold-bright);
}
.grants-sbir-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 4px;
}
.grants-sbir-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* --- Grants Drill-Down Panels --- */
.grants-expand-chevron {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
  display: inline-block;
  margin-left: 6px;
  flex-shrink: 0;
}
.grants-agency-clickable,
.grants-program-clickable { cursor: pointer; }
.grants-agency-clickable:hover .grants-expand-chevron,
.grants-program-clickable:hover .grants-expand-chevron { color: var(--gold-dim); }
.grants-expanded .grants-expand-chevron { transform: rotate(90deg); color: var(--gold); }
.grants-expanded { background: rgba(212, 168, 67, 0.04); }

.grants-agency-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Agency drill-down panel spans the full grid width */
.grants-agency-grid > .grants-drill-panel {
  grid-column: 1 / -1;
}

.grants-drill-panel {
  padding: var(--space-md);
  margin: var(--space-sm) 0 var(--space-md);
  background: var(--bg-deep, #080c16);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-dim, rgba(212,168,67,0.3));
  border-radius: 0 0 8px 8px;
  animation: slideDown 0.2s ease;
}
.grants-drill-panel.grants-drill-year {
  margin-top: var(--space-md);
}
.grants-drill-panel.grants-drill-award {
  margin: 0;
  border-top: none;
  border-radius: 0;
}
.grants-drill-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.grants-drill-close {
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: 0 4px;
}
.grants-drill-close:hover { color: var(--gold); }

.grants-drill-stats {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.grants-drill-stats span { white-space: nowrap; }

/* Grid layout inside drill-down panels */
.grants-drill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
@media (max-width: 700px) {
  .grants-drill-grid { grid-template-columns: 1fr; }
}
.grants-drill-full { grid-column: 1 / -1; }

.grants-drill-section {
  margin-bottom: 0;
}
.grants-drill-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
}
.grants-drill-empty {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  padding: var(--space-sm) 0;
}
.grants-drill-more {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: right;
  padding-top: var(--space-xs);
}

/* Drill-down mini table */
.grants-drill-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}
.grants-drill-table th {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
}
.grants-drill-table td {
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-secondary);
}

/* Drill-down mini bars */
.grants-drill-bars { display: flex; flex-direction: column; gap: 4px; }
.grants-drill-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.72rem;
}
.grants-drill-bar-label {
  min-width: 80px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grants-drill-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
  overflow: hidden;
}
.grants-drill-bar-fill {
  height: 100%;
  background: var(--gold-dim, rgba(212,168,67,0.4));
  border-radius: 3px;
  transition: width 0.3s ease;
}
.grants-drill-bar-val {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  min-width: 55px;
  text-align: right;
}

/* Drill-down FY trend rows */
.grants-drill-fy-trend { display: flex; flex-direction: column; gap: 3px; }
.grants-drill-fy-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
}
.grants-drill-fy-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-secondary);
  min-width: 32px;
  flex-shrink: 0;
}
.grants-drill-fy-val {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-secondary);
  min-width: 48px;
  text-align: right;
  flex-shrink: 0;
}
.grants-drill-fy-count {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  min-width: 20px;
  text-align: right;
  flex-shrink: 0;
}
.grants-drill-fy-count::before { content: '('; }
.grants-drill-fy-count::after { content: ')'; }

/* Drill-down sparkline mini chart */
.grants-drill-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 60px;
  padding-bottom: 14px;
  position: relative;
}
.grants-drill-spark-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}
.grants-drill-spark-bar {
  width: 100%;
  max-width: 20px;
  background: var(--gold-dim, rgba(212,168,67,0.35));
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height 0.3s ease;
}
.grants-drill-spark-col:hover .grants-drill-spark-bar {
  background: var(--gold);
}
.grants-drill-spark-yr {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--text-muted);
  position: absolute;
  bottom: -12px;
}

/* Award row drill-down */
.grants-award-row { transition: background 0.15s ease; }
.grants-award-row:hover { background: rgba(212, 168, 67, 0.04); }
.grants-award-expanded { background: rgba(212, 168, 67, 0.06) !important; }
.grants-award-detail-row td { padding: 0 !important; border-bottom: 2px solid var(--gold-dim, rgba(212,168,67,0.2)); }

.grants-drill-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}
.grants-drill-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-sm);
}
.grants-drill-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.grants-drill-detail-key {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.grants-drill-detail-val {
  font-size: 0.8rem;
  color: var(--text-primary, #e2e8f0);
}
.grants-drill-source {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold);
  text-decoration: none;
  margin-top: var(--space-sm);
  padding: 4px 0;
}
.grants-drill-source:hover { text-decoration: underline; }

/* Trend bar active highlight */
.grants-trend-clickable { cursor: pointer; transition: opacity 0.15s ease; }
.grants-trend-clickable:hover .grants-trend-bar-fill { background: var(--gold) !important; }
.grants-trend-active .grants-trend-bar-fill { background: var(--gold) !important; }
.grants-trend-active .grants-trend-year { color: var(--gold); }

/* ============================================================
   CATALOG PAGE
   ============================================================ */

/* --- Constellation Cards --- */
.constellation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.constellation-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: var(--space-md);
  transition: border-color 0.2s;
}
.constellation-card:hover {
  background: var(--bg-elevated);
  border-color: var(--border-gold);
  border-left-color: var(--gold-bright);
}
.constellation-card-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.constellation-card-operator {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-dim);
  margin-bottom: var(--space-sm);
}
.constellation-card-meta {
  display: flex;
  gap: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.constellation-card-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.constellation-card-stat-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.constellation-card-stat-value {
  font-weight: 500;
  color: var(--text-primary);
}

/* --- Orbit Census Bars --- */
.orbit-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}
.orbit-bar-row:last-child {
  border-bottom: none;
}
.orbit-bar-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  width: 120px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.orbit-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-deep);
  border-radius: 2px;
  overflow: hidden;
}
.orbit-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.6s ease-out;
}
.orbit-bar-value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  width: 72px;
  flex-shrink: 0;
  text-align: right;
}
.orbit-bar-pct {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  width: 48px;
  flex-shrink: 0;
  text-align: right;
}

/* --- Deployments Table --- */
.deployments-table {
  width: 100%;
  border-collapse: collapse;
}
.deployments-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  font-weight: 400;
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
.deployments-table td {
  padding: var(--space-md);
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.deployments-table tbody tr {
  transition: background 0.15s ease;
}
.deployments-table tbody tr:nth-child(even) {
  background: var(--bg-card);
}
.deployments-table tbody tr:nth-child(odd) {
  background: var(--bg-deep);
}
.deployments-table tbody tr:hover {
  background: var(--bg-elevated);
  border-left: 2px solid var(--gold);
}
.deployments-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- Health Bar --- */
.health-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-deep);
  border-radius: 3px;
  overflow: hidden;
  margin: var(--space-sm) 0 4px;
}
.health-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease-out;
}
.health-bar-fill.health-good {
  background: var(--gold-bright);
}
.health-bar-fill.health-warn {
  background: var(--gold-dim);
}
.health-bar-fill.health-critical {
  background: #7a4a2a;
}

/* --- Decay Forecast --- */
.decay-summary-row {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
.decay-stat-card {
  flex: 1;
  min-width: 100px;
}
.decay-filters {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}
.decay-filter-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.decay-filter-pill:hover {
  color: var(--text-primary);
  border-color: var(--gold-dim);
  background: var(--bg-elevated);
}
.decay-filter-pill.active {
  color: var(--bg-deep);
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 500;
}
.decay-table-header {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}
.decay-rate-negative {
  color: #b86a5a;
  font-family: var(--font-mono);
}
.decay-conf-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 3px;
}
.decay-conf-badge.conf-high {
  color: #e8c547;
  background: rgba(232, 197, 71, 0.12);
  border: 1px solid rgba(232, 197, 71, 0.25);
}
.decay-conf-badge.conf-medium {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}
.decay-conf-badge.conf-low {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.urgency-critical-text { color: #d4705a; }
.urgency-warn-text { color: #e8c547; }
.urgency-normal-text { color: var(--text-secondary); }
tr.urgency-critical { border-left: 3px solid #d4705a; }
tr.urgency-warn { border-left: 3px solid #e8c547; }

/* --- Decay Subsection Titles --- */
.decay-subsection-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-dim);
  margin: var(--space-xl) 0 var(--space-sm) 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

/* --- Decay History Bar Chart --- */
.decay-history-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  padding: var(--space-md) 0;
}
.decay-history-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.decay-history-bar-value {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.decay-history-bar-track {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
}
.decay-history-bar-fill {
  width: 100%;
  background: #7a4a2a;
  border-radius: 2px 2px 0 0;
  transition: height 0.5s ease-out;
  min-height: 2px;
}
.decay-history-bar-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
}

/* --- Census / Concentration Sections --- */
.census-subtitle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-dim);
  margin: 0 0 var(--space-sm) 0;
}
.purpose-fill {
  background: var(--gold);
}
.optype-commercial { background: var(--gold); }
.optype-government { background: #5a8ab4; }
.optype-military { background: #b86a5a; }
.optype-civil { background: #6a9a6a; }
.optype-academic { background: #9a7ab8; }
.optype-unknown { background: var(--text-muted); }
.operator-fill {
  background: var(--gold);
}
.country-fill {
  background: #5a8ab4;
}
.hhi-summary {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}
.hhi-value {
  font-weight: 600;
}
.hhi-high { color: #d4705a; }
.hhi-moderate { color: #e8c547; }
.hhi-low { color: #6a9a6a; }

/* --- Constellation Clickable Cards --- */
.constellation-card-clickable {
  cursor: pointer;
}
.constellation-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.constellation-expand-chevron {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.constellation-card-clickable:hover .constellation-expand-chevron,
.constellation-card-clickable.expanded .constellation-expand-chevron {
  color: var(--gold);
}
.constellation-card-clickable.expanded {
  border-color: var(--gold);
  border-left-color: var(--gold-bright);
}

/* --- Constellation Detail Panel --- */
.constellation-detail {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  border-radius: 0 0 8px 8px;
  padding: var(--space-lg);
  margin-top: calc(var(--space-md) * -1);
  margin-bottom: var(--space-md);
  animation: fadeSlideIn 0.25s ease-out;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.constellation-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.constellation-detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-md);
}
.constellation-detail-card-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-dim);
  margin-bottom: var(--space-sm);
}

/* --- Age Distribution Bars --- */
.age-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 3px 0;
}
.age-bar-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  width: 48px;
  flex-shrink: 0;
}
.age-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-deep);
  border-radius: 2px;
  overflow: hidden;
}
.age-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.5s ease-out;
}
.age-bar-value {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  width: 48px;
  flex-shrink: 0;
  text-align: right;
}

/* --- Replenishment Rate Bars --- */
.replenish-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 3px 0;
}
.replenish-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  width: 56px;
  flex-shrink: 0;
}
.replenish-bars {
  flex: 1;
}
.replenish-bar-pair {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.replenish-bar {
  height: 4px;
  border-radius: 2px;
  transition: width 0.5s ease-out;
}
.replenish-bar-deploy {
  background: var(--gold);
}
.replenish-bar-decay {
  background: #7a4a2a;
}
.replenish-net {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  width: 40px;
  flex-shrink: 0;
  text-align: right;
}
.replenish-net.net-positive { color: var(--gold-bright); }
.replenish-net.net-negative { color: #d4705a; }
.replenish-legend {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}
.replenish-legend-item { display: flex; align-items: center; gap: 4px; }
.replenish-dot {
  width: 8px;
  height: 4px;
  border-radius: 2px;
}
.replenish-dot.deploy { background: var(--gold); }
.replenish-dot.decay { background: #7a4a2a; }

/* --- Altitude Sparkline --- */
.altitude-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 60px;
  padding: var(--space-xs) 0;
}
.altitude-spark-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.altitude-spark-bar {
  width: 100%;
  min-width: 4px;
  background: var(--gold);
  border-radius: 2px 2px 0 0;
  transition: height 0.5s ease-out;
  opacity: 0.7;
}
.altitude-spark-col:hover .altitude-spark-bar {
  opacity: 1;
}
.altitude-spark-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.altitude-range {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
  text-align: center;
}

/* --- At-Risk Summary --- */
.at-risk-count {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: #e8c547;
  line-height: 1;
  margin-bottom: var(--space-xs);
}
.at-risk-count.at-risk-clear {
  color: var(--text-muted);
}
.at-risk-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.risk-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.risk-row:last-child { border-bottom: none; }
.risk-row-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}
.risk-row-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}
.empty-state-sm {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: var(--space-md) 0;
}

/* ============================================================
   CATALOG PAGE — NEW COMPONENTS (Phase 2)
   ============================================================ */

/* --- Last Updated Timestamp --- */
.catalog-timestamp {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: var(--space-sm);
}

/* --- Loading Skeletons --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-elevated) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
.skeleton-value {
  height: 2rem;
  width: 80%;
  margin-bottom: var(--space-xs);
}
.skeleton-label {
  height: 0.75rem;
  width: 60%;
}
.skeleton-bar {
  border-radius: 4px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Section Collapse/Expand --- */
.section-header-collapsible {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
}
.section-collapse-chevron {
  font-size: 1rem;
  color: var(--text-muted);
  margin-left: auto;
  transition: color 0.15s;
  padding-left: var(--space-md);
}
.section-header-collapsible:hover .section-collapse-chevron {
  color: var(--gold);
}
.section-collapsed > *:not(.section-header) {
  display: none !important;
}

/* --- Decay Intelligence Summary Row --- */
.decay-intel-row {
  margin-bottom: var(--space-lg);
}
.decay-intel-card {
  flex: 1;
  min-width: 120px;
}

/* --- Decay Explanation Banner --- */
.decay-explanation-banner {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: rgba(212, 168, 67, 0.06);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-left: 3px solid var(--gold-dim);
  border-radius: 4px;
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}

/* --- Striped Tables --- */
.striped-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}
.striped-table tbody tr:nth-child(odd) {
  background: transparent;
}

/* --- Clickable Table Rows --- */
.clickable-row {
  cursor: pointer;
  transition: background 0.15s ease;
}
.clickable-row:hover {
  background: var(--bg-elevated) !important;
}
.clickable-row.drill-down-open {
  background: rgba(212, 168, 67, 0.08) !important;
  border-left: 3px solid var(--gold);
}

/* --- Sticky Table Headers --- */
.sticky-header thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-surface);
}

/* --- Sortable Column Headers --- */
.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
.sortable-th:hover {
  color: var(--gold) !important;
}
.sort-indicator {
  font-size: 0.6rem;
  color: var(--gold);
  margin-left: 2px;
}

/* --- Priority Dots (Over Design Life) --- */
.priority-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.priority-dot-critical { background: #d4705a; }
.priority-dot-elevated { background: #e8c547; }
.priority-dot-watch { background: var(--text-muted); }

/* --- Constellation Badges (inline) --- */
.constellation-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid rgba(212, 168, 67, 0.2);
  border-radius: 3px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* --- Pagination Controls --- */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.pagination-info {
  color: var(--text-secondary);
}
.pagination-size {
  display: flex;
  gap: 4px;
}
.page-size-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.page-size-pill:hover {
  color: var(--text-primary);
  border-color: var(--gold-dim);
}
.page-size-pill.active {
  color: var(--bg-deep);
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 500;
}
.pagination-nav {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.page-nav-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.page-nav-btn:hover:not([disabled]) {
  background: var(--bg-elevated);
  border-color: var(--gold-dim);
}
.page-nav-btn[disabled] {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.4;
}
.page-nav-info {
  color: var(--text-muted);
  font-size: 0.65rem;
}

/* --- Drill-Down Detail Rows --- */
tr.detail-row > td {
  padding: 0;
  border-bottom: 1px solid var(--border);
}
.satellite-drill-down {
  background: var(--bg-card);
  border-top: 2px solid var(--gold);
  padding: var(--space-md) var(--space-lg);
  animation: fadeSlideIn 0.25s ease-out;
}
.drill-down-section {
  margin-bottom: var(--space-md);
}
.drill-down-section:last-child {
  margin-bottom: 0;
}
.drill-down-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-dim);
  margin-bottom: var(--space-xs);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.drill-down-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-xs) var(--space-md);
}
.drill-down-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.drill-down-wide {
  grid-column: 1 / -1;
}
.drill-down-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.drill-down-val {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
}

/* --- Single Prediction Card (when only 1 prediction) --- */
.single-prediction-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: var(--space-md) var(--space-lg);
}

/* --- Census Footnote --- */
.census-footnote {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* --- Dominance Callout Card --- */
.dominance-callout {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  background: rgba(212, 168, 67, 0.06);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}
.dominance-callout-icon {
  font-size: 1.2rem;
  color: var(--gold);
  flex-shrink: 0;
}
.dominance-callout-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Country Cards Row --- */
.country-cards-row {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
.country-card {
  flex: 1;
  min-width: 120px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-md);
  text-align: center;
}
.country-card-code {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.country-card-name {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
}
.country-card-count {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--gold);
}
.country-card-pct {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* --- Asset Depreciation Section --- */
.depr-stat-card {
  border-top: 2px solid var(--border);
}
.depr-stat-card.depr-failed { border-top-color: #d4705a; }
.depr-stat-card.depr-anomalous { border-top-color: #e8a547; }
.depr-stat-card.depr-low-perigee { border-top-color: #d4705a; }
.depr-stat-card.depr-disposal { border-top-color: var(--text-muted); }
.depr-stat-card.depr-extended { border-top-color: #e8c547; }
.depr-stat-card.depr-reentered { border-top-color: #7a4a2a; }

.depr-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
.depr-badge-failed {
  color: #d4705a;
  background: rgba(212, 112, 90, 0.12);
  border: 1px solid rgba(212, 112, 90, 0.25);
}
.depr-badge-anomalous {
  color: #e8a547;
  background: rgba(232, 165, 71, 0.12);
  border: 1px solid rgba(232, 165, 71, 0.25);
}
.depr-badge-disposal {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}
.depr-badge-decommissioned {
  color: #8a7a6a;
  background: rgba(138, 122, 106, 0.1);
  border: 1px solid rgba(138, 122, 106, 0.2);
}

.depr-title-low-perigee { color: #d4705a; }
.depr-title-failed { color: #e8a547; }
.depr-title-disposal { color: var(--text-muted); }

/* --- Hide on Mobile --- */
@media (min-width: 769px) {
  .show-mobile-only { display: none; }
}

/* --- Catalog Responsive --- */
@media (max-width: 768px) {
  .constellation-grid {
    grid-template-columns: 1fr;
  }
  .constellation-detail-grid {
    grid-template-columns: 1fr;
  }
  .decay-summary-row {
    flex-direction: column;
  }
  .decay-stat-card {
    min-width: unset;
  }
  .orbit-bar-label {
    width: 80px;
    font-size: 0.7rem;
  }
  .orbit-bar-value {
    width: 56px;
  }
  .orbit-bar-pct {
    width: 40px;
  }
  .deployments-table {
    font-size: 0.78rem;
  }
  .hide-mobile {
    display: none !important;
  }
  .drill-down-grid {
    grid-template-columns: 1fr 1fr;
  }
  .table-pagination {
    flex-direction: column;
    align-items: flex-start;
  }
  .country-cards-row {
    flex-direction: column;
  }
  .country-card {
    min-width: unset;
  }
  .decay-intel-row {
    flex-direction: column;
  }
}

