/* ═══════════════════════════════════════════════════════
   ROS Energy Abundance Index — Editorial Light Design
   ═══════════════════════════════════════════════════════ */

/* ─── RESET & BASE ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Light panel palette */
  --bg: #FAFAF7;
  --bg-warm: #F5F5F0;
  --bg-card: #FFFFFF;

  /* Dark panel palette */
  --dark-bg: #0F172A;
  --dark-bg-card: #1E293B;
  --dark-border: rgba(255,255,255,0.08);

  /* Text — light panels */
  --text-primary: #1A1A2E;
  --text-secondary: #4A4A68;
  --text-muted: #8A8AA0;

  /* Text — dark panels */
  --text-light: #F0F0FA;
  --text-light-secondary: rgba(240,240,250,0.65);
  --text-light-muted: rgba(240,240,250,0.40);

  /* Borders */
  --border: #E5E5E0;
  --border-hover: #D0D0C8;

  /* Accent — emerald */
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-dim: rgba(16,185,129,0.10);

  /* Energy scale */
  --energy-high: #22c55e;
  --energy-mid: #f59e0b;
  --energy-low: #ef4444;

  /* Region colors */
  --region-europe: #3B82F6;
  --region-asia: #EC4899;
  --region-africa: #F59E0B;
  --region-namerica: #10B981;
  --region-samerica: #8B5CF6;
  --region-oceania: #0EA5E9;
  --region-mideast: #F97316;
  --region-casia: #D946EF;

  /* Radii */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── PANEL SYSTEM ─── */
.light-panel {
  background: var(--bg);
}

.dark-panel {
  background: var(--dark-bg);
  color: var(--text-light);
}

/* ─── NAVIGATION ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250,250,247,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-badge {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  padding: 4px 10px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  letter-spacing: 1px;
}

.nav-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--text-primary); }

.nav-ros {
  color: var(--accent) !important;
  font-weight: 600 !important;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(250,250,247,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  padding: 16px 24px;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu.active { display: flex; }

.mobile-link {
  display: block;
  padding: 12px 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.mobile-link:hover { color: var(--text-primary); }

/* ─── HERO — asymmetric split ─── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 140px 24px 60px;
  align-items: start;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 5.5vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-subtitle em {
  color: var(--accent);
  font-style: normal;
  font-weight: 700;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.hero-stat { text-align: left; }

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(16,185,129,0.25);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  font-family: var(--font-body);
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text-primary);
  background: var(--bg-warm);
}

/* Hero right — mini rankings */
.hero-right {
  padding-top: 20px;
}

.hero-mini-rankings {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.mini-col {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.mini-heading {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.mini-heading.green { color: var(--energy-high); border-color: var(--energy-high); }
.mini-heading.red { color: var(--energy-low); border-color: var(--energy-low); }
.mini-heading.navy { color: var(--accent); border-color: var(--accent); }

/* Glance rows (used in mini rankings) */
.glance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
}

.glance-row:not(:last-child) {
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.glance-rank {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  min-width: 28px;
  font-family: var(--font-body);
}

.glance-name {
  flex: 1;
  margin-left: 4px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 12px;
}

.glance-name:hover {
  color: var(--accent);
}

.glance-score {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  min-width: 40px;
  text-align: right;
}

/* ─── TICKER ─── */
.ticker {
  position: relative;
  overflow: hidden;
  background: var(--dark-bg);
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ticker-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
}

.ticker-track span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light-secondary);
  padding: 0 12px;
}

.ticker-track .sep {
  color: var(--accent);
  padding: 0 4px;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── SECTION HEADERS ─── */
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.section-eyebrow.light {
  color: rgba(16,185,129,0.8);
}

.section-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.section-title.light {
  color: var(--text-light);
}

.section-desc {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 600px;
  line-height: 1.6;
}

.section-desc.light {
  color: var(--text-light-secondary);
}

/* Center-aligned sections */
.rankings-section .section-eyebrow,
.rankings-section .section-title,
.rankings-section .section-desc,
.insights-section .section-eyebrow,
.insights-section .section-title,
.insights-section .section-desc,
.compare-section .section-eyebrow,
.compare-section .section-title,
.compare-section .section-desc,
.regional-section .section-eyebrow,
.regional-section .section-title,
.regional-section .section-desc,
.methodology-section .section-eyebrow,
.methodology-section .section-title,
.methodology-section .section-desc,
.charts-section .container > .section-eyebrow,
.charts-section .container > .section-title,
.charts-section .container > .section-desc,
.calculator-section .section-eyebrow,
.calculator-section .section-title,
.calculator-section .section-desc,
.lcoe-section .section-eyebrow,
.lcoe-section .section-title,
.lcoe-section .section-desc,
.converter-section .section-eyebrow,
.converter-section .section-title,
.converter-section .section-desc,
.perspective-section .section-eyebrow,
.perspective-section .section-title,
.perspective-section .section-desc {
  text-align: center;
}

.rankings-section .section-desc,
.insights-section .section-desc,
.compare-section .section-desc,
.regional-section .section-desc,
.methodology-section .section-desc,
.charts-section .section-desc,
.calculator-section .section-desc,
.lcoe-section .section-desc,
.converter-section .section-desc,
.perspective-section .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* ─── MAP SECTION — dark panel, full-bleed ─── */
.map-section {
  padding: 60px 0 0;
}

.map-section .container {
  margin-bottom: 24px;
}

.map-wrapper {
  position: relative;
  height: 560px;
  background: #060610;
}

#world-map {
  width: 100%;
  height: 100%;
}

.leaflet-container { background: #060610 !important; }

.leaflet-control-zoom {
  border: 1px solid var(--dark-border) !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--dark-bg-card) !important;
  color: var(--text-light) !important;
  border-color: var(--dark-border) !important;
}

.leaflet-control-zoom a:hover {
  background: #334155 !important;
}

.map-legend-bar {
  position: absolute;
  bottom: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15,23,42,0.92);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  z-index: 500;
}

