/* ============================================================
   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-watch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-md);
  padding: 6px 16px;
  background: var(--danger);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.hero-watch:hover { background: #c0392b; }
.hero-watch-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.2s 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;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.live-badge[href]:hover {
  background: #c0392b;
}

.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;
}

/* --- Table Search/Filter Bar --- */
.table-search {
  display: block;
  width: 100%;
  max-width: 420px;
  margin-bottom: var(--space-sm);
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.table-search::placeholder {
  color: var(--text-muted);
  font-size: 0.68rem;
}
.table-search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-dim);
}

.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 */
/* Event category badges (launch vs reentry) */
.event-category-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}
.event-category-reentry {
  background: rgba(155, 89, 182, 0.15);
  color: #b07cd8;
  border: 1px solid rgba(155, 89, 182, 0.3);
}
.reentry-row {
  border-left: 2px solid rgba(155, 89, 182, 0.4);
}

/* ── Reentry Section ─────────────────────────────────────── */
.reentry-rule {
  background: linear-gradient(90deg, transparent, #9b59b6) !important;
}
.reentry-section-title {
  color: #b07cd8 !important;
}
.nav-link-reentry {
  color: #b07cd8 !important;
}
.nav-link-reentry.active, .nav-link-reentry:hover {
  color: #c99ce0 !important;
  border-bottom-color: #9b59b6 !important;
}

/* Reentry table purple accent */
.reentry-table thead th {
  color: #b07cd8;
}

/* Reentry detail drill-down */
.reentry-detail-row td {
  border-left: 3px solid rgba(155, 89, 182, 0.5);
}
.reentry-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(155, 89, 182, 0.18);
  color: #c99ce0;
  border: 1px solid rgba(155, 89, 182, 0.35);
}
.reentry-program {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.reentry-status-detail {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: rgba(155, 89, 182, 0.05);
  border-radius: 3px;
  border-left: 2px solid rgba(155, 89, 182, 0.25);
}

/* Data grid (reentry drill-down) */
.reentry-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
}
.reentry-data-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: rgba(155, 89, 182, 0.6);
  text-transform: uppercase;
  margin-bottom: 3px;
}
.reentry-data-val {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}
.reentry-data-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Crew manifest */
.reentry-crew {
  margin-bottom: var(--space-lg);
}
.reentry-crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-sm) var(--space-lg);
  margin-top: var(--space-sm);
}
.reentry-crew-member {
  display: flex;
  flex-direction: column;
}
.reentry-crew-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.reentry-crew-role {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Mission highlights */
.reentry-highlights {
  margin-bottom: var(--space-lg);
}
.reentry-highlight-list {
  list-style: none;
  padding: 0;
  margin-top: var(--space-sm);
}
.reentry-highlight-list li {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-secondary);
  padding: 3px 0 3px 16px;
  position: relative;
}
.reentry-highlight-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(155, 89, 182, 0.5);
}

/* Source links */
.reentry-sources {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(155, 89, 182, 0.1);
}
.reentry-source-link {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #b07cd8;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(155, 89, 182, 0.25);
  border-radius: 3px;
  transition: all 0.2s ease;
}
.reentry-source-link:hover {
  background: rgba(155, 89, 182, 0.12);
  color: #c99ce0;
  border-color: rgba(155, 89, 182, 0.45);
}

/* Crewed row — visual indicator separate from data */
.crewed-row {
  position: relative;
  border-left: 3px solid #5dade2 !important;
  background: linear-gradient(90deg, rgba(52, 152, 219, 0.05) 0%, transparent 40%);
}
.crewed-row > td:first-child {
  position: relative;
}
.crewed-row > td:first-child::after {
  content: 'CREW';
  display: block;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #5dade2;
  background: rgba(52, 152, 219, 0.12);
  border: 1px solid rgba(52, 152, 219, 0.25);
  border-radius: 2px;
  padding: 1px 4px;
  margin-top: 3px;
  width: fit-content;
}

/* ── Crewed / Reentry badges (newsletter + universal) ─────────── */
.crew-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5dade2;
  background: rgba(52, 152, 219, 0.12);
  border: 1px solid rgba(52, 152, 219, 0.3);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}

.reentry-badge-sm {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c99ce0;
  background: rgba(155, 89, 182, 0.12);
  border: 1px solid rgba(155, 89, 182, 0.3);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}

.crewed-item {
  border-left: 2px solid rgba(52, 152, 219, 0.4);
}

/* Responsive */
@media (max-width: 600px) {
  .reentry-data-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
  .reentry-crew-grid { grid-template-columns: 1fr; }
}

.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;
}
.status-badge {
  display: inline-block;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.06);
}
.status-badge.status-success { background: rgba(46,204,113,0.15); }
.status-badge.status-failure { background: rgba(231,76,60,0.15); }
.status-badge.status-scheduled { background: rgba(255,255,255,0.06); }

/* ============================================================
   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;
}

/* ── Unified Confidence Badges (all INTEL pages) ────────────────────────────
   Primary classes: .confidence-badge + .confidence-badge--{tier}
   SAI legacy aliases (.sai-conf-*) kept for backward-compat markup that hasn't
   been migrated yet. Both class sets emit identical visual styles.
*/
.confidence-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
  cursor: default;
  line-height: 1.4;
}
.confidence-badge--reported {
  background: rgba(46, 204, 113, 0.15);
  color: #2ECC71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}
.confidence-badge--derived {
  background: rgba(212, 168, 67, 0.15);
  color: #D4A843;
  border: 1px solid rgba(212, 168, 67, 0.3);
}
.confidence-badge--estimated {
  background: rgba(232, 141, 100, 0.12);
  color: #E88D64;
  border: 1px solid rgba(232, 141, 100, 0.25);
}

/* SAI Confidence badges (legacy alias — same appearance as unified badges above) */
.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 scorecard (replaces stacked bar + redundant legend) */
.sai-transparency-scorecard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.sai-transparency-score-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.sai-transparency-score-pct {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text-primary);
}
.sai-conf-reported-item .sai-transparency-score-pct { color: #2ECC71; }
.sai-conf-derived-item  .sai-transparency-score-pct { color: var(--gold); }
.sai-conf-estimated-item .sai-transparency-score-pct { color: #E88D64; }
.sai-transparency-score-unit {
  font-size: 0.9rem;
  opacity: 0.7;
}
.sai-transparency-score-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.sai-transparency-score-def {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}
@media (max-width: 640px) {
  .sai-transparency-scorecard { grid-template-columns: 1fr; }
}

.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-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-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 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);
}

/* Role segmentation select — sits between email and button in subscribe form */
.cta-select {
  width: 150px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-dim) 50%), linear-gradient(135deg, var(--gold-dim) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
  color: var(--text-muted);
  cursor: pointer;
}

.cta-select:valid,
.cta-select:focus:valid {
  color: var(--text-primary);
}

.cta-select option {
  background: #0E0E14;
  color: var(--text-primary);
}

/* 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;
}

/* ── Dropdown navigation ──────────────────────────────────── */

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
}

.nav-caret {
  display: inline-block;
  font-size: 9px;
  line-height: 1;
  transform: translateY(1px);
  transition: transform 0.2s ease;
  opacity: 0.75;
}

.nav-dropdown.open .nav-caret {
  transform: translateY(1px) rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  min-width: 220px;
  background: rgba(10, 10, 16, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 168, 67, 0.08);
  padding: 6px;
  display: none;
  z-index: 120;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
  animation: nav-dropdown-fade 0.15s ease-out;
}

.nav-dropdown-menu--right {
  left: auto;
  right: 0;
}

