/* Source of truth for the site styles. Design reference copy: ../docs/features/F-003/ui/litrigo.css (sync when changing). */
/*
 * Litrigo design system — direction "Signal" (A) with card elements from "Bento" (C).
 * F-003, 2026-10-07. Plain CSS, no framework: tokens as custom properties, components as classes.
 * The same file is meant to move into litrigo-backend (assets) and be used by the Twig templates.
 *
 * Performance rules: no backdrop-filter, no large blurred shadows, two font families only
 * (Overpass for text, Overpass Mono for prices), everything works without JavaScript.
 */

/* ---------------------------------------------------------------- Tokens */
:root {
  /* Surfaces */
  --c-bg: #f2f5f8;            /* page: cool grey biased to motorway blue */
  --c-surface: #ffffff;       /* cards */
  --c-surface-2: #eaf0f6;     /* inset areas, table heads, highlighted row */
  --c-line: #d9e0e7;
  /* Text */
  --c-ink: #15212c;
  --c-ink-2: #5a6876;         /* secondary text */
  --c-ink-3: #8592a0;         /* tertiary: captions, axis labels */
  /* Brand: Spanish motorway sign blue */
  --c-brand: #1f4e8c;
  --c-brand-ink: #ffffff;
  --c-brand-soft: #e3ecf7;
  /* Totem: station price sign */
  --c-totem: #121a22;
  --c-totem-ink: #dbe4ec;
  --c-totem-line: #22303d;
  --c-led: #ffb33b;
  --c-led-glow: rgba(255, 179, 59, .35);
  /* Semantic */
  --c-cheap: #17794a;   --c-cheap-soft: #e2f3ea;
  --c-dear: #b0442a;    --c-dear-soft: #f8e7e2;
  --c-stale: #8a5a00;   --c-stale-soft: #fbf0d4;
  --c-focus: #1f4e8c;

  /* Type */
  --f-text: "Litrigo Dot", "Overpass", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-num: "Overpass Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --t-xs: .75rem;   /* 12 */
  --t-s: .875rem;   /* 14 */
  --t-m: 1rem;      /* 16 */
  --t-l: 1.125rem;  /* 18 */
  --t-xl: 1.375rem; /* 22 */
  --t-2xl: 1.75rem; /* 28 */
  --t-3xl: 2.25rem; /* 36 */
  --t-price-hero: clamp(2.6rem, 6vw, 3.4rem);

  /* Space, radius, depth (Bento: generous radius, one soft shadow) */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem;
  --r-s: 8px; --r-m: 14px; --r-l: 20px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(21, 33, 44, .06), 0 4px 14px rgba(21, 33, 44, .05);
  --page-max: 76rem;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #0e141a; --c-surface: #151d25; --c-surface-2: #1b2530; --c-line: #2a3541;
    --c-ink: #e5ebf1; --c-ink-2: #a3b0bd; --c-ink-3: #7d8a97;
    --c-brand: #6fa1e6; --c-brand-ink: #0b1420; --c-brand-soft: #1a2a3d;
    --c-totem: #0a0f14; --c-totem-ink: #d4dee8; --c-totem-line: #1e2a35;
    --c-cheap: #4fc489; --c-cheap-soft: #143224; --c-dear: #ee8a6f; --c-dear-soft: #3a1e17;
    --c-stale: #e7b84d; --c-stale-soft: #33290f; --c-focus: #8fb7ee;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --c-bg: #0e141a; --c-surface: #151d25; --c-surface-2: #1b2530; --c-line: #2a3541;
  --c-ink: #e5ebf1; --c-ink-2: #a3b0bd; --c-ink-3: #7d8a97;
  --c-brand: #6fa1e6; --c-brand-ink: #0b1420; --c-brand-soft: #1a2a3d;
  --c-totem: #0a0f14; --c-totem-ink: #d4dee8; --c-totem-line: #1e2a35;
  --c-cheap: #4fc489; --c-cheap-soft: #143224; --c-dear: #ee8a6f; --c-dear-soft: #3a1e17;
  --c-stale: #e7b84d; --c-stale-soft: #33290f; --c-focus: #8fb7ee;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--c-bg); color: var(--c-ink); font: 400 var(--t-m)/1.55 var(--f-text); -webkit-font-smoothing: antialiased; }
a { color: var(--c-brand); text-underline-offset: .15em; }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(var(--t-2xl), 4.5vw, var(--t-3xl)); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: var(--t-xl); font-weight: 800; }
h3 { font-size: var(--t-l); font-weight: 800; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.container { max-width: var(--page-max); margin-inline: auto; padding-inline: var(--gutter); }
.stack > * + * { margin-top: var(--s-4); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------------------------------------------------------------- Buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); font: 600 var(--t-s)/1 var(--f-text); padding: .65rem 1rem; border-radius: var(--r-pill); border: 1px solid transparent; cursor: pointer; text-decoration: none; min-height: 2.5rem; white-space: nowrap; }
.btn--primary { background: var(--c-brand); color: var(--c-brand-ink); }
.btn--secondary { background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line); }
.btn--ghost { background: transparent; color: var(--c-brand); }
.btn--on-totem { background: var(--c-brand); color: #fff; }
.btn svg { width: 1em; height: 1em; }
.field { display: flex; align-items: center; gap: var(--s-2); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-pill); padding: .2rem .3rem .2rem 1rem; min-height: 2.75rem; }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: inherit; outline: none; }
.field:focus-within { outline: 3px solid var(--c-focus); outline-offset: 1px; }

