/* ============================================
   GLOBAL POWER GRID DASHBOARD
   Infrastructure-monitoring aesthetic.
   Dark. Data-dense. Circuit-trace motifs.
   Warm amber accent distinguishes from
   the cooler Flight Crisis Dashboard.
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Backgrounds */
  --bg-primary: #060709;
  --bg-panel: #0c0d12;
  --bg-panel-alt: #0f1017;
  --bg-header: #09090e;
  --border: #181a26;
  --border-light: #222434;

  /* Text */
  --text-primary: #d4d6e2;
  --text-secondary: #969ab0;
  --text-muted: #484a5e;
  --text-dim: #2a2b3a;

  /* Status */
  --green: #00e676;
  --green-dim: rgba(0, 230, 118, 0.08);
  --green-border: rgba(0, 230, 118, 0.20);
  --yellow: #ffab00;
  --yellow-dim: rgba(255, 171, 0, 0.08);
  --yellow-border: rgba(255, 171, 0, 0.20);
  --red: #ff1744;
  --red-dim: rgba(255, 23, 68, 0.08);
  --red-border: rgba(255, 23, 68, 0.18);
  --orange: #ff6d00;
  --orange-dim: rgba(255, 109, 0, 0.08);
  --orange-border: rgba(255, 109, 0, 0.20);

  /* Accent -- warm amber instead of flight dashboard's blue */
  --accent: #f0a830;
  --accent-dim: rgba(240, 168, 48, 0.08);
  --accent-border: rgba(240, 168, 48, 0.22);
  --accent-secondary: #448aff;
  --accent-secondary-dim: rgba(68, 138, 255, 0.08);

  /* Chart colors */
  --chart-weather: #448aff;
  --chart-equipment: #ff6d00;
  --chart-fuel: #ff1744;
  --chart-cyber: #ce44ff;
  --chart-demand: #ffab00;
  --chart-other: #484a5e;
  --chart-projection: rgba(240, 168, 48, 0.12);
  --chart-trendline: #f0a830;

  /* Spacing */
  --gap: 14px;
  --panel-pad: 20px;
  --radius: 4px;

  /* Fonts */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

/* --- Grain overlay --- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}

/* --- Scanline effect --- */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.025) 2px,
    rgba(0, 0, 0, 0.025) 4px
  );
}

/* --- Circuit-trace background pattern --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.018;
  background-image:
    linear-gradient(90deg, var(--accent) 1px, transparent 1px),
    linear-gradient(0deg, var(--accent) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* --- Panel entrance animations --- */
@keyframes panelReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel, .header, .explainer, .section-divider, .footer {
  animation: panelReveal 0.5s ease-out both;
}

.header { animation-delay: 0.05s; }
.panel:nth-child(2) { animation-delay: 0.10s; }
.panel:nth-child(3) { animation-delay: 0.18s; }
.panel:nth-child(4) { animation-delay: 0.26s; }
.panel:nth-child(5) { animation-delay: 0.34s; }
.panel:nth-child(6) { animation-delay: 0.40s; }
.panel:nth-child(7) { animation-delay: 0.46s; }
.panel:nth-child(8) { animation-delay: 0.52s; }
.panel:nth-child(9) { animation-delay: 0.58s; }
.panel:nth-child(10) { animation-delay: 0.64s; }
.panel:nth-child(11) { animation-delay: 0.70s; }

/* --- Layout Shell --- */
.dashboard {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--gap);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* --- Header --- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--panel-pad);
  background: var(--bg-header);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

/* Subtle amber glow on header left edge */
.header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent), 0 0 30px rgba(240, 168, 48, 0.15);
}

.header__title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.header__title span {
  color: var(--accent);
  font-weight: 700;
}

.header__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.header__updated {
  color: var(--text-secondary);
}

.header__updated.fresh {
  color: var(--accent);
}

.header__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

.header__dot.stale { background: var(--yellow); }
.header__dot.seed { background: var(--text-muted); animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* --- Panels (shared) --- */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--panel-pad);
  transition: border-color 0.3s ease;
  overflow: visible;
}

.panel:hover {
  border-color: var(--border-light);
  z-index: 10;
  position: relative;
}

.panel--alt {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
}

.panel__label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
  position: relative;
  padding-left: 12px;
}

/* Amber tick before panel labels */
.panel__label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 1px;
  opacity: 0.6;
}

.panel__sublabel {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: -8px;
  margin-bottom: 14px;
}