@keyframes nav-dropdown-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-item:hover {
  background: var(--gold-glow);
  color: var(--gold-bright);
}

.nav-dropdown-item.active {
  background: var(--gold-glow-strong);
  color: var(--gold-bright);
}

.nav-dropdown-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--gold);
}

.nav-dropdown-item:hover .nav-dropdown-label,
.nav-dropdown-item.active .nav-dropdown-label {
  color: var(--gold-bright);
}

.nav-dropdown-desc {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-transform: none;
}

/* Mobile: flatten dropdowns to inline items since .nav has overflow-x: auto
   which would clip absolutely-positioned dropdown popups. */
@media (max-width: 900px) {
  .nav-dropdown {
    display: contents;
  }
  .nav-dropdown-trigger,
  .nav-caret {
    display: none;
  }
  .nav-dropdown-menu {
    position: static;
    display: contents;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: none;
  }
  .nav-dropdown-item {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    padding: 6px 12px;
    border-radius: 4px;
    flex-shrink: 0;
  }
  .nav-dropdown-desc {
    display: none;
  }
  .nav-dropdown-label {
    font-size: 10px;
    letter-spacing: 0.1em;
  }
}

/* ============================================================
   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);
}

.teaser-editorial-quote {
  margin: 0 0 var(--space-md) 0;
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--gold);
  background: var(--bg-card);
  border-radius: 0 6px 6px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  font-style: italic;
}

/* ============================================================
   SAI Teaser Card (Home Page)
   ============================================================ */

.sai-teaser-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) 0;
  display: flex;
  justify-content: center;
}

.sai-teaser-card {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  background: var(--bg-card);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.sai-teaser-card:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
}

.sai-teaser-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.sai-teaser-score {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.sai-teaser-phase {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sai-teaser-arrow {
  font-size: 16px;
  color: var(--gold-dim);
  transition: color 0.2s ease;
}

.sai-teaser-card:hover .sai-teaser-arrow {
  color: var(--gold);
}

/* ============================================================
   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;
}

/* Structured watching items (data-driven) */
.watching-list-item--structured {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
}

.watching-item-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.watching-date {
  color: var(--gold);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.watching-source {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.watching-source--launch_events { color: var(--cyan, #4ecdc4); background: rgba(78, 205, 196, 0.10); }
.watching-source--gov_grants    { color: var(--gold);          background: rgba(212, 175, 55, 0.10); }
.watching-source--roadmaps      { color: #a78bfa;             background: rgba(167, 139, 250, 0.10); }

.watching-item-event {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
}

.watching-item-sig {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
  font-style: italic;
}

/* ── 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 table now uses shared .table-pagination classes (see Pagination Controls section) */

/* --- 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;
}

/* Recipients — share-of-total column (replaces decorative inline bar) */
.grants-share-col {
  width: 140px;
  white-space: nowrap;
}
.grants-share-cell {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0 var(--space-sm) !important;
}
.grants-share-bar-track {
  flex: 1;
  height: 5px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}
.grants-share-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width 0.4s ease-out;
}
.grants-share-pct {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 3.5ch;
  text-align: right;
}

/* Recipients — concentration callout above table */
.grants-recipients-concentration {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.grants-recipients-concentration strong {
  color: var(--gold);
  font-family: var(--font-mono);
}
.grants-conc-sep {
  color: var(--border);
}

/* --- 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;
}
.grants-agency-amount {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
}

/* 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;
  }
}


/* ============================================================
   Finance — Company Intelligence Dashboard
   ============================================================ */

/* Controls bar */
.fin-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.fin-search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
}
.fin-search-input::placeholder { color: var(--text-muted); }
.fin-search-input:focus { outline: none; border-color: var(--gold); }

.fin-select {
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  cursor: pointer;
}
.fin-select:focus { outline: none; border-color: var(--gold); }

/* Company grid */
.fin-company-grid {
  display: block;
}
.fin-company-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.75rem;
}

.fin-company-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.fin-company-card:hover {
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.04);
}

/* ARI ring on card */
.fin-card-ari {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}
.fin-ari-ring {
  width: 44px;
  height: 44px;
}
.fin-ari-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
}

.fin-card-info { flex: 1; min-width: 0; }
.fin-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fin-card-ticker {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--gold);
  margin-left: 0.4rem;
}
.fin-card-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.fin-card-risk {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  margin-top: 0.15rem;
}

/* Badges */
.fin-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.fin-badge-private { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.fin-badge-sub { background: rgba(6,182,212,0.12); color: #06b6d4; }
.fin-badge-crewed { background: rgba(52, 152, 219, 0.12); color: #5dade2; border: 1px solid rgba(52, 152, 219, 0.25); }
.fin-badge-reentry { background: rgba(155, 89, 182, 0.12); color: #c99ce0; border: 1px solid rgba(155, 89, 182, 0.25); }

/* Risk distribution bar */
.fin-risk-dist { margin-bottom: 1.5rem; }
.fin-risk-bar {
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.fin-risk-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  transition: width 0.4s ease;
}
.fin-risk-seg-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: #000;
  font-weight: 600;
}
.fin-risk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.fin-risk-legend-item { display: flex; align-items: center; gap: 0.3rem; }
.fin-risk-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Sector cards (reuse grants-agency-card layout) */
.fin-sector-card { transition: border-color 0.2s; }
.fin-sector-card:hover { border-color: var(--gold); }

/* Detail overlay / modal */
.fin-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem;
  overflow-y: auto;
}
.fin-detail-panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--surface, #111827);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2rem;
  color: var(--text);
}
.fin-detail-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.fin-detail-close:hover { color: var(--text); }

.fin-detail-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.fin-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.fin-detail-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.fin-detail-section {
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.fin-detail-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin: 0 0 0.75rem;
}

/* ARI detail ring */
.fin-detail-ari-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.fin-detail-ari-ring {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.fin-detail-ari-ring svg { width: 80px; height: 80px; }
.fin-detail-ari-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'DM Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
}
.fin-detail-ari-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

/* Factor breakdown grid */
.fin-factor-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.fin-factor-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.fin-factor-name {
  width: 140px;
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: capitalize;
}
.fin-factor-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
}
.fin-factor-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.fin-factor-score {
  width: 28px;
  text-align: right;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* Confidence badges */
.fin-conf-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  flex-shrink: 0;
}
.fin-conf-computed { background: rgba(34,197,94,0.15); color: #22c55e; }
.fin-conf-partial { background: rgba(212,168,67,0.15); color: #D4A843; }
.fin-conf-default { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* ARI summary text */
.fin-detail-ari-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.fin-detail-ari-coverage {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
}
.fin-ari-summary {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Factor rationale (below each factor row) */
.fin-factor-row {
  flex-wrap: wrap;
}
.fin-factor-rationale {
  width: 100%;
  padding-left: 140px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'DM Mono', monospace;
  margin-top: 2px;
  margin-bottom: 0.2rem;
  line-height: 1.4;
}

/* Government contracts redesign */
.fin-contracts-summary {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}
.fin-contracts-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.fin-contracts-stat-value {
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.fin-contracts-stat-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fin-contracts-agencies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.fin-contracts-agency-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-radius: 4px;
  font-size: 0.65rem;
}
.fin-contracts-agency-name {
  color: var(--gold);
  font-family: 'DM Mono', monospace;
}
.fin-contracts-agency-amt {
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
}
.fin-contracts-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.fin-contract-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  transition: border-color 0.15s ease;
}
.fin-contract-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}
.fin-contract-large {
  border-left: 3px solid var(--gold);
}
.fin-contract-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.fin-contract-amount {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}
.fin-contract-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
}
.fin-contract-details {
  display: flex;
  gap: 0.75rem;
  font-size: 0.65rem;
}
.fin-contract-agency {
  color: var(--gold);
  font-family: 'DM Mono', monospace;
}
.fin-contract-program {
  color: var(--text-muted);
}
.fin-contracts-more {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  padding-top: 0.4rem;
}

/* Comps table */
.fin-comps-table {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.fin-comps-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.75rem;
}
.fin-comps-row span:first-child { color: var(--text-muted); }
.fin-comps-row span:last-child { font-family: 'DM Mono', monospace; color: var(--text); }

/* Tags */
.fin-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fin-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(212, 168, 67, 0.1);
  color: var(--gold);
  border: 1px solid rgba(212, 168, 67, 0.2);
}

/* Finance responsive */
@media (max-width: 768px) {
  .fin-company-grid-inner {
    grid-template-columns: 1fr;
  }
  .fin-controls {
    flex-direction: column;
  }
  .fin-search-input {
    min-width: unset;
    width: 100%;
  }
  .fin-detail-panel {
    padding: 1.25rem;
  }
  .fin-factor-name {
    width: 100px;
  }
  .fin-factor-rationale {
    padding-left: 100px;
  }
  .fin-contracts-summary {
    gap: 1rem;
  }
  .fin-contracts-stat-value {
    font-size: 0.9rem;
  }
}


/* ============================================================
   Finance — Intelligence Tier (Peer Groups, Heatmap)
   ============================================================ */

.fin-intel-gate {
  margin-top: 2rem;
}
.fin-intel-gate-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}
.fin-intel-gate-icon {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.fin-intel-gate-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.fin-intel-gate-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.fin-intel-gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.intel-waitlist-input {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.intel-waitlist-input:focus {
  outline: none;
  border-color: var(--gold-dim);
}
.intel-waitlist-select {
  appearance: none;
  cursor: pointer;
}
.intel-waitlist-btn {
  background: var(--gold);
  color: var(--bg-deep);
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 0.25rem;
}
.intel-waitlist-btn:hover {
  background: var(--gold-bright);
}
.fin-intel-gate-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* -- Intel Content (unlocked) -- */

.fin-intel-content {
  margin-top: 1.5rem;
}
.fin-intel-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.fin-intel-subhead {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* -- Peer Group Grid -- */

.fin-intel-peer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.fin-intel-peer-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  transition: border-color 0.2s ease;
}
.fin-intel-peer-card:hover {
  border-color: var(--gold-dim);
}
.fin-intel-peer-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
}
.fin-intel-peer-name {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.fin-intel-peer-count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.fin-intel-peer-median {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.fin-intel-peer-median-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fin-intel-peer-median-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}
.fin-intel-peer-range {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.fin-intel-peer-col {
  margin-bottom: 0.4rem;
}
.fin-intel-peer-col-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--gold-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}
.fin-intel-peer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.fin-intel-peer-col li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 0.15rem 0;
}
.fin-intel-score {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text);
  font-weight: 600;
}

/* -- Heatmap -- */

.fin-intel-heatmap {
  margin-bottom: 1.5rem;
}
.fin-intel-footnote {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.75rem;
}

@media (max-width: 600px) {
  .fin-intel-peer-grid {
    grid-template-columns: 1fr;
  }
  .fin-intel-gate-card {
    padding: 1.25rem;
  }
}


/* ============================================================
   Globe — 3D Orbital Visualization
   ============================================================ */

.globe-page {
  overflow: hidden;
}

#globe-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

#globe-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
#globe-canvas:active {
  cursor: grabbing;
}

