@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --mario-red: #E52521;
  --mario-blue: #049CD8;
  --mario-green: #43B047;
  --mario-yellow: #FBD000;
  --mario-brown: #A0522D;
  --mario-orange: #F5A623;
  --mario-sky: #6BB6FF;
  --mario-cream: #FFF8F0;
  --mario-brick: #C84C09;

  --bg: #F4F6FA;
  --panel: #FFFFFF;
  --border: #E2E6EE;
  --accent: var(--mario-red);
  --accent2: var(--mario-blue);
  --accent3: var(--mario-green);
  --text: #3A3D4A;
  --textbright: #14161E;
  --dim: #6B7280;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.6;
}

canvas#scene3d {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  filter: saturate(0.7) brightness(0.95);
}
canvas#scene3d::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(244,246,250,0.25) 0%, rgba(244,246,250,0.6) 100%);
  pointer-events: none;
  z-index: 1;
}

.overlay {
  position: relative;
  z-index: 10;
  pointer-events: none;
}

.overlay > * {
  pointer-events: auto;
}

/* ==================== HEADER ==================== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 3px solid var(--mario-red);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--mario-red);
}

.logo-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--dim);
  text-transform: uppercase;
  margin-top: 1px;
}

.nav-pills {
  display: flex;
  gap: 6px;
}

.nav-pill {
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--dim);
  background: transparent;
  transition: all 0.2s;
}

.nav-pill:hover, .nav-pill.active {
  color: #fff;
  border-color: var(--mario-red);
  background: var(--mario-red);
  box-shadow: 0 2px 8px rgba(229,37,33,0.25);
}

/* ==================== HERO ==================== */
.hero-spacer {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  position: relative;
}
.hero-spacer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.55) 0%, rgba(244,246,250,0.15) 60%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}
.hero-card {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 48px;
  border-radius: 24px;
  background: rgba(20, 22, 30, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
  max-width: min(92vw, 880px);
  animation: fadeUp 0.9s ease both;
}
.hero-card::before {
  content: "🇩🇿";
  position: absolute;
  top: -22px;
  background: #14161E;
  border: 3px solid var(--mario-yellow);
  border-radius: 999px;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px, 5.5vw, 60px);
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 2px 14px rgba(0,0,0,0.5);
  animation: fadeUp 0.8s ease both;
}
.hero-title .hero-accent {
  background: linear-gradient(135deg, #FBD000 0%, #F5A623 50%, #E52521 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
}

.hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: clamp(13px, 1.5vw, 17px);
  font-weight: 600;
  letter-spacing: 2px;
  color: #E8EAF2;
  text-transform: uppercase;
  margin: 0;
  animation: fadeUp 0.8s ease 0.15s both;
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  animation: bounce 2s ease infinite;
  color: var(--mario-blue);
  font-size: 22px;
  font-weight: 700;
}

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

@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ==================== SECTIONS ==================== */
.section {
  padding: 80px 40px;
  max-width: 1400px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}

.section-tag {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--mario-blue);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-block;
  background: rgba(4,156,216,0.08);
  padding: 4px 12px;
  border-radius: 6px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 700;
  color: var(--textbright);
  margin-bottom: 32px;
  line-height: 1.2;
}

/* ==================== KPI CARDS ==================== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.kpi-card {
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--mario-red);
  transform: scaleX(0);
  transition: transform 0.3s;
  transform-origin: left;
}

.kpi-card:hover::before { transform: scaleX(1); }

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--mario-red);
}

.kpi-card:nth-child(2n)::before { background: var(--mario-blue); }
.kpi-card:nth-child(2n):hover { border-color: var(--mario-blue); }
.kpi-card:nth-child(3n)::before { background: var(--mario-green); }
.kpi-card:nth-child(3n):hover { border-color: var(--mario-green); }

.kpi-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--mario-red);
  line-height: 1;
}

.kpi-card:nth-child(2n) .kpi-value { color: var(--mario-blue); }
.kpi-card:nth-child(3n) .kpi-value { color: var(--mario-green); }

.kpi-unit {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--mario-orange);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.kpi-label {
  font-size: 13px;
  color: var(--dim);
  margin-top: 6px;
  line-height: 1.4;
  font-weight: 500;
}

/* ==================== DIVIDER ==================== */
.glow-line {
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--mario-red) 0 30px,
    var(--mario-yellow) 30px 60px,
    var(--mario-green) 60px 90px,
    var(--mario-blue) 90px 120px
  );
  margin: 0 auto;
  border-radius: 2px;
  opacity: 0.5;
  max-width: 1400px;
  position: relative;
  z-index: 10;
  box-shadow: 0 0 0 40px var(--bg);
}

/* ==================== FLOW DIAGRAM ==================== */
.flow-container {
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  margin: 32px 0;
  overflow-x: auto;
  box-shadow: var(--shadow);
}

.flow-phase-header {
  text-align: center;
  margin-bottom: 24px;
}

.flow-phase-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 24px;
  border-radius: 8px;
  display: inline-block;
}

.flow-phase-title.day {
  color: var(--mario-blue);
  background: rgba(4,156,216,0.08);
  border: 1.5px solid rgba(4,156,216,0.2);
}

.flow-phase-title.night {
  color: var(--mario-red);
  background: rgba(229,37,33,0.06);
  border: 1.5px solid rgba(229,37,33,0.2);
}

.flow-divider {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-divider-line {
  width: 2px;
  height: 28px;
  background: var(--border);
  border-radius: 1px;
}

.flow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.flow-box {
  padding: 14px 20px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  min-width: 135px;
  transition: all 0.2s;
  position: relative;
}

.flow-box:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.flow-input {
  background: rgba(4,156,216,0.07);
  border: 1.5px solid var(--mario-blue);
  color: var(--mario-blue);
}

.flow-process {
  background: rgba(67,176,71,0.07);
  border: 1.5px solid var(--mario-green);
  color: #2D7A32;
}

.flow-output {
  background: rgba(229,37,33,0.06);
  border: 1.5px solid var(--mario-red);
  color: var(--mario-red);
}

.flow-arrow {
  font-size: 20px;
  color: var(--mario-yellow);
  font-weight: 900;
}

.flow-label {
  font-size: 10px;
  color: var(--dim);
  text-align: center;
  margin-top: 3px;
  font-weight: 600;
}

/* ==================== COMPARISON TABLE ==================== */
.comp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 32px 0;
  font-size: 13px;
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
}

.comp-table th {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  background: var(--mario-blue);
}

.comp-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
  font-weight: 500;
}

.comp-table tr:hover td {
  background: rgba(4,156,216,0.03);
}