/* --- Status Badges (reusable) --- */
.badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
  display: inline-block;
}

.badge.green, .badge.stable { background: var(--green-dim); color: var(--green); border: 1px solid var(--green-border); }
.badge.yellow, .badge.elevated { background: var(--yellow-dim); color: var(--yellow); border: 1px solid var(--yellow-border); }
.badge.orange, .badge.high { background: var(--orange-dim); color: var(--orange); border: 1px solid var(--orange-border); }
.badge.red, .badge.critical { background: var(--red-dim); color: var(--red); border: 1px solid var(--red-border); animation: flash 1s ease-in-out infinite; }
.badge.unknown, .badge.no-data { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-border); }
.badge.muted { background: rgba(78,79,98,0.15); color: var(--text-muted); border: 1px solid rgba(78,79,98,0.3); }

/* --- Status Overview --- */
.status-overview {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: wrap;
}

.status-overview__main {
  flex: 1;
  min-width: 300px;
}

.status-overview__summary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 100%;
  margin-top: 10px;
}

.status-metrics {
  display: flex;
  gap: 32px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.status-metric {
  display: flex;
  flex-direction: column;
}

.status-metric__value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  text-shadow: 0 0 20px rgba(240, 168, 48, 0.08);
}

.status-metric__label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.status-metric__change {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
}

.status-metric__change.up { color: var(--red); }
.status-metric__change.down { color: var(--green); }
.status-metric__change.neutral { color: var(--text-muted); }

/* --- Chart Panels --- */
.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
}

.chart-container--short {
  position: relative;
  width: 100%;
  height: 200px;
}

.chart-container--tall {
  position: relative;
  width: 100%;
  height: 360px;
}

.chart-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.chart-toggle__btn {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.chart-toggle__btn:hover {
  color: var(--text-secondary);
  border-color: var(--border-light);
}

.chart-toggle__btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* --- Two-column panels --- */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.split-grid--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* --- Region Cards --- */
.region-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gap);
}

.region-card {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  border-left: 3px solid var(--text-muted);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.region-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
}

.region-card.green { border-left-color: var(--green); }
.region-card.green:hover { box-shadow: -4px 0 16px rgba(0, 230, 118, 0.08); }
.region-card.yellow { border-left-color: var(--yellow); }
.region-card.yellow:hover { box-shadow: -4px 0 16px rgba(255, 171, 0, 0.08); }
.region-card.orange { border-left-color: var(--orange); }
.region-card.orange:hover { box-shadow: -4px 0 16px rgba(255, 109, 0, 0.08); }
.region-card.red { border-left-color: var(--red); }
.region-card.red:hover { box-shadow: -4px 0 16px rgba(255, 23, 68, 0.08); }
.region-card.no-data { border-left-color: var(--text-dim); }

.region-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.region-card__name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.region-card__stats {
  margin-bottom: 8px;
}

.region-card__stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
}