/* ── Loading Overlay ────────────────────────────────────── */

.globe-loading {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black, #08080C);
  z-index: 100;
  transition: opacity 0.5s ease;
}

.globe-loading-inner {
  text-align: center;
}

.globe-loading-ring {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(212, 168, 67, 0.15);
  border-top-color: var(--gold, #D4A843);
  border-radius: 50%;
  margin: 0 auto var(--space-md, 16px);
  animation: globe-spin 1s linear infinite;
}

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

.globe-loading-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gold, #D4A843);
  letter-spacing: 0.15em;
  margin-bottom: 6px;
}

.globe-loading-sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted, #6b7a8d);
}

/* ── HUD Panels ─────────────────────────────────────────── */

.globe-hud {
  position: fixed;
  background: rgba(8, 8, 12, 0.85);
  border: 1px solid rgba(212, 168, 67, 0.12);
  border-radius: 6px;
  padding: 14px 16px;
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-width: 180px;
  pointer-events: auto;
}

.globe-hud-tl { top: 80px; left: 16px; }
.globe-hud-tr { top: 80px; right: 16px; }
.globe-hud-bl { bottom: 60px; left: 16px; max-height: calc(100vh - 200px); overflow-y: auto; }
.globe-hud-br { bottom: 60px; right: 16px; min-width: 240px; }

.globe-hud-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.65rem;
  color: var(--gold, #D4A843);
  letter-spacing: 0.2em;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(212, 168, 67, 0.1);
}
.globe-hud-separator {
  height: 1px;
  background: rgba(212, 168, 67, 0.12);
  margin: 10px 0 8px 0;
}
.globe-time-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.globe-time-bound {
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  color: #5a6575;
  white-space: nowrap;
  flex-shrink: 0;
}
.globe-time-slider {
  flex: 1;
}
.globe-time-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}
.globe-time-value {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: #D4A843;
  letter-spacing: 0.1em;
}
.globe-time-reset {
  background: transparent;
  border: 1px solid rgba(212, 168, 67, 0.25);
  color: #8a95a5;
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 3px;
  cursor: pointer;
  line-height: 1;
}
.globe-time-reset:hover {
  border-color: #D4A843;
  color: #D4A843;
}

/* ── Stats Panel ────────────────────────────────────────── */

.globe-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 3px 0;
}

.globe-stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted, #6b7a8d);
  letter-spacing: 0.1em;
}

.globe-stat-value {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--text, #e0e6ed);
  font-weight: 500;
}

/* ── Controls Panel ─────────────────────────────────────── */

.globe-control-row {
  padding: 4px 0;
}

.globe-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-secondary, #8a95a5);
}

.globe-toggle input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.globe-toggle input[type="checkbox"]:checked {
  background: rgba(212, 168, 67, 0.2);
  border-color: var(--gold, #D4A843);
}

.globe-toggle input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 1px; left: 4px;
  width: 4px; height: 8px;
  border: solid var(--gold, #D4A843);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.globe-slider-label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted, #6b7a8d);
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

.globe-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: rgba(212, 168, 67, 0.15);
  border-radius: 2px;
  outline: none;
}

.globe-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold, #D4A843);
  cursor: pointer;
  border: none;
}

.globe-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold, #D4A843);
  cursor: pointer;
  border: none;
}

/* ── Legend ──────────────────────────────────────────────── */

.globe-legend-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.globe-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s;
}

.globe-legend-item:hover {
  background: rgba(212, 168, 67, 0.06);
}

.globe-legend-item.globe-legend-active {
  background: rgba(212, 168, 67, 0.12);
  border: 1px solid rgba(212, 168, 67, 0.2);
  margin: -1px;
}

.globe-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.globe-legend-name {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-secondary, #8a95a5);
  flex: 1;
}

.globe-legend-count {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted, #6b7a8d);
}

/* ── Satellite Info Panel ───────────────────────────────── */

.globe-info-hidden {
  display: none !important;
}

