:root {
  --bg: #f5f7f2;
  --panel: #ffffff;
  --ink: #15201c;
  --muted: #627069;
  --line: #d9e0da;
  --solar: #f1a21a;
  --distributed-pv: #e83e8c;
  --wind: #2f8f46;
  --hydro: #2d74c4;
  --nuclear: #7c3aed;
  --coal: #000000;
  --oil-gas: #808080;
  --bioenergy: #8b5a2b;
  --geothermal: #17becf;
  --accent: #2f6b4f;
  --map-water: #202a24;
  --shadow: 0 18px 48px rgba(33, 48, 42, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 390px) 1fr;
  min-height: 100vh;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  max-height: 100vh;
  padding: 24px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 700;
}

.panel-header {
  padding-bottom: 6px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 31px;
  line-height: 1.05;
  letter-spacing: 0;
}

.country-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f5;
}

.view-tabs {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f5;
}

.country-tab {
  min-height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #526072;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.view-tab {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #526072;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.country-tab:last-child {
  border-right: 0;
}

.view-tab:last-child {
  border-right: 0;
}

.country-tab.active,
.country-tab[aria-selected="true"],
.view-tab.active,
.view-tab[aria-selected="true"] {
  background: var(--accent);
  color: #ffffff;
}

.view-tabs.hidden {
  display: none;
}

h2 {
  font-size: 15px;
  line-height: 1.2;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.metric-value {
  display: block;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.1;
}

.metric-label {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.control-section,
.legend,
.top-list,
.check-panel {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.control-heading,
.range-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

label,
.control-heading span,
.control-heading label {
  color: #26322d;
  font-size: 13px;
  font-weight: 800;
}

output {
  color: var(--accent);
  font-size: 17px;
  font-weight: 900;
}

.year-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.play-button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f5;
  color: #2d3a34;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.play-button[aria-pressed="true"] {
  background: var(--accent);
  color: #ffffff;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.coverage-slider {
  position: relative;
  min-height: 26px;
  display: grid;
  align-items: center;
}

.coverage-slider-track {
  position: absolute;
  right: 0;
  left: 0;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #d8dfd9;
  pointer-events: none;
}

.coverage-slider-track span {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: var(--accent);
}

.coverage-range {
  position: absolute;
  inset: 0;
  z-index: 2;
  height: 26px;
  margin: 0;
  appearance: none;
  background: transparent;
  pointer-events: none;
}

.coverage-range-start {
  z-index: 3;
}

.coverage-range-end {
  z-index: 4;
}

.coverage-range::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
}

.coverage-range::-moz-range-track {
  height: 6px;
  background: transparent;
}

.coverage-range::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -5px;
  appearance: none;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(21, 32, 28, 0.28);
  cursor: grab;
  pointer-events: auto;
}

.coverage-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(21, 32, 28, 0.28);
  cursor: grab;
  pointer-events: auto;
}

.range-row {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.segment {
  min-height: 38px;
  border: 0;
  background: #f6f8f5;
  color: #35453d;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.segment + .segment {
  border-left: 1px solid var(--line);
}

.segment.active {
  background: var(--accent);
  color: white;
}

.switch-row,
.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: #34423b;
  font-size: 13px;
  font-weight: 750;
}

.switch-row input,
.check-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tech-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

select,
input[type="search"] {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
}

.legend {
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.legend-tech-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
}

.legend-row,
.size-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  color: #34423b;
  font-size: 13px;
  font-weight: 800;
}

.size-legend {
  grid-column: 1 / -1;
  color: var(--muted);
}

.legend-dot,
.size-dot {
  display: inline-block;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.legend-dot {
  width: 14px;
  height: 14px;
}

.solar {
  background: var(--solar);
}

.distributed-pv {
  background: var(--distributed-pv);
}

.wind {
  background: var(--wind);
}

.hydro {
  background: var(--hydro);
}

.nuclear {
  background: var(--nuclear);
}

.coal {
  background: var(--coal);
}

.oil-gas {
  background: var(--oil-gas);
}

.bioenergy {
  background: var(--bioenergy);
}

.geothermal {
  background: var(--geothermal);
}

.size-dot {
  background: #91a199;
}

.size-dot.small {
  width: 4px;
  height: 4px;
}

.size-dot.medium {
  width: 22px;
  height: 22px;
}

.size-dot.large {
  width: 40px;
  height: 40px;
}

body[data-active-country="world"] .size-dot.small {
  width: 3px;
  height: 3px;
}

body[data-active-country="world"] .size-dot.medium {
  width: 10px;
  height: 10px;
}

body[data-active-country="world"] .size-dot.large {
  width: 18px;
  height: 18px;
}

#top-projects {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

#top-projects li {
  padding-left: 2px;
  color: #27342e;
  font-size: 13px;
  line-height: 1.35;
}

.top-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.check-heading {
  align-items: start;
}