.legend-gradient {
  width: 160px;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 35%, #22c55e 70%, #22c55e 100%);
}

.legend-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light-secondary);
}

.legend-desc {
  font-size: 11px;
  color: var(--text-light-muted);
  margin-left: 8px;
}

.map-tooltip {
  display: none;
  position: absolute;
  z-index: 600;
  background: rgba(15,23,42,0.96);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  pointer-events: none;
  min-width: 240px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.map-tooltip.active { display: block; }

.tooltip-country {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.tooltip-rank {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.tooltip-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}

.tooltip-metric-label {
  font-size: 11px;
  color: var(--text-light-muted);
}

.tooltip-metric-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  text-align: right;
}

.leaflet-popup-content-wrapper {
  background: var(--dark-bg-card) !important;
  border: 1px solid var(--dark-border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-light) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
}

.leaflet-popup-tip { background: var(--dark-bg-card) !important; }

.leaflet-popup-content {
  margin: 12px 16px !important;
  font-family: var(--font-body) !important;
  line-height: 1.5 !important;
}

/* ─── RANKINGS SECTION — light panel, striped table ─── */
.rankings-section {
  padding: 80px 0;
}

.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.search-wrapper {
  position: relative;
  flex: 2;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

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

.filter-select {
  flex: 0 1 auto;
  min-width: 140px;
  padding: 10px 32px 10px 14px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238A8AA0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.filter-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.results-count {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.btn-reset, .btn-export {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  white-space: nowrap;
}

.btn-reset {
  background: transparent;
  color: var(--text-secondary);
}

.btn-reset:hover {
  background: var(--bg-warm);
  color: var(--text-primary);
}

.btn-export {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-export:hover {
  background: var(--accent-hover);
}

/* Table — light striped */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.rankings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg-card);
}

.rankings-table th {
  position: sticky;
  top: 0;
  background: var(--bg-warm);
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.rankings-table th:hover {
  color: var(--text-secondary);
}

.rankings-table td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  white-space: nowrap;
}

/* Striped rows */
.rankings-table tbody tr:nth-child(even) {
  background: var(--bg-warm);
}

.rankings-table tbody tr {
  transition: background var(--transition);
  cursor: pointer;
}

.rankings-table tbody tr:hover {
  background: var(--accent-dim);
}

.th-rank { width: 60px; }
.th-score { width: 70px; }
.th-bar { width: 120px; }
.th-elec, .th-energy, .th-gdp { width: 140px; }
.th-ratio, .th-clean { width: 110px; }

.td-rank {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--text-muted);
}

.td-country {
  font-weight: 500;
  color: var(--text-primary);
}

.td-country .country-flag {
  margin-right: 6px;
}

.td-score {
  font-family: var(--font-body);
  font-weight: 700;
}

.score-bar-cell {
  padding: 10px 8px !important;
}

.score-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-warm);
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.td-metric {
  color: var(--text-secondary);
  font-size: 13px;
}

.td-metric-highlight {
  color: var(--text-primary);
  font-weight: 500;
}

/* ─── INSIGHTS SECTION — editorial layout ─── */
.insights-section {
  padding: 80px 0;
}

/* Featured insight — full width */
.insight-featured {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 24px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  border-left: 4px solid var(--accent);
}

.insight-big-number {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.insight-featured-body h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.insight-featured-body p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.insight-featured-body strong {
  color: var(--text-primary);
}

/* 2-column insights */
.insights-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.insight-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  transition: all var(--transition);
}

.insight-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.insight-icon {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}

.insight-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.insight-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.insight-card p strong {
  color: var(--text-primary);
}

/* Highlight quote card */
.highlight-quote {
  background: linear-gradient(135deg, var(--accent-dim) 0%, var(--bg-card) 100%);
  border-left: 4px solid var(--accent);
  display: flex;
  align-items: center;
}

.highlight-quote blockquote {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  font-style: italic;
}

.highlight-quote blockquote em {
  color: var(--accent);
  font-weight: 700;
}

/* Movers */
.movers-section {
  margin-top: 20px;
}

.movers-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.movers-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 32px;
}