.globe-info-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text, #e0e6ed);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.globe-info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
}

.globe-info-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  color: var(--muted, #6b7a8d);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.globe-info-value {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--text, #e0e6ed);
  text-align: right;
}

.globe-info-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--muted, #6b7a8d);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.globe-info-close:hover {
  color: var(--gold, #D4A843);
}

/* ── Star Info Popup (reuses satellite detail pattern) ──── */

.globe-star-info {
  position: fixed;
  bottom: 20px;
  right: 16px;
  z-index: 1010;
  min-width: 220px;
  max-width: 300px;
  background: rgba(8, 8, 12, 0.92);
  border: 1px solid rgba(212, 168, 67, 0.18);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  padding: 14px 16px 12px;
  font-family: "DM Mono", "Fira Code", monospace;
  color: var(--text, #EDEDF0);
  transition: opacity 0.2s;
}

.globe-star-info-hidden {
  display: none;
}

.globe-star-info-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold, #D4A843);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.globe-star-info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 0.75rem;
}

.globe-star-info-label {
  color: var(--muted, #6b7a8d);
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.globe-star-info-value {
  color: var(--text, #EDEDF0);
  text-align: right;
}

.globe-star-info-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--muted, #6b7a8d);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.globe-star-info-close:hover {
  color: var(--gold, #D4A843);
}

/* ── Regime Filter Bar ──────────────────────────────────── */

.globe-regime-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  background: rgba(8, 8, 12, 0.85);
  border: 1px solid rgba(212, 168, 67, 0.12);
  border-radius: 6px;
  padding: 4px;
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.globe-regime-btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--muted, #6b7a8d);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.globe-regime-btn:hover {
  color: var(--text-secondary, #8a95a5);
  background: rgba(212, 168, 67, 0.04);
}

.globe-regime-btn.active {
  color: var(--gold, #D4A843);
  background: rgba(212, 168, 67, 0.1);
  border-color: rgba(212, 168, 67, 0.2);
}

/* ── Body Navigation Bar ───────────────────────────────── */

.globe-body-bar {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(8, 8, 12, 0.88);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-radius: 8px;
  padding: 4px 6px;
  z-index: 12;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.globe-body-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--muted, #6b7a8d);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.globe-body-btn:hover {
  color: var(--text-secondary, #8a95a5);
  background: rgba(212, 168, 67, 0.06);
}

.globe-body-btn.active {
  color: var(--gold, #D4A843);
  background: rgba(212, 168, 67, 0.12);
  border-color: rgba(212, 168, 67, 0.25);
}

.globe-body-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.globe-body-sep {
  width: 1px;
  height: 18px;
  background: rgba(212, 168, 67, 0.15);
  margin: 0 4px;
  flex-shrink: 0;
}

.globe-body-system {
  color: var(--muted, #6b7a8d);
}
.globe-body-system:hover {
  color: #FFF4E0;
  background: rgba(255, 244, 224, 0.06);
}

/* ── Breadcrumb Navigation ────────────────────────────────── */

.globe-breadcrumb {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--muted, #6b7a8d);
  background: rgba(8, 8, 12, 0.85);
  border: 1px solid rgba(212, 168, 67, 0.1);
  border-radius: 6px;
  padding: 5px 14px;
  z-index: 12;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.globe-breadcrumb-link {
  color: var(--gold, #D4A843);
  cursor: pointer;
  transition: color 0.15s;
}
.globe-breadcrumb-link:hover {
  color: #E8C547;
}

.globe-breadcrumb-sep {
  color: rgba(212, 168, 67, 0.3);
  font-size: 0.7rem;
}

.globe-breadcrumb-current {
  color: var(--text, #e0e6ed);
}

/* ── Globe Footer ───────────────────────────────────────── */

.globe-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  background: transparent;
  padding: 8px 0;
  display: none; /* hidden on globe page to maximize viewport */
}

/* ── Globe HUD scrollbar ────────────────────────────────── */

.globe-hud::-webkit-scrollbar {
  width: 3px;
}
.globe-hud::-webkit-scrollbar-track {
  background: transparent;
}
.globe-hud::-webkit-scrollbar-thumb {
  background: rgba(212, 168, 67, 0.2);
  border-radius: 2px;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 768px) {
  .globe-hud-tl { top: 70px; left: 8px; right: 8px; min-width: unset; }
  .globe-hud-tr { top: auto; bottom: 140px; right: 8px; left: auto; min-width: unset; }
  .globe-hud-bl { bottom: 50px; left: 8px; max-width: 160px; }
  .globe-hud-br { bottom: 50px; right: 8px; left: auto; min-width: 200px; }
  .globe-regime-bar { bottom: 8px; }
  .globe-regime-btn { padding: 4px 8px; font-size: 0.55rem; }
  .globe-body-bar { bottom: 42px; padding: 3px 4px; gap: 1px; flex-wrap: wrap; justify-content: center; max-width: 95vw; }
  .globe-body-btn { padding: 4px 7px; font-size: 0.5rem; }
  .globe-breadcrumb { top: 60px; font-size: 0.55rem; }
}

/* ============================================================
   Site Footer — Social Links & Copyright
   ============================================================ */

.av-site-footer {
  background: var(--bg-deep);
  border-top: 1px solid rgba(212, 168, 67, 0.15);
  padding: var(--space-xl) var(--space-lg);
  margin-top: var(--space-3xl);
  position: relative;
  z-index: 10;
}

.av-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-rows: auto auto;
  gap: var(--space-lg) var(--space-xl);
  align-items: start;
}

/* ── Brand column ── */

.av-footer-brand {
  grid-row: 1;
  grid-column: 1;
}

.av-footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.av-footer-logo-icon {
  color: var(--gold);
  font-size: 1.1rem;
  line-height: 1;
}

.av-footer-logo-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.av-footer-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Resource links column ── */

.av-footer-links {
  grid-row: 1;
  grid-column: 2;
}

.av-footer-link-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.av-footer-link-heading {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-xs);
}

.av-footer-link-group a {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s ease;
}

.av-footer-link-group a:hover {
  color: var(--gold);
}

/* ── Social icons column ── */

.av-footer-social {
  grid-row: 1;
  grid-column: 3;
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding-top: 2px;
}

.av-footer-social-link {
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.av-footer-social-link:hover {
  color: var(--gold);
  transform: translateY(-1px);
}

.av-footer-social-link svg {
  width: 20px;
  height: 20px;
}

/* ── Copyright row ── */

.av-footer-copyright {
  grid-row: 2;
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding-top: var(--space-md);
}

.av-footer-copyright p {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.04em;
}

/* ── Freshness pulse ── */

.av-freshness-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.av-freshness-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: av-pulse 2s ease-in-out infinite;
}

@keyframes av-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.av-freshness-label {
  text-transform: uppercase;
}

/* ── Footer responsive ── */

@media (max-width: 768px) {
  .av-footer-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    gap: var(--space-lg);
    text-align: center;
  }

  .av-footer-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .av-footer-logo {
    justify-content: center;
  }

  .av-footer-links {
    grid-column: 1;
    grid-row: 2;
  }

  .av-footer-link-group {
    align-items: center;
  }

  .av-footer-social {
    grid-column: 1;
    grid-row: 3;
    justify-content: center;
  }

  .av-footer-copyright {
    grid-column: 1;
    grid-row: 4;
  }
}

/* ============================================================
   Space Roadmaps Page
   ============================================================ */

.roadmaps-intro {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 var(--space-lg);
  max-width: 760px;
}

/* --- Shared Panel --- */
.roadmap-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-lg);
}

/* --- Filter Bar --- */
.roadmap-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: var(--space-md);
  align-items: flex-end;
}
.roadmap-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 170px;
}
.roadmap-filter-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--gold-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}
.roadmap-filter-select {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.roadmap-filter-select:hover,
.roadmap-filter-select:focus {
  border-color: var(--gold-dim);
  outline: none;
}

/* --- Program Horizon ---
   Rich phase-band timeline. Each row has a left identity column (initials
   badge, name, owner, progress bar, next-milestone chip) and a track with
   tall phase bars that carry inline phase number + name. Milestone dots
   ride on top. A glowing NOW beam cuts across every row. Row click opens
   the full program drill-down in a modal overlay.
*/
.roadmap-gantt-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-lg);
  overflow-x: auto;
}
.rm-container {
  --rm-label-w: 260px;
  --rm-row-h: 72px;
  position: relative;
  min-width: 1080px;
}
.rm-timeline-empty {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: var(--space-xl);
  text-align: center;
  letter-spacing: 0.08em;
}