.check-heading select {
  width: auto;
  min-width: 158px;
  min-height: 34px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.check-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.check-summary-card {
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.check-summary-card strong {
  display: block;
  color: #223029;
  font-size: 15px;
  line-height: 1.1;
}

.check-summary-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.check-table-wrap {
  max-height: 310px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.check-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 11px;
}

.check-table th,
.check-table td {
  padding: 6px 7px;
  border-bottom: 1px solid #e8ede7;
  text-align: left;
  vertical-align: top;
}

.check-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f8f5;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.check-table td:nth-child(3),
.check-table td:nth-child(4),
.check-table td:nth-child(5) {
  text-align: right;
  white-space: nowrap;
}

.check-table tr.check-annual td {
  background: #f4f7f2;
  font-weight: 850;
}

.check-delta {
  font-weight: 900;
}

.check-ok {
  color: #23613b;
}

.check-warn {
  color: #9a6200;
}

.check-alert {
  color: #9f2d2d;
}

.check-na {
  color: var(--muted);
}

.check-footnote {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.event-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.event-note a {
  color: var(--accent);
  font-weight: 850;
  text-decoration: none;
}

.source-note {
  margin-top: auto;
  padding-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.map-area {
  position: relative;
  min-height: 100vh;
}

#map {
  position: absolute;
  inset: 0;
  background: var(--map-water);
}

.map-area.generation-mode:not(.single-generation-mode) #map {
  display: none;
}

.map-area.single-generation-mode #map {
  bottom: 260px;
}

.map-area.single-generation-mode #map .leaflet-tile-pane {
  opacity: 0.72;
}

.map-area.cost-mode #map {
  display: none;
}

.map-area.world-history-mode #map {
  bottom: 286px;
  background: #d9e0da;
}

.map-area.world-history-mode #map .leaflet-tile-pane {
  filter: grayscale(0.72) saturate(0.22) brightness(0.9) contrast(0.76);
}

.world-plant-canvas {
  pointer-events: none;
}

.generation-dispatch-canvas {
  pointer-events: none;
}

.world-map-legend {
  position: absolute;
  left: 18px;
  bottom: 304px;
  z-index: 520;
  display: none;
  min-width: 148px;
  padding: 10px 11px;
  color: #eff6f1;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(14, 25, 20, 0.76);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(5px);
}

.map-area.world-history-mode .world-map-legend {
  display: block;
}

.world-map-legend h2 {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.world-map-legend .legend-row {
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  line-height: 1.15;
}

.world-map-legend .legend-dot {
  width: 10px;
  height: 10px;
  border-width: 1px;
}

.world-year-badge {
  position: absolute;
  z-index: 530;
  display: none;
  transform: translate(-50%, -50%);
  min-width: 116px;
  padding: 6px 16px 8px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(10, 18, 14, 0.72);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
  color: #ffffff;
  font-size: 36px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  pointer-events: none;
}

.map-area.world-history-mode .world-year-badge {
  display: block;
}

.world-zoom-badge {
  position: absolute;
  top: 82px;
  right: 12px;
  z-index: 530;
  display: none;
  min-width: 210px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(10, 18, 14, 0.72);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  pointer-events: auto;
  user-select: text;
}

.world-zoom-badge span {
  display: block;
  white-space: nowrap;
}

.world-zoom-badge span + span {
  margin-top: 3px;
}

.map-area.world-history-mode .world-zoom-badge {
  display: block;
}

.world-history-view {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 286px;
  padding: 10px 12px 12px;
  background: var(--map-water);
}

.world-history-view[hidden] {
  display: none;
}

.world-split-maps {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.world-map-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #17231d;
}

.world-map-panel header,
.world-history-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 9px 12px;
  color: #ffffff;
  background: rgba(10, 18, 14, 0.84);
}

.world-map-panel h2,
.world-history-panel h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 950;
}

.world-map-panel span,
.world-history-panel span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.world-map {
  min-height: 0;
  background: var(--map-water);
}

.world-history-panel {
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #f7f9f5;
}

.world-history-chart {
  height: 236px;
}

.world-history-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.world-history-grid {
  stroke: #d6ded8;
  stroke-width: 1;
}

.world-history-axis {
  stroke: #7d8a83;
  stroke-width: 1;
}

.world-history-area {
  opacity: 0.78;
}

.world-history-current-line {
  stroke: #111d18;
  stroke-width: 2;
}

.world-history-current-label,
.world-history-tick {
  fill: #33423b;
  font-size: 12px;
  font-weight: 800;
}

.generation-compare {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: var(--map-water);
}

.generation-compare[hidden] {
  display: none;
}

.dispatch-dashboard .generation-compare {
  inset: 0 0 260px 0;
  padding: 14px;
}

.dispatch-dashboard .compare-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.dispatch-dashboard .compare-chart {
  display: none;
}

.dispatch-dashboard .compare-map .leaflet-tile-pane {
  opacity: 0.72;
}

