/* energymap.app — Placard design system. Dark ground, Anton display,
   Libre Franklin text, yellow/green accents, zero border-radius. */

:root {
  --bg: #141416;
  --panel: #1d1d21;
  --line: #2c2c30;
  --line-strong: #3a3a40;
  --ink: #f4f2ec;
  --muted: #b8b5ac;
  --faint: #8c8a82;
  --yellow: #f2c94c;
  --yellow-dim: #d9ac1e;
  --green: #7bd8a2;
  --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --text: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--yellow); text-decoration: none; }
a:hover { color: var(--yellow-dim); }
.display { font-family: var(--display); text-transform: uppercase; line-height: 1.04; font-weight: 400; }

/* ---- header ---- */
.site-header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 24px; border-bottom: 3px solid var(--ink); background: var(--bg);
}
.wordmark { font-family: var(--display); font-size: 22px; color: var(--ink); letter-spacing: 0.02em; }
.wordmark em { font-style: normal; color: var(--yellow); }
.site-nav { display: flex; gap: 22px; align-items: center; font-size: 14px; font-weight: 600; }
.site-nav a { color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
.search-box { position: relative; }
.search-box input {
  background: var(--bg); border: 2px solid var(--line-strong); color: var(--ink);
  font-family: var(--text); font-size: 14px; padding: 9px 12px; width: 230px; border-radius: 0;
}
.search-box input::placeholder { color: var(--faint); }
.search-box input:focus { outline: none; border-color: var(--yellow); }
.search-results {
  position: absolute; top: 100%; right: 0; width: 320px; max-height: 320px; overflow-y: auto;
  background: var(--panel); border: 2px solid var(--line-strong); z-index: 60; display: none;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 10px 14px; color: var(--ink); font-size: 14px; border-bottom: 1px solid var(--line); }
.search-results a:hover, .search-results a.active { background: var(--line); }
.search-results .hint { padding: 10px 14px; color: var(--faint); font-size: 13px; }

/* ---- stamps ---- */
.stamps { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stamp { background: var(--yellow); color: var(--bg); font-weight: 800; font-size: 13px; padding: 6px 12px; white-space: nowrap; }
.stamp-outline { border: 2px solid var(--line-strong); color: var(--muted); font-weight: 600; font-size: 13px; padding: 5px 12px; white-space: nowrap; }

/* ---- seat page ---- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.seat-hero { padding: 48px 0 0; display: flex; flex-direction: column; gap: 18px; }
.seat-hero h1 { font-size: clamp(38px, 6vw, 72px); max-width: 1050px; }
.seat-hero h1 em { font-style: normal; color: var(--yellow); }
.editorial { font-size: 18px; color: var(--muted); max-width: 740px; }

.numbers { margin-top: 44px; border-top: 3px solid var(--ink); }
.numrow {
  display: grid; grid-template-columns: minmax(240px, 380px) minmax(0, 1fr);
  gap: 36px; padding: 30px 0; border-bottom: 1px solid var(--line); align-items: center;
}
.numrow:last-child { border-bottom: 3px solid var(--ink); }
.numrow .big { font-family: var(--display); font-size: clamp(48px, 7vw, 84px); line-height: 0.95; }
.big.yellow { color: var(--yellow); }
.big.green { color: var(--green); }
.numrow .sentence { font-size: 21px; font-weight: 600; line-height: 1.35; }
.sentence .hl-y { color: var(--yellow); }
.sentence .hl-g { color: var(--green); }
.numrow .provenance { font-size: 13px; font-weight: 600; color: var(--faint); margin-top: 8px; }
.numrow.not-visible .big { color: var(--faint); font-size: clamp(30px, 4vw, 44px); text-transform: uppercase; font-family: var(--display); }

/* ---- sections ---- */
.section { margin-top: 52px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--display); text-transform: uppercase; font-size: 30px; font-weight: 400; }
.section-head .meta { font-size: 13px; font-weight: 600; color: var(--faint); }

/* waiting bars */
.bars { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.bar-row { display: flex; align-items: center; gap: 18px; }
.bar-label { width: 300px; flex-shrink: 0; font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label span { color: var(--faint); font-weight: 400; }
.bar-track { flex-grow: 1; height: 18px; background: #212125; display: flex; }
.bar-fill { background: var(--yellow); }
.bar-val { width: 100px; text-align: right; font-family: var(--display); color: var(--yellow); font-size: 19px; flex-shrink: 0; }

/* tables */
table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
th { text-align: left; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); font-weight: 700; padding: 10px 12px 10px 0; border-bottom: 2px solid var(--ink); }
td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.strong { font-weight: 700; }
td.dim, th.dim { color: var(--faint); }
tr.linkrow { cursor: pointer; }
tr.linkrow:hover td { background: var(--panel); }
.table-scroll { overflow-x: auto; }
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--ink); }
th.sorted { color: var(--yellow); }

/* caveat + boxes */
.caveat { margin-top: 52px; border: 2px solid var(--line-strong); padding: 24px 28px; }
.caveat h3 { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: var(--yellow); text-transform: uppercase; }
.caveat p { font-size: 15px; color: var(--muted); margin-top: 8px; max-width: 980px; }
.caveat a { font-weight: 600; }

/* buttons */
.btn { display: inline-block; background: var(--yellow); color: var(--bg); font-family: var(--display); text-transform: uppercase; font-size: 16px; padding: 12px 24px; border: 0; cursor: pointer; border-radius: 0; }
.btn:hover { background: var(--yellow-dim); color: var(--bg); }
.btn-outline { display: inline-block; border: 2px solid var(--line-strong); color: var(--ink); font-weight: 700; font-size: 14px; padding: 11px 18px; cursor: pointer; background: none; font-family: var(--text); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }

/* footer */
.site-footer { margin-top: 64px; border-top: 3px solid var(--ink); padding: 22px 24px 40px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.site-footer .src { font-size: 13px; font-weight: 600; color: var(--faint); max-width: 640px; }
.site-footer .src a { color: var(--muted); }

/* ---- landing map ---- */
.map-page { position: fixed; inset: 0; overflow: hidden; }
#map { position: absolute; inset: 0; }
.overlay { position: absolute; z-index: 10; }
.ov-brand { left: 24px; top: 84px; max-width: 300px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.ov-brand .tag { font-size: 15px; color: var(--muted); }
.ov-toggle { left: 24px; bottom: 120px; display: flex; flex-direction: column; gap: 8px; }
.ov-toggle .lab { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; color: var(--faint); }
.toggle-row { display: flex; }
.toggle-row button {
  padding: 10px 14px; font-size: 14px; font-weight: 700; cursor: pointer; border-radius: 0;
  border: 2px solid var(--yellow); background: var(--bg); color: var(--yellow); font-family: var(--text);
}
.toggle-row button + button { border-left: 0; }
.toggle-row button[aria-pressed="true"] { background: var(--yellow); color: var(--bg); }
.ov-toggle .note { font-size: 13px; color: var(--faint); max-width: 320px; }
.ov-strip {
  left: 24px; bottom: 28px; right: auto; display: flex; gap: 24px; align-items: baseline;
  border-top: 3px solid var(--ink); padding-top: 10px; background: var(--bg); flex-wrap: wrap; max-width: 720px; padding-right: 12px;
}
.ov-strip .stat { display: flex; gap: 8px; align-items: baseline; }
.ov-strip .v { font-family: var(--display); font-size: 24px; }
.ov-strip .v.g { color: var(--green); } .ov-strip .v.y { color: var(--yellow); }
.ov-strip .k { font-size: 13px; color: var(--muted); }
.ov-readout {
  right: 24px; top: 84px; width: 330px; border: 2px solid var(--line-strong);
  background: var(--bg); padding: 16px 20px; display: flex; flex-direction: column; gap: 6px;
}
.ov-readout .kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; color: var(--faint); }
.ov-readout .name { font-family: var(--display); text-transform: uppercase; font-size: 21px; min-height: 46px; }
.ov-readout .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.ov-readout .row strong { color: var(--ink); }
.ov-readout .row strong.y { color: var(--yellow); } .ov-readout .row strong.g { color: var(--green); }
.ov-seat {
  right: 24px; bottom: 28px; width: 330px; border-top: 6px solid var(--yellow);
  background: var(--panel); padding: 18px 20px; display: none; flex-direction: column; gap: 8px;
}
.ov-seat.open { display: flex; }
.ov-seat .name { font-family: var(--display); text-transform: uppercase; font-size: 22px; }
.ov-seat p { font-size: 14px; color: var(--muted); }

/* ---- rank/method pages ---- */
.page-title { padding-top: 44px; }
.page-title h1 { font-size: clamp(34px, 5vw, 56px); }
.page-title p { margin-top: 12px; }
.method h2 { font-family: var(--display); text-transform: uppercase; font-size: 26px; font-weight: 400; margin-top: 44px; }
.method p, .method li { color: var(--muted); font-size: 16px; max-width: 820px; margin-top: 10px; }
.method ul { margin-left: 20px; }
.method strong { color: var(--ink); }
code { background: var(--panel); padding: 1px 6px; font-size: 14px; }

/* maplibre chrome, dark */
.maplibregl-ctrl-group { background: var(--panel) !important; border-radius: 0 !important; box-shadow: none !important; border: 2px solid var(--line-strong); }
.maplibregl-ctrl-group button { border-radius: 0 !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line-strong) !important; }
.maplibregl-ctrl button .maplibregl-ctrl-icon { filter: invert(0.85); }
.maplibregl-ctrl-attrib { background: rgba(20, 20, 22, 0.85) !important; color: var(--faint) !important; font-size: 11px; }
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .site-header { padding: 12px 16px; }
  .site-nav { gap: 14px; }
  .search-box input { width: 150px; }
  .wrap { padding: 0 16px; }
  .numrow { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .bar-label { width: 46%; font-size: 14px; }
  .bar-val { width: 78px; font-size: 16px; }
  .ov-brand { top: 76px; max-width: 220px; }
  .ov-brand .tag { font-size: 13px; }
  .ov-readout { display: none; }
  .ov-toggle { bottom: 96px; }
  .ov-toggle .note { display: none; }
  .ov-strip { bottom: 20px; gap: 14px; max-width: calc(100vw - 40px); }
  .ov-strip .v { font-size: 18px; }
  .ov-strip .k { font-size: 11px; }
  .ov-seat { left: 16px; right: 16px; width: auto; bottom: 0; padding-bottom: 24px; }
}

/* ---- v2 story page ---- */
.story { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.screen { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 72px 0; border-bottom: 1px solid var(--line); }
.screen:last-child { border-bottom: 0; }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.14em; color: var(--faint); }
.screen .huge { font-family: var(--display); text-transform: uppercase; font-size: clamp(52px, 9vw, 120px); line-height: 0.95; }
.huge .y { color: var(--yellow); } .huge .g { color: var(--green); }
.screen .lede { font-size: clamp(19px, 2.4vw, 24px); font-weight: 600; line-height: 1.4; max-width: 780px; }
.screen .fine { font-size: 15px; color: var(--muted); max-width: 680px; line-height: 1.55; }
.counter-stamp { display: inline-flex; align-items: baseline; gap: 12px; }
.counter-ts { font-size: 12px; font-weight: 700; color: var(--faint); letter-spacing: 0.06em; }
.two-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--line-strong); border: 2px solid var(--line-strong); }
.two-panel > div { background: var(--bg); padding: 26px 28px; display: flex; flex-direction: column; gap: 10px; }
.two-panel h3 { font-family: var(--display); text-transform: uppercase; font-size: 22px; font-weight: 400; }
.two-panel .num { font-family: var(--display); font-size: 34px; }
.wire-list { display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--muted); }
.wire-list strong { color: var(--ink); }
.wire-list .yr { color: var(--yellow); font-weight: 700; }
.diagram-wrap { display: flex; gap: 36px; align-items: center; flex-wrap: wrap; }
.diagram-wrap svg { flex-shrink: 0; }
.diagram-notes { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.diagram-notes .row { border-left: 3px solid var(--line-strong); padding-left: 14px; }
.diagram-notes .row .v { font-family: var(--display); font-size: 26px; }
.diagram-notes .row .k { font-size: 14px; color: var(--muted); }
.teaser-grids { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.postcode-cta { display: flex; gap: 0; max-width: 460px; }
.postcode-cta input { flex-grow: 1; background: var(--bg); border: 2px solid var(--yellow); color: var(--ink); font-family: var(--text); font-size: 16px; padding: 13px 14px; border-radius: 0; min-width: 0; }
.postcode-cta input:focus { outline: none; }
.postcode-cta button { border: 2px solid var(--yellow); border-left: 0; }
.battery-anim { display: flex; align-items: center; gap: 10px; }
.battery-shell { width: 64px; height: 30px; border: 3px solid var(--ink); position: relative; }
.battery-shell::after { content: ""; position: absolute; right: -8px; top: 8px; width: 5px; height: 8px; background: var(--ink); }
.battery-fill { position: absolute; left: 3px; top: 3px; bottom: 3px; background: var(--green); animation: bfill 6s ease-in-out infinite; }
@keyframes bfill { 0% { width: 8%; } 45% { width: 88%; } 55% { width: 88%; } 100% { width: 8%; } }
.seat-paragraph { font-size: clamp(19px, 2.2vw, 23px); font-weight: 600; line-height: 1.5; max-width: 920px; border-left: 6px solid var(--yellow); padding-left: 22px; }
.status-pill { font-size: 12px; font-weight: 800; padding: 3px 9px; }
.st-approved { background: var(--yellow); color: var(--bg); }
.st-operating { background: var(--green); color: var(--bg); }
.st-building { border: 2px solid var(--green); color: var(--green); }
.st-refused { border: 2px solid #e8963f; color: #e8963f; }
.st-submitted { border: 2px solid var(--line-strong); color: var(--muted); }
@media (max-width: 860px) {
  .two-panel, .teaser-grids { grid-template-columns: 1fr; }
  .screen { min-height: 0; padding: 56px 0; }
}