/* ----- Year rail (header above the rows) ----- */
.rm-year-rail {
  display: flex;
  align-items: stretch;
  height: 34px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--bg-card);
}
.rm-label-head {
  width: var(--rm-label-w);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-right: 1px solid var(--border);
}
.rm-year-axis {
  flex: 1;
  position: relative;
  min-width: 0;
}
.rm-year-tick {
  position: absolute;
  top: 11px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.rm-year-tick-minor {
  font-size: 0.52rem;
  color: rgba(255, 255, 255, 0.3);
}
.rm-year-tick-first { transform: translateX(0); }
.rm-year-tick-last { transform: translateX(-100%); }
.rm-now-label {
  position: absolute;
  top: 7px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--gold-bright);
  letter-spacing: 0.18em;
  padding: 2px 6px;
  background: rgba(212, 168, 67, 0.14);
  border: 1px solid var(--border-gold);
  border-radius: 3px;
  z-index: 2;
}

/* ----- Body ----- */
.rm-body {
  position: relative;
}

/* ----- Program row (click target) ----- */
.rm-row {
  position: relative;
  display: flex;
  align-items: stretch;
  height: var(--rm-row-h);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background-color 0.15s;
}
.rm-row:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.rm-row:hover {
  background-color: rgba(212, 168, 67, 0.045);
}
.rm-row:hover .rm-row-name {
  color: var(--gold-bright);
}
.rm-row:hover .rm-row-icon {
  border-color: var(--gold-bright);
  box-shadow: 0 0 12px rgba(212, 168, 67, 0.3);
}

/* Status accent bar on the left edge */
.rm-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold-dim);
  opacity: 0.5;
  pointer-events: none;
}
.rm-row-status-active::before { background: var(--gold-bright); opacity: 0.85; }
.rm-row-status-completed::before { background: #6de3a8; opacity: 0.7; }
.rm-row-status-paused::before { background: var(--text-muted); opacity: 0.5; }
.rm-row-status-cancelled::before { background: rgba(255, 255, 255, 0.2); opacity: 0.4; }
.rm-row-status-speculative::before { background: #ff7a55; opacity: 0.55; }

/* ----- Label column (icon + info block) ----- */
.rm-row-label {
  width: var(--rm-label-w);
  flex-shrink: 0;
  padding: 8px 14px 8px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-right: 1px solid var(--border);
  overflow: hidden;
  transition: background-color 0.15s;
}
.rm-row-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  background: rgba(212, 168, 67, 0.08);
  box-shadow: 0 0 8px rgba(212, 168, 67, 0.15);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rm-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.rm-row-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.005em;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}
.rm-row-owner {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--gold-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rm-row-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.rm-row-progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.rm-row-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright));
  box-shadow: 0 0 4px rgba(212, 168, 67, 0.45);
}
.rm-row-progress-pct {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  min-width: 24px;
  text-align: right;
}
.rm-row-next-chip {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ----- Track (phase bars + dots + NOW beam) ----- */
.rm-row-track {
  flex: 1;
  position: relative;
  min-width: 0;
  isolation: isolate;
}
.rm-row-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(212, 168, 67, 0.55), 0 0 3px rgba(232, 197, 71, 0.9);
  opacity: 0.55;
  z-index: 2;
  pointer-events: none;
}

