/* --- Anthropic-inspired warm cream design system --- */
:root {
  --bg:        #F5F4ED;   /* warm cream paper */
  --surface:   #FFFFFF;
  --surface-2: #FAF9F5;
  --ink:       #1F1E1B;   /* warm near-black */
  --ink-soft:  #3D3D38;
  --muted:     #87867F;   /* warm grey */
  --rule:      #E8E6DD;
  --rule-soft: #EFEDE4;
  --accent:    #CC785C;   /* coral/terracotta */
  --accent-ink:#A35B43;
  --good:      #6B8E50;   /* warm sage green */
  --bad:       #B85C4B;

  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --max-width: 980px;
  --radius:    10px;
  --shadow:    0 1px 2px rgba(31,30,27,0.04), 0 1px 3px rgba(31,30,27,0.03);
}

* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Header ---- */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
/* Sticky on every page except the homepage (which has its own hero search).
   Keeps the postcode/town field one tap away while scrolling long results. */
header:not(.is-home) {
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 var(--rule), 0 2px 8px rgba(31,30,27,0.04);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); text-decoration: none; }

.header-ticker {
  display: flex;
  gap: 1rem;
  margin-left: 1.5rem;
  align-items: baseline;
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: nowrap;
  overflow: hidden;
}
.header-ticker .ticker-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}
.header-ticker .ticker-item {
  display: inline-flex;
  gap: 0.35rem;
  align-items: baseline;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.header-ticker .ticker-item .lbl {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.header-ticker .ticker-item strong {
  color: var(--ink);
  font-weight: 600;
}
.header-ticker .ticker-fresh {
  white-space: nowrap;
  color: var(--good);
  font-weight: 500;
}

.search {
  flex: 1;
  display: flex;
  max-width: 380px;
  margin-left: auto;
}
.search input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  font: 0.95rem/1.2 var(--sans);
  color: var(--ink);
  outline: none;
}
.search input:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.search button {
  padding: 0 1.1rem;
  background: var(--ink);
  color: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font: 500 0.9rem/1 var(--sans);
}
.search button:hover { background: var(--accent); border-color: var(--accent); }

/* ---- Layout ---- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
section + section { margin-top: 3rem; }

/* ---- Typography ---- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}
h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}
h2 { font-size: 1.4rem; margin-top: 0; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1rem; }

.lede {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink-soft);
  line-height: 1.45;
  font-weight: 400;
  max-width: 36em;
}
.muted { color: var(--muted); }

/* ---- Hero ---- */
.hero { margin-bottom: 2.5rem; }
.hero h1 { margin-bottom: 0.5rem; }

/* ---- Hero (search-first homepage) ---- */
.hero--search {
  text-align: center;
  padding: 3.5rem 1rem 3rem;
  margin: 0 auto 3rem;
  max-width: 720px;
}
.hero--search h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0.85rem;
}
.hero--search .lede {
  text-align: center;
  margin: 0 auto 2rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink-soft);
}