.region-card__stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.region-card__stat-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.region-card__vulnerability {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.region-card__operators {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 6px;
}

/* --- Oil / Energy Section --- */
.oil-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.oil-stat {
  display: flex;
  flex-direction: column;
}

.oil-stat__value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.oil-stat__change {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
}

.oil-stat__change.up { color: var(--red); }
.oil-stat__change.down { color: var(--green); }
.oil-stat__change.neutral { color: var(--text-muted); }

.oil-stat__label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Callout Box --- */
.callout {
  padding: 16px;
  border-radius: var(--radius);
  margin-top: 14px;
}

.callout--insight {
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-left: 3px solid var(--accent);
}

.callout--warning {
  background: var(--yellow-dim);
  border: 1px solid var(--yellow-border);
  border-left: 3px solid var(--yellow);
}

.callout--danger {
  background: var(--red-dim);
  border: 1px solid var(--red-border);
  border-left: 3px solid var(--red);
}

.callout__title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.callout--insight .callout__title { color: var(--accent); }
.callout--warning .callout__title { color: var(--yellow); }
.callout--danger .callout__title { color: var(--red); }

.callout__text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- Vulnerability Cards --- */
.vuln-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.vuln-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.vuln-card:hover {
  border-color: var(--border-light);
  background: var(--bg-panel-alt);
}

.vuln-card__country {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vuln-card__detail {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Timeline Table --- */
.timeline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.timeline-table th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
}

.timeline-table td {
  padding: 8px 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

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

.timeline-table tbody tr {
  transition: background 0.15s ease;
}

.timeline-table tbody tr:hover td {
  background: rgba(240, 168, 48, 0.03);
}

.timeline-table .date-col {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  width: 100px;
}

.timeline-table .value-col {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.timeline-table .cause-col {
  white-space: nowrap;
}

.timeline-table .highlight-row td {
  background: var(--red-dim);
}

.timeline-table .current-row td {
  background: var(--yellow-dim);
}

/* --- Cyber Status Card --- */
.cyber-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.cyber-card__icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.cyber-card__body {
  flex: 1;
}

.cyber-card__stat {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.cyber-card__detail {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cyber-card__sources {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.cyber-card__sources a {
  color: var(--accent);
  text-decoration: none;
}

.cyber-card__sources a:hover {
  text-decoration: underline;
}

/* --- Cause Legend --- */
.cause-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.cause-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cause-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* --- Explainer Section --- */
.explainer {
  margin-top: var(--gap);
}

.explainer__toggle {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 10px var(--panel-pad);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  list-style: none;
  user-select: none;
  transition: color 0.2s, border-color 0.2s;
}

.explainer__toggle::-webkit-details-marker { display: none; }

.explainer__toggle::before {
  content: '// ';
  color: var(--accent);
}

.explainer[open] > .explainer__toggle::before {
  content: '-- ';
}

.explainer[open] > .explainer__toggle {
  border-color: var(--border-light);
  color: var(--text-primary);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none;
}

.explainer__content {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: var(--panel-pad);
}

.explainer__section {
  margin-bottom: 20px;
}

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

.explainer__heading {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.explainer__text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}

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

.explainer__term {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.explainer__term-name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  min-width: 80px;
}

.explainer__term-def {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Tooltips --- */
.has-tip {
  border-bottom: 1px dotted var(--text-muted);
  cursor: help;
  position: relative;
}

.has-tip:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: normal;
  width: max-content;
  max-width: 300px;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: tooltipIn 0.15s ease-out;
}

@keyframes tooltipIn {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.has-tip--below:hover::after {
  bottom: auto;
  top: calc(100% + 6px);
  left: 0;
  transform: none;
  animation: tooltipInBelow 0.15s ease-out;
}

@keyframes tooltipInBelow {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- EIA Live Panel --- */
.eia-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--gap);
}

.eia-demand-list {
  list-style: none;
  padding: 0;
}

.eia-demand-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

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

.eia-demand-item__region {
  color: var(--text-secondary);
}

.eia-demand-item__value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.eia-no-key {
  padding: 20px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
}

.eia-no-key a {
  color: var(--accent);
  text-decoration: none;
}

/* --- Annotation markers on charts --- */
.chart-annotation {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}

/* --- Section Divider --- */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 6px 0;
  position: relative;
}

.section-divider::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -1px;
  width: 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.3;
  transform: translateX(-50%);
}

/* --- Detail list --- */
.detail-list {
  list-style: none;
  padding: 0;
}

.detail-list li {
  position: relative;
  padding-left: 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 4px;
}

.detail-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* --- Data quality warning --- */
.data-quality-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: var(--yellow-dim);
  border: 1px solid var(--yellow-border);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius);
  font-size: 0.72rem;
  color: var(--yellow);
  font-family: var(--font-mono);
  margin-bottom: 14px;
  line-height: 1.6;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 20px 16px;
  font-size: 0.68rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text-secondary);
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .region-grid {
    grid-template-columns: 1fr 1fr;
  }

  .split-grid--3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard {
    padding: 8px;
    gap: 10px;
  }

  .header {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .status-overview {
    flex-direction: column;
  }

  .status-metrics {
    flex-direction: column;
    gap: 16px;
  }

  .split-grid,
  .split-grid--3,
  .region-grid,
  .vuln-grid,
  .eia-grid {
    grid-template-columns: 1fr;
  }

  .chart-container {
    height: 220px;
  }

  .chart-container--tall {
    height: 280px;
  }

  .oil-stats {
    flex-direction: column;
    gap: 16px;
  }

  .timeline-table { font-size: 0.8rem; }
  .timeline-table .date-col { width: 80px; }
}

@media (max-width: 480px) {
  html { font-size: 13px; }

  .header__title {
    font-size: 0.6rem;
  }

  .cause-legend {
    flex-direction: column;
    gap: 6px;
  }
}