/* ---------------------------------------------------------------- Header & footer */
.site-header { background: var(--c-brand); color: #fff; }
:root[data-theme="dark"] .site-header { background: #13355f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-header { background: #13355f; } }
.site-header__inner { display: flex; align-items: center; gap: var(--s-3); padding-block: .6rem; }
.logo { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; font-size: 1.3rem; color: #fff; text-decoration: none; letter-spacing: .01em; }
.site-header .field { flex: 1; max-width: 30rem; background: rgba(255, 255, 255, .14); border-color: transparent; color: #fff; }
.site-header .field input::placeholder { color: rgba(255, 255, 255, .78); }
.site-header__actions { margin-left: auto; display: flex; gap: var(--s-2); align-items: center; }
.lang-switch { font: 600 var(--t-s) var(--f-text); color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, .5); border-radius: var(--r-pill); padding: .45rem .8rem; }
.site-header .btn--near { background: #fff; color: var(--c-brand); }
@container (max-width: 640px) {
  .site-header .field { display: none; }
  .site-header .btn--near span { display: none; }
}
.site-footer { border-top: 1px solid var(--c-line); color: var(--c-ink-2); font-size: var(--t-s); padding-block: var(--s-6); }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--s-5); }
.site-footer h4 { margin: 0 0 var(--s-2); font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--c-ink-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.site-footer a { color: var(--c-ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--c-brand); text-decoration: underline; }

/* ---------------------------------------------------------------- Page title */
.crumbs { display: flex; flex-wrap: wrap; gap: .35rem; font-size: var(--t-s); color: var(--c-ink-2); margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "›"; margin-right: .35rem; color: var(--c-ink-3); }
.crumbs a { color: var(--c-ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--c-brand); text-decoration: underline; }
.page-title { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
/* Long words (Greek, Finnish, German compounds) must not widen the page on phones. */
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
.freshness { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; font-size: var(--t-s); color: var(--c-ink-2); }
.freshness__live { display: inline-flex; align-items: center; gap: .4rem; }
.freshness__live::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--c-cheap); box-shadow: 0 0 0 3px var(--c-cheap-soft); }

/* ---------------------------------------------------------------- Price */
.price { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; letter-spacing: -.01em; }
.price sup { font-size: .55em; vertical-align: .55em; margin-left: .02em; }
.price__unit { font-size: .6em; font-weight: 600; margin-left: .2em; color: inherit; opacity: .8; }
.price--s { font-size: var(--t-m); }
.price--m { font-size: var(--t-l); }
.price--l { font-size: var(--t-2xl); }
.price--hero { font-size: var(--t-price-hero); line-height: 1; }
.price--led { color: var(--c-led); text-shadow: 0 0 10px var(--c-led-glow); }
.delta { display: inline-flex; align-items: center; gap: .15rem; font: 600 var(--t-xs) var(--f-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta--down { color: var(--c-cheap); }
.delta--down::before { content: "▼"; font-size: .8em; }
.delta--up { color: var(--c-dear); }
.delta--up::before { content: "▲"; font-size: .8em; }
.delta--same { color: var(--c-ink-3); }

/* ---------------------------------------------------------------- Totem (station price sign) */
.totem { background: var(--c-totem); color: var(--c-totem-ink); border-radius: var(--r-l); padding: var(--s-4) var(--s-5) var(--s-5); display: grid; gap: var(--s-2); box-shadow: inset 0 0 0 4px var(--c-totem-line); align-content: start; }
.totem__label { font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase; color: #9fb0c0; }
.totem__where { font-size: var(--t-s); color: #b7c4d0; }
.totem__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.totem__rows { display: grid; }
.totem__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); padding-block: .55rem; border-top: 1px solid var(--c-totem-line); }
.totem__row:first-child { border-top: 0; }
.totem__fuel { font-weight: 600; color: #e6edf3; }
.totem__fuel small { display: block; font-weight: 400; font-size: var(--t-xs); color: #93a4b4; }

/* ---------------------------------------------------------------- Cards (Bento) */
.card { background: var(--c-surface); border-radius: var(--r-m); box-shadow: var(--shadow-1); padding: var(--s-4); min-width: 0; }
.card--flat { box-shadow: none; border: 1px solid var(--c-line); }
.card__title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-3); }
.card__title h2, .card__title h3 { font-size: var(--t-l); }
.bento { display: grid; gap: var(--s-3); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.bento > * { grid-column: span 12; }
@container (min-width: 760px) {
  .bento .span-4 { grid-column: span 4; } .bento .span-5 { grid-column: span 5; } .bento .span-6 { grid-column: span 6; }
  .bento .span-7 { grid-column: span 7; } .bento .span-8 { grid-column: span 8; }
}
.stat { display: grid; gap: .15rem; align-content: start; }
.stat__label { font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-2); }
.stat__value { font: 700 var(--t-xl) var(--f-num); font-variant-numeric: tabular-nums; }
.stat__note { font-size: var(--t-s); color: var(--c-ink-2); }
.stat--save { background: var(--c-cheap-soft); box-shadow: none; }
.stat--save .stat__value { color: var(--c-cheap); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: var(--s-3); }

/* ---------------------------------------------------------------- Chips & control bar */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { display: inline-flex; align-items: center; gap: .35rem; font: 600 var(--t-s)/1 var(--f-text); padding: .5rem .85rem; border-radius: var(--r-pill); background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-line); text-decoration: none; cursor: pointer; min-height: 2.25rem; white-space: nowrap; }
.chip[aria-current="page"], .chip[aria-pressed="true"] { background: var(--c-ink); color: var(--c-bg); border-color: var(--c-ink); }
.chip--brand img, .chip--brand .dot { width: 1rem; height: 1rem; border-radius: 50%; }
.chip .count { font: 600 var(--t-xs) var(--f-num); color: var(--c-ink-3); }
.control-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--c-bg) 92%, transparent); padding-block: var(--s-2); display: grid; gap: var(--s-2); border-bottom: 1px solid var(--c-line); }
.control-bar__row { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; }
.control-bar__row::-webkit-scrollbar { display: none; }
.control-bar__sep { width: 1px; background: var(--c-line); flex: none; margin-inline: var(--s-1); }