.cost-plf-view {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: auto;
  padding: 18px;
  background: #f4f7f2;
}

.cost-plf-view[hidden] {
  display: none;
}

.thermal-cost-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.thermal-cost-header h2 {
  font-size: 24px;
}

.thermal-cost-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #35413b;
  font-size: 12px;
  font-weight: 850;
}

.thermal-cost-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.thermal-cost-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.thermal-cost-legend .thermal-total-line {
  width: 18px;
  height: 0;
  border-top: 2px solid #111111;
  border-radius: 0;
  background: transparent;
}

.thermal-cost-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.thermal-cost-summary-item {
  min-height: 62px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.thermal-cost-summary-item strong {
  display: block;
  color: #16231d;
  font-size: 21px;
  font-weight: 950;
  line-height: 1.1;
}

.thermal-cost-summary-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.thermal-cost-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  gap: 14px;
  align-items: stretch;
}

.thermal-cost-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.thermal-cost-panel h3 {
  margin: 0;
  color: #26322d;
  font-size: 13px;
  font-weight: 950;
}

.thermal-cost-map,
.thermal-cost-chart {
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.thermal-cost-map {
  background: var(--map-water);
}

.thermal-cost-chart {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 640px;
}

.thermal-cost-empty {
  display: grid;
  min-height: 420px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.thermal-cost-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.thermal-cost-grid-line {
  stroke: #d9e0da;
  stroke-width: 1;
}

.thermal-cost-axis {
  stroke: #7d8982;
  stroke-width: 1.2;
}

.thermal-cost-axis-label,
.thermal-cost-tick {
  fill: #52615a;
  font-size: 12px;
  font-weight: 750;
}

.thermal-cost-area {
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 0.8;
}

.thermal-cost-total-line {
  fill: none;
  stroke: #111111;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.thermal-cost-no-vc-line {
  fill: none;
  stroke: #3f4743;
  stroke-dasharray: 6 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.thermal-cost-no-vc-point {
  fill: #3f4743;
  stroke: #ffffff;
  stroke-width: 1.4;
}

.thermal-cost-current-line {
  stroke: #18231f;
  stroke-width: 1.4;
  stroke-dasharray: 4 4;
}

.thermal-cost-current-point {
  stroke: #ffffff;
  stroke-width: 1.6;
}

.thermal-cost-chart-label {
  fill: #18231f;
  font-size: 13px;
  font-weight: 900;
}

.chart-hover-target,
.thermal-cost-hover-target,
.dispatch-energy-hover-target {
  cursor: crosshair;
}

.chart-tooltip {
  position: fixed;
  z-index: 5000;
  max-width: 270px;
  padding: 8px 10px;
  border: 1px solid rgba(21, 32, 28, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 28px rgba(21, 32, 28, 0.22);
  color: #15201c;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 80ms ease;
  white-space: pre-line;
}

.chart-tooltip.visible {
  opacity: 1;
}

.thermal-cost-chart-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 12px;
  align-items: center;
  padding: 8px 12px 9px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: #35413b;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.18;
}

.thermal-cost-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: normal;
}

.thermal-area-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.thermal-line-swatch {
  display: inline-block;
  width: 19px;
  height: 0;
  border-radius: 0;
}

.thermal-total-swatch {
  border-top: 2.4px solid #111111;
}

.thermal-no-vc-swatch {
  border-top: 2.2px dashed #3f4743;
}

.thermal-cost-footnote {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.cost-plf-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.cost-plf-header h2 {
  font-size: 24px;
}

.cost-plf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #35413b;
  font-size: 12px;
  font-weight: 850;
}

.cost-plf-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.coal-dot,
.gas-dot,
.hollow-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.coal-dot {
  background: var(--coal);
}

.gas-dot {
  background: var(--oil-gas);
}

.hollow-dot {
  border: 1.4px solid #33413b;
  background: transparent;
}

.cost-plf-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.cost-plf-summary-item {
  min-height: 62px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.cost-plf-summary-item strong {
  display: block;
  color: #16231d;
  font-size: 21px;
  font-weight: 950;
  line-height: 1.1;
}

.cost-plf-summary-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.cost-plf-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: start;
}

.cost-plf-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  gap: 8px;
}

.cost-plf-panel h3 {
  margin: 0;
  color: #26322d;
  font-size: 13px;
  font-weight: 950;
}

.cost-plf-chart {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.cost-plf-empty {
  display: grid;
  min-height: 420px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.cost-plf-svg {
  display: block;
  width: 100%;
  height: auto;
}

.cost-plf-grid-line {
  stroke: #d9e0da;
  stroke-width: 1;
}

.cost-plf-axis {
  stroke: #7d8982;
  stroke-width: 1.2;
}

.cost-plf-axis-label,
.cost-plf-tick {
  fill: #52615a;
  font-size: 12px;
  font-weight: 750;
}

.cost-plf-point {
  cursor: default;
}

.cost-plf-label {
  fill: #26322d;
  font-size: 10.5px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 3px;
}

.cost-plf-footnote {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.compare-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(280px, 1fr) 134px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: #102019;
}

.compare-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.95);
}

.compare-resource-picker {
  position: relative;
  min-width: 0;
}

.compare-resource-button {
  position: relative;
  width: 100%;
  min-height: 32px;
  padding: 0 28px 0 10px;
  overflow: hidden;
  border: 1px solid rgba(38, 50, 45, 0.28);
  border-radius: 6px;
  background: #ffffff;
  color: #26322d;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.compare-resource-button::after {
  position: absolute;
  right: 11px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #26322d;
  content: "";
  transform: translateY(-30%);
}

.compare-resource-menu {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 5px);
  left: 0;
  width: min(240px, 78vw);
  max-height: 290px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(38, 50, 45, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 32px rgba(16, 32, 25, 0.22);
}

.compare-resource-menu[hidden] {
  display: none;
}

.resource-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 6px;
  color: #26322d;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.resource-option:hover {
  background: rgba(39, 96, 75, 0.1);
}

