:root {
  --paper: #f3efe7;
  --paper-soft: #faf8f3;
  --ink: #123d37;
  --ink-soft: #47615d;
  --green: #0e453d;
  --green-2: #1d6b5e;
  --lime: #d9f06e;
  --lime-soft: #eaf7ad;
  --coral: #f07b5a;
  --border: rgba(18, 61, 55, .18);
  --border-soft: rgba(18, 61, 55, .1);
  --shadow: 0 28px 70px rgba(34, 53, 49, .12);
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
.skip-link { position: fixed; z-index: 10000; left: 16px; top: -60px; padding: 12px 16px; color: white; background: var(--green); border-radius: 8px; }
.skip-link:focus { top: 16px; }

.site-header { width: min(1180px, calc(100% - 48px)); min-height: 56px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border); }
.brand { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 11px; font-weight: 780; letter-spacing: -.025em; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; color: var(--lime); background: var(--green); border-radius: 50%; }
.header-meta { display: flex; align-items: center; gap: 10px; }
.live-pill, .language-button { min-height: 30px; padding: 0 11px; border: 1px solid var(--border); border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.26); color: var(--ink); font: 700 9px var(--mono); letter-spacing: .04em; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(217,240,110,.25); }
.live-pill[data-state="stale"] i { background: var(--coral); box-shadow: 0 0 0 4px rgba(240,123,90,.18); }
.postcode-input-wrap input[aria-invalid="true"] { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(240,123,90,.14); }

