/* aqoFUEL — fuel.aqo.ai. aqo.ai palette (warm neutrals, vermillion accent); petrol green and diesel black follow UK pump colours. */
:root {
  --paper: #FAFAF8; --surface: #FFFFFF; --soft: #F2F1EE; --line: #E4E3DF; --muted: #66655F; --ink: #111110;
  --accent: #C8271F; --accent-ink: #FFFFFF; --petrol: #2E6B48; --diesel: #26261F; --gold: #9A7A22;
  --good: #2E6B48; --bad: #B42318; --warn-bg: #FFF4D6; --warn-ink: #7A5200; --focus: #C8271F;
  --radius: 14px; --shadow: 0 1px 2px rgba(17,17,16,.05), 0 6px 20px rgba(17,17,16,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151514; --surface: #1E1E1C; --soft: #262624; --line: #34342F; --muted: #A9A8A1; --ink: #F2F1EE;
    --accent: #EF4B43; --accent-ink: #151514; --petrol: #64B07F; --diesel: #DAD9D2; --gold: #D4AC52;
    --good: #64B07F; --bad: #F2867F; --warn-bg: #3A2F12; --warn-ink: #F3D27A; --focus: #EF4B43;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.9rem, 6vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 3.5vw, 1.6rem); font-weight: 750; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
code { font-size: .85em; word-break: break-all; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.section { margin-top: 2.25rem; }
.narrow-top { margin-top: 1.5rem; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.num-muted { color: var(--muted); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-mark { width: 22px; height: 22px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--accent); display: inline-block; }
.brand-name { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.03em; margin: 0; }
.brand-name b { font-weight: 850; }
.brand-name.small { font-size: 1.1rem; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav a { text-decoration: none; padding: 8px 10px; border-radius: 999px; font-size: .9rem; font-weight: 600; white-space: nowrap; color: var(--muted); }
.nav a[aria-current="page"], .nav a:hover { color: var(--ink); background: var(--soft); }
@media (max-width: 600px) {
  .header-row { flex-wrap: wrap; gap: 0; padding-top: 6px; }
  .nav { width: 100%; justify-content: space-between; padding-bottom: 6px; }
  .nav a { padding: 8px 10px; font-size: .9rem; }
}

/* Hero */
.hero { background: linear-gradient(180deg, var(--soft), var(--paper)); border-bottom: 1px solid var(--line); padding: 28px 0 32px; }
.hero-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr 1fr; align-items: center; } .hero { padding: 56px 0; } }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 800; color: var(--accent); margin-bottom: .5rem; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 38rem; }
.small-lede { font-size: 1rem; }

/* Search */
.search { display: flex; gap: 8px; margin-top: 1rem; max-width: 34rem; }
.search input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.search input:focus { border-color: var(--ink); outline: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: .95rem; border-radius: 12px; padding: 12px 16px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; min-height: 48px; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); }
.locate { margin-top: 10px; }
.locate-status:empty { display: none; }
.locate-status { margin-top: 6px; }

/* Stat cards */
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat-card h3 { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); font-weight: 700; }
.stat-card .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.stat-card.petrol .dot { background: var(--petrol); }
.stat-card.diesel .dot { background: var(--diesel); }
.stat-value { font-size: clamp(1.9rem, 7vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 0; }
.stat-change { font-weight: 700; font-size: .95rem; margin: .25rem 0; font-variant-numeric: tabular-nums; }
.stat-change.up { color: var(--bad); } .stat-change.down { color: var(--good); } .stat-change.flat { color: var(--ink); }
.stat-meta { font-size: .8rem; color: var(--muted); margin: .5rem 0 0; line-height: 1.4; }
.stat-card.wide .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.label { font-size: .8rem; font-weight: 700; color: var(--muted); margin: 0 0 2px; text-transform: uppercase; letter-spacing: .06em; }
.petrol-text { color: var(--petrol); } .diesel-text { color: var(--diesel); }
@media (max-width: 380px) { .hero-stats { grid-template-columns: 1fr; } }

/* Sections and tables */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: .75rem; }
.more { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .95rem; }
table.data th, table.data td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
table.data tbody tr:last-child th, table.data tbody tr:last-child td { border-bottom: 0; }
table.data tr.total th, table.data tr.total td { font-weight: 800; }
table.data .chg { color: var(--muted); }
table.compact th, table.compact td { padding: 6px 10px; }
table.hours { max-width: 22rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* Charts */
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 12px 8px; box-shadow: var(--shadow); position: relative; }
.chart { width: 100%; height: 240px; position: relative; touch-action: pan-y; }
.chart-card.tall .chart { height: 340px; }
@media (min-width: 900px) { .chart { height: 300px; } .chart-card.tall .chart { height: 420px; } }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .petrol { stroke: var(--petrol); } .chart .diesel { stroke: var(--diesel); }
.chart .dot-petrol { fill: var(--petrol); } .chart .dot-diesel { fill: var(--diesel); }
.chart .hollow { fill: var(--surface); stroke-width: 2; }
.chart .cursor { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart .empty { fill: var(--muted); font-size: 14px; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); border-radius: 10px; padding: 8px 10px; font-size: .8rem; line-height: 1.35; min-width: 140px; box-shadow: var(--shadow); z-index: 2; white-space: nowrap; }
.tip b { font-variant-numeric: tabular-nums; }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .8rem; color: var(--muted); margin: 6px 4px 0; }
.key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; }
.key.petrol { background: var(--petrol); } .key.diesel { background: var(--diesel); }
.key.hollow { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--muted); }