.resource-option input {
  margin: 0;
}

.resource-option-all {
  font-weight: 950;
}

.resource-menu-divider {
  height: 1px;
  margin: 5px 2px;
  background: rgba(38, 50, 45, 0.14);
}

.compare-total {
  color: #26322d;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.compare-map {
  min-height: 0;
  background: var(--map-water);
}

.compare-chart {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 4px;
  padding: 8px 10px 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.94);
}

.chart-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #26322d;
  font-size: 11px;
  font-weight: 850;
}

.chart-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-title strong {
  font-size: 12px;
  font-weight: 950;
}

.chart-svg {
  width: 100%;
  min-height: 72px;
}

.chart-grid {
  stroke: #d8dfd9;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill-opacity: 0.78;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 0.7;
}

.chart-stack-total-line {
  fill: none;
  stroke: rgba(18, 28, 24, 0.82);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.chart-current-line {
  stroke: rgba(22, 32, 28, 0.34);
  stroke-width: 1.2;
  stroke-dasharray: 3 3;
}

.chart-current-point {
  stroke: #ffffff;
  stroke-width: 2;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.map-badge {
  display: none;
}

.map-area.single-generation-mode .map-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 520;
  display: flex;
  min-width: 190px;
  flex-direction: column;
  gap: 2px;
  padding: 11px 13px;
  color: #f5fbf7;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(12, 23, 19, 0.78);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(5px);
  pointer-events: none;
}

.map-area.single-generation-mode .map-badge strong {
  font-size: 18px;
  line-height: 1.15;
  font-weight: 900;
}

.map-area.single-generation-mode .map-badge span {
  color: rgba(245, 251, 247, 0.82);
  font-size: 12px;
  font-weight: 780;
}

.dispatch-energy-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 510;
  display: none;
  height: 260px;
  padding: 14px 18px 12px;
  color: #eff6f1;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 27, 22, 0.94);
}

.dispatch-cumulative-card {
  position: absolute;
  right: 18px;
  bottom: 278px;
  z-index: 525;
  display: none;
  width: min(285px, calc(100% - 36px));
  gap: 10px;
  padding: 12px;
  color: #f4fbf6;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(12, 23, 19, 0.82);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(5px);
}

.map-area.single-generation-mode > .dispatch-cumulative-card,
.map-area.dispatch-compare-mode .compare-panel .dispatch-cumulative-card {
  display: grid;
  grid-template-columns: 1fr;
}

.dispatch-cumulative-card[hidden],
.map-area.single-generation-mode > .dispatch-cumulative-card[hidden] {
  display: none;
}

.dispatch-dashboard .single-generation-mode > .dispatch-cumulative-card {
  width: min(232px, calc(100% - 36px));
  gap: 6px;
  padding: 9px 10px;
}

.dispatch-dashboard .single-generation-mode .dispatch-cumulative-copy strong {
  font-size: 18px;
}

.dispatch-dashboard .compare-panel .dispatch-cumulative-card {
  right: 12px;
  bottom: 12px;
  width: min(218px, calc(100% - 24px));
  max-height: min(168px, calc(100% - 76px));
  gap: 6px;
  padding: 8px 9px;
  overflow: auto;
  background: rgba(12, 23, 19, 0.74);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.dispatch-cumulative-copy {
  display: grid;
  align-content: start;
  gap: 4px;
}

.dispatch-cumulative-copy span,
.dispatch-cumulative-copy small {
  color: rgba(244, 251, 246, 0.76);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.dispatch-cumulative-copy strong {
  font-size: 21px;
  line-height: 1.1;
  font-weight: 950;
}

.dispatch-dashboard .compare-panel .dispatch-cumulative-copy {
  gap: 2px;
}

.dispatch-dashboard .compare-panel .dispatch-cumulative-copy span,
.dispatch-dashboard .compare-panel .dispatch-cumulative-copy small {
  font-size: 9px;
}

.dispatch-dashboard .compare-panel .dispatch-cumulative-copy strong {
  font-size: 16px;
}

.dispatch-cumulative-legend {
  display: grid;
  gap: 4px;
}

.dispatch-cumulative-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  color: rgba(244, 251, 246, 0.86);
  font-size: 10px;
  font-weight: 800;
}

.dispatch-dashboard .compare-panel .dispatch-cumulative-legend {
  gap: 2px;
}

.dispatch-dashboard .compare-panel .dispatch-cumulative-row {
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 5px;
  font-size: 9px;
}

.dispatch-dashboard .compare-panel .dispatch-cumulative-row i {
  width: 7px;
  height: 7px;
}

.dispatch-cumulative-row i {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.24);
}

