:root {
  color-scheme: light;
  --paper: #f3f0e7;
  --surface: #fffdf8;
  --surface2: #e9e7dd;
  --ink: #10261c;
  --muted: #617068;
  --line: #d5dbd2;
  --green: #137c58;
  --mint: #57cfa0;
  --lime: #a9cf4e;
  --blue: #267f9f;
  --orange: #db7540;
  --purple: #7465b8;
  --yellow: #dbb536;
  --red: #c55242;
  --grey: #87938d;
  --shadow: 0 16px 48px rgba(24, 44, 34, 0.08);
}

/* Geographic map: locally hosted Natural Earth vectors and directional cable paths. */
:root {
  --map-sea: #dbe8e3;
  --map-land: #f8f5ea;
  --map-border: #78968a;
  --map-label: #526b61;
  --map-route-base: rgba(16, 38, 28, 0.35);
}
body.dark {
  --map-sea: #0e2d21;
  --map-land: #173c2e;
  --map-border: #6b927f;
  --map-label: #a8bdb3;
  --map-route-base: rgba(245, 243, 234, 0.3);
}
.map-band {
  background: color-mix(in srgb, var(--map-sea) 72%, var(--paper));
  color: var(--ink);
}
.map-band .section-heading > p,
.map-band #mapLoadStatus,
.connector-summary > p {
  color: var(--muted);
}
.map-band .layer-filters button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.electricity-map-card {
  background: var(--map-sea);
  border-color: var(--map-border);
}
.country-shape {
  fill: var(--map-land);
  stroke: var(--map-border);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
}
.country-label {
  fill: var(--map-label);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--map-sea);
  stroke-width: 4;
  pointer-events: none;
}
.route-base {
  fill: none;
  stroke: var(--map-route-base);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.route-base.selected {
  stroke-width: 8;
  stroke: color-mix(in srgb, var(--ink) 60%, transparent);
}
.route-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 24;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
  cursor: pointer;
}
.route-flow {
  fill: none;
  stroke-width: calc(var(--route-width, 3) * 1px);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 3 12;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  pointer-events: stroke;
  animation: route-travel 1.8s linear infinite;
}
.route-flow.importing {
  stroke: var(--green);
}
.route-flow.exporting {
  stroke: var(--orange);
}
.route-flow.zero {
  stroke: var(--grey);
  stroke-dasharray: none;
  animation: none;
}
.route-flow.unavailable {
  stroke: var(--grey);
  stroke-dasharray: 8 7;
  animation: none;
  opacity: 0.75;
}
.route-flow.selected {
  filter: drop-shadow(0 0 3px var(--surface));
  stroke-width: calc((var(--route-width, 3) + 2) * 1px);
}
#routeArrow path {
  fill: context-stroke;
  stroke: none;
}
@keyframes route-travel {
  to {
    stroke-dashoffset: -30;
  }
}
.route-label {
  font-size: 10px;
  font-weight: 850;
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--map-sea);
  stroke-width: 4;
  stroke-linejoin: round;
  fill: var(--ink);
  pointer-events: all;
  cursor: pointer;
}
.route-label.importing {
  fill: var(--green);
}
.route-label.exporting {
  fill: var(--orange);
}
.route-label.zero,
.route-label.unavailable {
  fill: var(--map-label);
}
.map-key,
.map-attribution {
  color: var(--muted);
}
.connector-table-wrap {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.map-key .solar {
  border-radius: 1px;
}
.map-key .firm {
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.map-key .storage {
  border-radius: 2px;
  width: 15px;
  height: 10px;
}
.asset-map-label {
  fill: var(--ink);
  font-weight: 850;
  paint-order: stroke;
  stroke: var(--map-sea);
  stroke-width: 3;
  pointer-events: none;
}
.direction.zero,
.direction.unavailable {
  color: var(--muted);
}
.connector-detail-chart {
  height: 150px;
  margin-top: 0.4rem;
}
.explorer-detail h4 {
  font-size: 0.78rem;
  margin: 1.2rem 0 0;
  color: #d5e1da;
}
@media (prefers-reduced-motion: reduce) {
  .route-flow {
    animation: none !important;
    stroke-dasharray: 8 7;
  }
  .route-flow.zero {
    stroke-dasharray: none;
  }
}

/* Weather context stays visually subordinate to measured grid conditions. */
.weather-band {
  background: color-mix(in srgb, var(--paper) 88%, var(--blue) 12%);
  border-block: 1px solid var(--line);
}
.weather-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.weather-card,
.weather-outlook-grid article {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.weather-card span,
.weather-card small {
  display: block;
}
.weather-card strong {
  display: block;
  margin: 0.35rem 0;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.4vw, 2.15rem);
  line-height: 1.05;
}
.weather-card small,
.weather-attribution,
.weather-history-panel > p {
  color: var(--muted);
}
.forecast-card {
  border-style: dashed;
}
.weather-outlook-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}
.weather-outlook-grid p:last-child {
  margin-bottom: 0;
}
.weather-status {
  display: flex;
  gap: 0.5rem 1rem;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 90%, var(--orange) 10%);
}
.weather-status[hidden] {
  display: none;
}
.warning-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
}
.warning-item {
  padding: 0.85rem 1rem;
  border-inline-start: 0.35rem solid var(--yellow);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--card);
}
.warning-item.amber {
  border-color: var(--orange);
}
.warning-item.red {
  border-color: var(--red);
}
.warning-item p {
  margin: 0.25rem 0;
}
.regional-weather {
  margin-top: 0.9rem;
}
.regional-weather summary,
.weather-history-panel summary {
  cursor: pointer;
  font-weight: 700;
}
.weather-history-panel {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.weather-history-panel .chart-shell {
  margin-top: 0.65rem;
  min-height: 190px;
}
.weather-attribution {
  margin: 0.9rem 0 0;
  font-size: 0.86rem;
}
body.dark .weather-band {
  background: color-mix(in srgb, var(--paper) 90%, var(--blue) 10%);
}
@media (max-width: 900px) {
  .weather-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .weather-outlook-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .weather-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .country-label {
    font-size: 10px;
  }
  .route-label {
    font-size: 8px;
  }
  .map-key span {
    font-size: 0.6rem;
  }
}
body.dark {
  color-scheme: dark;
  --paper: #0c1d15;
  --surface: #152b21;
  --surface2: #1d382c;
  --ink: #f4f2e8;
  --muted: #b2c0b8;
  --line: #385247;
  --green: #61d2a1;
  --mint: #62d5a5;
  --lime: #bddb66;
  --blue: #71bad4;
  --orange: #ef9867;
  --purple: #aba1e5;
  --yellow: #e9ca67;
  --red: #ee8878;
  --grey: #9caaa3;
  --shadow: 0 18px 56px rgba(0, 0, 0, 0.25);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
button,
input,
select,
a {
  font: inherit;
}
.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
  z-index: 100;
  border-radius: 0.5rem;
}
.skip-link:focus {
  top: 1rem;
}
.site-header {
  width: min(1380px, calc(100% - 36px));
  height: 66px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -0.03em;
}
.brand-mark {
  display: flex;
  align-items: end;
  gap: 2px;
  height: 23px;
}
.brand-mark i {
  display: block;
  width: 5px;
  background: var(--green);
  border-radius: 5px;
}
.brand-mark i:nth-child(1) {
  height: 11px;
}
.brand-mark i:nth-child(2) {
  height: 23px;
}
.brand-mark i:nth-child(3) {
  height: 16px;
}
.site-header nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
}
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
}
.site-header nav a:hover {
  color: var(--ink);
}
.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.section,
.live-section,
footer {
  width: min(1240px, calc(100% - 36px));
  margin-inline: auto;
}
.live-section {
  padding: 1.75rem 0 2.5rem;
}
.live-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: 1.15rem;
}
.live-intro h1 {
  font-size: clamp(2.35rem, 4.8vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
  margin: 0.12rem 0 0.38rem;
}
.live-intro p {
  margin: 0;
  color: var(--muted);
}
.eyebrow {
  color: var(--green) !important;
  font-size: 0.7rem !important;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  margin: 0 0 0.35rem !important;
}
.pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 0.5rem;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 14%, transparent);
}
.freshness {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}
.mode-pill,
.quality-pill {
  display: inline-flex;
  border-radius: 99px;
  padding: 0.28rem 0.55rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--green) 14%, transparent);
  color: var(--green);
}
.mode-pill.historical {
  background: color-mix(in srgb, var(--orange) 16%, transparent);
  color: var(--orange);
}
.text-button {
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  color: var(--green);
  min-height: 30px;
  cursor: pointer;
}
.live-dashboard {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 0.85rem;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.62rem;
}
.metric-card,
.mix-card,
.chart-card,
.electricity-map-card,
.explorer-detail,
.record-card,
.comparison-card,
.asset-table-wrap,
.asset-panel,
.insight-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}
.metric-card {
  padding: 0.9rem 1rem;
  min-height: 122px;
  display: flex;
  flex-direction: column;
}
.metric-card > span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 750;
}
.metric-card strong {
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  letter-spacing: -0.055em;
  line-height: 1;
  margin: auto 0 0.35rem;
}
.metric-card strong b {
  font-weight: 850;
}
.metric-card strong em {
  font-size: 0.62rem;
  font-style: normal;
  letter-spacing: 0;
}
.metric-card small {
  font-size: 0.68rem;
  color: var(--muted);
}
.metric-card.primary {
  background: var(--green);
  color: #fff;
  border-color: transparent;
}
.metric-card.primary > span,
.metric-card.primary small {
  color: rgba(255, 255, 255, 0.78);
}
.mix-card {
  padding: 1rem 1.15rem;
}
.card-title,
.chart-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}
.card-title h2 {
  font-size: 1.12rem;
  line-height: 1.1;
  margin: 0.12rem 0;
  letter-spacing: -0.035em;
}
.mix-live {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 0.9rem;
  align-items: center;
  margin-top: 0.6rem;
}
.donut {
  width: 136px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--line) 0 100%);
  position: relative;
}
.donut:after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: var(--surface);
}
.donut span {
  z-index: 1;
  text-align: center;
}
.donut strong {
  display: block;
  font-size: 1.62rem;
  letter-spacing: -0.05em;
}
.donut small {
  display: block;
  max-width: 76px;
  color: var(--muted);
  font-size: 0.58rem;
}
.mix-list {
  display: grid;
  gap: 0.18rem;
}
.mix-row {
  display: grid;
  grid-template-columns: 9px 1fr auto auto;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.67rem;
}
.mix-row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.mix-row b {
  font-size: 0.7rem;
}
.mix-row small {
  color: var(--muted);
  min-width: 60px;
  text-align: right;
}
.fine-print,
.home-note {
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0.55rem 0 0;
}
.home-note {
  text-align: right;
}
.section {
  padding: 4.8rem 0;
}
.compact-section {
  padding: 3.4rem 0;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 3rem;
  margin-bottom: 1.7rem;
}
.section-heading h2 {
  font-size: clamp(2rem, 4.3vw, 3.65rem);
  line-height: 1;
  letter-spacing: -0.055em;
  margin: 0.18rem 0;
}
.section-heading > p {
  max-width: 430px;
  color: var(--muted);
  margin: 0;
}
.small-heading h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}
.insight-band,
.records-band {
  background: var(--surface2);
}
.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}
.insight-card {
  padding: 1rem 1.1rem;
}
.insight-card h3 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
}
.insight-card p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}
.insight-card small {
  display: block;
  margin-top: 0.65rem;
  color: var(--green);
  font-size: 0.64rem;
}
.map-band {
  background: #0b251b;
  color: #f4f2e8;
}
.map-band .section-heading > p,
.map-band #mapLoadStatus {
  color: #adbbb3;
}
.map-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.layer-filters,
.record-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.layer-filters button,
.record-tabs button,
.range-picker button {
  border: 1px solid currentColor;
  color: inherit;
  background: transparent;
  border-radius: 99px;
  padding: 0.45rem 0.75rem;
  min-height: 38px;
  cursor: pointer;
  font-size: 0.72rem;
}
.layer-filters button[aria-pressed="true"],
.record-tabs button[aria-pressed="true"],
.range-picker button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.map-band .layer-filters button[aria-pressed="true"] {
  background: #f4f2e8;
  color: #10261c;
  border-color: #f4f2e8;
}
.electricity-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.55fr);
  gap: 0.8rem;
}
.electricity-map-card {
  position: relative;
  overflow: hidden;
  background: #0e2d21;
  border-color: #315245;
}
.map-toolbar {
  position: absolute;
  z-index: 4;
  left: 0.8rem;
  top: 0.8rem;
  display: flex;
  gap: 0.25rem;
  align-items: center;
  background: rgba(7, 24, 17, 0.88);
  border: 1px solid #426657;
  border-radius: 0.65rem;
  padding: 0.3rem;
}
.map-toolbar button {
  min-width: 38px;
  height: 38px;
  border: 1px solid #547466;
  background: #15392b;
  color: #fff;
  border-radius: 0.45rem;
  cursor: pointer;
}
.map-toolbar span {
  font-size: 0.65rem;
  color: #b9c7bf;
  padding: 0 0.35rem;
}
#electricityMap {
  width: 100%;
  height: min(68vh, 690px);
  min-height: 520px;
  display: block;
  touch-action: none;
  cursor: grab;
}
#electricityMap.dragging {
  cursor: grabbing;
}
.country-shape {
  fill: #173c2e;
  stroke: #6b927f;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}
.country-shape.northern-ireland {
  fill: #143227;
}
.asset-dot {
  stroke: #0e2d21;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
}
.asset-dot.selected {
  stroke: #fff;
  stroke-width: 5;
}
.cluster circle {
  fill: #f4f2e8;
  stroke: #10261c;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.cluster text {
  fill: #10261c;
  font-weight: 850;
  text-anchor: middle;
  dominant-baseline: central;
  font-size: 14px;
  pointer-events: none;
}
.route-line {
  fill: none;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
}
.route-line.importing {
  stroke: var(--mint);
}
.route-line.exporting {
  stroke: var(--orange);
}
.route-line.unavailable {
  stroke: #9aa7a0;
  stroke-dasharray: 7 6;
}
.route-line.selected {
  stroke-width: 8;
}
.route-label {
  font-size: 11px;
  font-weight: 850;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #0e2d21;
  stroke-width: 4;
  fill: #fff;
  pointer-events: none;
}
.route-label.importing {
  fill: var(--mint);
}
.route-label.exporting {
  fill: var(--orange);
}
.map-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 0.65rem 0.9rem;
  color: #b8c6be;
  font-size: 0.64rem;
}
.map-key span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.map-key i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}
.map-key .wind {
  background: var(--green);
}
.map-key .solar {
  background: var(--yellow);
}
.map-key .firm {
  background: var(--orange);
}
.map-key .storage {
  background: var(--purple);
}
.map-key .import,
.map-key .export {
  width: 20px;
  height: 4px;
  border-radius: 5px;
}
.map-key .import {
  background: var(--mint);
}
.map-key .export {
  background: var(--orange);
}
.map-attribution {
  font-size: 0.6rem;
  color: #9bada3;
  padding: 0 0.9rem 0.8rem;
  margin: 0;
}
.explorer-detail {
  padding: 1.25rem;
  background: #163528;
  border-color: #315245;
  color: #f4f2e8;
  align-self: stretch;
}
.explorer-detail h3,
.asset-panel h3 {
  font-size: 1.65rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0.25rem 0;
}
.explorer-detail p {
  color: #bcc8c1;
}
.detail-number {
  font-size: 2.75rem;
  font-weight: 850;
  letter-spacing: -0.055em;
  margin: 1.1rem 0 0.15rem;
}
.detail-list {
  margin: 1rem 0 0;
}
.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  padding: 0.58rem 0;
}
.detail-list dt {
  color: #aebeb5;
  font-size: 0.68rem;
}
.detail-list dd {
  margin: 0;
  text-align: right;
  font-size: 0.75rem;
  font-weight: 750;
}
.detail-list a {
  color: var(--mint);
}
.connector-summary {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin: 2rem 0 0.7rem;
}
.connector-summary h3 {
  font-size: 1.5rem;
  margin: 0.1rem 0;
}
.connector-summary > p {
  color: #adbbb3;
  font-size: 0.76rem;
  margin: 0;
}
.connector-table-wrap,
.asset-table-wrap {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.8rem;
}
.connector-table-wrap table {
  min-width: 850px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}