/* ---------------------------------------------------------------- Badges */
.badge { display: inline-flex; align-items: center; gap: .25rem; font: 600 .7rem/1.4 var(--f-text); letter-spacing: .02em; padding: .05rem .45rem; border-radius: var(--r-pill); white-space: nowrap; background: var(--c-surface-2); color: var(--c-ink-2); }
.badge--open { background: var(--c-cheap-soft); color: var(--c-cheap); }
.badge--closed { background: var(--c-dear-soft); color: var(--c-dear); }
.badge--stale { background: var(--c-stale-soft); color: var(--c-stale); }
.badge--brand { background: var(--c-brand-soft); color: var(--c-brand); }

/* ---------------------------------------------------------------- Station list */
.station-list { list-style: none; margin: 0; padding: var(--s-1); background: var(--c-surface); border-radius: var(--r-l); box-shadow: var(--shadow-1); counter-reset: rank; }
.station { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: .1rem var(--s-3); align-items: center; padding: .75rem .8rem; border-radius: var(--r-m); position: relative; counter-increment: rank; }
.station + .station { box-shadow: 0 -1px 0 var(--c-line); }
.station::before { content: counter(rank); font: 600 var(--t-xs) var(--f-num); color: var(--c-ink-3); text-align: right; grid-row: 1 / span 2; }
.station--best { background: var(--c-cheap-soft); }
.station--best + .station { box-shadow: none; }
.station__name { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-weight: 700; min-width: 0; }
.station__name a { color: var(--c-ink); text-decoration: none; }
.station__name a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-m); }
.station__name a:hover { text-decoration: underline; }
.station__name a:focus-visible::after { outline: 3px solid var(--c-focus); outline-offset: -3px; }
.station__meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: .1rem .6rem; font-size: var(--t-s); color: var(--c-ink-2); min-width: 0; }
.station__meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.station__price { grid-row: 1 / span 2; grid-column: 3; text-align: right; display: grid; justify-items: end; gap: .1rem; }
.station--stale .station__price .price { color: var(--c-ink-3); }
.station--closed { opacity: .62; }
.hours-mini { grid-column: 2 / span 2; height: 4px; border-radius: 2px; background: var(--c-cheap); opacity: .55; }