.dispatch-cumulative-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-cumulative-row strong {
  color: #ffffff;
  font-weight: 900;
}

.map-area.single-generation-mode .dispatch-energy-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.map-area.dispatch-compare-mode .dispatch-energy-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.dispatch-energy-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.dispatch-energy-header h2 {
  color: #f8fcfa;
  font-size: 17px;
}

.dispatch-energy-total {
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  text-align: right;
}

.dispatch-energy-chart {
  min-height: 0;
  overflow-x: auto;
}

.dispatch-energy-svg {
  display: block;
  width: 100%;
  min-width: 820px;
  height: 100%;
  min-height: 194px;
}

.dispatch-energy-grid {
  stroke: rgba(218, 230, 223, 0.17);
  stroke-width: 1;
}

.dispatch-energy-axis {
  stroke: rgba(239, 246, 241, 0.42);
  stroke-width: 1.1;
}

.dispatch-energy-area {
  opacity: 0.82;
  stroke: rgba(255, 255, 255, 0.34);
  stroke-linejoin: round;
  stroke-width: 0.55;
}

.dispatch-energy-column {
  opacity: 0.86;
  shape-rendering: crispEdges;
}

.dispatch-energy-current-line {
  stroke: #ffffff;
  stroke-width: 2.2;
  stroke-dasharray: 4 4;
}

.dispatch-energy-current-label {
  fill: #ffffff;
  font-size: 13px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(15, 27, 22, 0.9);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.dispatch-energy-axis-label,
.dispatch-energy-tick {
  fill: rgba(239, 246, 241, 0.78);
  font-size: 11px;
  font-weight: 800;
}

.dispatch-energy-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: rgba(239, 246, 241, 0.76);
  font-size: 13px;
  font-weight: 800;
}

.dispatch-dashboard .country-tabs,
.dispatch-dashboard .view-tabs,
.dispatch-dashboard #stress-day-section,
.dispatch-dashboard #generation-check-panel {
  display: none !important;
}

.dispatch-dashboard .panel {
  gap: 16px;
}

.dispatch-technology-picker {
  position: relative;
}

.dispatch-technology-button {
  position: relative;
  width: 100%;
  min-height: 40px;
  padding: 9px 38px 9px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: #26322d;
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-technology-button::after {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 8px;
  height: 8px;
  content: "";
  border-right: 2px solid #526057;
  border-bottom: 2px solid #526057;
  transform: translateY(-62%) rotate(45deg);
}

.dispatch-technology-menu {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 820;
  display: grid;
  max-height: 286px;
  gap: 2px;
  overflow-y: auto;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(20, 31, 26, 0.18);
}

.dispatch-technology-menu[hidden] {
  display: none;
}

.dispatch-technology-option {
  display: grid;
  grid-template-columns: 16px 12px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px;
  border-radius: 6px;
  color: #26322d;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.dispatch-technology-option-all {
  grid-template-columns: 16px minmax(0, 1fr);
}

.dispatch-technology-option:hover {
  background: #f3f6f1;
}

.dispatch-technology-option input {
  margin: 0;
}

.leaflet-popup-content {
  min-width: 230px;
  margin: 12px;
  color: #16231d;
}

.popup-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.popup-subtitle {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.popup-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 10px;
  font-size: 12px;
}

.popup-grid dt {
  color: var(--muted);
  font-weight: 800;
}

.popup-grid dd {
  margin: 0;
  font-weight: 700;
}

.unit-details {
  margin-top: 10px;
}

.unit-details h4 {
  margin: 0 0 6px;
  color: #27342e;
  font-size: 12px;
  font-weight: 900;
}

.unit-table-wrap {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.unit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.unit-table th,
.unit-table td {
  padding: 5px 7px;
  border-bottom: 1px solid #e8ede7;
  text-align: left;
  vertical-align: top;
}

.unit-table th {
  position: sticky;
  top: 0;
  background: #f6f8f5;
  color: var(--muted);
  font-weight: 900;
}

.unit-table td:nth-child(2),
.unit-table td:nth-child(3) {
  white-space: nowrap;
}

.cost-details .unit-table-wrap {
  max-height: 180px;
}

.cost-details .unit-table {
  min-width: 520px;
}

.popup-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.state-label {
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    1px 0 2px rgba(0, 0, 0, 0.9),
    -1px 0 2px rgba(0, 0, 0, 0.9),
    0 -1px 2px rgba(0, 0, 0, 0.9);
}

@media (max-width: 840px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(560px, 1fr);
  }

  .panel {
    max-height: none;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .map-area {
    min-height: 70vh;
  }

  .map-area.generation-mode {
    min-height: 1080px;
  }

  .map-area.generation-mode.dispatch-compare-mode {
    min-height: 1288px;
  }

  .map-area.generation-mode.single-generation-mode {
    min-height: 860px;
  }

  .map-area.single-generation-mode #map {
    bottom: 300px;
  }

  .dispatch-energy-panel {
    height: 300px;
  }

  .dispatch-dashboard .generation-compare {
    inset: 0 0 300px 0;
  }

  .dispatch-dashboard .compare-panel .dispatch-cumulative-card {
    top: 96px;
    bottom: auto;
  }

  .dispatch-cumulative-card {
    bottom: 318px;
  }

  .map-area.cost-mode {
    min-height: 920px;
  }

  .map-area.world-history-mode {
    min-height: 856px;
  }

  .generation-compare {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(480px, 1fr));
  }

  .cost-plf-summary,
  .cost-plf-grid,
  .thermal-cost-summary,
  .thermal-cost-layout {
    grid-template-columns: 1fr;
  }

  .cost-plf-header,
  .thermal-cost-header {
    align-items: start;
    flex-direction: column;
  }

  .thermal-cost-map,
  .thermal-cost-chart,
  .thermal-cost-svg {
    min-height: 480px;
  }

  h1 {
    font-size: 27px;
  }
}