caption {
  text-align: left;
  padding: 0.65rem 0.9rem;
  color: inherit;
  opacity: 0.72;
}
th,
td {
  padding: 0.64rem 0.85rem;
  text-align: left;
  border-top: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 13%, transparent);
}
tbody tr:hover,
tbody tr:focus-within {
  background: color-mix(in srgb, currentColor 7%, transparent);
}
tbody button {
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
  text-align: left;
}
.direction {
  font-weight: 850;
}
.direction.importing {
  color: var(--mint);
}
.direction.exporting {
  color: var(--orange);
}
.time-band {
  border-bottom: 1px solid var(--line);
}
.time-controls {
  display: flex;
  gap: 0.55rem;
  align-items: end;
  flex-wrap: wrap;
}
.time-controls button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--surface);
  color: var(--ink);
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}
.time-controls label,
.asset-tools label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.67rem;
  color: var(--muted);
}
.time-controls input,
.asset-tools input,
.asset-tools select {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 0.65rem;
  padding: 0.5rem 0.7rem;
}
.time-controls .primary-action {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.timeline-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.3rem;
  color: var(--muted);
  font-size: 0.72rem;
}
.timeline-label strong {
  color: var(--ink);
}
.timeline {
  width: 100%;
  accent-color: var(--green);
  min-height: 38px;
}
.range-picker {
  display: flex;
  gap: 0.35rem;
  margin: -0.3rem 0 1rem;
}
.chart-card {
  padding: 1.2rem;
}
.chart-feature {
  margin-bottom: 0.8rem;
}
.chart-title h3 {
  font-size: 1.1rem;
  margin: 0 0 0.2rem;
}
.chart-title p {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
}
.chart-unit {
  color: var(--muted);
  font-size: 0.64rem;
}
.chart-shell {
  position: relative;
  height: 310px;
  margin-top: 0.6rem;
}
.chart-shell canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.chart-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0.55rem;
  padding: 0.55rem 0.65rem;
  min-width: 155px;
  box-shadow: var(--shadow);
  transform: translate(-50%, -110%);
  font-size: 0.68rem;
}
.chart-tooltip strong {
  display: block;
  margin-bottom: 0.25rem;
}
.chart-tooltip span {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}
.chart-tooltip i {
  font-style: normal;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.7rem 0;
}
.legend button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 99px;
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
  cursor: pointer;
}
.legend button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface2);
}
.legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 0.3rem;
}
.chart-summary {
  font-size: 0.67rem;
  color: var(--muted);
  margin: 0.45rem 0 0;
}
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.chart-gap {
  margin-top: 0.8rem;
}
.record-tabs {
  margin: -0.3rem 0 1rem;
}
.record-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
}
.record-card {
  padding: 1rem;
}
.record-card span {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.record-card strong {
  display: block;
  font-size: 1.65rem;
  letter-spacing: -0.045em;
  margin: 0.25rem 0;
}
.record-card p {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.2rem 0;
}
.record-card small {
  font-size: 0.62rem;
  color: var(--green);
}
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-top: 1.5rem;
}
.comparison-card {
  padding: 1.1rem;
}
.comparison-card h3 {
  font-size: 1.1rem;
  margin: 0 0 0.8rem;
}
.comparison-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}
.comparison-row span {
  color: var(--muted);
  font-size: 0.7rem;
}
.comparison-row strong {
  text-align: right;
}
.comparison-row small {
  display: block;
  color: var(--muted);
  font-weight: 400;
}
.asset-tools {
  display: flex;
  gap: 0.7rem;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.asset-tools label:first-child {
  flex: 1;
  min-width: 240px;
}
.asset-tools span {
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: auto;
}
.asset-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 0.8rem;
}
.asset-table-wrap {
  border-color: var(--line);
  background: var(--surface);
}
.asset-table-wrap table {
  min-width: 700px;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem;
  border-top: 1px solid var(--line);
}
.pagination button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 0.5rem;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}
.pagination span {
  font-size: 0.68rem;
  color: var(--muted);
}
.asset-panel {
  padding: 1.2rem;
}
.asset-panel p {
  color: var(--muted);
  font-size: 0.78rem;
}
.asset-panel .detail-list a {
  color: var(--green);
}
.asset-context {
  margin-top: 1.2rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.asset-context h4 {
  margin: 0;
}
.small-chart {
  height: 185px;
}
.method {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
}
.method h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}
.method > div > p {
  color: var(--muted);
}
.source-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}
.source-card {
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.7rem;
}
.source-card strong,
.source-card small {
  display: block;
}
.source-card small {
  color: var(--muted);
  font-size: 0.65rem;
}
.source-card a {
  color: var(--green);
  font-size: 0.68rem;
}
.faq details {
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}
.faq details:last-child {
  border-bottom: 1px solid var(--line);
}
summary {
  font-weight: 750;
  cursor: pointer;
}
.faq details p {
  font-size: 0.82rem;
  margin: 0.65rem 0 0;
}
footer {
  padding: 2.4rem 0 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  color: var(--muted);
}
footer p {
  font-size: 0.74rem;
}
footer > div:last-child {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
footer a {
  color: var(--ink);
  font-size: 0.74rem;
}
.error-banner {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  background: #9d2f25;
  color: white;
  border-radius: 0.7rem;
  padding: 0.8rem 1rem;
  box-shadow: var(--shadow);
}
.noscript {
  padding: 1rem;
  background: #ffe2a7;
  color: #36270d;
  text-align: center;
}
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 1000px) {
  .site-header nav {
    display: none;
  }
  .live-dashboard {
    grid-template-columns: 1fr;
  }
  .electricity-map-layout,
  .asset-explorer {
    grid-template-columns: 1fr;
  }
  .explorer-detail {
    min-height: 260px;
  }
  .record-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .method {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}
@media (max-width: 760px) {
  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 0.65rem;
  }
  .insight-grid,
  .chart-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .record-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .map-filter-row {
    align-items: start;
    flex-direction: column;
  }
  .connector-summary {
    align-items: start;
    flex-direction: column;
    gap: 0.3rem;
  }
  .chart-shell {
    height: 270px;
  }
}
@media (max-width: 600px) {
  .site-header,
  .section,
  .live-section,
  footer {
    width: min(100% - 24px, 1240px);
  }
  .site-header {
    height: 60px;
  }
  .live-section {
    padding: 1.15rem 0 2rem;
  }
  .live-intro {
    align-items: start;
    flex-direction: column;
    gap: 0.5rem;
  }
  .live-intro h1 {
    font-size: 2.35rem;
  }
  .freshness {
    white-space: normal;
    flex-wrap: wrap;
  }
  .metric-card {
    min-height: 108px;
    padding: 0.78rem;
  }
  .metric-card strong {
    font-size: 1.72rem;
  }
  .metric-card strong em {
    font-size: 0.54rem;
  }
  .mix-live {
    grid-template-columns: 108px 1fr;
  }
  .donut {
    width: 108px;
  }
  .mix-row {
    grid-template-columns: 8px 1fr auto;
  }
  .mix-row small {
    grid-column: 2/4;
    text-align: left;
  }
  .home-note {
    text-align: left;
  }
  .section {
    padding: 3.7rem 0;
  }
  .compact-section {
    padding: 2.8rem 0;
  }
  .section-heading h2 {
    font-size: 2.25rem;
  }
  .layer-filters {
    flex-wrap: nowrap;
    overflow: auto;
    width: 100%;
    padding-bottom: 0.25rem;
  }
  .layer-filters button,
  .record-tabs button {
    white-space: nowrap;
  }
  #electricityMap {
    height: 480px;
    min-height: 480px;
  }
  .map-toolbar {
    top: 0.5rem;
    left: 0.5rem;
  }
  .map-key {
    gap: 0.45rem;
  }
  .time-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .time-controls label {
    grid-column: 1/3;
  }
  .time-controls #liveNow {
    grid-column: 1/3;
  }
  .range-picker,
  .record-tabs {
    overflow: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.3rem;
  }
  .range-picker button {
    white-space: nowrap;
  }
  .chart-card {
    padding: 0.9rem;
  }
  .chart-shell {
    height: 245px;
  }
  .legend.dense {
    max-height: 76px;
    overflow: auto;
  }
  .record-grid {
    grid-template-columns: 1fr 1fr;
  }
  .asset-tools {
    align-items: stretch;
    flex-direction: column;
  }
  .asset-tools span {
    margin-left: 0;
  }
  .method {
    gap: 1.5rem;
  }
  footer,
  footer > div:last-child {
    flex-direction: column;
    gap: 0.55rem;
  }
}

/* Keep geographic theme overrides after the legacy dashboard rules. */
.map-band {
  background: color-mix(in srgb, var(--map-sea) 72%, var(--paper));
  color: var(--ink);
}
.map-band .section-heading > p,
.map-band #mapLoadStatus,
.connector-summary > p {
  color: var(--muted);
}
.map-band .layer-filters button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.electricity-map-card {
  background: var(--map-sea);
  border-color: var(--map-border);
}
.country-shape {
  fill: var(--map-land);
  stroke: var(--map-border);
  stroke-width: 1.1;
}
.route-label {
  font-size: 10px;
  stroke: var(--map-sea);
  fill: var(--ink);
  pointer-events: all;
  cursor: pointer;
}
.route-label.importing {
  fill: var(--green);
}
.route-label.exporting {
  fill: var(--orange);
}
.route-label.zero,
.route-label.unavailable {
  fill: var(--map-label);
}
.map-key,
.map-attribution {
  color: var(--muted);
}
.connector-table-wrap {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