.comp-table .highlight-row td {
  background: rgba(67,176,71,0.06);
  border-left: 3px solid var(--mario-green);
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-green { background: rgba(67,176,71,0.12); color: #2D7A32; }
.badge-blue { background: rgba(4,156,216,0.12); color: #0480B0; }
.badge-orange { background: rgba(245,166,35,0.15); color: #B06E00; }
.badge-red { background: rgba(229,37,33,0.12); color: #B01A17; }

/* ==================== BAR CHARTS ==================== */
.bar-chart-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0;
}

@media (max-width: 900px) {
  .bar-chart-section { grid-template-columns: 1fr; }
}

.chart-panel {
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.chart-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--textbright);
  margin-bottom: 18px;
  text-transform: uppercase;
}

.bar-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

.bar-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--dim);
  min-width: 90px;
  text-align: right;
}

.bar-track {
  flex: 1;
  height: 26px;
  background: #F0F2F5;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  transition: width 1.5s cubic-bezier(0.22,1,0.36,1);
  width: 0;
}

.bar-fill.blue { background: var(--mario-blue); }
.bar-fill.green { background: var(--mario-green); }
.bar-fill.orange { background: var(--mario-orange); }
.bar-fill.red { background: var(--mario-red); }

/* ==================== SPEC CARDS ==================== */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.spec-card {
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.25s;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.spec-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--mario-blue);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.spec-card:hover::after { transform: scaleX(1); }

.spec-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--mario-blue);
}

.spec-card:nth-child(2n)::after { background: var(--mario-red); }
.spec-card:nth-child(2n):hover { border-color: var(--mario-red); }
.spec-card:nth-child(3n)::after { background: var(--mario-green); }
.spec-card:nth-child(3n):hover { border-color: var(--mario-green); }

.spec-card-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.spec-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--textbright);
  margin-bottom: 8px;
}

.spec-card-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--dim);
  font-weight: 500;
}

.spec-card-body strong {
  color: var(--mario-red);
  font-weight: 700;
}

.spec-card:nth-child(2n) .spec-card-body strong { color: var(--mario-blue); }
.spec-card:nth-child(3n) .spec-card-body strong { color: var(--mario-green); }

/* ==================== CHEMISTRY SECTION ==================== */
.chem-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0;
}
@media (max-width: 760px) {
  .chem-grid { grid-template-columns: 1fr; }
}

.chem-card {
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: all 0.25s;
}

.chem-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.chem-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.chem-card-num {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.chem-card:nth-child(1) .chem-card-num { background: var(--mario-red); }
.chem-card:nth-child(2) .chem-card-num { background: var(--mario-blue); }
.chem-card:nth-child(3) .chem-card-num { background: var(--mario-green); }
.chem-card:nth-child(4) .chem-card-num { background: var(--mario-orange); }
.chem-card:nth-child(5) .chem-card-num { background: var(--mario-brick); }
.chem-card:nth-child(6) .chem-card-num { background: var(--mario-blue); }

.chem-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--textbright);
}

.chem-card-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--dim);
  font-weight: 500;
  margin-bottom: 14px;
}

.equation {
  background: #F6F8FB;
  border: 1px solid var(--border);
  border-left: 4px solid var(--mario-blue);
  border-radius: 8px;
  padding: 14px 18px;
  font-family: 'Space Grotesk', monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--textbright);
  text-align: center;
  margin: 10px 0;
  /* Allow long equations to wrap instead of scrolling horizontally */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.55;
}

.equation.red { border-left-color: var(--mario-red); }
.equation.green { border-left-color: var(--mario-green); }
.equation.orange { border-left-color: var(--mario-orange); }

.chem-note {
  font-size: 12px;
  color: var(--dim);
  font-style: italic;
  margin-top: 8px;
  line-height: 1.5;
}

/* ==================== CONFIGURATOR / SLIDER ==================== */
.configurator {
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  margin: 32px 0;
  box-shadow: var(--shadow);
}

.config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.config-header-left {
  flex: 1;
}

.config-slider-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.config-slider-label {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--textbright);
  min-width: 160px;
}

.config-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #E8ECF2;
  outline: none;
  max-width: 400px;
}

.config-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mario-red);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(229,37,33,0.3);
  transition: transform 0.15s;
}

.config-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.config-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mario-red);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(229,37,33,0.3);
}

.config-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--mario-red);
  min-width: 110px;
  text-align: right;
}

.config-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.config-result-card {
  background: #F6F8FB;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 16px;
  text-align: center;
  transition: all 0.3s;
}

.config-result-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--mario-blue);
  line-height: 1;
}

.config-result-unit {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--mario-orange);
  margin-top: 4px;
}

.config-result-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--dim);
  margin-top: 4px;
}

.config-result-card:nth-child(2n) .config-result-value { color: var(--mario-red); }
.config-result-card:nth-child(3n) .config-result-value { color: var(--mario-green); }

.config-note {
  margin-top: 20px;
  padding: 12px 16px;
  background: rgba(4,156,216,0.06);
  border-radius: 8px;
  font-size: 13px;
  color: var(--dim);
  font-weight: 500;
  line-height: 1.6;
}

.config-note strong {
  color: var(--textbright);
  font-weight: 700;
}

/* ==================== LOCATIONS ==================== */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.location-card {
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.location-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--mario-blue);
}

.location-flag {
  font-size: 28px;
  line-height: 1;
}

.location-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--textbright);
}

.location-details {
  font-size: 13px;
  line-height: 1.6;
  color: var(--dim);
  font-weight: 500;
}

.location-details strong {
  color: var(--textbright);
  font-weight: 700;
}

/* ==================== TIMELINE ==================== */
.timeline {
  position: relative;
  padding-left: 0;
  margin: 40px 0;
  display: grid;
  gap: 0;
}

.timeline-track {
  display: flex;
  position: relative;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  z-index: 0;
}

.timeline-item {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 12px;
}

.timeline-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.timeline-item:nth-child(1) .timeline-dot { background: var(--mario-red); }
.timeline-item:nth-child(2) .timeline-dot { background: var(--mario-blue); }
.timeline-item:nth-child(3) .timeline-dot { background: var(--mario-green); }
.timeline-item:nth-child(4) .timeline-dot { background: var(--mario-orange); }
.timeline-item:nth-child(5) .timeline-dot { background: var(--mario-brick); }

.timeline-year {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--textbright);
  margin-bottom: 6px;
}

.timeline-text {
  font-size: 13px;
  color: var(--dim);
  line-height: 1.5;
  font-weight: 500;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}

/* ==================== WHITEPAPER ==================== */
.wp-container {
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 48px 56px;
  margin: 32px 0;
  box-shadow: var(--shadow);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.wp-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.wp-version {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: var(--mario-red);
  padding: 4px 12px;
  border-radius: 6px;
}

.wp-date {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--dim);
}

.wp-authors {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--textbright);
}

.wp-abstract {
  background: rgba(4,156,216,0.05);
  border: 1px solid rgba(4,156,216,0.15);
  border-left: 4px solid var(--mario-blue);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 24px 0;
}

.wp-abstract-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mario-blue);
  margin-bottom: 8px;
}

.wp-abstract p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  font-weight: 500;
  font-style: italic;
}

.wp-toc {
  background: #F6F8FB;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 24px 0;
}

.wp-toc-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--textbright);
  margin-bottom: 10px;
}

.wp-toc ol {
  list-style: none;
  counter-reset: toc;
  padding: 0;
}

.wp-toc ol li {
  counter-increment: toc;
  font-size: 13px;
  font-weight: 600;
  color: var(--mario-blue);
  padding: 4px 0;
  cursor: default;
}