/* Controls */
.controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: end; margin: 1rem 0; }
.controls fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.controls legend { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; width: 100%; }
.controls label { font-size: .9rem; }
.controls fieldset label { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; min-height: 40px; }
.controls fieldset label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.controls input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.controls fieldset label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.controls select { font: inherit; padding: 9px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); display: block; margin-top: 4px; min-height: 40px; }
.controls.inline { margin: .25rem 0 .75rem; }
.segmented, .chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.segmented a, .segmented button, .chips a { font: inherit; font-size: .9rem; font-weight: 700; text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; }
.segmented [aria-current="true"], .segmented [aria-selected="true"], .segmented [aria-pressed="true"], .chips [aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: .75rem; }

/* Forecourt lists */
.fc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 900px) { .fc-list { grid-template-columns: 1fr 1fr; } }
.fc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.fc-link { text-decoration: none; display: grid; gap: 2px; }
.fc-name { font-weight: 750; font-size: 1.02rem; }
.fc-link:hover .fc-name { color: var(--accent); }
.fc-place { color: var(--muted); font-size: .85rem; }
.fc-dist { font-size: .8rem; font-weight: 700; color: var(--ink); }
.fc-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fc-fuel { border-radius: 10px; background: var(--soft); padding: 8px 10px; border-left: 4px solid var(--line); }
.fc-fuel.petrol { border-left-color: var(--petrol); } .fc-fuel.diesel { border-left-color: var(--diesel); }
.fc-fuel.chosen { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
#nearby .fc-fuel:not(.chosen) .num { font-size: 1.1rem; }
.nearby-fuel { margin-bottom: .5rem; }
.fuel-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--muted); }
.price { display: grid; }
.price .num { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.price .num.big { font-size: 2rem; }
.price.stale .num, .price.odd .num { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.price.none { color: var(--muted); font-size: .9rem; padding: 6px 0; }
.fresh { font-size: .75rem; color: var(--muted); }
.fresh.warn, .tag.warn { color: var(--warn-ink); }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--soft); margin-right: 6px; }
.tag.warn { background: var(--warn-bg); }

/* Forecourt page */
.crumbs { color: var(--muted); margin-bottom: .5rem; }
.fc-head .fc-sub { color: var(--muted); }
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 1rem 0; }
.price-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; border-top: 4px solid var(--line); box-shadow: var(--shadow); }
.price-tile.petrol { border-top-color: var(--petrol); } .price-tile.diesel { border-top-color: var(--diesel); }
.compare { padding: 10px 14px; border-radius: 12px; background: var(--soft); margin: .5rem 0; }
.compare.good strong { color: var(--good); } .compare.bad strong { color: var(--bad); }
.two-col { display: grid; gap: 24px; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1fr 1fr; } }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ticks li::before { content: "✓"; color: var(--good); font-weight: 800; margin-right: 8px; }
.directions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
details.about-data { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
details.about-data summary { cursor: pointer; font-weight: 750; }
details.about-data ul { margin: .75rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .92rem; }

/* Maps */
/* isolation + translateZ: Safari otherwise clips transformed markers inside a rounded, overflow-hidden box. */
.map { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--soft); isolation: isolate; transform: translateZ(0); }
.big-map { height: 62vh; min-height: 360px; margin-top: 10px; }
.results-map { height: 60vh; min-height: 320px; }
.small-map { height: 260px; }
.explore-grid { display: grid; gap: 18px; margin-top: 1rem; }
@media (min-width: 960px) { .explore-grid { grid-template-columns: 380px 1fr; align-items: start; } }
.explore-side { display: grid; gap: 14px; }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--muted); margin: 8px 0 4px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.sw.cheap { background: #2E8B57; } .sw.mid { background: #D9A400; } .sw.dear { background: #C8271F; } .sw.none { background: #9A9893; }
.maplibregl-popup-content { border-radius: 12px !important; padding: 10px 12px !important; font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #111110; }
.maplibregl-popup-content a { color: #C8271F; font-weight: 700; }

/* Prose */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 1.75rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }
.freshness { border-top: 1px solid var(--line); padding-top: 1rem; }

/* Footer */
.units button { font: inherit; font-weight: 700; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 4px 10px; cursor: pointer; margin-left: 4px; }
.units button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); background: var(--soft); padding: 28px 0 40px; }
.footer-grid { display: grid; gap: 16px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1fr 2fr; } }

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