main { overflow: hidden; }
.intro { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 12px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.eyebrow { margin: 0 0 12px; font: 750 10px/1.2 var(--mono); letter-spacing: .16em; }
.intro h1 { margin: 0; white-space: nowrap; font-size: clamp(30px, 3.4vw, 44px); line-height: 1; letter-spacing: -.052em; font-weight: 780; }
.intro h1 em { color: var(--coral); font-style: normal; }
.intro-copy { max-width: 430px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.35; letter-spacing: -.01em; }

.finder { width: min(1180px, calc(100% - 48px)); margin: 0 auto 88px; min-height: 540px; display: grid; grid-template-columns: 410px 1fr; border: 1px solid var(--border); border-radius: 24px; overflow: hidden; background: var(--paper-soft); box-shadow: var(--shadow); }
.search-panel { padding: 28px 30px 24px; }
.search-heading { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; margin-bottom: 22px; }
.step-number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); font: 750 10px var(--mono); }
.search-heading h2 { margin: 2px 0 4px; font-size: 20px; letter-spacing: -.04em; }
.search-heading p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.field-label, .radius-fieldset legend { display: block; margin-bottom: 9px; font-size: 11px; font-weight: 760; }
.postcode-row { display: grid; grid-template-columns: 1fr; gap: 9px; }
.postcode-input-wrap { position: relative; }
.postcode-input-wrap svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--green-2); pointer-events: none; }
.postcode-input-wrap input { width: 100%; height: 50px; padding: 0 16px 0 45px; border: 1px solid var(--border); border-radius: 11px; outline: 0; color: var(--ink); background: white; font-size: 18px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.postcode-input-wrap input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(29,107,94,.13); }
.search-button { height: 46px; padding: 0 18px; border: 0; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; color: white; background: var(--green); font-size: 13px; font-weight: 750; }
.search-button:hover { background: #092f2a; }
.search-button:disabled { cursor: wait; opacity: .68; }
.input-help { min-height: 14px; margin: 7px 0 18px; color: var(--ink-soft); font-size: 9px; line-height: 1.35; }
.input-help[data-state="error"] { color: #a13f2b; font-weight: 700; }
.radius-fieldset { padding: 0; margin: 0; border: 0; }
.radius-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.radius-options label { position: relative; }
.radius-options input { position: absolute; opacity: 0; pointer-events: none; }
.radius-options span { min-height: 38px; border: 1px solid var(--border); border-radius: 9px; display: grid; place-items: center; background: transparent; font: 700 10px var(--mono); transition: .18s ease; }
.radius-options input:checked + span { color: var(--ink); border-color: var(--green); background: var(--lime-soft); box-shadow: inset 0 0 0 1px var(--green); }
.radius-options input:focus-visible + span { outline: 3px solid rgba(29,107,94,.2); outline-offset: 2px; }
.status-key { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-soft); display: flex; flex-wrap: wrap; gap: 15px; color: var(--ink-soft); font-size: 9px; }
.status-key span { display: inline-flex; align-items: center; gap: 6px; }
.status-key i { width: 7px; height: 7px; display: block; border-radius: 50%; }
.available-dot { background: var(--green-2); }.busy-dot { background: var(--coral); }.unknown-dot { background: #9daaa7; }.unavailable-dot { background: #73827f; opacity: .72; }

.map-panel { min-width: 0; position: relative; background: #dbe2d4; }
#map { width: 100%; height: 100%; min-height: 540px; background: #dfe6d9; }
.map-unavailable #map { padding: 50px; display: grid; place-items: center; text-align: center; color: var(--ink-soft); }
.map-unavailable #map p { max-width: 300px; line-height: 1.5; }
.map-summary { position: absolute; z-index: 500; left: 16px; right: 16px; bottom: 16px; min-height: 70px; padding: 12px 14px 12px 18px; border: 1px solid rgba(14,69,61,.13); border-radius: 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--ink); background: rgba(250,248,243,.94); box-shadow: 0 12px 32px rgba(27,49,45,.2); backdrop-filter: blur(12px); }
.map-summary > div { display: grid; gap: 5px; }
.summary-label { color: var(--ink-soft); font-size: 10px; }.summary-label strong { color: var(--ink); }
.summary-number { font-size: 20px; letter-spacing: -.035em; }
.map-list-toggle { min-height: 43px; padding: 0 14px; border: 1px solid var(--border); border-radius: 9px; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); background: white; font-size: 11px; font-weight: 750; }
.map-list-toggle:hover { background: var(--lime-soft); }
.map-icon { font-size: 17px; }
.leaflet-control-zoom { border: 0 !important; box-shadow: 0 7px 20px rgba(18,61,55,.18) !important; }
.leaflet-control-zoom a { color: var(--ink) !important; border: 0 !important; }
.leaflet-control-attribution { font-size: 8px !important; }
.charger-pin { width: 42px !important; height: 42px !important; margin: -21px 0 0 -21px !important; border: 3px solid white; border-radius: 50% 50% 50% 15%; display: grid !important; place-items: center; transform: rotate(-45deg); background: var(--green); box-shadow: 0 6px 18px rgba(14,69,61,.26); color: white; }
.charger-pin span { transform: rotate(45deg); font-size: 12px; font-weight: 800; }
.charger-pin.busy { background: var(--coral); }
.charger-pin.unknown { background: #899996; }
.charger-pin.unavailable { opacity: .72; background: #899996; box-shadow: 0 5px 14px rgba(82,97,95,.22); }
.charger-pin.favorite { z-index: 1000 !important; box-shadow: 0 0 0 5px var(--lime), 0 8px 22px rgba(14,69,61,.4); }
.charger-pin.favorite i { position: absolute; top: -9px; right: -9px; width: 20px; height: 20px; border: 2px solid white; border-radius: 50%; display: grid; place-items: center; transform: rotate(45deg); color: white; background: var(--coral); font: 700 10px/1 var(--sans); }
.search-centre { width: 18px !important; height: 18px !important; margin: -9px 0 0 -9px !important; border: 4px solid white; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px var(--green), 0 3px 12px rgba(14,69,61,.35); }
.radius-circle { stroke: var(--green); stroke-width: 1.5; stroke-dasharray: 5 6; fill: var(--lime); fill-opacity: .12; }

.results-section { width: min(1180px, calc(100% - 48px)); margin: 0 auto 120px; }
.results-header { margin-bottom: 28px; display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.results-header h2 { margin: 0; font-size: clamp(35px, 4.3vw, 58px); line-height: 1; letter-spacing: -.057em; }
.results-header h2 span { color: var(--coral); }
.favorites-help { margin: 12px 0 0; color: var(--ink-soft); font-size: 11px; }
.results-total { min-width: 100px; padding-left: 19px; border-left: 1px solid var(--border); display: grid; }
.results-total strong { font-size: 31px; letter-spacing: -.05em; }.results-total span { color: var(--ink-soft); font-size: 10px; }
.station-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.station-card { min-height: 242px; padding: 25px; border: 1px solid var(--border); border-radius: 15px; display: grid; grid-template-rows: auto 1fr auto; color: var(--ink); background: rgba(250,248,243,.62); transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.station-card:hover, .station-card:focus-within { transform: translateY(-3px); background: var(--paper-soft); box-shadow: 0 15px 35px rgba(34,53,49,.1); }
.station-card.is-highlighted { border-color: var(--green-2); background: var(--lime-soft); }
.station-card.is-favorite { border-color: var(--green-2); background: linear-gradient(105deg, var(--lime-soft), rgba(250,248,243,.82) 68%); box-shadow: inset 4px 0 0 var(--green-2), 0 10px 28px rgba(34,53,49,.08); }
.station-card.is-favorite:hover, .station-card.is-favorite:focus-within, .station-card.is-favorite.is-highlighted { background: var(--lime-soft); box-shadow: inset 4px 0 0 var(--green-2), 0 15px 35px rgba(34,53,49,.13); }
.station-card.is-unavailable { border-color: rgba(82,97,95,.22); color: #52615f; background: rgba(225,231,228,.68); box-shadow: none; }
.station-card.is-unavailable:hover, .station-card.is-unavailable:focus-within, .station-card.is-unavailable.is-highlighted { background: #e1e7e4; box-shadow: 0 10px 28px rgba(34,53,49,.07); }
.station-card.is-unavailable.is-favorite { box-shadow: inset 4px 0 0 #899996; }
.station-card-top { display: flex; justify-content: space-between; gap: 20px; }
.station-card-controls { display: flex; align-items: center; gap: 8px; }
.favorite-button { width: 31px; height: 31px; padding: 0; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; color: var(--ink-soft); background: white; font-size: 18px; line-height: 1; transition: .18s ease; }
.favorite-button:hover { color: var(--coral); border-color: var(--coral); transform: scale(1.06); }
.favorite-button[aria-pressed="true"] { color: white; border-color: var(--coral); background: var(--coral); box-shadow: 0 0 0 3px rgba(240,123,90,.14); }
.favorite-button:focus-visible { outline: 3px solid rgba(29,107,94,.22); outline-offset: 2px; }
.leaflet-popup-content .popup-favorite-button { width: 100%; height: 32px; margin-top: 10px; padding: 0 11px; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; font-weight: 760; }
.leaflet-popup-content .popup-favorite-button:hover { transform: none; }
.distance { font: 750 10px var(--mono); letter-spacing: .06em; }
.availability { padding: 7px 10px; border-radius: 999px; background: var(--lime-soft); font-size: 10px; font-weight: 780; white-space: nowrap; }
.availability.limited { color: #7b3526; background: #fce1d8; }
.availability.busy { color: #7b3526; background: #fce1d8; }
.availability.unknown { color: #52615f; background: #e1e7e4; }
.availability.unavailable { color: #52615f; border: 1px solid rgba(82,97,95,.16); background: #d4dcda; }
.station-card h3 { margin: 28px 0 5px; font-size: 23px; letter-spacing: -.045em; }
.station-address { margin: 0; color: var(--ink-soft); font-size: 12px; }
.station-meta { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.station-meta-list { display: flex; gap: 16px; color: var(--ink-soft); font-size: 10px; }
.station-meta-list span { display: inline-flex; align-items: center; gap: 5px; }
.directions-link { color: var(--ink); display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 760; text-underline-offset: 3px; }
.empty-state { grid-column: 1 / -1; padding: 56px 30px; border: 1px dashed var(--border); border-radius: 15px; text-align: center; }
.empty-state h3 { margin: 0 0 8px; font-size: 24px; }.empty-state p { margin: 0; color: var(--ink-soft); }

.data-note { width: min(1180px, calc(100% - 48px)); margin: 0 auto 110px; padding: 60px; border-radius: 24px; display: grid; grid-template-columns: .45fr 1.55fr; gap: 70px; color: white; background: var(--green); }
.data-note h2 { margin: 0 0 26px; max-width: 690px; font-size: clamp(33px, 4.3vw, 58px); line-height: 1.02; letter-spacing: -.057em; }
.data-note div p { max-width: 650px; margin: 0; color: rgba(255,255,255,.65); font-size: 14px; line-height: 1.6; }
.data-note .eyebrow { color: var(--lime); }
footer { width: min(1180px, calc(100% - 48px)); min-height: 110px; margin: 0 auto; padding: 25px 0 38px; border-top: 1px solid var(--border); display: flex; align-items: start; justify-content: space-between; gap: 40px; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
footer strong { color: var(--ink); font-size: 12px; } footer p { margin: 4px 0 0; max-width: 420px; }
footer a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
footer a:hover { color: var(--green-2); }

@media (max-width: 900px) {
  .intro { gap: 24px; }
  .intro-copy { max-width: 560px; }
  .finder { grid-template-columns: 340px 1fr; }
  .search-panel { padding: 32px 28px; }
  .station-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header, .intro, .finder, .results-section, .data-note, footer { width: min(100% - 28px, 1180px); }
  .site-header { min-height: 54px; }.live-pill { display: none; }
  .intro { padding: 13px 0 14px; }.intro h1 { font-size: clamp(25px, 7.5vw, 34px); }.intro-copy { display: none; }
  .finder { grid-template-columns: 1fr; border-radius: 18px; margin-bottom: 75px; }
  .search-panel { padding: 28px 22px; }
  .map-panel, #map { min-height: 480px; }
  .map-summary { left: 12px; right: 12px; bottom: 12px; }.summary-number { font-size: 18px; }
  .results-header { align-items: start; }.results-total { display: none; }
  .station-card { min-height: 225px; padding: 21px; }.station-card h3 { font-size: 21px; }
  .data-note { padding: 38px 25px; grid-template-columns: 1fr; gap: 20px; }
  footer { flex-direction: column; gap: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