@media (max-width: 460px) {
  .metric-grid,
  .check-grid,
  .legend-tech-list {
    grid-template-columns: 1fr;
  }

  .size-legend {
    grid-column: auto;
  }
}

/* The dedicated dispatch view keeps analysis together beside a full-height map. */
.dispatch-dashboard .app-shell {
  grid-template-columns:
    clamp(360px, var(--dispatch-panel-width, 48%), calc(50% - 5px))
    10px minmax(0, 1fr);
}

.dispatch-panel-resizer {
  position: relative;
  z-index: 710;
  min-width: 10px;
  background: #f0f3f1;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  cursor: col-resize;
  touch-action: none;
}

.dispatch-panel-resizer::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 40px;
  border-radius: 2px;
  background: #94a79b;
  content: "";
  transform: translate(-50%, -50%);
}

.dispatch-panel-resizer:hover,
.dispatch-panel-resizer:focus-visible,
.dispatch-panel-resizing .dispatch-panel-resizer {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: #dfeae3;
}

.dispatch-panel-resizing,
.dispatch-panel-resizing .app-shell {
  cursor: col-resize;
  user-select: none;
}

.dispatch-dashboard .panel {
  container: dispatch-controls / inline-size;
  min-width: 0;
  gap: 12px;
  padding: 18px 20px 14px;
  box-shadow: none;
}

.dispatch-dashboard .panel > * {
  flex-shrink: 0;
}

.dispatch-dashboard .panel-header {
  padding-bottom: 2px;
}

.dispatch-dashboard .panel-header h1 {
  font-size: 25px;
  line-height: 1.12;
}

.dispatch-dashboard .panel-header .eyebrow {
  font-size: 10px;
}

.dispatch-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px 12px;
}

.dispatch-filter-grid .control-section {
  min-width: 0;
  gap: 5px;
  padding: 0;
}

.dispatch-search {
  grid-column: 1 / -1;
}

.dispatch-filter-grid .dispatch-technology-picker {
  min-width: 0;
}

.dispatch-filter-grid .dispatch-technology-menu {
  right: 0;
  left: auto;
  width: max(100%, 220px);
  max-width: calc(100vw - 32px);
}

.dispatch-search-picker {
  position: relative;
}

.dispatch-dashboard .dispatch-search-picker input {
  padding-right: 44px;
}

.dispatch-search-picker input::-webkit-search-cancel-button {
  display: none;
}