.wp-toc ol li::before {
  content: counter(toc) ".";
  display: inline-block;
  width: 24px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--mario-red);
}

.wp-h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--textbright);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--mario-red);
  display: flex;
  align-items: center;
  gap: 10px;
}

.wp-h2-num {
  background: var(--mario-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wp-h2:nth-of-type(2n) { border-bottom-color: var(--mario-blue); }
.wp-h2:nth-of-type(2n) .wp-h2-num { background: var(--mario-blue); }
.wp-h2:nth-of-type(3n) { border-bottom-color: var(--mario-green); }
.wp-h2:nth-of-type(3n) .wp-h2-num { background: var(--mario-green); }

.wp-h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--textbright);
  margin: 24px 0 10px;
}

.wp-p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
  font-weight: 450;
  margin-bottom: 14px;
}

.wp-p strong {
  color: var(--textbright);
  font-weight: 700;
}

.wp-highlight {
  background: rgba(229,37,33,0.05);
  border: 1px solid rgba(229,37,33,0.15);
  border-left: 4px solid var(--mario-red);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  font-weight: 500;
}

.wp-highlight.green {
  background: rgba(67,176,71,0.05);
  border-color: rgba(67,176,71,0.15);
  border-left-color: var(--mario-green);
}

.wp-highlight.blue {
  background: rgba(4,156,216,0.05);
  border-color: rgba(4,156,216,0.15);
  border-left-color: var(--mario-blue);
}

.wp-highlight.orange {
  background: rgba(245,166,35,0.08);
  border-color: rgba(245,166,35,0.2);
  border-left-color: var(--mario-orange);
}

.wp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  font-size: 13px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.wp-table th {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  background: var(--mario-blue);
}

.wp-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
}

.wp-table tr:last-child td { border-bottom: none; }
.wp-table tr:nth-child(even) td { background: #F8FAFB; }

.wp-list {
  padding-left: 20px;
  margin: 10px 0 16px;
}

.wp-list li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  font-weight: 450;
  margin-bottom: 4px;
}

.wp-list li strong {
  color: var(--textbright);
  font-weight: 700;
}

.wp-refs {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.wp-refs-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--textbright);
  margin-bottom: 10px;
}

.wp-ref {
  font-size: 12px;
  line-height: 1.6;
  color: var(--dim);
  font-weight: 500;
  padding: 3px 0;
}

.wp-ref span {
  font-weight: 700;
  color: var(--mario-blue);
}

@media (max-width: 768px) {
  .wp-container { padding: 24px 20px; }
}

/* ==================== FOOTER ==================== */
footer {
  text-align: center;
  padding: 48px 40px;
  background: var(--textbright);
  margin-top: 60px;
}

.footer-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--mario-red);
}

.footer-text {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  font-weight: 500;
}

/* ==================== SCROLL ANIMATIONS ==================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== CONTROL HINT ==================== */
.control-hint {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 11px;
  color: var(--dim);
  z-index: 50;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  box-shadow: var(--shadow);
  pointer-events: none;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .timeline-track { flex-direction: column; gap: 20px; }
  .timeline-track::before {
    top: 0; bottom: 0; left: 18px; right: auto;
    width: 3px; height: auto;
  }
  .timeline-item { text-align: left; padding: 0 0 0 56px; }
  .timeline-dot { margin: 0; position: absolute; left: 0; top: 0; }
}

@media (max-width: 768px) {
  header { padding: 12px 16px; flex-direction: column; gap: 10px; }
  .section { padding: 40px 16px; }
  .flow-container { padding: 20px; }
  .nav-pills { flex-wrap: wrap; justify-content: center; }
  .configurator { padding: 20px; }
  .config-slider-group { flex-direction: column; align-items: flex-start; }
  .config-slider { max-width: 100%; width: 100%; }
  .chem-grid { grid-template-columns: 1fr; }
  .dz-strategy-grid { grid-template-columns: 1fr !important; }
  .dz-roadmap-track { flex-direction: column !important; }
  .dz-score-row { grid-template-columns: 1fr !important; }
  .dz-map-legend { flex-direction: column !important; }
}

/* ============ ALGÉRIE — HERO TAGLINE ============ */
.logo-flag { font-size: 0.9em; margin-left: 6px; }
.hero-tagline {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 1.5px;
  color: var(--mario-yellow);
  text-transform: uppercase;
  padding: 8px 18px;
  background: rgba(251, 208, 0, 0.12);
  border: 1px solid rgba(251, 208, 0, 0.4);
  border-radius: 999px;
  animation: fadeUp 0.8s ease 0.3s both;
}

