/* =====================================================================
   LowFuel — site.css (v5)
   Forecourt design system: price-sign numerals, pump nozzle colours
   (unleaded green, diesel black), hi-vis amber for actions.
   Standalone: index.php, towns.php and status.php need only this file.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
    --bg: #eceef1;           /* concrete */
    --bg-hero: #e2e5e9;
    --surface: #ffffff;
    --surface-2: #f4f5f7;
    --line: #d7dbe1;
    --text: #151920;
    --muted: #5a636f;
    --faint: #8a939e;

    --amber: #f2a900;        /* hi-vis / indicator amber */
    --amber-ink: #1b1400;
    --amber-text: #8a5d00;

    --unleaded: #12825a;     /* pump nozzle green */
    --unleaded-deep: #0b5e41;
    --diesel: #1b1f25;       /* pump nozzle black */
    --diesel-ink: #ffffff;
    --other: #4b5666;

    --up: #c42f3a;
    --down: #12825a;
    --warn: #9a6200;

    --shadow-1: 0 1px 2px rgba(20, 25, 32, .06), 0 4px 14px rgba(20, 25, 32, .06);
    --shadow-2: 0 2px 4px rgba(20, 25, 32, .05), 0 18px 40px -18px rgba(20, 25, 32, .28);

    --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-cond: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;

    --r-lg: 22px;
    --r-md: 16px;
    --r-sm: 10px;

    color-scheme: light;
}