/* ----- Phase bars — substantial, with inline phase number + name ----- */
.rm-phase {
  position: absolute;
  top: 50%;
  height: 30px;
  transform: translateY(-50%);
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  min-width: 4px;
  background: var(--gold-dim);
  z-index: 1;
}
.rm-phase-num {
  flex-shrink: 0;
  padding: 2px 5px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.52rem;
  letter-spacing: 0.05em;
}
.rm-phase-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  overflow: hidden;
}
.rm-phase-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  font-weight: 500;
}
.rm-phase-dates {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.rm-phase-in_progress .rm-phase-dates {
  color: rgba(0, 0, 0, 0.72);
  text-shadow: none;
}
.rm-phase-upcoming .rm-phase-dates {
  color: var(--gold-dim);
  text-shadow: none;
}
.rm-phase-completed {
  background: linear-gradient(180deg, rgba(46, 204, 113, 0.78), rgba(46, 204, 113, 0.5));
  border: 1px solid rgba(109, 227, 168, 0.5);
}
.rm-phase-in_progress {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border: 1px solid var(--gold-bright);
  color: rgba(0, 0, 0, 0.92);
  box-shadow: 0 0 12px var(--gold-glow-strong);
}
.rm-phase-in_progress .rm-phase-num {
  background: rgba(0, 0, 0, 0.28);
  color: rgba(0, 0, 0, 0.95);
}
.rm-phase-in_progress .rm-phase-name {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}
.rm-phase-upcoming {
  background: rgba(212, 168, 67, 0.08);
  border: 1px dashed rgba(212, 168, 67, 0.45);
  color: var(--text-secondary);
}
.rm-phase-upcoming .rm-phase-name { text-shadow: none; }
.rm-phase-upcoming .rm-phase-num {
  background: rgba(212, 168, 67, 0.12);
  color: var(--gold-dim);
}
.rm-phase-delayed,
.rm-phase-at_risk {
  background: linear-gradient(180deg, rgba(231, 76, 60, 0.82), rgba(231, 76, 60, 0.52));
  border: 1px solid rgba(255, 122, 85, 0.55);
}
.rm-phase-cancelled {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  text-decoration: line-through;
}
.rm-phase-cancelled .rm-phase-name { text-shadow: none; }

/* ----- Timeline legend — decodes marker glyphs ----- */
.rm-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 10px var(--space-md);
  background: rgba(14, 14, 20, 0.55);
  border-bottom: 1px solid var(--border);
}
.rm-legend-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-right: 4px;
}
.rm-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rm-legend-glyph {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rm-legend-glyph svg {
  width: 14px;
  height: 14px;
  display: block;
  overflow: visible;
}
.rm-legend-glyph.rm-ms-marker-cluster {
  width: 18px;
  height: 14px;
  background: rgba(14, 14, 20, 0.92);
  border: 1px solid var(--gold-dim);
  border-radius: 7px;
}
.rm-legend-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* -----------------------------------------------------------------------
   Milestone markers — collision-aware 2-lane placement.

   Row = 72px. Phase bars occupy y=21..51 (30px tall, centered).
     Lane 0 = ABOVE bar — marker at y=3..17, connector 4px to y=21
     Lane 1 = BELOW bar — marker at y=55..69, connector 4px up to y=51

   Markers whose dates fall within COLLISION_THRESHOLD_PCT get staggered
   to opposite lanes in JS. Third+ overlap becomes a cluster badge.

   Each status uses a distinct SVG glyph (check-disc, ring, diamond,
   triangle, X) so the timeline reads at a glance without tooltips.
   ----------------------------------------------------------------------- */
.rm-ms-marker {
  position: absolute;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
  transition: transform 0.15s ease, filter 0.15s ease;
}
.rm-ms-marker svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.rm-ms-marker::after {
  /* Connector line — lane classes override top/bottom to point at the bar. */
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
  transform: translateX(-50%);
}
.rm-ms-marker:hover {
  transform: translateX(-50%) scale(1.3);
  z-index: 6;
}
.rm-ms-marker:hover::after {
  background: rgba(255, 255, 255, 0.6);
}

/* ----- Lane 0: above the phase bar ----- */
.rm-ms-marker-lane-0 {
  top: 3px;
}
.rm-ms-marker-lane-0::after {
  top: 14px;  /* marker height = 14, connector drops 4px into phase bar top */
}
.rm-ms-marker-lane-0.rm-ms-marker-critical {
  top: 1px;
}
.rm-ms-marker-lane-0.rm-ms-marker-critical::after {
  top: 17px;
  height: 3px;
}

/* ----- Lane 1: below the phase bar ----- */
.rm-ms-marker-lane-1 {
  top: 55px;
}
.rm-ms-marker-lane-1::after {
  /* Connector extends UP from the marker to the bottom edge of the bar. */
  top: -4px;
}
.rm-ms-marker-lane-1.rm-ms-marker-critical {
  top: 54px;
}
.rm-ms-marker-lane-1.rm-ms-marker-critical::after {
  top: -3px;
  height: 3px;
}

/* ----- Critical size bump ----- */
.rm-ms-marker-critical {
  width: 17px;
  height: 17px;
}

/* ----- Per-status glows ----- */
.rm-ms-marker-in_progress {
  filter: drop-shadow(0 0 5px var(--gold-glow-strong));
}
.rm-ms-marker-completed {
  filter: drop-shadow(0 0 4px rgba(109, 227, 168, 0.65));
}
.rm-ms-marker-delayed,
.rm-ms-marker-at_risk {
  filter: drop-shadow(0 0 4px rgba(255, 122, 85, 0.65));
}

/* ----- Cluster marker — shown when 3+ milestones collide ----- */
.rm-ms-marker-cluster {
  width: 18px;
  height: 14px;
  background: rgba(14, 14, 20, 0.92);
  border: 1px solid var(--gold-dim);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
}
.rm-ms-marker-cluster .rm-ms-cluster-count {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 600;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
  line-height: 1;
}

/* --- Drill-down modal --- */
.rm-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 12, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  overflow-y: auto;
  animation: rmModalFade 0.2s ease-out;
}
.rm-modal[hidden] {
  display: none;
}
@keyframes rmModalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.rm-modal-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  max-width: 960px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 168, 67, 0.15);
  animation: rmModalSlide 0.25s ease-out;
}
@keyframes rmModalSlide {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.rm-modal-body {
  padding: var(--space-xl);
}
.rm-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}
.rm-modal-title-block {
  flex: 1;
  min-width: 0;
}
.rm-modal-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.rm-modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 4px;
}
.rm-modal-subtitle {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--gold-dim);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.rm-modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rm-modal-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 4px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.rm-modal-close:hover {
  border-color: var(--border-gold);
  color: var(--gold-bright);
  background: rgba(212, 168, 67, 0.08);
}
.rm-modal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: var(--space-lg);
}
.rm-modal-stat-label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.rm-modal-stat-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--gold-bright);
  line-height: 1.1;
}
.rm-modal-stat-ctx {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-secondary);
  margin-top: 3px;
  letter-spacing: 0.04em;
}
/* Tame the reused .roadmap-expanded detail block inside the modal */
.rm-modal-body .roadmap-expanded {
  background: transparent;
  border: none;
  padding: 0;
  margin-top: 0;
}

/* --- Roadmap Grid --- */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}
.roadmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.roadmap-card:hover {
  border-color: var(--border-gold);
}
.roadmap-card-highlight {
  border-color: var(--gold);
  box-shadow: 0 0 16px var(--gold-glow);
  position: relative;
}
.roadmap-card-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 8px 8px 0 0;
}
.roadmap-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.roadmap-card-title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: 0.01em;
  flex: 1;
  min-width: 0;
}
.roadmap-card-owner {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gold-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.roadmap-card-status {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 3px;
  white-space: nowrap;
  font-weight: 500;
}
.roadmap-status-active {
  background: rgba(61, 163, 122, 0.14);
  color: #6de3a8;
  border: 1px solid rgba(109, 227, 168, 0.28);
}
.roadmap-status-paused {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.roadmap-status-completed {
  background: rgba(109, 227, 168, 0.1);
  color: #6de3a8;
  border: 1px solid rgba(109, 227, 168, 0.25);
}
.roadmap-status-cancelled {
  background: rgba(194, 90, 58, 0.15);
  color: #ff7a55;
  border: 1px solid rgba(255, 122, 85, 0.25);
}
.roadmap-status-speculative {
  background: rgba(212, 168, 67, 0.08);
  color: var(--gold-dim);
  border: 1px solid rgba(212, 168, 67, 0.25);
}
.roadmap-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.roadmap-chip {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Progress bar (multi-segment) --- */
.roadmap-card-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.roadmap-card-progress-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.roadmap-card-progress-pct {
  color: var(--gold);
  font-weight: 500;
}
.roadmap-progress-track {
  display: flex;
  height: 8px;
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.roadmap-progress-seg {
  height: 100%;
  transition: width 0.6s ease-out;
}
.roadmap-progress-completed {
  background: #3da37a;
}
.roadmap-progress-in_progress {
  background: var(--gold);
}
.roadmap-progress-delayed {
  background: #c25a3a;
}

/* --- Next Milestone teaser --- */
.roadmap-card-next {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold-dim);
  border-radius: 4px;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.roadmap-card-next-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--gold-dim);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}
.roadmap-card-next-event {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.4;
}
.roadmap-card-next-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Status pills --- */
.roadmap-pill {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  white-space: nowrap;
  font-weight: 500;
}
.roadmap-pill-completed {
  background: rgba(61, 163, 122, 0.15);
  color: #6de3a8;
}
.roadmap-pill-in_progress {
  background: rgba(212, 168, 67, 0.18);
  color: var(--gold-bright);
}
.roadmap-pill-upcoming {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}
.roadmap-pill-delayed,
.roadmap-pill-at_risk {
  background: rgba(194, 90, 58, 0.2);
  color: #ff7a55;
}
.roadmap-pill-cancelled {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  text-decoration: line-through;
}

.roadmap-pill-signif {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
.roadmap-signif-critical {
  background: rgba(255, 122, 85, 0.18);
  color: #ff9575;
}
.roadmap-signif-high {
  background: rgba(212, 168, 67, 0.15);
  color: var(--gold-bright);
}
.roadmap-signif-medium {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}
.roadmap-signif-low {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  opacity: 0.75;
}

/* --- Expand button --- */
.roadmap-card-expand-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
  margin-top: auto;
}
.roadmap-card-expand-btn:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(212, 168, 67, 0.04);
}

/* --- Expanded drill-down --- */
.roadmap-expanded {
  grid-column: 1 / -1;
  background: var(--bg-deep);
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-top: var(--space-sm);
}
.roadmap-description {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 820px;
}
.roadmap-phase-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.roadmap-phase-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-sm);
}
.roadmap-phase-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.roadmap-phase-dates {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gold-dim);
  letter-spacing: 0.1em;
}
.roadmap-phase-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.roadmap-milestone-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.roadmap-milestone-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: var(--space-md);
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  transition: border-color 0.15s;
}
.roadmap-milestone-row:hover {
  border-color: var(--border-gold);
}
.roadmap-milestone-row.roadmap-milestone-completed {
  opacity: 0.72;
}
.roadmap-milestone-date {
  color: var(--gold-dim);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}