/* ============ DZ MAP ============ */
.dz-map-wrap {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.dz-map {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  background: linear-gradient(180deg, #E8F4FC 0%, #FEF8E6 40%, #FDECC4 100%);
}
.dz-map-sea-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  fill: #1E5B8C;
  letter-spacing: 2px;
}
.dz-map-region {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  fill: #8B5A1A;
  letter-spacing: 1.5px;
}
.dz-map-region-light {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  fill: #A88040;
}
.dz-map-neighbor {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  fill: #999;
  letter-spacing: 1px;
}
.dz-map-capital {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 800;
  fill: #14161E;
  letter-spacing: 1px;
}
.dz-map-coast {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  fill: #1E5B8C;
  font-style: italic;
}
.dz-map-pin-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 800;
  fill: #14161E;
}
.dz-site { cursor: pointer; transition: transform 0.25s; transform-origin: center; transform-box: fill-box; }
.dz-site:hover { transform: scale(1.08); }
.dz-site circle:first-child { animation: dzPulse 2.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes dzPulse {
  0%, 100% { opacity: 0.3; r: 20; }
  50% { opacity: 0.9; r: 30; }
}

.dz-map-legend {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.dz-legend-item { display: flex; align-items: center; gap: 8px; }
.dz-dot {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

/* ============ LOCATION CARD VARIANTS ============ */
.location-card.card-flash {
  animation: cardFlash 2.4s ease-out;
  box-shadow: 0 0 0 4px var(--mario-yellow), var(--shadow-hover);
}
@keyframes cardFlash {
  0%   { transform: scale(1); }
  10%  { transform: scale(1.03); box-shadow: 0 0 0 6px var(--mario-yellow), var(--shadow-hover); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 transparent, var(--shadow); }
}

.location-card--red   { border-top: 5px solid var(--mario-red); }
.location-card--blue  { border-top: 5px solid var(--mario-blue); }
.location-card--green { border-top: 5px solid var(--mario-green); }
.location-card--orange{ border-top: 5px solid var(--mario-orange); }

.location-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.loc-tag {
  display: inline-block;
  background: #F4F6FA;
  color: #4a4d5a;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
}
.loc-tag-red    { background: #FFE5E4; color: #A4211D; border-color: #F4B9B7; }
.loc-tag-blue   { background: #DDF0FA; color: #035884; border-color: #A8D8F0; }
.loc-tag-green  { background: #DFF3E0; color: #2A6E2D; border-color: #A8DAAB; }
.loc-tag-orange { background: #FFEACC; color: #8B5100; border-color: #F4C888; }

/* ============ SCORECARD ============ */
.dz-scorecard {
  margin-top: 40px;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.dz-scorecard-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--textbright);
  margin-bottom: 22px;
  text-align: center;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.dz-score-grid { display: flex; flex-direction: column; gap: 14px; }
.dz-score-row {
  display: grid;
  grid-template-columns: 180px 1fr 260px;
  gap: 16px;
  align-items: center;
}
.dz-score-label {
  font-weight: 700;
  color: var(--textbright);
  font-size: 0.95rem;
}
.dz-score-bar {
  height: 18px;
  background: #F4F6FA;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.dz-score-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1s ease-out;
}
.dz-score-val {
  font-weight: 800;
  color: var(--textbright);
  font-size: 0.95rem;
}
.dz-score-val span {
  display: block;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--dim);
  margin-top: 2px;
}

/* ============ STRATEGY GRID ============ */
.dz-strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.dz-strategy-card {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}
.dz-strategy-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.dz-strat-icon { font-size: 2rem; margin-bottom: 10px; }
.dz-strat-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--textbright);
  margin-bottom: 12px;
}
.dz-strat-body { font-size: 0.92rem; line-height: 1.6; color: var(--text); }
.dz-strat-body ul { padding-left: 18px; }
.dz-strat-body li { margin-bottom: 6px; }

.dz-strat-vision    { border-top: 5px solid var(--mario-green); }
.dz-strat-vigilance { border-top: 5px solid var(--mario-orange); }
.dz-strat-biz       { border-top: 5px solid var(--mario-blue); }
.dz-strat-partners  { border-top: 5px solid var(--mario-red); }

/* ============ ROADMAP DZ ============ */
.dz-roadmap {
  margin-top: 40px;
  background: linear-gradient(135deg, #14161E 0%, #2A2D3A 100%);
  border-radius: 20px;
  padding: 32px;
  color: #fff;
}
.dz-roadmap-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 28px;
  color: var(--mario-yellow);
}
.dz-roadmap-track {
  display: flex;
  gap: 14px;
  justify-content: space-between;
}
.dz-road-step {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 18px;
}
.dz-road-year {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--mario-yellow);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.dz-road-body {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #D8DBE5;
}
.dz-road-body strong { color: #fff; }

/* ============ DZ MAP v2 — shell + detail panel ============ */
.dz-map-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 24px;
  pointer-events: auto;
}
.dz-map-wrap {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.dz-land {
  filter: drop-shadow(0 6px 10px rgba(160,104,24,0.25));
  transition: filter 0.3s;
}
.dz-pulse {
  animation: dzPulseV2 2.4s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes dzPulseV2 {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%      { opacity: 0.9; transform: scale(1.3); }
}
.dz-site { cursor: pointer; transition: transform 0.3s; transform-origin: center; transform-box: fill-box; }
.dz-site:hover { transform: scale(1.06); }
.dz-site.dz-site-active text.dz-pin-title { fill: #fff; }
.dz-site.dz-site-active rect { fill: #14161E; }

.dz-pin-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 800;
  fill: #fff;
}
.dz-pin-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 800;
  fill: #14161E;
  letter-spacing: 0.5px;
}
.dz-pin-sub {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  fill: #6B7280;
}

.dz-solar-chip {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #FBD000 0%, rgba(251,208,0,0.2) 100%);
  border: 2px solid #FBD000;
}

/* Detail panel */
.dz-detail-panel {
  background: linear-gradient(160deg, #14161E 0%, #2A2D3A 100%);
  border-radius: 20px;
  padding: 28px;
  color: #fff;
  box-shadow: var(--shadow);
  min-height: 500px;
  position: relative;
  overflow: hidden;
}
.dz-detail-hint {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  color: #8A8F9E;
  text-align: center;
  padding: 40px 10px;
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: 14px;
}
.dz-detail-content {
  display: none;
  animation: dzFade 0.4s ease-out;
}
.dz-detail-content.active { display: block; }
.dz-detail-panel.has-active .dz-detail-hint { display: none; }
@keyframes dzFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dz-detail-badge {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.dz-detail-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.dz-detail-coord {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  color: var(--mario-yellow);
  margin-bottom: 20px;
  letter-spacing: 1px;
}
.dz-detail-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.dz-metric {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 12px;
}
.dz-metric span {
  display: block;
  font-size: 0.7rem;
  color: #8A8F9E;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.dz-metric strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  color: #fff;
}
.dz-detail-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #D8DBE5;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ============ SALINITY COMPARISON ============ */
.dz-salinity-wrap {
  margin-top: 40px;
  pointer-events: auto;
}
.dz-sub-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--textbright);
  margin-bottom: 20px;
}
.dz-salinity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.dz-sal-card {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}
.dz-sal-card:hover { transform: translateY(-3px); }
.dz-sal-low  { border-top: 5px solid var(--mario-green); }
.dz-sal-mid  { border-top: 5px solid var(--mario-blue); }
.dz-sal-high { border-top: 5px solid var(--mario-red); }
.dz-sal-top {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.dz-sal-drop {
  font-size: 1.8rem;
  margin-bottom: 4px;
}
.dz-sal-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--textbright);
  line-height: 1;
}
.dz-sal-type {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: 1.5px;
  margin: 8px 0 14px;
}
.dz-sal-bar {
  height: 14px;
  background: #F4F6FA;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.dz-sal-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1.2s ease-out;
}
.dz-sal-energy {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  color: var(--textbright);
  font-size: 1.1rem;
}
.dz-sal-note {
  font-size: 0.8rem;
  color: var(--dim);
  margin-top: 6px;
  line-height: 1.4;
}

/* ============ FINANCIAL DASHBOARD ============ */
.dz-finance-wrap {
  margin-top: 40px;
}
.dz-finance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.dz-fin-card {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.dz-fin-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--textbright);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.dz-fin-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 0.9rem;
  color: var(--dim);
  text-align: center;
}
.dz-fin-footer strong { color: var(--textbright); }

/* Donut */
.dz-donut-wrap { display: flex; justify-content: center; align-items: center; }
.dz-donut { width: 220px; height: 220px; }
.dz-slice {
  transition: stroke-dasharray 1.2s ease-out;
}
.dz-donut-center {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  font-weight: 800;
  fill: var(--textbright);
}
.dz-donut-sub {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  fill: var(--dim);
  letter-spacing: 2px;
}
.dz-donut-legend {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text);
}
.dz-donut-legend div { display: flex; align-items: center; gap: 8px; }
.dz-donut-legend span {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Revenue bars */
.dz-rev-row { margin-bottom: 12px; }
.dz-rev-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.dz-rev-bar {
  height: 26px;
  background: #F4F6FA;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.dz-rev-fill {
  height: 100%;
  border-radius: 8px;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  transition: width 1.2s ease-out;
  white-space: nowrap;
}

/* ROI chart */
.dz-roi-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 180px;
  padding: 10px 0;
  border-bottom: 2px solid var(--border);
  gap: 6px;
}
.dz-roi-year {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}
.dz-roi-year span {
  font-size: 0.7rem;
  color: var(--dim);
  font-weight: 700;
  position: absolute;
  bottom: -22px;
  white-space: nowrap;
}
.dz-roi-year em {
  font-style: normal;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--textbright);
  margin-bottom: 4px;
}
.dz-roi-bar {
  width: 70%;
  border-radius: 6px 6px 0 0;
  min-height: 6px;
  transition: height 1s ease-out;
}
.dz-roi-bar.loss { background: linear-gradient(180deg, #E52521, #A4211D); }
.dz-roi-bar.neutral { background: #FBD000; }
.dz-roi-bar.gain { background: linear-gradient(180deg, #5FD064, #2F8E33); }
.dz-roi-year.breakeven em { color: var(--mario-yellow); background: #14161E; padding: 2px 6px; border-radius: 4px; }

/* Impact card */
.dz-fin-impact { background: linear-gradient(145deg, #14161E, #2A2D3A); color: #fff; }
.dz-fin-impact .dz-fin-title { color: var(--mario-yellow); border-bottom-color: rgba(255,255,255,0.15); }
.dz-fin-impact .dz-fin-footer { border-top-color: rgba(255,255,255,0.1); color: #8A8F9E; }
.dz-impact-kpi {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.dz-impact-kpi:last-child { border-bottom: none; }
.dz-imp-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--mario-yellow);
  text-align: right;
  line-height: 1;
}
.dz-imp-label {
  font-size: 0.85rem;
  color: #D8DBE5;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 1024px) {
  .dz-map-shell { grid-template-columns: 1fr; }
  .dz-detail-panel { min-height: 0; }
  .dz-finance-grid { grid-template-columns: 1fr; }
  .dz-salinity-grid { grid-template-columns: 1fr; }
  .dz-score-row { grid-template-columns: 140px 1fr 200px; }
}
@media (max-width: 640px) {
  .dz-detail-metrics { grid-template-columns: 1fr; }
  .dz-donut-legend { grid-template-columns: 1fr; }
  .dz-impact-kpi { grid-template-columns: 100px 1fr; }
  .dz-imp-value { font-size: 1.5rem; }
}

/* ============ LEAFLET MAP v3 ============ */
.dz-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.dz-map-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--textbright);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.dz-map-layers { display: flex; gap: 6px; }
.dz-layer-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
.dz-layer-btn:hover { border-color: var(--mario-blue); }
.dz-layer-btn.active {
  background: var(--textbright);
  color: #fff;
  border-color: var(--textbright);
}

.dz-leaflet {
  width: 100%;
  height: 560px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}
.dz-leaflet .leaflet-control-attribution { font-size: 10px; }
.dz-leaflet .leaflet-popup-content-wrapper {
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}
.dz-leaflet .leaflet-popup-content {
  margin: 10px 14px;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  min-width: 200px;
}
.dz-popup-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--textbright);
  margin-bottom: 4px;
}
.dz-popup-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  margin-bottom: 8px;
}
.dz-popup-meta { font-size: 0.8rem; color: var(--dim); }
.dz-popup-meta strong { color: var(--textbright); }
.dz-popup-btn {
  display: inline-block;
  margin-top: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--textbright);
  color: #fff !important;
  text-decoration: none;
  letter-spacing: 0.5px;
  cursor: pointer;
  border: none;
}

/* Custom Leaflet marker */
.dz-custom-pin {
  background: transparent;
  border: none;
}
.dz-pin-outer {
  width: 42px; height: 42px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dz-pin-inner {
  width: 36px; height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--pin-color, #E52521);
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dz-pin-inner span {
  transform: rotate(45deg);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 16px;
}
.dz-pin-outer::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--pin-color, #E52521);
  opacity: 0.35;
  animation: dzMapPulse 2.2s ease-out infinite;
}
@keyframes dzMapPulse {
  0%   { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(2); opacity: 0; }
}

/* Map legend as buttons */
.dz-map-legend {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dz-map-legend .dz-legend-item {
  padding: 8px 14px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  color: var(--text);
}
.dz-map-legend .dz-legend-item:hover {
  transform: translateY(-2px);
  border-color: var(--textbright);
  box-shadow: var(--shadow);
}

/* Partner chips in detail panel */
.dz-partners-local {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.dz-partners-label {
  font-size: 0.72rem;
  color: #8A8F9E;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 10px;
}
.dz-partner-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dz-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #D8DBE5;
  border: 1px solid rgba(255,255,255,0.12);
}
.dz-chip-red    { background: rgba(229,37,33,0.25); color: #FFBAB8; border-color: rgba(229,37,33,0.5); }
.dz-chip-blue   { background: rgba(4,156,216,0.25); color: #9ED8F2; border-color: rgba(4,156,216,0.5); }
.dz-chip-green  { background: rgba(67,176,71,0.25); color: #A8E4AB; border-color: rgba(67,176,71,0.5); }
.dz-chip-orange { background: rgba(245,166,35,0.25); color: #FBD89B; border-color: rgba(245,166,35,0.5); }

/* ============ LOCAL ECOSYSTEM ============ */
.dz-eco-wrap {
  margin-top: 50px;
  pointer-events: auto;
}
.dz-eco-note {
  text-align: center;
  font-size: 0.95rem;
  color: var(--dim);
  max-width: 760px;
  margin: 0 auto 30px;
  line-height: 1.6;
}
.dz-eco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.dz-eco-cat {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}
.dz-eco-cat:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.dz-eco-energy { border-top: 5px solid var(--mario-yellow); }
.dz-eco-water  { border-top: 5px solid var(--mario-blue); }
.dz-eco-btp    { border-top: 5px solid var(--mario-orange); }
.dz-eco-tech   { border-top: 5px solid var(--mario-green); }
.dz-eco-ind    { border-top: 5px solid var(--mario-red); }
.dz-eco-fin    { border-top: 5px solid var(--mario-brown); }

.dz-eco-cat-head {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--textbright);
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
}
.dz-eco-emoji { font-size: 1.4rem; }

.dz-eco-list { display: flex; flex-direction: column; gap: 12px; }
.dz-eco-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
}
.dz-eco-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #14161E, #3A3D4A);
  color: var(--mario-yellow);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.dz-eco-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--textbright);
  font-size: 0.9rem;
}
.dz-eco-role {
  font-size: 0.76rem;
  color: var(--dim);
  margin-top: 2px;
  line-height: 1.35;
}

.dz-eco-stats {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: linear-gradient(135deg, #14161E 0%, #2A2D3A 100%);
  border-radius: 18px;
  padding: 24px;
}
.dz-eco-stat {
  text-align: center;
  color: #fff;
}
.dz-eco-stat strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--mario-yellow);
  line-height: 1;
  margin-bottom: 8px;
}
.dz-eco-stat span {
  font-size: 0.78rem;
  color: #D8DBE5;
  letter-spacing: 0.5px;
}

@media (max-width: 1024px) {
  .dz-eco-grid { grid-template-columns: 1fr 1fr; }
  .dz-eco-stats { grid-template-columns: 1fr 1fr; }
  .dz-leaflet { height: 440px; }
}
@media (max-width: 640px) {
  .dz-eco-grid { grid-template-columns: 1fr; }
  .dz-eco-stats { grid-template-columns: 1fr 1fr; }
  .dz-map-toolbar { flex-direction: column; align-items: stretch; }
  .dz-leaflet { height: 380px; }
}

/* ============ POLITICAL SPONSORS ============ */
.sponsors-intro {
  max-width: 820px;
  margin: 0 auto 36px;
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text);
}
.sponsors-level-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--textbright);
  margin: 40px 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.sponsor-card {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sponsor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--mario-yellow);
}
.sponsor-tier-1 {
  border-top: 5px solid;
  border-image: linear-gradient(90deg, #006233 0%, #fff 50%, #D21034 100%) 1;
  background: linear-gradient(180deg, #fff 0%, #FFFDF5 100%);
}
.sponsor-tier-2 { border-top: 5px solid var(--mario-blue); }
.sponsor-local { border-top: 5px solid var(--border); }

.sponsor-tier-badge {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--textbright);
  color: var(--mario-yellow);
  align-self: flex-start;
  margin-bottom: 14px;
}

.sponsor-portrait {
  width: 112px;
  height: 112px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 4px solid var(--mario-yellow);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  background: #F4F6FA;
}
.sponsor-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.sponsor-initials {
  width: 100%; height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: #fff;
  letter-spacing: 1px;
  position: absolute;
  top: 0; left: 0;
}

.sponsor-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--textbright);
  text-align: center;
  margin-bottom: 4px;
  line-height: 1.25;
}
.sponsor-role {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin-bottom: 4px;
  line-height: 1.3;
}
.sponsor-inst {
  font-size: 0.72rem;
  color: var(--dim);
  text-align: center;
  font-style: italic;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.sponsor-why {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text);
  flex: 1;
}
.sponsor-why strong { color: var(--textbright); }
.sponsor-levers {
  margin-top: 14px;
  padding: 10px 12px;
  background: #14161E;
  color: var(--mario-yellow);
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.3px;
}

.sponsors-stats {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: linear-gradient(135deg, #006233 0%, #14161E 50%, #D21034 100%);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.sponsors-stat {
  text-align: center;
  color: #fff;
}
.sponsors-stat strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--mario-yellow);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.sponsors-stat span {
  font-size: 0.82rem;
  color: #E8EAF2;
  letter-spacing: 0.5px;
}

.sponsors-disclaimer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--dim);
  font-style: italic;
  line-height: 1.55;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1100px) {
  .sponsors-grid { grid-template-columns: repeat(2, 1fr); }
  .sponsors-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .sponsors-grid { grid-template-columns: 1fr; }
  .sponsors-stats { grid-template-columns: 1fr 1fr; }
  .sponsor-portrait { width: 96px; height: 96px; }
}