.hero-search {
  display: flex;
  gap: 0.5rem;
  max-width: 560px;
  margin: 0 auto 1rem;
}
.hero-search input {
  flex: 1;
  height: 56px;
  padding: 0 1.1rem;
  font: 500 1.05rem/1.2 var(--sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(204, 120, 92, 0.15), var(--shadow);
}
.hero-search button {
  height: 56px;
  padding: 0 1.75rem;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font: 600 1rem/1 var(--sans);
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background .15s, transform .1s;
}
.hero-search button:hover { background: var(--accent-ink); }
.hero-search button:active { transform: translateY(1px); }

@media (max-width: 540px) {
  .hero-search { flex-direction: column; gap: 0.6rem; }
  .hero-search button { width: 100%; }
}

.hero-trust {
  text-align: center;
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* hide redundant header search on homepage */
header.is-home .header-inner { justify-content: flex-start; }

/* ---- Card surface ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
}
.card h2 { margin-bottom: 1rem; }

/* ---- Breadcrumbs ---- */
.crumbs {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

/* ---- Two-column grid ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; }
.averages, .prices, .hours {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--rule-soft);
}
tbody tr:last-child td { border-bottom: 0; }
th {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-2);
}
.price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-size: 1.02rem;
}
.row-action { text-align: right; }
.cheap  { color: var(--good); font-weight: 600; font-variant-numeric: tabular-nums; }
.pricey { color: var(--bad);  font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- Leaderboard list ---- */
.leaderboard {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.leaderboard li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
}
.leaderboard li:last-child { border-bottom: 0; }
.leaderboard li:hover { background: var(--surface-2); }
.leaderboard a {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  color: var(--ink);
}
.leaderboard a:hover { text-decoration: none; }
.leaderboard a:hover .name { color: var(--accent-ink); }
.leaderboard .name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leaderboard .meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.leaderboard .price {
  font-size: 1.1rem;
  white-space: nowrap;
}

/* ---- Chips (browse by) ---- */
.chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chips li a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  transition: border-color .15s, background .15s, color .15s;
}
.chips li a:hover {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
  text-decoration: none;
}
.chips li a:hover .count { color: rgba(255,255,255,0.6); }
.chips .count {
  color: var(--muted);
  font-size: 0.8em;
  font-variant-numeric: tabular-nums;
}

/* ---- Amenities grid ---- */
.amenities {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}
.amenities li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.amenities li::before {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.amenities li.yes { color: var(--ink); }
.amenities li.yes::before {
  background: var(--good);
  background-image: linear-gradient(135deg, var(--good), #87a868);
}
.amenities li.no { color: var(--muted); }
.amenities li.no::before {
  background: var(--bad);
  background-image: linear-gradient(135deg, var(--bad), #d07866);
}

/* ---- Address block ---- */
address {
  font-style: normal;
  line-height: 1.6;
  color: var(--ink-soft);
}
address strong { color: var(--ink); }

/* ---- Warning panel ---- */
.warn {
  background: #FBF1E8;
  border: 1px solid #E8C9A8;
  color: #6B4225;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  margin: 1rem 0;
}

/* ---- Footer ---- */
footer {
  margin-top: 4rem;
  background: var(--surface);
  border-top: 1px solid var(--rule);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
footer p { margin: 0 0 0.4rem; }
footer a { color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
footer a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ---- Search results page ---- */
.results { list-style: none; padding: 0; margin: 0; }
.results li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.results li:last-child { border-bottom: 0; }
.results strong { font-weight: 600; }
.results .meta { display: block; font-size: 0.875rem; color: var(--muted); margin-top: 0.15rem; }

/* ---- Insight blocks (homepage) ---- */
.insights { margin-top: 0; }
.insights-heading {
  font-size: 0.85rem;
  font-family: var(--sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 2.5rem 0 1rem;
}
.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 620px) { .insight-grid { grid-template-columns: 1fr; } }

.insight {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.insight:hover {
  text-decoration: none;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31,30,27,0.06), 0 1px 3px rgba(31,30,27,0.04);
}
.insight-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.insight-stat {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.insight-body {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
  flex: 1;
}
.insight-body strong { color: var(--ink); font-weight: 600; }
.insight-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent-ink);
  font-weight: 500;
  font-size: 0.9rem;
}
.insight:hover .insight-link { color: var(--accent); }

/* ---- Freshness pills ---- */
/* Honest framing: a "stable" price is not the same as a "stale" one. Recent updates
   are highlighted; older prices are presented as factual "unchanged since" markers,
   without alarmism. */
.freshness {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.freshness.fresh    { background: #E6F0DC; color: #3F5E2C; }
.freshness.neutral  { background: var(--surface-2); color: var(--ink-soft); }

/* ---- Charts ---- */
.chart {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.75rem 0.75rem 0.5rem;
  margin: 0.75rem 0 1rem;
}
.chart-caption { margin: 0 0 0.5rem; font-size: 0.875rem; }
.line-chart { width: 100%; height: auto; display: block; }
.chart-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--surface-2);
  border-radius: 6px;
}
.chart-grid { stroke: var(--rule-soft); stroke-width: 1; }
.chart-axis {
  fill: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.chart-axis.chart-x { text-anchor: middle; }

.chart-legend {
  list-style: none;
  padding: 0.25rem 0 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.chart-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}
.chart-legend .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
}
.chart-legend .name { color: var(--ink-soft); }
.chart-legend .latest {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ---- UK trend chart with range toggle ---- */
.trend-chart-container {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1rem 1.25rem;
  margin: 0.75rem 0 1rem;
}
.trend-chart { display: none; }
.trend-chart[data-active] { display: block; }
.chart-toggle {
  position: absolute;
  bottom: 0.6rem;
  right: 0.8rem;
  display: inline-flex;
  gap: 0.15rem;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.2rem;
}
.chart-toggle button {
  background: transparent;
  border: 0;
  padding: 0.3rem 0.7rem;
  font: 500 0.8rem/1 var(--sans);
  color: var(--muted);
  cursor: pointer;
  border-radius: 5px;
  transition: background .15s, color .15s;
}
.chart-toggle button:hover { color: var(--ink); background: var(--surface); }
.chart-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--surface);
}
.chart-toggle button[aria-pressed="true"]:hover {
  background: var(--ink);
  color: var(--surface);
}

/* ---- Brand summary table ---- */
.brand-table {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.brand-table td:nth-child(2),
.brand-table td:nth-child(3),
.brand-table td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.brand-table th:nth-child(2),
.brand-table th:nth-child(3),
.brand-table th:nth-child(4) {
  text-align: right;
}

/* ---- Search anchor highlight ---- */
.anchor {
  font-family: var(--sans);
  font-weight: 600;
  background: linear-gradient(transparent 60%, rgba(204,120,92,0.22) 60%);
  padding: 0 0.15em;
}

/* ---- Sort tabs ---- */
.sort-bar {
  display: flex;
  gap: 0.25rem;
  margin: 1.25rem 0 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.3rem;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}
.sort-tab {
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.sort-tab:hover { color: var(--ink); background: rgba(204,120,92,0.06); text-decoration: none; }
.sort-tab.is-active {
  background: var(--ink);
  color: var(--surface);
}
.sort-tab.is-active:hover { color: var(--surface); background: var(--ink); }

/* ---- Near-results list ---- */
.near-list {
  list-style: none;
  padding: 0; margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.near-list li { border-bottom: 1px solid var(--rule-soft); }
.near-list li:last-child { border-bottom: 0; }
.near-list a {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 1rem 1.25rem;
  color: var(--ink);
}
.near-list a:hover { background: var(--surface-2); text-decoration: none; }
.near-list a:hover .near-name { color: var(--accent-ink); }

.near-main { min-width: 0; }
.near-name { display: block; font-weight: 600; font-size: 1.02rem; }
.near-meta { display: block; color: var(--muted); font-size: 0.87rem; margin-top: 0.15rem; }

.near-distance {
  text-align: right;
  min-width: 70px;
}
.near-distance .distance {
  display: block;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.near-distance .distance-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.near-prices {
  display: flex;
  gap: 1.25rem;
  min-width: 200px;
}
.near-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 70px;
}
.near-price .lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.near-price .price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-size: 1.05rem;
}
.near-price.empty .price { color: var(--muted); font-weight: 500; }

.tag {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.tag.motorway   { background: #F4DDD6; color: #8A3B2A; }
.tag.supermarket { background: #E6F0DC; color: #3F5E2C; }

@media (max-width: 720px) {
  .near-list a {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .near-distance { grid-column: 2; grid-row: 1; }
  .near-prices { grid-column: 1 / -1; grid-row: 2; justify-content: flex-end; }
}

/* ---- Multi-fuel inline chips (nearby stations on station page) ---- */
.leaderboard.nearby li {
  align-items: center;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
}
.fuel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  align-items: baseline;
  justify-content: flex-end;
}
.fuel-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.fuel-chip .lbl {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ---- Discrepancy report link under station prices ---- */
.report-link {
  font-size: 0.85rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
}
.report-link a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.report-link a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ---- Tank-cost sub-line under per-litre prices ---- */
.tank-cost {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-top: 0.1rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.tank-cost-cell {
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---- "Cheapest near you" highlight ---- */
.near-list li.is-cheapest { background: rgba(107,142,80,0.06); }
.near-list li.is-cheapest::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--good);
}
.near-list li.is-cheapest a:hover { background: rgba(107,142,80,0.09); }
.tag.cheapest-here {
  background: #E6F0DC;
  color: #3F5E2C;
  margin-left: 0.4rem;
  vertical-align: 0.08em;
}

/* ---- Per-card freshness on results ---- */
.near-updated { color: var(--muted); }

/* ---- UK + nations merged averages table ---- */
.averages.nations tbody td:nth-child(2),
.averages.nations tbody td:nth-child(3),
.averages.nations tbody td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.averages.nations th:nth-child(2),
.averages.nations th:nth-child(3),
.averages.nations th:nth-child(4) {
  text-align: right;
}
.averages.nations tr.totals td { background: var(--surface-2); }
.averages.nations tr.totals td:first-child strong { font-weight: 600; }

/* ---- Brand-table collapse ---- */
.brand-table[data-collapsed] tr.row-extra { display: none; }
.reveal-button {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.45rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  font: 500 0.88rem/1 var(--sans);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.reveal-button:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--surface-2);
}

/* ---- Misc utilities ---- */
.stats { margin-bottom: 2rem; }

/* ---- Responsive tweaks ---- */
html, body { overflow-x: hidden; }

/* Tables on mobile: allow horizontal scroll instead of squashing */
@media (max-width: 600px) {
  .averages, .prices, .brand-table, .hours {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  th, td { padding: 0.7rem 0.85rem; white-space: nowrap; }
}

@media (max-width: 980px) {
  .header-ticker .ticker-fresh { display: none; }
}
@media (max-width: 820px) {
  .header-ticker { gap: 0.6rem; margin-left: 0.85rem; }
  .header-ticker .ticker-label { display: none; }
  .search { max-width: 260px; }
}
@media (max-width: 680px) {
  .header-ticker { display: none; }
}

@media (max-width: 600px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
  }
  .brand { font-size: 1.1rem; }
  .search {
    max-width: none;
    flex: 1;
    margin-left: 0;
  }
  .search input { padding: 0.55rem 0.7rem; font-size: 0.9rem; }
  .search button { padding: 0 0.85rem; font-size: 0.85rem; }

  main { padding: 1.25rem 1rem 2.5rem; }
  section + section { margin-top: 2rem; }
  .card { padding: 1.25rem; }
  h1 { font-size: 1.75rem; }
  .lede { font-size: 1.05rem; }

  /* Hero: tighter on small screens */
  .hero--search {
    padding: 1.5rem 0.5rem 1.25rem;
    margin-bottom: 1.5rem;
  }
  .hero--search h1 { font-size: 2rem; line-height: 1.1; }
  .hero--search .lede { font-size: 1rem; margin-bottom: 1.25rem; }
  .hero-trust { font-size: 0.8rem; }

  /* Insight cards: smaller stat number on mobile */
  .insight { padding: 1.25rem 1.25rem 1rem; }
  .insight-stat { font-size: 2rem; }
  .insights-heading { margin: 1.5rem 0 0.75rem; }

  /* Trend chart: keep room for the toggle */
  .trend-chart-container { padding: 0.75rem 0.5rem 2.5rem; }
  .chart-toggle { bottom: 0.4rem; right: 0.5rem; }

  /* Fuel chips (nearby section): align consistently on wrap */
  .leaderboard.nearby li { gap: 0.5rem; }
  .fuel-chips { justify-content: flex-start; gap: 0.3rem 0.75rem; }
  .fuel-chip { font-size: 0.88rem; }

  /* Search-results card: less padding, smaller text */
  .near-list a { padding: 0.75rem 0.85rem; gap: 0.5rem 0.75rem; }
  .near-name { font-size: 0.98rem; }
  .near-price .price { font-size: 0.98rem; }
  .tank-cost { font-size: 0.68rem; }
  .tag { font-size: 0.65rem; }
}