.roadmap-milestone-event {
  color: var(--text-primary);
  font-size: 0.74rem;
  line-height: 1.4;
}
.roadmap-milestone-status-cell {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
}

.roadmap-detail-subsection {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.roadmap-detail-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gold-dim);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}
.roadmap-news-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.roadmap-news-list li {
  display: block;
}
.roadmap-news-list a {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.15s, color 0.15s;
  line-height: 1.4;
}
.roadmap-news-list a:hover {
  border-color: var(--border-gold);
  color: var(--gold);
}
.roadmap-news-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 3px;
  letter-spacing: 0.08em;
}
.roadmap-tracking-notes {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-style: italic;
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold-dim);
  border-radius: 0 4px 4px 0;
}

/* --- Milestone rollup lists (upcoming / completed / delays) --- */
.roadmap-milestone-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.milestone-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 2px;
}
.milestone-filter-pill[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}
.milestone-filter-count {
  opacity: 0.65;
  font-weight: 400;
}
.roadmap-milestone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.roadmap-milestone-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.15s;
}
.roadmap-milestone-item:hover {
  border-color: var(--border-gold);
}
.roadmap-milestone-date-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.roadmap-milestone-date-main {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.06em;
}
.roadmap-milestone-date-secondary {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.roadmap-milestone-roadmap {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--gold-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.roadmap-milestone-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.roadmap-milestone-event-main {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.4;
}
.roadmap-milestone-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.roadmap-empty {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: var(--space-lg);
  text-align: center;
  letter-spacing: 0.06em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .roadmap-gantt-container {
    min-width: 740px;
  }
  .roadmap-gantt-row-label {
    width: 150px;
  }
  .roadmap-gantt-axis {
    margin-left: 150px;
  }
  .roadmap-grid {
    grid-template-columns: 1fr;
  }
  .roadmap-milestone-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .roadmap-milestone-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .roadmap-expanded {
    padding: var(--space-md);
  }
  .roadmap-phase-block {
    padding: var(--space-md);
  }
}

/* ==========================================================================
   Deal flow page (/deals/) — B3
   ========================================================================== */

.deals-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.deals-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Mono', monospace;
}

.deals-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 400;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.deals-table th.num,
.deals-table td.num {
  text-align: right;
}

.deals-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-primary);
  vertical-align: middle;
}

.deals-table tbody tr:last-child td {
  border-bottom: none;
}

.deals-table tbody tr:hover {
  background: rgba(212, 168, 67, 0.04);
}

.deals-rank {
  color: var(--text-muted);
  width: 32px;
}

.deals-company {
  color: var(--gold);
  font-weight: 500;
}

.deals-type-pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.deals-source-link {
  color: var(--gold-dim);
  font-size: 11px;
  text-decoration: none;
}

.deals-source-link:hover {
  color: var(--gold);
  text-decoration: underline;
}

.deals-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 12px;
}

.deals-rebuilding-banner {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-radius: 4px;
  background: rgba(212, 168, 67, 0.04);
}

@media (max-width: 768px) {
  .deals-table th,
  .deals-table td {
    padding: 8px 10px;
    font-size: 11px;
  }
}

/* ==========================================================================
   Intelligence waitlist page (/intelligence/) — B4
   ========================================================================== */

.intel-hero {
  text-align: center;
}

.intel-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.intel-badge {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 24px;
}

.intel-headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--text-primary);
}

.intel-sub {
  font-size: 1.05rem;
  color: var(--text-secondary, var(--text-primary));
  line-height: 1.6;
  margin: 0 auto 12px;
  max-width: 580px;
}

.intel-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 auto 32px;
  max-width: 540px;
  font-style: italic;
}

.intel-waitlist-form {
  display: flex;
  gap: 1px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 640px;
  margin: 0 auto 12px;
}

.intel-waitlist-input {
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
  min-width: 180px;
  flex: 1;
}

.intel-waitlist-input::placeholder { color: var(--text-muted); }
.intel-waitlist-input:focus { border-color: var(--gold-dim); }

.intel-waitlist-select {
  cursor: pointer;
  color: var(--text-muted);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-dim) 50%), linear-gradient(135deg, var(--gold-dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.intel-waitlist-select:valid { color: var(--text-primary); }

.intel-waitlist-select option {
  background: #0E0E14;
  color: var(--text-primary);
}

.intel-waitlist-btn {
  padding: 12px 24px;
  border: 1px solid var(--gold-dim);
  background: transparent;
  color: var(--gold);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.intel-waitlist-btn:hover {
  background: var(--gold);
  color: #0E0E14;
}

.intel-waitlist-caveat {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 48px;
}

.intel-waitlist-success {
  max-width: 560px;
  margin: 0 auto 48px;
  padding: 18px 22px;
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  background: rgba(212, 168, 67, 0.05);
  text-align: center;
}

.intel-waitlist-success p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.intel-waitlist-form .subscribe-error {
  flex-basis: 100%;
  text-align: center;
  margin-top: 10px;
}

.intel-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.intel-feature-card {
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.intel-feature-icon {
  color: var(--gold);
  font-size: 18px;
  margin-bottom: 10px;
}

.intel-feature-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--text-primary);
}

.intel-feature-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.intel-not-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 720px;
}

.intel-not-list li {
  padding: 12px 0 12px 24px;
  position: relative;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.intel-not-list li:last-child { border-bottom: none; }

.intel-not-list li::before {
  content: "✕";
  position: absolute;
  left: 0;
  top: 12px;
  color: var(--gold-dim);
  font-size: 11px;
}

@media (max-width: 640px) {
  .intel-waitlist-form {
    flex-direction: column;
    gap: 8px;
  }
  .intel-waitlist-input,
  .intel-waitlist-btn {
    width: 100%;
    flex: none;
  }
}

/* ============================================================
   META BADGE — freshness / quality instrument readout
   Rendered by AV.renderMetaBadge() in shared.js
   ============================================================ */

.av-meta-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.av-meta-badge__field {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.av-meta-badge__label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
}

.av-meta-badge__value {
  color: var(--text-primary);
  font-weight: 500;
}

.av-meta-badge__value--warn {
  color: var(--caution);
}

.av-meta-badge__value--stale {
  color: var(--danger);
}

/* 3-segment confidence mini-bar */
.av-meta-conf-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.av-meta-conf-bar__track {
  display: flex;
  width: 72px;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-deep);
}

.av-meta-conf-bar__seg {
  height: 100%;
  transition: width 0.3s ease;
}

.av-meta-conf-bar__seg--reported  { background: #22c55e; }
.av-meta-conf-bar__seg--derived   { background: var(--gold); }
.av-meta-conf-bar__seg--estimated { background: var(--danger); }

.av-meta-conf-bar__legend {
  color: var(--text-muted);
  font-size: 10px;
}

/* Stale banner — shown at payload level when stale_flag is true */
.av-stale-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  margin-top: 10px;
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--danger);
}

.av-stale-banner__icon { flex-shrink: 0; }