.dispatch-search-clear {
  position: absolute;
  top: 50%;
  right: 3px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.dispatch-search-clear:hover {
  background: #e9f2ed;
}

.dispatch-search-clear:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.dispatch-search-results {
  position: absolute;
  z-index: 830;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 6px 18px #18231f26;
}

.dispatch-search-results ul {
  margin: 0;
  padding: 4px;
  list-style: none;
}

.dispatch-search-results [role="option"] {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 3px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.dispatch-search-results [role="option"]:hover,
.dispatch-search-results [aria-selected="true"] {
  background: #e9f2ed;
}

.dispatch-search-results strong {
  font-size: 13px;
  line-height: 1.3;
}

.dispatch-search-results span,
.dispatch-search-results p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.dispatch-search-results p {
  margin: 0;
  padding: 12px;
}

.dispatch-dashboard .dispatch-filter-grid select,
.dispatch-dashboard .dispatch-filter-grid input,
.dispatch-dashboard .dispatch-technology-button {
  min-height: 36px;
  border-radius: 5px;
  font-size: 12px;
}

.dispatch-dashboard .dispatch-coverage-section {
  gap: 4px;
}

.dispatch-dashboard #dispatch-coverage-output {
  font-size: 13px;
}

.dispatch-dashboard .play-button {
  display: inline-flex;
  width: 52px;
  height: 48px;
  min-width: 52px;
  min-height: 48px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #ffffff;
  border-color: var(--accent);
  border-radius: 6px;
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(21, 32, 28, 0.16);
}

.dispatch-dashboard .play-button:hover {
  border-color: #24563f;
  background: #24563f;
}

.dispatch-dashboard .play-button:focus-visible {
  outline: 3px solid #91baa1;
  outline-offset: 3px;
}

.dispatch-dashboard .play-button img {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.dispatch-dashboard .play-button .dispatch-pause-icon,
.dispatch-dashboard .play-button[aria-pressed="true"] .dispatch-play-icon {
  display: none;
}

.dispatch-dashboard .play-button[aria-pressed="true"] .dispatch-pause-icon {
  display: block;
}

.dispatch-dashboard .map-area.single-generation-mode {
  min-height: 100vh;
}

.dispatch-dashboard .map-area.single-generation-mode #map {
  bottom: 0;
}

.dispatch-dashboard .panel .dispatch-energy-panel {
  position: static;
  display: grid;
  grid-template-rows: auto 240px;
  width: 100%;
  height: auto;
  gap: 6px;
  padding: 12px 0 0;
  color: var(--ink);
  border-top: 1px solid var(--line);
  background: transparent;
}

.dispatch-dashboard .dispatch-energy-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 10px;
}

.dispatch-dashboard .dispatch-energy-header .eyebrow {
  font-size: 10px;
}

.dispatch-dashboard .dispatch-energy-header h2 {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
}