.movers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.movers-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.movers-card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.movers-down { color: var(--energy-low); border-color: var(--energy-low) !important; }
.movers-up { color: var(--energy-high); border-color: var(--energy-high) !important; }

.mover-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}

.mover-row:not(:last-child) {
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.mover-name {
  color: var(--text-primary);
  font-weight: 500;
}

.mover-change {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
}

.mover-change.down { color: var(--energy-low); }
.mover-change.up { color: var(--energy-high); }

.mover-ranks {
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── ZONES — dark panel, horizontal stepped bar ─── */
.zones-section {
  padding: 80px 0;
}

.zones-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.zone-segment {
  padding: 32px 24px;
  position: relative;
  transition: all var(--transition);
}

.zone-segment:hover {
  transform: scale(1.02);
  z-index: 1;
}

.zone-survival { background: rgba(239,68,68,0.12); }
.zone-struggle { background: rgba(245,158,11,0.12); }
.zone-industrial { background: rgba(132,204,22,0.12); }
.zone-abundance { background: rgba(34,197,94,0.12); }

.zone-range {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.zone-survival .zone-range { color: #ef4444; }
.zone-struggle .zone-range { color: #f59e0b; }
.zone-industrial .zone-range { color: #84cc16; }
.zone-abundance .zone-range { color: #22c55e; }

.zone-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-light);
}

.zone-watt {
  font-size: 12px;
  color: var(--text-light-muted);
  margin-bottom: 12px;
}

.zone-desc {
  font-size: 13px;
  color: var(--text-light-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.zone-examples {
  font-size: 11px;
  color: var(--text-light-muted);
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ─── COMPARE SECTION — light panel ─── */
.compare-section {
  padding: 80px 0;
}

.compare-selectors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.compare-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.compare-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.compare-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.compare-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.compare-country-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.compare-rank-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.compare-score-big {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}

.compare-score-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.compare-metrics {
  text-align: left;
}

.compare-metric {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.compare-metric-label { color: var(--text-muted); }
.compare-metric-value { color: var(--text-primary); font-weight: 500; }

.compare-bar-wrapper {
  margin-top: 16px;
}

.compare-bar-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.compare-bar-track {
  height: 8px;
  background: var(--bg-warm);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.compare-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* ─── SCATTER CHART — dark panel ─── */
.charts-section {
  padding: 80px 0;
}

.chart-controls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  justify-content: center;
}

.chart-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chart-control label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.chart-control select {
  padding: 8px 32px 8px 12px;
  background: var(--dark-bg-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.chart-control select:focus {
  outline: none;
  border-color: var(--accent);
}

.chart-container {
  position: relative;
  background: var(--dark-bg-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 24px;
  overflow: hidden;
}

.chart-container canvas {
  width: 100% !important;
  height: auto !important;
}

.chart-tooltip {
  display: none;
  position: absolute;
  z-index: 10;
  background: rgba(15,23,42,0.96);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  pointer-events: none;
  font-size: 13px;
  color: var(--text-light);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.chart-tooltip.active { display: block; }

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-light-secondary);
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ─── REGIONAL SECTION — light panel ─── */
.regional-section {
  padding: 80px 0;
}

.regional-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.regional-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  transition: all var(--transition);
}

.regional-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.regional-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.regional-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.regional-count {
  font-size: 12px;
  color: var(--text-muted);
  padding: 2px 8px;
  background: var(--bg-warm);
  border-radius: 10px;
}

.regional-avg-score {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 4px;
}

.regional-avg-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.regional-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
}

.regional-stat-label { color: var(--text-muted); }
.regional-stat-value { color: var(--text-secondary); font-weight: 500; }

.regional-best {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.regional-best strong {
  color: var(--text-primary);
}

/* ─── METHODOLOGY — light panel ─── */
.methodology-section {
  padding: 80px 0;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.method-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.method-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
}

.method-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--accent);
}

.method-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.method-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.method-card p strong {
  color: var(--accent);
}

.method-formula {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.method-formula h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
}

.formula-block {
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.formula-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  min-width: 120px;
  color: var(--accent);
}

.formula-eq {
  font-family: 'Courier New', monospace;
  font-size: 15px;
  color: var(--text-secondary);
}

.formula-eq sub, .formula-eq sup {
  font-size: 11px;
  color: var(--text-muted);
}

.formula-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

.formula-note a {
  color: var(--accent);
  text-decoration: none;
}

.formula-note a:hover { text-decoration: underline; }

.formula-note strong {
  color: var(--text-secondary);
}

/* ─── ABOUT — dark panel ─── */
.about-section {
  padding: 80px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: center;
}

.about-text .section-eyebrow {
  text-align: left;
}

.about-text .section-title {
  color: var(--text-light);
}

.about-text p {
  font-size: 15px;
  color: var(--text-light-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-text strong {
  color: var(--text-light);
}

.about-text em {
  color: var(--accent);
  font-style: italic;
}

.about-callouts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.callout-card {
  background: var(--dark-bg-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

.callout-card.dim {
  opacity: 0.6;
}

.callout-number {
  display: block;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 900;
  color: var(--accent);
}

.callout-unit {
  display: block;
  font-size: 12px;
  color: var(--text-light-muted);
  margin-bottom: 4px;
}

.callout-label {
  display: block;
  font-size: 13px;
  color: var(--text-light-secondary);
}

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 1;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.modal-content { padding: 32px; }

.modal-country-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.modal-rank-line {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
}

.modal-score-display {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.modal-score-num {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
}

.modal-score-details {
  flex: 1;
}

.modal-score-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.modal-score-bar-fill {
  height: 100%;
  border-radius: 4px;
}

.modal-score-label {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.modal-metric-card {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.modal-metric-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.modal-metric-value {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--text-primary);
}

.modal-metric-unit {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.modal-subscores {
  margin-bottom: 20px;
}

.modal-subscores-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.modal-subscore-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.modal-subscore-label {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 130px;
}

.modal-subscore-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.modal-subscore-fill {
  height: 100%;
  border-radius: 3px;
}

.modal-subscore-val {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  min-width: 40px;
  text-align: right;
}

/* ─── FOOTER ─── */
.footer {
  background: var(--dark-bg);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-light);
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text-light);
}

.footer p {
  font-size: 14px;
  color: var(--text-light-secondary);
  margin-bottom: 8px;
}

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

.footer a:hover { text-decoration: underline; }

.footer-fine {
  font-size: 12px;
  color: var(--text-light-muted);
  line-height: 1.6;
}

/* ─── SCROLL ANIMATIONS ─── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.animate-stagger.visible > *:nth-child(2) { transition-delay: 80ms; }
.animate-stagger.visible > *:nth-child(3) { transition-delay: 160ms; }
.animate-stagger.visible > *:nth-child(4) { transition-delay: 240ms; }
.animate-stagger.visible > *:nth-child(5) { transition-delay: 320ms; }
.animate-stagger.visible > *:nth-child(6) { transition-delay: 400ms; }

.animate-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ─── MAP LOADING STATE ─── */
.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 500;
}

.map-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--dark-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

.map-loading-text {
  font-size: 13px;
  color: var(--text-light-muted);
}

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

/* ─── BACK TO TOP ─── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(16,185,129,0.3);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ─── READING PROGRESS BAR ─── */
.reading-progress {
  position: fixed;
  top: 64px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  z-index: 1001;
  transition: width 50ms linear;
}

/* ─── ACCESSIBILITY ─── */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 8px;
}

/* ─── SCORE COLORS ─── */
.score-excellent { color: #22c55e; }
.score-good { color: #84cc16; }
.score-fair { color: #f59e0b; }
.score-poor { color: #ef4444; }

/* ─── UTILITY ─── */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-results-icon { font-size: 48px; margin-bottom: 16px; }
.no-results-text { font-size: 16px; }

/* ─── CALCULATOR SECTION — light panel ─── */
.calculator-section {
  padding: 80px 0;
}

.calc-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
  margin-top: 40px;
  align-items: start;
}

/* ─ Controls column ─ */
.calc-controls {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  max-height: 640px;
  overflow-y: auto;
  position: sticky;
  top: 80px;
}

.calc-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.calc-summary-total {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.calc-total-number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.calc-total-unit {
  font-size: 13px;
  color: var(--text-muted);
}

.calc-summary-actions {
  display: flex;
  gap: 8px;
}

.calc-btn-clear, .calc-btn-share {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.calc-btn-clear {
  background: transparent;
  color: var(--text-secondary);
}
.calc-btn-clear:hover {
  background: var(--bg-warm);
  color: var(--text-primary);
}

.calc-btn-share {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.calc-btn-share:hover {
  background: var(--accent-hover);
}

/* Categories accordion */
.calc-category {
  margin-bottom: 6px;
}

.calc-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.calc-category-header:hover {
  background: var(--border);
}

.calc-category-header.active {
  background: var(--accent-dim);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.calc-category-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-category-icon {
  font-size: 16px;
}

.calc-category-count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 10px;
}

.calc-category-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.calc-category-header.active .calc-category-chevron {
  transform: rotate(180deg);
}

.calc-category-items {
  display: none;
  padding: 6px 8px;
  background: var(--bg-warm);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.calc-category.open .calc-category-items {
  display: block;
}

/* Product items */
.calc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.calc-item:hover {
  background: rgba(0,0,0,0.03);
}

.calc-item-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.calc-item-label {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1.3;
}

.calc-item-input {
  width: 56px;
  padding: 5px 6px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-body);
  text-align: right;
}

.calc-item-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.calc-item-unit {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 36px;
}

.calc-item.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.calc-selection-count {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ─ Chart column ─ */
.calc-chart-area {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.calc-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calc-view-toggle {
  display: flex;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.calc-view-btn {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.calc-view-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}

.calc-country-select {
  padding: 8px 30px 8px 12px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238A8AA0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.calc-country-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.calc-chart-container {
  position: relative;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
  min-height: 200px;
}

.calc-chart-container canvas {
  display: block;
}

.calc-chart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
}

.calc-chart-empty.hidden { display: none; }

.calc-empty-icon {
  color: var(--border);
}

.calc-chart-empty p {
  font-size: 15px;
  max-width: 300px;
}

.calc-chart-tooltip {
  display: none;
  position: absolute;
  z-index: 10;
  background: var(--dark-bg);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  pointer-events: none;
  font-size: 13px;
  color: var(--text-light);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  white-space: nowrap;
}

.calc-chart-tooltip.active { display: block; }

/* Country comparison */
.calc-comparison {
  margin-bottom: 20px;
}

.calc-comparison-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.calc-comparison-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.calc-comparison-total {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
}

.calc-comparison-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.calc-country-compare {
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.calc-country-compare:hover {
  border-color: var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.calc-cc-flag {
  font-size: 20px;
  margin-bottom: 4px;
}

.calc-cc-name {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.calc-cc-value {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.calc-cc-ratio {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.calc-cc-ratio.more { color: var(--energy-low); }
.calc-cc-ratio.less { color: var(--energy-high); }
.calc-cc-ratio.equal { color: var(--text-muted); }

/* Download button */
.calc-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: var(--dark-bg);
  color: var(--text-light);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.calc-download-btn:hover {
  background: var(--dark-bg-card);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ─── LCOE SECTION ─── */
.lcoe-section { padding: 80px 0; }

.lcoe-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin: 32px 0 24px;
}

.lcoe-toggle-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lcoe-toggle-label {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lcoe-toggle {
  display: flex;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 3px;
}

.lcoe-toggle-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.lcoe-toggle-btn:hover {
  color: rgba(255,255,255,0.8);
}

.lcoe-toggle-btn.active {
  background: var(--accent);
  color: #fff;
}

.lcoe-chart-wrap {
  position: relative;
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 48px;
}

.lcoe-chart-wrap canvas {
  width: 100%;
  height: auto;
}

.lcoe-tooltip,
.lcoe-history-tooltip {
  position: absolute;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
  white-space: nowrap;
}

.lcoe-sub-title {
  font-family: var(--font-heading);
  font-size: 22px;
  color: #fff;
  text-align: center;
  margin-bottom: 6px;
}

.lcoe-sub-desc {
  font-family: var(--font-body);
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  text-align: center;
  margin-bottom: 24px;
}

.lcoe-history-wrap {
  position: relative;
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.lcoe-history-wrap canvas {
  width: 100%;
  height: auto;
}

.lcoe-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.lcoe-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.lcoe-legend-swatch {
  width: 14px;
  height: 4px;
  border-radius: 2px;
}

/* ─── UNIT CONVERTER SECTION ─── */
.converter-section { padding: 80px 0; }

.conv-input-hero {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 32px auto 36px;
  max-width: 440px;
}

.conv-hero-field {
  flex: 1;
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 600;
  padding: 12px 16px;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--dark-bg);
  text-align: right;
  transition: border-color 0.2s;
}

.conv-hero-field:focus {
  outline: none;
  border-color: var(--accent);
}

.conv-hero-select {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 16px;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--dark-bg);
  cursor: pointer;
  min-width: 100px;
}

.conv-hero-select:focus {
  outline: none;
  border-color: var(--accent);
}

.conv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.conv-card {
  background: var(--bg-card);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}

.conv-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(16,185,129,0.1);
}

.conv-card-value {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--dark-bg);
  word-break: break-all;
  margin-bottom: 4px;
}

.conv-card-unit {
  font-family: var(--font-body);
  font-size: 13px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.conv-card-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 14px;
  transition: color 0.2s;
}

.conv-card-copy:hover {
  color: var(--accent);
}

.conv-fun-title {
  font-family: var(--font-heading);
  font-size: 22px;
  text-align: center;
  margin-bottom: 20px;
  color: var(--dark-bg);
}

.conv-fun-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.conv-fun-card {
  background: var(--bg-card);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s;
}

.conv-fun-card:hover {
  transform: translateY(-2px);
}

.conv-fun-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.conv-fun-value {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.conv-fun-label {
  font-family: var(--font-body);
  font-size: 14px;
  color: #6b7280;
}

/* ─── PERSPECTIVE SECTION ─── */
.perspective-section { padding: 80px 0; }

.persp-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin: 36px 0 24px;
  flex-wrap: wrap;
}

.persp-side {
  flex: 0 1 320px;
  text-align: center;
}

.persp-label {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}

.persp-select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  appearance: auto;
}

.persp-select:focus {
  outline: none;
  border-color: var(--accent);
}

.persp-value {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin-top: 8px;
}

.persp-equals {
  font-family: var(--font-heading);
  font-size: 36px;
  color: var(--accent);
  font-weight: 700;
}

.persp-result {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 16px;
  padding: 24px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.persp-result-number {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
}

.persp-result-label {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
}

.persp-bar-wrap {
  margin: 24px auto 48px;
  max-width: 700px;
}

.persp-bar-container {
  display: flex;
  gap: 4px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
}

.persp-bar {
  height: 100%;
  border-radius: 8px;
  transition: flex 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  min-width: 2px;
  overflow: hidden;
  white-space: nowrap;
  padding: 0 12px;
}

.persp-bar-left { background: var(--accent); }
.persp-bar-right { background: #60a5fa; }

.persp-ratio {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 20px;
  color: rgba(255,255,255,0.8);
  margin-top: 12px;
}

.persp-gallery-title {
  font-family: var(--font-heading);
  font-size: 22px;
  color: #fff;
  text-align: center;
  margin-bottom: 24px;
}

.persp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.persp-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.persp-card:hover {
  border-color: rgba(16,185,129,0.3);
  transform: translateY(-2px);
}

.persp-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.persp-card-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.3;
}

.persp-card-body {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

.persp-card-stat {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin: 12px 0 4px;
}

/* ─── SCROLLBAR — light theme ─── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-warm); }
::-webkit-scrollbar-thumb { background: #C0C0B8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #A0A098; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 120px;
  }

  .hero-mini-rankings {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .calc-layout {
    grid-template-columns: 1fr;
  }

  .calc-controls {
    max-height: none;
    position: static;
  }

  .calc-comparison-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .lcoe-controls {
    flex-direction: column;
    align-items: center;
  }

  .persp-compare {
    flex-direction: column;
    gap: 16px;
  }

  .persp-side { flex: 1 1 100%; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }

  .hero {
    padding: 100px 20px 40px;
  }

  .hero-title {
    font-size: clamp(36px, 9vw, 52px);
  }

  .hero-mini-rankings {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .map-wrapper { height: 400px; }

  .filter-bar {
    flex-direction: column;
  }

  .search-wrapper { min-width: 100%; }
  .filter-select { min-width: 100%; }
  .filter-meta { width: 100%; justify-content: space-between; }

  .th-elec, .th-energy, .th-gdp, .th-ratio, .th-clean, .th-bar {
    display: none;
  }
  .rankings-table td:nth-child(4),
  .rankings-table td:nth-child(5),
  .rankings-table td:nth-child(6),
  .rankings-table td:nth-child(7),
  .rankings-table td:nth-child(8),
  .rankings-table td:nth-child(9) {
    display: none;
  }

  .insights-duo {
    grid-template-columns: 1fr;
  }

  .insight-featured {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .movers-grid { grid-template-columns: 1fr; }

  .zones-bar {
    grid-template-columns: 1fr 1fr;
  }

  .compare-selectors {
    grid-template-columns: 1fr 1fr;
  }

  .calc-chart-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .calc-comparison-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .calc-summary-bar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .method-grid { grid-template-columns: 1fr; }

  .lcoe-toggle {
    flex-wrap: wrap;
    justify-content: center;
  }

  .conv-input-hero {
    flex-direction: column;
    max-width: 100%;
  }

  .conv-hero-field {
    font-size: 24px;
    text-align: center;
  }

  .conv-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .persp-equals { font-size: 24px; }

  .persp-cards {
    grid-template-columns: 1fr;
  }

  .formula-block {
    flex-direction: column;
    gap: 4px;
  }

  .modal-metrics-grid { grid-template-columns: 1fr; }

  .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }

  .section-title { font-size: 28px; }
}

@media (max-width: 480px) {
  .compare-selectors {
    grid-template-columns: 1fr;
  }

  .zones-bar { grid-template-columns: 1fr; }

  .calc-comparison-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chart-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats { gap: 20px; }
}

/* =====================================================
   HORMUZ VULNERABILITY INDEX — Section Styles
   ===================================================== */

/* 1. Base section */
.hormuz-section {
  /* inherits .dark-panel styles */
}

/* 2. Hero stats grid */
.hz-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.hz-stat-card {
  background: var(--dark-bg-card, #1E293B);
  border-left: 3px solid #f97316;
  padding: 24px;
  border-radius: 12px;
}

.hz-stat-number {
  font-size: 36px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.hz-stat-unit {
  font-size: 14px;
  color: var(--text-light-secondary, rgba(240,240,250,0.65));
  margin-left: 4px;
}

.hz-stat-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-light-muted, rgba(240,240,250,0.40));
  letter-spacing: 1px;
  margin-top: 8px;
}

/* 3. Tabs */
.hz-tabs {
  display: flex;
  flex-direction: row;
  gap: 4px;
  margin-bottom: 32px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 4px;
}

.hz-tab {
  all: unset;
  cursor: pointer;
  padding: 12px 24px;
  border-radius: 10px;
  color: var(--text-light-secondary, rgba(240,240,250,0.65));
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.hz-tab:hover {
  color: var(--text-light, #F0F0FA);
  background: rgba(255,255,255,0.06);
}

.hz-tab.active {
  background: #f97316;
  color: #ffffff;
  font-weight: 600;
}

/* 4. Panel container */
.hz-panel {
  /* basic container */
}

/* 5. Filter bar */
.hz-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hz-filter-bar .search-input,
.hz-filter-bar .hz-search-input {
  background: var(--dark-bg-card, #1E293B);
  color: var(--text-light, #F0F0FA);
  border: 1px solid var(--dark-border, rgba(255,255,255,0.08));
  border-radius: 8px;
  padding: 8px 12px 8px 36px;
  font-size: 14px;
}

.hz-filter-bar .search-input::placeholder,
.hz-filter-bar .hz-search-input::placeholder {
  color: var(--text-light-muted, rgba(240,240,250,0.40));
}

.hz-filter-bar .filter-select,
.hz-filter-bar .hz-filter-select {
  background: var(--dark-bg-card, #1E293B);
  color: var(--text-light, #F0F0FA);
  border: 1px solid var(--dark-border, rgba(255,255,255,0.08));
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

.hz-filter-bar .search-icon {
  color: rgba(240,240,250,0.40);
}

.hz-filter-bar .results-count {
  color: rgba(240,240,250,0.50);
}

.hz-btn-export {
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-light-secondary, rgba(240,240,250,0.65));
  background: transparent;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.hz-btn-export:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-light, #F0F0FA);
}

/* 6. Table — dark variant */
.hz-table-wrapper {
  overflow-x: auto;
}

table.hz-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--dark-bg, #0F172A);
}

table.hz-table thead th {
  color: rgba(240,240,250,0.40);
  background: var(--dark-bg, #0F172A);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}

table.hz-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: transparent;
}

table.hz-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.02);
}

table.hz-table tbody tr:hover {
  background: rgba(255,255,255,0.06);
}

table.hz-table td {
  color: #F0F0FA;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

table.hz-table .td-rank {
  color: rgba(240,240,250,0.50);
}

table.hz-table .td-country {
  color: #F0F0FA;
  font-weight: 500;
}

.hz-th-detail {
  text-align: right;
  min-width: 80px;
}

table.hz-table .hz-detail-cell {
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: rgba(240,240,250,0.65);
}

.hz-score-cell {
  font-weight: 700;
  font-size: 18px;
}

.hz-bar-cell {
  width: 120px;
}

.hz-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.hz-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.hz-exporter-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(249,115,22,0.15);
  color: #f97316;
  margin-left: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hz-estimated-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(96,165,250,0.15);
  color: #60a5fa;
  margin-left: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 7. Score color classes */
.hz-score-critical {
  color: #ef4444;
}

.hz-score-high {
  color: #f97316;
}

.hz-score-moderate {
  color: #f59e0b;
}

.hz-score-low {
  color: #84cc16;
}

.hz-score-insulated {
  color: #22c55e;
}

/* Bar fill color variants */
.hz-bar-fill.hz-score-critical {
  background: #ef4444;
}

.hz-bar-fill.hz-score-high {
  background: #f97316;
}

.hz-bar-fill.hz-score-moderate {
  background: #f59e0b;
}

.hz-bar-fill.hz-score-low {
  background: #84cc16;
}

.hz-bar-fill.hz-score-insulated {
  background: #22c55e;
}

/* 8. Map panel */
.hz-map-container {
  position: relative;
  min-height: 500px;
}

#hz-world-map {
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--dark-bg, #0F172A);
}

.hz-map-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30,41,59,0.9);
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--dark-border, rgba(255,255,255,0.08));
  font-size: 12px;
  color: var(--text-light-secondary, rgba(240,240,250,0.65));
  backdrop-filter: blur(8px);
  z-index: 5;
}

.hz-legend-gradient {
  background: linear-gradient(to right, #22c55e, #84cc16, #f59e0b, #f97316, #ef4444);
  height: 12px;
  width: 200px;
  border-radius: 6px;
}

#hz-map-tooltip {
  position: absolute;
  display: none;
  background: var(--dark-bg-card, #1E293B);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-light, #F0F0FA);
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 9. Detail panel */
.hz-detail-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hz-detail-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hz-detail-selector select {
  background: var(--dark-bg-card, #1E293B);
  color: var(--text-light, #F0F0FA);
  border: 1px solid var(--dark-border, rgba(255,255,255,0.08));
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

.hz-detail-label {
  color: var(--text-light-secondary, rgba(240,240,250,0.65));
  font-size: 14px;
}

.hz-detail-content {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 40px;
}

.hz-detail-chart-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hz-detail-chart-col canvas {
  max-width: 100%;
}

.hz-detail-info-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hz-detail-score-big {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
}

.hz-detail-score-label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.hz-detail-rank {
  font-size: 14px;
  color: var(--text-light-muted, rgba(240,240,250,0.40));
  margin-top: 8px;
}

.hz-breakdown-item {
  margin-bottom: 12px;
}

.hz-breakdown-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-light-secondary, rgba(240,240,250,0.65));
  margin-bottom: 4px;
}

.hz-breakdown-value {
  font-weight: 600;
  color: var(--text-light, #F0F0FA);
}

.hz-breakdown-bar-track {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}

.hz-breakdown-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Breakdown bar fill color variants */
.hz-breakdown-bar-fill.hz-score-critical {
  background: #ef4444;
}

.hz-breakdown-bar-fill.hz-score-high {
  background: #f97316;
}

.hz-breakdown-bar-fill.hz-score-moderate {
  background: #f59e0b;
}

.hz-breakdown-bar-fill.hz-score-low {
  background: #84cc16;
}

.hz-breakdown-bar-fill.hz-score-insulated {
  background: #22c55e;
}

/* 10. Scenario panel */
.hz-scenario-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

.hz-scenario-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hz-slider-label {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-light, #F0F0FA);
}

.hz-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.hz-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f97316;
  cursor: pointer;
  border: 2px solid #ffffff;
}

.hz-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f97316;
  cursor: pointer;
  border: 2px solid #ffffff;
}

.hz-price-display {
  text-align: center;
  margin-top: 8px;
}

.hz-price-value {
  font-size: 48px;
  font-weight: 800;
  color: #f97316;
  line-height: 1.1;
}

.hz-price-unit {
  font-size: 16px;
  color: var(--text-light-secondary, rgba(240,240,250,0.65));
  margin-left: 4px;
}

.hz-price-marks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-light-muted, rgba(240,240,250,0.40));
  margin-top: 4px;
}

.hz-scenario-chart-wrap {
  position: relative;
}

#hz-scenario-chart {
  width: 100%;
  border-radius: 8px;
}

.hz-scenario-tooltip {
  position: absolute;
  display: none;
  background: var(--dark-bg-card, #1E293B);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-light, #F0F0FA);
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 11. Responsive — Hormuz */
@media (max-width: 1024px) {
  .hz-hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .hz-detail-content {
    grid-template-columns: 1fr;
  }

  .hz-scenario-layout {
    grid-template-columns: 1fr;
  }

  .hz-th-detail {
    display: none;
  }

  .hz-detail-cell {
    display: none;
  }
}

@media (max-width: 768px) {
  .hz-hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .hz-stat-card {
    padding: 16px;
  }

  .hz-stat-number {
    font-size: 28px;
  }

  .hz-tabs {
    flex-wrap: wrap;
  }

  .hz-tab {
    padding: 10px 16px;
    font-size: 13px;
  }

  .hz-detail-content {
    grid-template-columns: 1fr;
  }

  #hz-world-map {
    height: 350px;
  }
}

@media (max-width: 480px) {
  .hz-hero-stats {
    grid-template-columns: 1fr;
  }

  .hz-stat-card {
    padding: 12px 16px;
  }

  .hz-stat-number {
    font-size: 24px;
  }

  .hz-tabs {
    gap: 2px;
  }

  .hz-tab {
    padding: 8px 12px;
    font-size: 12px;
  }

  #hz-world-map {
    height: 280px;
  }

  .hz-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
}