/* ============================================================
   PARTIAL FAILURE — 3-tier reliability display
   ============================================================ */

.rel-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rel-tier {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  cursor: default;
  position: relative;
}

.rel-tier--success {
  background: rgba(46, 204, 113, 0.12);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.25);
}

.rel-tier--partial {
  background: rgba(212, 168, 67, 0.12);
  color: var(--gold);
  border: 1px solid rgba(212, 168, 67, 0.30);
}

.rel-tier--failure {
  background: rgba(231, 76, 60, 0.12);
  color: var(--danger);
  border: 1px solid rgba(231, 76, 60, 0.25);
}

/* tooltip */
.rel-tier[title] { cursor: help; }

/* ============================================================
   VEHICLE UNDERWRITING SHEET — Tab panel on Finance page
   ============================================================ */

.fin-tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.fin-tab-btn {
  padding: 8px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  margin-bottom: -1px;
}

.fin-tab-btn:hover  { color: var(--text-primary); }
.fin-tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.fin-tab-panel { display: none; }
.fin-tab-panel.active { display: block; }

/* Underwriting sheet table */
.uw-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.uw-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11px;
  table-layout: auto;
}

.uw-table th {
  padding: 7px 6px;
  text-align: left;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.uw-table th.num, .uw-table td.num {
  text-align: right;
}

.uw-table td {
  padding: 7px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-primary);
  vertical-align: middle;
  white-space: nowrap;
}

/* Operator column can wrap on long names so it doesn't blow out the table. */
.uw-table td.uw-op {
  white-space: normal;
  max-width: 130px;
  line-height: 1.3;
}

.uw-table tr:hover td {
  background: rgba(255,255,255,0.025);
}

/* Anomaly rate coloring */
.uw-rate--green  { color: #22c55e; }
.uw-rate--amber  { color: var(--gold); }
.uw-rate--red    { color: var(--danger); }

/* Days-since-failure badge */
.uw-dsf-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
}
.uw-dsf-badge--gold {
  background: rgba(212,168,67,0.15);
  color: var(--gold);
  border: 1px solid rgba(212,168,67,0.3);
  animation: glow-pulse 2.5s ease-in-out infinite;
}
.uw-dsf-badge--red {
  background: rgba(231,76,60,0.12);
  color: var(--danger);
  border: 1px solid rgba(231,76,60,0.25);
}
.uw-dsf-badge--normal {
  color: var(--text-secondary);
}

/* Industry baseline row */
.uw-table tr.uw-baseline td {
  background: rgba(212,168,67,0.05);
  color: var(--gold);
  font-weight: 500;
  border-bottom: 1px solid var(--border-gold);
  border-top: 1px solid var(--border-gold);
}

/* Underwriting filter controls */
.uw-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: var(--space-md);
  align-items: center;
}

.uw-filter-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.uw-filter-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  border-radius: 4px;
  cursor: pointer;
}

.uw-filter-select:focus {
  outline: none;
  border-color: var(--gold);
}

/* Streak sparkline (inline text approximation) */
.uw-streak {
  color: #22c55e;
  font-weight: 500;
}

/* Empty / unavailable cell */
.uw-na { color: var(--text-muted); }

/* Crewed / reentry counts in underwriting table */
.uw-crewed-count {
  color: #5dade2;
  font-weight: 600;
  font-size: 0.75rem;
}
.uw-reentry-count {
  color: #c99ce0;
  font-weight: 600;
  font-size: 0.75rem;
}

/* Column-header tooltip — pure CSS, triggered by [data-tip] attribute.
   Used by the underwriting sheet and confidence heatmap to explain columns.
   The hover affordance is a dotted underline (no icon — saves real estate so
   all 10 columns fit without horizontal scrolling). */
.uw-table th[data-tip],
.deals-table th[data-tip] {
  position: relative;
  cursor: help;
  text-decoration: underline dotted rgba(255,255,255,0.25);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.uw-table th[data-tip]:hover,
.deals-table th[data-tip]:hover {
  color: var(--gold);
  text-decoration-color: var(--gold-dim);
}
.uw-table th[data-tip]::after,
.deals-table th[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 240px;
  max-width: 340px;
  padding: 10px 12px;
  background: var(--bg-elevated, #1a1a1a);
  border: 1px solid var(--border-gold, rgba(212,168,67,0.35));
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.55;
  text-align: left;
  white-space: pre-wrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 50;
  box-shadow: 0 4px 18px rgba(0,0,0,0.55);
}
.uw-table th[data-tip]:hover::after,
.deals-table th[data-tip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
/* Right-edge headers — anchor the tooltip to the right so it doesn't clip. */
.uw-table th[data-tip].tip-right::after,
.deals-table th[data-tip].tip-right::after {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(-4px);
}
.uw-table th[data-tip].tip-right:hover::after,
.deals-table th[data-tip].tip-right:hover::after {
  transform: translateX(0) translateY(0);
}
.uw-table th[data-tip].tip-left::after,
.deals-table th[data-tip].tip-left::after {
  left: 0;
  right: auto;
  transform: translateX(0) translateY(-4px);
}
.uw-table th[data-tip].tip-left:hover::after,
.deals-table th[data-tip].tip-left:hover::after {
  transform: translateX(0) translateY(0);
}

/* Reliability tier badge — Wilson 95% lower bound buckets */
.uw-tier-badge {
  display: inline-block;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}
.uw-tier--aplus {
  background: rgba(34,197,94,0.18);
  color: #22c55e;
  border-color: rgba(34,197,94,0.35);
}
.uw-tier--a {
  background: rgba(34,197,94,0.10);
  color: #4ade80;
  border-color: rgba(34,197,94,0.22);
}
.uw-tier--b {
  background: rgba(212,168,67,0.12);
  color: var(--gold);
  border-color: rgba(212,168,67,0.25);
}
.uw-tier--c {
  background: rgba(249,115,22,0.12);
  color: #f97316;
  border-color: rgba(249,115,22,0.25);
}
.uw-tier--d {
  background: rgba(231,76,60,0.14);
  color: var(--danger);
  border-color: rgba(231,76,60,0.30);
}

/* Retired marker shown next to vehicle name when scope = active+retired */
.uw-retired-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  vertical-align: middle;
}

/* Variant badge — subtle indicator that this row is a variant-level rollup */
.uw-variant-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold);
  background: rgba(212,168,67,0.08);
  border: 1px solid rgba(212,168,67,0.20);
  vertical-align: middle;
}

/* Decision example callout */
.uw-decision-example {
  margin-top: var(--space-lg);
  padding: 16px 20px;
  background: rgba(212,168,67,0.05);
  border-left: 3px solid var(--gold-dim);
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.uw-decision-example strong {
  color: var(--gold);
  font-weight: 500;
}

@media (max-width: 860px) {
  .uw-controls { gap: 8px; }
  .fin-tab-btn { padding: 7px 12px; font-size: 11px; }
}

/* ============================================================
   Conjunction Overlay — popup severity badges
   ============================================================ */

.ov-conjunction-severity {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ov-conjunction-severity--high {
  background: rgba(255, 51, 51, 0.15);
  color: #ff3333;
  border: 1px solid rgba(255, 51, 51, 0.3);
}

.ov-conjunction-severity--medium {
  background: rgba(255, 136, 51, 0.15);
  color: #ff8833;
  border: 1px solid rgba(255, 136, 51, 0.3);
}

.ov-conjunction-severity--low {
  background: rgba(255, 204, 51, 0.15);
  color: #ffcc33;
  border: 1px solid rgba(255, 204, 51, 0.3);
}