/* ============ FINANCING — BANKS / FUNDS / INTL ============ */
.fin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.fin-grid-3 { grid-template-columns: repeat(3, 1fr); }

.fin-card {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.fin-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--mario-yellow);
}
.fin-bank { border-top: 5px solid var(--mario-blue); }
.fin-fund { border-top: 5px solid var(--mario-green); }
.fin-intl { border-top: 5px solid var(--mario-orange); }
.fin-export { border-top: 5px solid var(--mario-red); }
.fin-islamic { border-top: 5px solid #198037; }
.fin-featured {
  background: linear-gradient(180deg, #FFFCF0 0%, #fff 100%);
  border-color: var(--mario-yellow);
  box-shadow: 0 0 0 1px var(--mario-yellow), var(--shadow);
}

.fin-badge {
  align-self: flex-start;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--textbright);
  color: #fff;
}
.fin-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  align-self: center;
  text-align: center;
  line-height: 1.1;
}
.fin-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--textbright);
  line-height: 1.25;
  text-align: center;
}
.fin-sub {
  font-size: 0.76rem;
  color: var(--dim);
  font-style: italic;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.fin-detail {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text);
  flex: 1;
}
.fin-detail strong { color: var(--textbright); }
.fin-money {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #F4F6FA;
  border-radius: 10px;
  border-left: 4px solid var(--mario-green);
}
.fin-money span {
  font-size: 0.72rem;
  color: var(--dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.fin-money strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--textbright);
}
.fin-terms {
  font-size: 0.72rem;
  line-height: 1.5;
  background: #14161E;
  color: var(--mario-yellow);
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 600;
}