.dispatch-dashboard .dispatch-energy-total {
  grid-column: 1 / -1;
  padding-top: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.dispatch-export-actions {
  display: flex;
  gap: 4px;
}

.dispatch-export-actions button {
  display: inline-flex;
  min-width: 55px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 6px;
  color: #34423b;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.dispatch-export-actions button:hover:not(:disabled) {
  border-color: #8fa697;
  background: #f1f6f2;
}

.dispatch-export-actions button:focus-visible {
  outline: 2px solid #267b9a;
  outline-offset: 2px;
}

.dispatch-export-actions button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.dispatch-export-status {
  color: #8a3840;
  font-size: 11px;
  line-height: 1.4;
}

.dispatch-export-status a {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 3px;
}

.dispatch-dashboard .dispatch-energy-chart {
  overflow: hidden;
}

.dispatch-dashboard .dispatch-energy-svg {
  min-width: 0;
  min-height: 0;
  height: 240px;
}

.dispatch-dashboard .dispatch-energy-grid {
  stroke: #e1e6e2;
}

.dispatch-dashboard .dispatch-energy-axis {
  stroke: #78857c;
}

.dispatch-dashboard .dispatch-energy-axis-label,
.dispatch-dashboard .dispatch-energy-tick {
  fill: #526159;
  font-weight: 600;
}

.dispatch-dashboard .dispatch-energy-current-line {
  stroke: #b22538;
  stroke-width: 1.5;
}

.dispatch-dashboard .dispatch-energy-empty {
  color: var(--muted);
}

.dispatch-economics-panel {
  width: 100%;
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.dispatch-economics-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 10px;
}

.dispatch-economics-header h2 {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.dispatch-economics-header .eyebrow {
  font-size: 10px;
  line-height: 1.5;
}

.dispatch-economics-value {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.dispatch-economics-chart {
  width: 100%;
  height: 184px;
  margin-top: 6px;
  overflow: hidden;
}

.dispatch-economics-svg {
  display: block;
  width: 100%;
  height: 184px;
}

.dispatch-economics-line {
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.dispatch-economics-line-price {
  stroke: #167c9c;
}

.dispatch-economics-line-cost {
  stroke: #996a20;
}

.dispatch-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.dispatch-energy-title {
  min-width: 0;
}

.dispatch-energy-title select {
  width: 100%;
  max-width: 100%;
  min-height: 30px;
  padding: 3px 24px 3px 0;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background-color: transparent;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.dispatch-energy-title select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@container dispatch-controls (max-width: 440px) {
  .dispatch-filter-grid {
    column-gap: 8px;
  }

  .dispatch-filter-grid .dispatch-technology-button {
    padding-right: 26px;
    padding-left: 8px;
  }

  .dispatch-filter-grid .dispatch-technology-button::after {
    right: 8px;
  }

  .dispatch-dashboard .dispatch-energy-header .dispatch-energy-title {
    grid-column: 1 / -1;
  }

  .dispatch-dashboard .dispatch-energy-header .dispatch-export-actions {
    grid-column: 2;
    grid-row: 2;
  }

  .dispatch-dashboard .dispatch-energy-header .dispatch-energy-total {
    grid-column: 1;
    grid-row: 2;
  }
}

.dispatch-economics-start {
  stroke: #76867e;
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.dispatch-economics-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.dispatch-economics-note a {
  color: var(--accent);
  text-underline-offset: 2px;
}

.dispatch-economics-empty-state,
.dispatch-economics-loading {
  display: grid;
  height: 100%;
  padding: 24px;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.dispatch-dashboard .panel .dispatch-cumulative-card {
  position: static;
  display: grid;
  width: 100%;
  gap: 10px;
  padding: 12px 0 0;
  color: var(--ink);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.dispatch-dashboard .panel .dispatch-cumulative-copy {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
}

.dispatch-dashboard .panel .dispatch-cumulative-copy span,
.dispatch-dashboard .panel .dispatch-cumulative-copy small {
  color: var(--muted);
  font-size: 12px;
}

.dispatch-dashboard .panel .dispatch-cumulative-copy strong {
  grid-column: 2;
  grid-row: 1 / 3;
  font-size: 23px;
  white-space: nowrap;
}

.dispatch-dashboard .panel .dispatch-cumulative-legend {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 6px 18px;
}

.dispatch-dashboard .panel .dispatch-cumulative-row {
  grid-template-columns: 13px minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 21px;
  color: #34423b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.dispatch-dashboard .panel .dispatch-cumulative-row strong {
  color: var(--ink);
  font-weight: 700;
}

.dispatch-dashboard .panel .dispatch-cumulative-row i {
  width: 12px;
  height: 12px;
  border-color: #ffffff;
  box-shadow: 0 0 0 1px #c6d1ca;
}

.dispatch-plant-details {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.dispatch-plant-details summary {
  color: var(--muted);
  cursor: pointer;
}

.dispatch-plant-details summary h2 {
  display: inline;
  font-size: 12px;
  font-weight: 650;
}

.dispatch-plant-details ol {
  margin: 10px 0 0;
  padding-left: 20px;
}

.dispatch-dashboard .source-note {
  margin-top: 0;
  padding-top: 0;
  font-size: 10px;
}

.dispatch-dashboard .source-note a {
  color: #436452;
  text-underline-offset: 2px;
}

.dispatch-economics-methodology {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.dispatch-economics-methodology summary {
  cursor: pointer;
}

@media (max-width: 960px) {
  .dispatch-dashboard .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .dispatch-panel-resizer {
    display: none;
  }

  .dispatch-dashboard .panel {
    max-height: none;
    overflow: visible;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dispatch-dashboard .map-area.single-generation-mode {
    height: 70vh;
    min-height: 480px;
  }

  .dispatch-dashboard .dispatch-filter-grid select,
  .dispatch-dashboard .dispatch-filter-grid input,
  .dispatch-dashboard .dispatch-technology-button {
    min-height: 44px;
    font-size: 13px;
  }

  .dispatch-dashboard .play-button {
    min-height: 48px;
    min-width: 52px;
  }

  .dispatch-export-actions button {
    min-height: 44px;
  }

  .dispatch-energy-title select {
    min-height: 44px;
    font-size: 14px;
  }

  .dispatch-dashboard .coverage-slider,
  .dispatch-dashboard .coverage-range {
    min-height: 44px;
    height: 44px;
  }

  .dispatch-dashboard .coverage-slider-track {
    right: 22px;
    left: 22px;
  }

  .dispatch-dashboard .coverage-range::-webkit-slider-thumb {
    width: 44px;
    height: 44px;
    margin-top: -19px;
    border: 0;
    background: radial-gradient(circle, var(--accent) 0 6px, #ffffff 6.5px 8px, transparent 8.5px);
    box-shadow: none;
  }

  .dispatch-dashboard .coverage-range::-moz-range-thumb {
    width: 44px;
    height: 44px;
    border: 0;
    background: radial-gradient(circle, var(--accent) 0 6px, #ffffff 6.5px 8px, transparent 8.5px);
    box-shadow: none;
  }
}

@media (max-width: 380px) {
  .dispatch-dashboard .panel {
    padding: 12px;
  }

  .dispatch-dashboard .panel .dispatch-cumulative-legend {
    gap: 7px 10px;
  }

  .dispatch-dashboard .panel .dispatch-cumulative-copy strong {
    font-size: 20px;
  }

  .dispatch-dashboard .dispatch-coverage-section .control-heading {
    flex-wrap: wrap;
    gap: 6px;
  }
}