/* ---------------------------------------------------------------- Opening hours bar */
.hours { display: grid; gap: .35rem; font-size: var(--t-s); }
.hours__row { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 7rem; gap: var(--s-3); align-items: center; }
.hours__day { color: var(--c-ink-2); font-weight: 600; }
.hours__day--today { color: var(--c-ink); }
.hours__track { position: relative; height: .7rem; border-radius: var(--r-pill); background: var(--c-dear-soft); overflow: hidden; }
.hours__open { position: absolute; top: 0; bottom: 0; background: var(--c-cheap); border-radius: var(--r-pill); }
.hours__now { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--c-ink); }
.hours__text { font-family: var(--f-num); font-size: var(--t-xs); color: var(--c-ink-2); text-align: right; }

/* ---------------------------------------------------------------- Charts */
.chart { display: grid; gap: var(--s-3); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart__grid { stroke: var(--c-line); stroke-width: 1; }
.chart__axis { fill: var(--c-ink-3); font: 11px var(--f-num); }
.chart__line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart__line--city { stroke: var(--c-brand); }
.chart__line--province { stroke: var(--c-ink-3); stroke-width: 1.5; }
.chart__line--country { stroke: var(--c-dear); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart__area { fill: var(--c-brand); opacity: .08; }
.chart__dot { fill: var(--c-brand); }
.chart__legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: var(--t-s); color: var(--c-ink-2); }
.chart__legend i { display: inline-block; width: 1rem; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: .35rem; }
.periods { display: inline-flex; background: var(--c-surface-2); border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.periods a, .periods button { text-decoration: none; font: 600 var(--t-xs) var(--f-text); border: 0; background: transparent; color: var(--c-ink-2); padding: .35rem .7rem; border-radius: var(--r-pill); cursor: pointer; }
.periods a[aria-current="page"], .periods button[aria-pressed="true"] { background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow-1); }

/* ---------------------------------------------------------------- Ranking bars & histogram */
.ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.ranking li { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; font-size: var(--t-s); }
.ranking__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking__bar { height: .6rem; border-radius: var(--r-pill); background: var(--c-surface-2); overflow: hidden; }
.ranking__bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--c-brand); }
.ranking__bar--cheap i { background: var(--c-cheap); }
.ranking__bar--dear i { background: var(--c-dear); }
.histogram { display: flex; align-items: flex-end; gap: 3px; height: 6rem; }
.histogram i { flex: 1; background: var(--c-brand); opacity: .75; border-radius: 3px 3px 0 0; min-height: 2px; }
.histogram i.is-here { background: var(--c-led); opacity: 1; }