.dark {
    --bg: #101419;           /* asphalt */
    --bg-hero: #0b0e12;
    --surface: #181d24;
    --surface-2: #212730;
    --line: #2b323c;
    --text: #e9ecf0;
    --muted: #a0a9b4;
    --faint: #6f7883;

    --amber: #ffb81c;
    --amber-ink: #1b1400;
    --amber-text: #ffc84a;

    --unleaded: #1f9a6b;
    --unleaded-deep: #37c890;
    --diesel: #050608;
    --diesel-ink: #f3f5f7;
    --other: #56627a;

    --up: #ff6b74;
    --down: #3fd198;
    --warn: #ffc84a;

    --shadow-1: none;
    --shadow-2: 0 0 0 1px rgba(255, 255, 255, .04), 0 24px 50px -24px rgba(0, 0, 0, .8);

    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5;
    background: var(--bg); color: var(--text);
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img, svg { display: block; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.icon { flex: none; }

.theme-anim, .theme-anim *, .theme-anim *::before { transition: background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease !important; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 6px; }

.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--amber); color: var(--amber-ink); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* ---------- Price numerals (the signature element) ---------- */
.px {
    display: inline-flex; align-items: flex-start; font-family: var(--font-cond);
    font-weight: 700; line-height: .82; letter-spacing: -.01em; font-variant-numeric: tabular-nums lining-nums;
}
.px-int { font-size: 2.1rem; }
.px-dec { font-size: .98rem; margin-left: .06em; margin-top: .06em; }
.px-xl .px-int { font-size: clamp(4rem, 12vw, 5.5rem); }
.px-xl .px-dec { font-size: clamp(1.8rem, 5.4vw, 2.5rem); margin-top: .12em; }
.px-board .px-int { font-size: clamp(3.4rem, 10vw, 4.6rem); }
.px-board .px-dec { font-size: clamp(1.5rem, 4.4vw, 2rem); margin-top: .1em; }

/* ---------- Header ---------- */
.topbar {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo {
    font-family: var(--font-cond); font-weight: 800; font-style: italic; font-size: 1.7rem;
    text-transform: uppercase; letter-spacing: -.01em; text-decoration: none; line-height: 1;
}
.logo span {
    color: var(--amber-ink); background: var(--amber); padding: 0 .22em 0 .16em; margin-left: .08em;
    display: inline-block; transform: skewX(-8deg); border-radius: 3px;
}
.logo-sm { font-size: 1.35rem; }
.topnav { display: flex; align-items: center; gap: 14px; }
.topnav > a { font-weight: 600; text-decoration: none; color: var(--muted); padding: 6px 4px; }
.topnav > a:hover { color: var(--text); }

.theme-switch { display: flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.theme-switch button {
    width: 34px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 999px;
    background: transparent; color: var(--faint); cursor: pointer;
}
.theme-switch button .icon { width: 17px; height: 17px; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.dark .theme-switch button[aria-checked="true"] { background: #323a45; }

/* ---------- Hero + search ---------- */
.hero { background: var(--bg-hero); padding: 36px 0 30px; border-bottom: 1px solid var(--line); }
.page-results .hero { padding: 24px 0 22px; }
.hero-title {
    font-family: var(--font-cond); font-weight: 800; text-transform: none;
    font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: .95; letter-spacing: -.015em;
    margin-bottom: 20px; max-width: 18ch;
}
.page-results .hero-title { font-size: clamp(1.7rem, 4.6vw, 2.4rem); margin-bottom: 16px; max-width: none; }

.search { display: grid; gap: 12px; }
.search-row { display: flex; gap: 10px; }
.search-field {
    flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0;
    background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-md);
    padding: 0 6px 0 16px; height: 60px; box-shadow: var(--shadow-1);
}
.search-field:focus-within { border-color: var(--amber); }
.search-field > .icon { color: var(--faint); }
.search-field input {
    flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
    font-size: 1.2rem; font-weight: 600; height: 100%;
}
.search-field input::placeholder { color: var(--faint); font-weight: 500; }
.locate { width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.locate:hover { color: var(--text); }
.locate.is-busy .icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; cursor: pointer; text-decoration: none; font-weight: 700; border-radius: var(--r-sm);
    -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: translateY(1px); }
.search-go { height: 60px; padding: 0 28px; border-radius: var(--r-md); font-size: 1.1rem; }
.btn-sm { height: 42px; padding: 0 16px; font-size: .95rem; }
.btn-sm .icon { width: 18px; height: 18px; }
.btn-icon { width: 42px; height: 42px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.btn-icon:hover { color: var(--text); }
.btn-icon .icon { width: 18px; height: 18px; }
.btn-icon.is-done { background: var(--unleaded); color: #fff; border-color: transparent; }

.search-options { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: block; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: .92rem; color: var(--muted); white-space: nowrap; }
.segmented input:checked + span { background: var(--text); color: var(--bg); }
.segmented input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 1px; }
.segmented.is-inactive span { opacity: .7; }

.sort select {
    appearance: none; -webkit-appearance: none; height: 42px; padding: 0 38px 0 14px; border-radius: 12px;
    border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: .92rem; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a939e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
    display: inline-flex; align-items: center; gap: 4px; padding: 7px 13px; border-radius: 999px;
    font-size: .88rem; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.chip .icon { width: 0; height: 15px; opacity: 0; transition: width .15s ease, opacity .15s ease; }
.chip input:checked + span { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.chip input:checked + span .icon { width: 15px; opacity: 1; }
.chip input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }

.promise { margin-top: 14px; color: var(--muted); font-weight: 500; }

/* ---------- Notices + summary ---------- */
main.wrap { padding-top: 24px; padding-bottom: 60px; }
.notice { border-radius: var(--r-md); padding: 14px 18px; margin-bottom: 18px; font-weight: 600; border: 1px solid; }
.notice-error { background: color-mix(in srgb, var(--up) 9%, var(--surface)); border-color: color-mix(in srgb, var(--up) 30%, transparent); color: var(--up); }
.notice-warn { background: color-mix(in srgb, var(--amber) 14%, var(--surface)); border-color: color-mix(in srgb, var(--amber) 40%, transparent); color: var(--warn); }
.summary { margin-bottom: 18px; color: var(--muted); }
.summary strong { color: var(--text); }
.summary-time { white-space: nowrap; }

/* ---------- Cheapest nearby ---------- */
.best { display: grid; gap: 14px; margin-bottom: 22px; }
@media (min-width: 760px) { .best { grid-template-columns: 1fr 1fr; } }
.best-card {
    position: relative; background: var(--surface); border-radius: var(--r-lg); padding: 20px 22px 20px;
    box-shadow: var(--shadow-2); overflow: hidden; display: flex; flex-direction: column; gap: 12px;
}
.best-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; }
.best-unleaded::before { background: var(--unleaded); }
.best-diesel::before { background: var(--diesel); }
.dark .best-diesel::before { background: linear-gradient(90deg, #6b7684, #2a3038); }
.best-head { display: flex; align-items: center; gap: 8px; }
.best-head h2 { font-size: 1rem; font-weight: 700; color: var(--muted); }
.nozzle { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.best-unleaded .nozzle, .board-unleaded .nozzle { background: var(--unleaded); }
.best-diesel .nozzle, .board-diesel .nozzle { background: var(--diesel); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.best-unleaded .best-price { color: var(--unleaded); }
.dark .best-unleaded .best-price { color: var(--unleaded-deep); }
.best-diesel .best-price { color: var(--text); }
.best-station { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.best-station > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.best-station strong { font-weight: 700; line-height: 1.25; }
.best-station:hover strong { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.best-station small { color: var(--muted); font-size: .9rem; }
.best-avg { font-size: .9rem; color: var(--muted); }
.chg { font-weight: 700; white-space: nowrap; }
.chg-down { color: var(--down); }
.chg-up { color: var(--up); }

.drive { background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 6px; margin-top: auto; }
.drive-q { font-size: .9rem; color: var(--muted); }
.best-card > .drive-q { margin-top: auto; }
.drive-result { font-weight: 700; }
.drive-result.is-yes { color: var(--down); }
.drive-result.is-no { color: var(--up); }
.drive-inputs { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .9rem; color: var(--muted); }
.drive-inputs input {
    width: 58px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line);
    background: var(--surface); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums;
}

/* ---------- Map ---------- */
.map-card { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); margin-bottom: 22px; background: var(--surface-2); }
#stationMap { height: 360px; width: 100%; }
@media (max-width: 640px) { #stationMap { height: 280px; } }
.dark #stationMap .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.92) saturate(.6); }
.leaflet-container { font-family: var(--font); background: var(--surface-2); }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.dark .leaflet-popup-content-wrapper, .dark .leaflet-popup-tip { background: var(--surface-2); color: var(--text); }
.dark .leaflet-control-attribution { background: rgba(16,20,25,.75); color: var(--faint); }
.dark .leaflet-control-attribution a { color: var(--muted); }
.pop { display: flex; flex-direction: column; gap: 2px; min-width: 150px; font-size: 13px; }
.pop strong { font-size: 14px; }
.pop span { color: var(--muted); }
.pop .pop-u { color: var(--unleaded); font-weight: 700; }
.dark .pop .pop-u { color: var(--unleaded-deep); }
.pop .pop-d { color: var(--text); font-weight: 700; }
.pop a { margin-top: 4px; font-weight: 700; }
.pin { position: absolute; transform: translate(-16px, -16px); display: flex; align-items: center; filter: drop-shadow(0 3px 5px rgba(0,0,0,.35)); }
.pin-mono { width: 32px; height: 32px; border-radius: 50%; border: 2.5px solid #fff; display: grid; place-items: center; font-weight: 800; line-height: 1; position: relative; z-index: 1; }
.pin-price { margin-left: -8px; padding: 3px 7px 3px 12px; background: #fff; color: #151920; border-radius: 0 8px 8px 0; font-family: var(--font-cond); font-weight: 700; font-size: 14px; line-height: 1; }
.pin-closed { opacity: .45; filter: grayscale(1); }
.pin-you { width: 18px; height: 18px; border-radius: 50%; background: var(--amber); border: 3px solid #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--amber) 35%, transparent); }
.user-location-tag {
    background: var(--text) !important; color: var(--bg) !important; border: 0 !important; box-shadow: 0 2px 6px rgba(0,0,0,.3) !important;
    font-weight: 700 !important; font-size: 12px !important; padding: 3px 8px !important; border-radius: 8px !important;
}
.user-location-tag::before { display: none; }

/* ---------- Station list ---------- */
.stations { display: grid; gap: 12px; }
.station { background: var(--surface); border-radius: var(--r-md); padding: 18px 18px 16px; box-shadow: var(--shadow-1); border: 1px solid transparent; scroll-margin-top: 80px; }
.dark .station { border-color: var(--line); }
.station:target { border-color: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 35%, transparent); }
.station.is-closed { opacity: .62; }
.station-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; }
.station-name { font-size: 1.12rem; font-weight: 700; line-height: 1.25; }
.station-addr { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.station-dist { text-align: right; color: var(--muted); font-size: .9rem; white-space: nowrap; line-height: 1.1; }
.station-dist strong { font-family: var(--font-cond); font-size: 1.6rem; font-weight: 700; color: var(--text); }
.station-dist small { display: block; font-size: .75rem; }

.mono {
    width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
    font-weight: 800; font-size: 11px; letter-spacing: -.02em; line-height: 1; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.mono-sm { font-size: 9.5px; }
.mono-xs { font-size: 8px; }
.mono-generic { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px 54px; }
.badge { font-size: .8rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge-open { background: color-mix(in srgb, var(--down) 14%, var(--surface)); color: var(--down); }
.badge-closed { background: color-mix(in srgb, var(--up) 12%, var(--surface)); color: var(--up); }
.badge-warn { background: color-mix(in srgb, var(--amber) 18%, var(--surface)); color: var(--warn); }
.badge-brand { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }

/* Price tiles: coloured like the pump nozzles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.tile {
    position: relative; border-radius: var(--r-sm); padding: 10px 12px 9px; display: flex; flex-direction: column; gap: 6px;
    color: #fff; overflow: hidden;
}
.tile-label { font-size: .8rem; font-weight: 600; opacity: .9; }
.tile-age { font-size: .72rem; opacity: .78; }
.tile-unleaded { background: var(--unleaded); }
.tile-super { background: var(--unleaded-deep); }
.dark .tile-super { background: #0e6a49; }
.tile-diesel, .tile-diesel-premium { background: var(--diesel); color: var(--diesel-ink); }
.dark .tile-diesel, .dark .tile-diesel-premium { box-shadow: inset 0 0 0 1px #39414c; }
.tile-diesel-premium::after, .tile-super::after { content: ""; position: absolute; top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 16px 16px 0; border-color: transparent var(--amber) transparent transparent; }
.tile-other { background: var(--other); }
.tile.is-sorted { box-shadow: 0 0 0 3px var(--amber); }
.dark .tile-diesel.is-sorted, .dark .tile-diesel-premium.is-sorted { box-shadow: 0 0 0 3px var(--amber); }
.tile.is-stale { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 6px, transparent 6px 12px); }
.tile.is-stale .px { opacity: .75; }
.tile.is-stale .tile-age { opacity: 1; font-weight: 700; }

.station-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.facilities { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .85rem; color: var(--muted); flex: 1 1 260px; }
.facilities li { display: inline-flex; align-items: center; gap: 5px; }
.facilities li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.actions { display: flex; gap: 6px; margin-left: auto; }

@media (max-width: 560px) {
    .search-row { flex-direction: column; }
    .search-go { width: 100%; height: 54px; }
    .search-options { align-items: stretch; }
    .segmented { display: flex; width: 100%; }
    .segmented label { flex: 1; text-align: center; }
    .sort, .sort select { width: 100%; }
    .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 6px; scrollbar-width: none; }
    .chips::-webkit-scrollbar { display: none; }
    .chip span { white-space: nowrap; }
    .badges { margin-left: 0; }
    .mono { width: 38px; height: 38px; }
    .tiles { grid-template-columns: 1fr 1fr; }
    .actions { width: 100%; }
    .actions .btn-primary { flex: 1; }
}

/* ---------- Home: price board + facts ---------- */
.board {
    background: #14181e; color: #f3f5f7; border-radius: var(--r-lg); padding: 22px 24px 18px; margin: 6px 0 34px;
    box-shadow: var(--shadow-2); position: relative; overflow: hidden;
}
.dark .board { background: #07090c; box-shadow: 0 0 0 1px var(--line); }
.board-title { font-family: var(--font-cond); font-weight: 700; font-size: 1.35rem; margin-bottom: 8px; color: #cfd5dc; }
.board-rows { display: grid; gap: 4px; }
@media (min-width: 700px) { .board-rows { grid-template-columns: 1fr 1fr; gap: 24px; } }
.board-row { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: end; column-gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.08); }
.board-label { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #cfd5dc; align-self: center; }
.board-row .px { grid-row: span 2; color: #ffd166; text-shadow: 0 0 22px rgba(255, 184, 28, .35); }
.board-row .chg { grid-column: 1; font-size: .85rem; }
.board .chg-down { color: #3fd198; }
.board .chg-up { color: #ff6b74; }
.board-diesel .nozzle { background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.board-foot { font-size: .85rem; color: #8b949f; margin-top: 8px; }

.facts { display: grid; gap: 22px; margin-bottom: 30px; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.facts h2 { font-family: var(--font-cond); font-weight: 700; font-size: 1.45rem; line-height: 1.05; margin-bottom: 6px; }
.facts p { color: var(--muted); max-width: 44ch; }
.browse a, .text-link { font-weight: 700; text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* ---------- Towns index ---------- */
.letters { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 22px; }
.letters a { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: var(--surface); box-shadow: var(--shadow-1); font-weight: 700; text-decoration: none; }
.letters a:hover { background: var(--amber); color: var(--amber-ink); }
.letter-group { background: var(--surface); border-radius: var(--r-md); padding: 18px 20px; margin-bottom: 12px; box-shadow: var(--shadow-1); scroll-margin-top: 80px; }
.dark .letter-group { border: 1px solid var(--line); }
.letter-group h2 { font-family: var(--font-cond); font-weight: 800; font-size: 2.2rem; line-height: 1; margin-bottom: 10px; color: var(--amber-text); }
.town-list { display: grid; grid-template-columns: 1fr; gap: 0 24px; }
@media (min-width: 600px) { .town-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .town-list { grid-template-columns: 1fr 1fr 1fr; } }
.town-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.town-list a:hover .town-name { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; }
.town-name { font-weight: 600; }
.town-meta { font-size: .85rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.town-meta b { color: var(--unleaded); font-weight: 700; }
.dark .town-meta b { color: var(--unleaded-deep); }

/* ---------- Status page ---------- */
.status-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 24px; max-width: 560px; }
.status-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.status-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.status-ok { background: var(--down); box-shadow: 0 0 0 5px color-mix(in srgb, var(--down) 20%, transparent); }
.status-warn { background: var(--amber); box-shadow: 0 0 0 5px color-mix(in srgb, var(--amber) 25%, transparent); }
.status-bad { background: var(--up); box-shadow: 0 0 0 5px color-mix(in srgb, var(--up) 20%, transparent); }
.status-head h2 { font-family: var(--font-cond); font-weight: 700; font-size: 1.8rem; line-height: 1; }
.status-sub { color: var(--muted); margin-bottom: 18px; }
.status-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.status-rows dt { color: var(--muted); }
.status-rows dd { margin: 0; font-weight: 700; text-align: right; }
.is-ok { color: var(--down); }
.is-warn { color: var(--warn); }
.is-bad { color: var(--up); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-hero); padding: 30px 0 40px; }
.footer-inner { display: grid; gap: 18px; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1fr auto; align-items: start; } .footer-note { grid-column: 1 / -1; } }
.footer p { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer nav a { font-weight: 600; text-decoration: none; color: var(--muted); }
.footer nav a:hover { color: var(--text); }
.footer-note { font-size: .82rem !important; color: var(--faint) !important; max-width: 70ch; }

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