/* === TAX TABLE === */
.fin-tax-wrap {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
  pointer-events: auto;
  overflow-x: auto;
}
.fin-tax-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-bottom: 24px;
}
.fin-tax-table thead th {
  background: var(--textbright);
  color: var(--mario-yellow);
  padding: 12px 14px;
  text-align: left;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.fin-tax-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.fin-tax-table tbody tr:hover { background: #F9FAFC; }
.fin-tax-table tbody td:first-child { color: var(--textbright); font-weight: 600; }
.fin-tax-table tbody td:last-child { font-size: 0.78rem; color: var(--dim); font-style: italic; }

.fin-pill {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.fin-pill-green  { background: #DFF3E0; color: #2A6E2D; border: 1px solid #A8DAAB; }
.fin-pill-blue   { background: #DDF0FA; color: #035884; border: 1px solid #A8D8F0; }
.fin-pill-orange { background: #FFEACC; color: #8B5100; border: 1px solid #F4C888; }

.fin-tax-total {
  background: linear-gradient(135deg, #14161E, #3A3D4A);
  color: #fff;
  padding: 20px 24px;
  border-radius: 14px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.fin-tax-total strong { color: var(--mario-yellow); }
.fin-tax-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--mario-yellow);
  margin-left: auto;
}
.fin-tax-sub {
  font-size: 0.82rem;
  color: #D8DBE5;
  width: 100%;
  text-align: right;
  font-style: italic;
}

/* === SITE PICKER (dynamic financing synthesis) === */
.fin-site-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin: 0 auto 10px;
  padding: 14px 18px;
  background: #fff;
  border: 2px dashed var(--mario-yellow);
  border-radius: 14px;
  max-width: 760px;
}
.fin-pick-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--textbright);
  letter-spacing: 0.5px;
  margin-right: 4px;
}
.fin-pick {
  padding: 7px 14px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: #3A3D4A;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
.fin-pick:hover { border-color: var(--mario-red); transform: translateY(-1px); }
.fin-pick.active {
  background: var(--textbright);
  color: var(--mario-yellow);
  border-color: var(--textbright);
  box-shadow: 0 3px 8px rgba(20,22,30,0.2);
}
.fin-pick-all {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--mario-red);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  font-style: italic;
  cursor: pointer;
  letter-spacing: 0.3px;
}
.fin-pick-all:hover { text-decoration: underline; }
.fin-summary-subtitle {
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--mario-red);
  font-size: 0.95rem;
  margin-bottom: 22px;
  letter-spacing: 0.3px;
}

/* === FINANCING SUMMARY === */
.fin-summary {
  margin-top: 50px;
  background: linear-gradient(145deg, #fff 0%, #F4F6FA 100%);
  border: 3px solid var(--mario-yellow);
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  pointer-events: auto;
}
.fin-summary-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--textbright);
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: 1px;
}
.fin-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.fin-summary-table thead th {
  background: var(--textbright);
  color: var(--mario-yellow);
  padding: 12px 14px;
  text-align: left;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.fin-summary-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.fin-summary-table td:nth-child(3),
.fin-summary-table td:nth-child(4) {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--textbright);
}
.fin-row-equity td:first-child { background: #EBF4FE; color: #035884; border-left: 4px solid var(--mario-blue); }
.fin-row-debt   td:first-child { background: #FFF4E6; color: #8B5100; border-left: 4px solid var(--mario-orange); }
.fin-row-grant  td:first-child { background: #E8F7EA; color: #2A6E2D; border-left: 4px solid var(--mario-green); }
.fin-row-sukuk  td:first-child { background: #F4E5F7; color: #6A2A7A; border-left: 4px solid #8B3CA3; }
.fin-row-total {
  background: linear-gradient(90deg, #14161E, #2A2D3A);
}
.fin-row-total td {
  color: #fff !important;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  padding: 14px;
  background: transparent !important;
  border-left: none !important;
}
.fin-row-total td strong { color: var(--mario-yellow); }

.fin-kpis {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.fin-kpi {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px 10px;
  text-align: center;
}
.fin-kpi strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--textbright);
  line-height: 1;
  margin-bottom: 6px;
}
.fin-kpi span {
  font-size: 0.72rem;
  color: var(--dim);
  line-height: 1.3;
}
.fin-kpi-highlight {
  background: linear-gradient(135deg, #14161E, #3A3D4A);
  border-color: var(--mario-yellow);
}
.fin-kpi-highlight strong { color: var(--mario-yellow); }
.fin-kpi-highlight span { color: #E8EAF2; }

.fin-summary-footer {
  margin-top: 22px;
  padding: 18px 22px;
  background: #DFF3E0;
  border-left: 5px solid var(--mario-green);
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #1C5820;
}
.fin-summary-footer strong { color: var(--textbright); }

@media (max-width: 1100px) {
  .fin-grid, .fin-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .fin-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .fin-grid, .fin-grid-3 { grid-template-columns: 1fr; }
  .fin-kpis { grid-template-columns: 1fr 1fr; }
  .fin-summary-table { font-size: 0.78rem; }
  .fin-summary-table td, .fin-summary-table th { padding: 8px; }
  .fin-tax-amount { font-size: 1.4rem; margin-left: 0; }
}

/* ============ SITE DIMENSIONING ============ */
.site-dim {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}
.site-dim::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 6px; height: 100%;
}
.site-dim-1::before { background: linear-gradient(180deg, #E52521, #8C1411); }
.site-dim-2::before { background: linear-gradient(180deg, #049CD8, #014F79); }
.site-dim-3::before { background: linear-gradient(180deg, #43B047, #1F5C22); }
.site-dim-4::before { background: linear-gradient(180deg, #F5A623, #965F0A); }

.site-dim-head {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--border);
}
.site-dim-num {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  background: var(--textbright);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.site-dim-1 .site-dim-num { background: linear-gradient(135deg,#E52521,#8C1411); }
.site-dim-2 .site-dim-num { background: linear-gradient(135deg,#049CD8,#014F79); }
.site-dim-3 .site-dim-num { background: linear-gradient(135deg,#43B047,#1F5C22); }
.site-dim-4 .site-dim-num { background: linear-gradient(135deg,#F5A623,#965F0A); }

.site-dim-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--textbright);
  line-height: 1.15;
}
.site-dim-sub {
  font-size: 0.85rem;
  color: var(--dim);
  margin-top: 4px;
}
.site-dim-tier {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #14161E;
  color: var(--mario-yellow);
  white-space: nowrap;
}

.site-dim-hyp {
  background: #F4F6FA;
  border-left: 4px solid var(--mario-blue);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 20px;
}
.site-dim-hyp strong { color: var(--textbright); }

.site-dim-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.site-dim-kpi {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  transition: transform 0.2s;
}
.site-dim-kpi:hover { transform: translateY(-2px); border-color: var(--mario-yellow); }
.site-dim-kpi strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--textbright);
  line-height: 1;
  margin-bottom: 6px;
}
.site-dim-kpi span {
  font-size: 0.68rem;
  color: var(--dim);
  line-height: 1.35;
  display: block;
}
.site-dim-kpi.fin-kpi-highlight strong { color: var(--mario-yellow); }
.site-dim-kpi.fin-kpi-highlight { background: linear-gradient(135deg,#14161E,#3A3D4A); border-color: var(--mario-yellow); }
.site-dim-kpi.fin-kpi-highlight span { color: #E8EAF2; }

.site-dim-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.site-dim-col {
  background: #F9FAFC;
  border-radius: 12px;
  padding: 16px 18px;
}
.site-dim-col-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--textbright);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.site-dim-bar-row {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--text);
}
.site-dim-bar {
  height: 20px;
  background: #E8EBF2;
  border-radius: 6px;
  overflow: hidden;
}
.site-dim-bar > div {
  height: 100%;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  transition: width 1s ease-out;
}

.site-dim-synth {
  margin-top: 32px;
  background: linear-gradient(145deg, #fff 0%, #F4F6FA 100%);
  border: 3px solid var(--mario-yellow);
  border-radius: 22px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

@media (max-width: 1100px) {
  .site-dim-grid { grid-template-columns: repeat(4, 1fr); }
  .site-dim-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-dim-grid { grid-template-columns: repeat(2, 1fr); }
  .site-dim-head { grid-template-columns: 48px 1fr; }
  .site-dim-tier { grid-column: 1 / -1; justify-self: flex-start; }
  .site-dim-bar-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ============ DYNAMIC FINANCIAL CONFIGURATOR — COMPACT ============ */
.cfg-wrap {
  margin-top: 24px;
  background: linear-gradient(145deg, #FFF8E8 0%, #FFF 100%);
  border: 2px solid var(--mario-yellow);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  pointer-events: auto;
  font-size: 0.82rem;
}
.cfg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cfg-eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mario-red);
}
.cfg-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--textbright);
  line-height: 1.15;
  margin: 2px 0 0;
}
.cfg-subtitle { display: none; }
.cfg-reset {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1.5px solid var(--textbright);
  background: #fff;
  color: var(--textbright);
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all 0.2s;
}
.cfg-reset:hover { background: var(--textbright); color: var(--mario-yellow); }

.cfg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);
  gap: 16px;
  align-items: start;
}

/* MENU (left, scrolls internally) */
.cfg-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding-right: 4px;
  min-width: 0;
}
.cfg-menu::-webkit-scrollbar { width: 6px; }
.cfg-menu::-webkit-scrollbar-thumb { background: #CCD0D9; border-radius: 3px; }

/* each section becomes a collapsible <details>, styled tight */
.cfg-section {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  overflow: hidden;
}
.cfg-section > .cfg-section-title,
.cfg-section > summary.cfg-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--textbright);
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px dashed var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.4px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.cfg-section[open] > .cfg-section-title { background: #FFFCF0; }
.cfg-section > summary::-webkit-details-marker { display: none; }
.cfg-section > summary::after {
  content: "▾";
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--dim);
  transition: transform 0.2s;
}
.cfg-section:not([open]) > summary::after { transform: rotate(-90deg); }
.cfg-section-body { padding: 6px 8px 8px; }
.cfg-section-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--textbright);
  color: var(--mario-yellow);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}
.cfg-hint {
  margin-left: 4px;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--dim);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0;
}
.cfg-subgroup {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dim);
  margin: 6px 4px 2px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.cfg-subgroup:first-of-type { border-top: none; padding-top: 2px; }
.cfg-subgroup-grant { color: var(--mario-green); }

/* ITEM (menu row) — compact */
.cfg-item {
  display: grid;
  grid-template-columns: 18px 10px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
  line-height: 1.3;
  min-width: 0;
}
.cfg-item:hover { background: #FFF8E8; }
.cfg-item input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border: 2px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  background: #fff;
  transition: all 0.15s;
  flex-shrink: 0;
}
.cfg-item input[type=checkbox]:checked {
  background: var(--mario-red);
  border-color: var(--mario-red);
}
.cfg-item input[type=checkbox]:checked::after {
  content: "✓";
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -54%);
}
.cfg-item-grant input[type=checkbox]:checked {
  background: var(--mario-green);
  border-color: var(--mario-green);
}
.cfg-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px #fff, 0 1px 2px rgba(0,0,0,0.15);
}
.cfg-item-text { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.cfg-item-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--textbright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cfg-item-name em {
  font-style: normal;
  background: var(--mario-yellow);
  color: #14161E;
  font-size: 0.58rem;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  letter-spacing: 0.3px;
}
.cfg-item-sub {
  font-size: 0.7rem;
  color: var(--dim);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.cfg-price {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--textbright);
  background: #F4F6FA;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.cfg-price-grant { background: #DFF3E0; color: #2A6E2D; }

/* TICKET (right) — compact but readable */
.cfg-ticket {
  background: #fff;
  border: 2px solid var(--textbright);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 72px;
  min-width: 0;
}
.cfg-ticket::-webkit-scrollbar { width: 6px; }
.cfg-ticket::-webkit-scrollbar-thumb { background: #CCD0D9; border-radius: 3px; }
.cfg-ticket-head {
  background: linear-gradient(135deg, #14161E 0%, #2A2D3A 100%);
  color: var(--mario-yellow);
  padding: 14px 16px;
  text-align: center;
  border-bottom: 2px dashed rgba(251,208,0,0.5);
  position: sticky; top: 0; z-index: 1;
}
.cfg-ticket-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--mario-yellow);
}
.cfg-ticket-sub {
  font-size: 0.65rem;
  color: #A8ACBA;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 3px;
  font-family: 'Inter', sans-serif;
}
.cfg-ticket-body { padding: 14px 16px; }
.cfg-ticket-block {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.cfg-ticket-block:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.cfg-ticket-dashed {
  background: #FFFCF0;
  margin: 0 -16px;
  padding: 12px 16px;
  border-top: 1.5px dashed var(--mario-yellow);
  border-bottom: 1.5px dashed var(--mario-yellow);
}
.cfg-ticket-kpi {
  background: linear-gradient(135deg, #14161E, #2A2D3A);
  margin: 0 -16px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.cfg-ticket-kpi .cfg-ticket-line {
  flex-direction: column;
  padding: 0;
  text-align: center;
  border: none !important;
  margin: 0 !important;
  gap: 3px;
}
.cfg-ticket-kpi .cfg-ticket-line span { color: #8A8F9E; font-size: 0.6rem; letter-spacing: 0.8px; text-transform: uppercase; font-weight: 600; }
.cfg-ticket-kpi .cfg-ticket-line strong { color: var(--mario-yellow); font-size: 1.1rem; letter-spacing: -0.3px; }

.cfg-ticket-block-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--textbright);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cfg-ticket-count {
  background: var(--mario-red);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: auto;
  font-weight: 700;
}
.cfg-ticket-list { display: flex; flex-direction: column; gap: 3px; }
.cfg-ticket-bullet {
  font-size: 0.78rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
}
.cfg-ticket-empty {
  font-size: 0.76rem;
  color: var(--dim);
  font-style: italic;
}

.cfg-ticket-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  font-size: 0.82rem;
  color: var(--text);
  gap: 12px;
}
.cfg-ticket-line span { font-family: 'Inter', sans-serif; flex: 1; min-width: 0; }
.cfg-ticket-line strong {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  color: var(--textbright);
  font-size: 0.88rem;
  white-space: nowrap;
}
.cfg-ticket-line.cfg-big {
  padding: 6px 0;
  border-top: 1px dashed var(--border);
  margin-top: 4px;
}
.cfg-ticket-line.cfg-big strong { font-size: 1rem; }
.cfg-ticket-line.cfg-grant strong { color: var(--mario-green); }
.cfg-ticket-line.cfg-net strong { color: var(--mario-red); font-size: 1.15rem; }
.cfg-ticket-line.cfg-ebitda strong { color: var(--mario-green); font-size: 1.05rem; }

.cfg-ticket-balance {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
}
.cfg-bal-ok { background: #DFF3E0; color: #1C5820; border: 1px solid var(--mario-green); }
.cfg-bal-warn { background: #FFE5E4; color: #A4211D; border: 1px solid var(--mario-red); }

.cfg-ticket-foot {
  background: #F4F6FA;
  padding: 10px 14px;
  font-size: 0.68rem;
  color: var(--dim);
  text-align: center;
  line-height: 1.45;
  font-family: 'Inter', sans-serif;
  font-style: italic;
  border-top: 1px solid var(--border);
}

@media (max-width: 1100px) {
  .cfg-grid { grid-template-columns: 1fr; }
  .cfg-ticket { position: static; }
}
@media (max-width: 560px) {
  .cfg-item { grid-template-columns: 20px 10px 1fr; }
  .cfg-item .cfg-price { grid-column: 1 / -1; justify-self: flex-start; margin-top: 4px; }
  .cfg-title { font-size: 1.4rem; }
}

/* ============ AUTO-INJECTED LOGOS ============ */
/* Base slot becomes a positioned container when a logo is present */
.dz-eco-logo.has-auto-logo,
.fin-logo.has-auto-logo {
  position: relative;
  overflow: hidden;
}
.dz-eco-logo.has-auto-logo,
.fin-logo.has-auto-logo {
  background: #fff !important;
  border: 1px solid var(--border);
}
.auto-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  background: #fff;
  border-radius: inherit;
  animation: logoFade 0.4s ease-out;
}
.fin-logo.has-auto-logo .auto-logo { padding: 10px; }
@keyframes logoFade {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* Sponsor fallback corp logo (when Wikimedia portrait fails) */
.sponsor-corp-logo {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  padding: 8px;
}
.sponsor-initials {
  position: relative;
}

/* Real portrait injected by JS covers the whole circular slot */
.sponsor-portrait .sponsor-real-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
  z-index: 2;
  animation: logoFade 0.35s ease-out;
}