/* ---------------------------------------------------------------- Map card (static first, interactive on demand) */
.map-card { position: relative; border-radius: var(--r-l); overflow: hidden; background: var(--c-surface-2); min-height: 14rem; }
.map-card svg { width: 100%; height: 100%; display: block; }
.map-card__open { position: absolute; top: var(--s-3); right: var(--s-3); }

/* ---------------------------------------------------------------- Content blocks */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: var(--s-3); margin: 0; }
.facts div { background: var(--c-surface-2); border-radius: var(--r-m); padding: var(--s-3) var(--s-4); }
.facts dt { font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-2); }
.facts dd { margin: .15rem 0 0; font-weight: 700; }
.prose { max-width: 68ch; color: var(--c-ink); }
.prose p { margin: 0 0 var(--s-3); }
.faq { display: grid; gap: var(--s-2); }
.faq details { background: var(--c-surface); border-radius: var(--r-m); box-shadow: var(--shadow-1); padding: var(--s-3) var(--s-4); }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--s-3); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 var(--t-l) var(--f-num); color: var(--c-brand); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: var(--s-2) 0 0; color: var(--c-ink-2); max-width: 70ch; }
.visitor-box { display: grid; gap: var(--s-2); background: var(--c-brand-soft); border-radius: var(--r-l); padding: var(--s-4) var(--s-5); }
.visitor-box__terms { display: grid; grid-template-columns: fit-content(45%) minmax(0, 1fr); gap: .3rem var(--s-4); margin: 0; font-size: var(--t-s); }
.visitor-box__terms dt { font-weight: 700; font-family: var(--f-num); }
.visitor-box__terms dd { margin: 0; color: var(--c-ink-2); overflow-wrap: break-word; hyphens: auto; }
.visitor-box__terms dt { overflow-wrap: break-word; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: .35rem var(--s-4); list-style: none; margin: 0; padding: 0; font-size: var(--t-s); }
.link-grid a { text-decoration: none; display: flex; justify-content: space-between; gap: var(--s-2); }
.link-grid a:hover { text-decoration: underline; }
.link-grid .price { color: var(--c-ink-2); font-size: var(--t-xs); }
.partner-slot { border: 1px dashed var(--c-line); border-radius: var(--r-l); min-height: 6rem; display: grid; place-items: center; color: var(--c-ink-3); font-size: var(--t-s); }
.detour { display: grid; gap: var(--s-1); padding: var(--s-3) var(--s-4); border-radius: var(--r-m); background: var(--c-surface-2); font-size: var(--t-s); }
.detour strong { font-size: var(--t-m); }
.detour--worth strong { color: var(--c-cheap); }
.detour--not strong { color: var(--c-ink-2); }
.empty { display: grid; gap: var(--s-2); justify-items: start; padding: var(--s-5); border-radius: var(--r-l); border: 1px dashed var(--c-line); color: var(--c-ink-2); }

/* Container-query root: wrap the page (or a preview frame) in .cq so components adapt to the space they get. */
.cq { container-type: inline-size; }

/* ---------------------------------------------------------------- Page layout (added for step C) */
.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); padding-block: var(--s-4) var(--s-7); }
.section { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-2) var(--s-4); }
.section__head p { margin: 0; color: var(--c-ink-2); font-size: var(--t-s); max-width: 70ch; }
.layout { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); align-items: start; }
.split { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); align-items: start; }
.only-wide { display: none; }
@container (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
  .layout__aside { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 4rem); }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .only-wide { display: block; }
  .only-narrow { display: none !important; }
}
.hero { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); }
@container (min-width: 760px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }

/* ---------------------------------------------------------------- Home: search hero */
.search-hero { grid-template-columns: minmax(0, 1fr); background: var(--c-brand); color: #fff; border-radius: var(--r-l); padding: var(--s-6) var(--s-5); display: grid; gap: var(--s-4); }
:root[data-theme="dark"] .search-hero { background: #13355f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .search-hero { background: #13355f; } }
.search-hero h1 { color: #fff; font-size: clamp(var(--t-2xl), 5vw, 2.8rem); max-width: 22ch; }
.search-hero p { margin: 0; color: #d5e2f2; max-width: 60ch; }
.search-hero .field { background: #fff; color: var(--c-ink); min-height: 3.25rem; max-width: 38rem; }
:root[data-theme="dark"] .search-hero .field { background: var(--c-surface); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .search-hero .field { background: var(--c-surface); } }
.search-hero .chip { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }
.search-hero .chip[aria-current="page"] { background: #fff; color: #13355f; border-color: #fff; }
.search-hero__row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.btn--light { background: #fff; color: var(--c-brand); }

/* ---------------------------------------------------------------- Fuel cards with sparkline */
.fuel-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: var(--s-3); }
.fuel-card { display: grid; gap: var(--s-1); text-decoration: none; color: inherit; }
.fuel-card__name { font-weight: 700; display: flex; justify-content: space-between; gap: var(--s-2); }
.fuel-card__local { font-size: var(--t-xs); color: var(--c-ink-3); }
.fuel-card .spark { width: 100%; height: 2.6rem; display: block; margin-top: var(--s-2); }
.spark__line { fill: none; stroke: var(--c-brand); stroke-width: 2; stroke-linejoin: round; }
.spark__area { fill: var(--c-brand); opacity: .08; }
.spark__dot { fill: var(--c-brand); }

/* ---------------------------------------------------------------- City tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.5rem), 1fr)); gap: var(--s-3); list-style: none; margin: 0; padding: 0; }
.tile { display: grid; gap: .1rem; padding: var(--s-3) var(--s-4); background: var(--c-surface); border-radius: var(--r-m); box-shadow: var(--shadow-1); text-decoration: none; color: inherit; height: 100%; }
.tile:hover { outline: 2px solid var(--c-brand); outline-offset: -2px; }
.tile__name { font-weight: 700; }
.tile__meta { font-size: var(--t-xs); color: var(--c-ink-2); }
.tile__price { margin-top: var(--s-2); font-size: var(--t-s); color: var(--c-ink-2); }
.tile__price .price { color: var(--c-ink); font-size: var(--t-l); }

/* ---------------------------------------------------------------- Data table */
.table-wrap { overflow-x: auto; background: var(--c-surface); border-radius: var(--r-l); box-shadow: var(--shadow-1); }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-s); }
.table th, .table td { text-align: left; padding: .65rem .9rem; border-top: 1px solid var(--c-line); vertical-align: middle; }
.table thead th { border-top: 0; font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-2); font-weight: 600; white-space: nowrap; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.table small { display: block; color: var(--c-ink-2); font-size: var(--t-xs); }

/* ---------------------------------------------------------------- Province dot map */
.dotmap { width: 100%; height: auto; display: block; }
.dotmap__land { fill: var(--c-surface-2); }
.dotmap__inset { fill: none; stroke: var(--c-line); stroke-dasharray: 4 3; }
.dotmap__label { font: 600 10px var(--f-text); fill: var(--c-ink-2); }
.legend-ramp { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); min-width: 0; font-size: var(--t-xs); color: var(--c-ink-2); }
.legend-ramp > span { display: inline-flex; align-items: center; gap: var(--s-1); white-space: nowrap; }
.legend-ramp i { width: 1.4rem; height: .7rem; border-radius: 3px; display: inline-block; }

/* ---------------------------------------------------------------- A–Z links */
.az { columns: 4 11rem; column-gap: var(--s-5); list-style: none; margin: 0; padding: 0; font-size: var(--t-s); }
.az li { break-inside: avoid; padding-block: .15rem; }
.az a { text-decoration: none; }
.az a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- Small helpers */
.muted { color: var(--c-ink-2); }
.row-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.note { font-size: var(--t-xs); color: var(--c-ink-3); margin: 0; }
.callout { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-m); background: var(--c-cheap-soft); color: var(--c-ink); }
.callout strong { color: var(--c-cheap); }

/* Hero compare cards: 2 × 2 next to the totem. */
@container (min-width: 760px) { .hero .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Language menu in the header: a no-JavaScript disclosure with links to the same page in every language. */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 20; list-style: none; margin: 0; padding: var(--s-2); background: var(--c-surface); border-radius: var(--r-m); box-shadow: var(--shadow-1), 0 12px 32px rgba(21, 33, 44, .18); columns: 2; column-gap: var(--s-3); width: max-content; max-width: min(28rem, 90vw); }
.lang-menu li a { display: block; padding: .3rem .6rem; border-radius: var(--r-s); color: var(--c-ink); text-decoration: none; font-size: var(--t-s); white-space: nowrap; }
.lang-menu li a:hover, .lang-menu li a[aria-current] { background: var(--c-brand-soft); color: var(--c-brand); }

/* Brand logo plates (logos are third-party trademarks, shown only to identify the station's brand). */
.brand-logo { display: inline-grid; place-items: center; flex: none; inline-size: 1.75rem; block-size: 1.75rem; border-radius: var(--r-s); background: #fff; box-shadow: 0 0 0 1px var(--c-line); overflow: hidden; vertical-align: middle; margin-inline-end: .5rem; }
.brand-logo img { inline-size: 100%; block-size: 100%; object-fit: contain; padding: 2px; box-sizing: border-box; }
.brand-logo--l { inline-size: 3rem; block-size: 3rem; border-radius: var(--r-m); }
.brand-logo--mono { --brand: var(--c-ink-3); background: color-mix(in srgb, var(--brand) 16%, var(--c-surface)); color: var(--brand); font: 800 .85rem/1 var(--f-text); box-shadow: none; }
.brand-logo--l.brand-logo--mono { font-size: 1.4rem; }
.chart__line--brand { stroke-width: 1.8; }
.table .spark { width: 100%; height: 2rem; display: block; }

/* Search autocomplete (F-009) */
.suggest { position: absolute; z-index: 30; inset-inline: 0; top: calc(100% + .35rem); margin: 0; padding: var(--s-1); list-style: none; background: var(--c-surface); color: var(--c-ink);
  border-radius: var(--r-m); box-shadow: var(--shadow-1), 0 12px 32px rgba(21, 33, 44, .22); max-height: min(70vh, 30rem); overflow-y: auto; min-width: min(26rem, 92vw); text-align: start; }
.suggest__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .45rem .55rem; border-radius: var(--r-s); cursor: pointer; }
.suggest__item[aria-selected="true"], .suggest__item:hover { background: var(--c-brand-soft); }
.suggest__icon { inline-size: 1.75rem; block-size: 1.75rem; display: grid; place-items: center; border-radius: var(--r-s); background: var(--c-surface-2); color: var(--c-ink-2); font: 800 .85rem/1 var(--f-text); overflow: hidden; }
.suggest__icon img { inline-size: 100%; block-size: 100%; object-fit: contain; background: #fff; padding: 2px; box-sizing: border-box; }
.suggest__main { display: grid; min-width: 0; }
.suggest__label { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest__meta { font-size: var(--t-xs); color: var(--c-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest__price { font: 600 var(--t-s) var(--f-num); color: var(--c-ink); }
.suggest__none { padding: .6rem; font-size: var(--t-s); color: var(--c-ink-2); }

/* Inputs shrink with their flex/grid parent instead of keeping their intrinsic width. */
.field input { min-width: 0; flex: 1 1 auto; }
.station__name .badge { white-space: normal; max-width: 100%; }
.site-footer__legal p { margin: var(--s-4) 0 0; font-size: var(--t-xs); color: var(--c-ink-3); max-width: 80ch; }
.legal h2 { font-size: var(--t-l); margin: var(--s-5) 0 var(--s-2); }
.legal h3 { font-size: var(--t-m); margin: var(--s-4) 0 var(--s-1); }
.legal ul { padding-inline-start: 1.2rem; }

/* Interactive map (assets/map.js) */
.map-dialog { inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--c-bg); }
.map-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.map-dialog__map { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-dialog__close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 2; }
.map-pin { --pin: var(--c-ink-2); display: inline-block; padding: .15rem .45rem; border-radius: var(--r-pill); background: var(--pin); color: #fff; font: 700 .78rem/1.3 var(--f-num);
  text-decoration: none; white-space: nowrap; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); border: 2px solid #fff; cursor: pointer; }
.map-pin--best { font-size: .9rem; z-index: 2; }
.map-pin--here { outline: 3px solid var(--c-led); }
.map-pin:hover { transform: scale(1.1); z-index: 3; }
