body.finder { background: var(--surface); --card-shadow: 0 8px 28px #0b1f3a0c; }
.finder-page { scroll-padding-top: 96px; }
.finder-sprite { position: absolute; }
.finder-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.finder .top { box-shadow: 0 2px 12px #0b1f3a08; }
.finder .top-inner { max-width: 1440px; }
.finder .top-form select { border-radius: 999px; padding-inline: 12px; min-width: 76px; }
.finder .search-wrap input { height: 48px; padding-right: 54px; border-radius: 12px; }
.finder .search-submit { width: 44px; height: 44px; inset: 2px 2px 2px auto; border-radius: 10px; }
.finder .locate { border-radius: 999px; }
.finder .suggestions li { min-height: 44px; padding: 10px 12px; }
.finder-grid, .finder-extras { width: min(1400px, calc(100% - 48px)); margin-inline: auto; }
.finder-grid { display: grid; grid-template-columns: minmax(350px, 424px) minmax(0, 1fr); gap: 16px 24px; padding-top: 24px; position: relative; }
.finder-intro, #fuel-chips, #finder-message { grid-column: 1 / -1; }
.finder-intro { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.finder-intro h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.14; letter-spacing: -.045em; }
.finder-panel { min-width: 0; grid-column: 1; }
.fuel-chips { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 4px; margin: -4px; scrollbar-width: thin; }
.chip, .icon-button, .sort-switch button, .view-switch button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--white); color: var(--navy); font-size: .875rem;
  font-weight: 750; text-decoration: none; white-space: nowrap;
}
.fuel-chip { flex: none; }
.chip:hover, .icon-button:hover { background: var(--gold-soft); border-color: var(--gold); }
.fuel-chip[aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.fuel-chip[aria-pressed="true"] .finder-icon { color: #fbd47d; }
.chip:disabled, .sort-switch button:disabled { color: var(--muted); cursor: default; }
.finder-message, .result-empty { margin: 0; padding: 12px 16px; background: var(--gold-soft); border-radius: 12px; color: var(--navy); }
.result-empty { margin-top: 12px; }
.hero-card, .app-block, .extra-card {
  border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--card-shadow);
  animation: card-enter .28s ease-out both;
}
@keyframes card-enter { from { opacity: .7; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.hero-card { padding: 20px; position: relative; }
.pump-tile { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--gold-soft); color: var(--gold-ink); }
.pump-tile .finder-icon { width: 36px; height: 36px; }
.hero-card > .star-button { position: absolute; top: 16px; right: 16px; }
.hero-label { margin: 12px 0 0; color: var(--muted); font-size: .875rem; font-weight: 800; }
.hero-price { display: flex; align-items: baseline; gap: 8px; margin: 0; color: var(--navy); line-height: 1.06; font-variant-numeric: tabular-nums; }
.hero-price strong { font-size: clamp(3.5rem, 8vw, 4.75rem); letter-spacing: -.07em; }
.hero-price span { color: var(--muted); font-size: 1rem; font-weight: 750; }
.hero-name { margin: 8px 0 0; font-size: clamp(1.25rem, 3vw, 1.6rem); letter-spacing: -.035em; line-height: 1.18; overflow-wrap: anywhere; }
.hero-meta, .hero-cost, .hero-saving { margin: 4px 0 0; font-size: .875rem; }
.hero-meta { color: var(--muted); }
.hero-cost { margin-top: 12px; font-weight: 750; }
.hero-saving { color: var(--green); font-weight: 750; }
.hero-directions { justify-content: center; width: 100%; margin-top: 16px; min-height: 52px; border-radius: 12px; }
.notice-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; background: #edf1f6; color: var(--muted); font-size: .75rem; font-weight: 750; }
.notice-pill .finder-icon { width: 14px; height: 14px; }
.hero-card .notice-pill { margin-top: 12px; padding: 6px 10px; font-size: .8125rem; }
.notice-pill.fill, .notice-pill.down { color: var(--green); background: var(--green-soft); }
.notice-pill.wait { color: #1b4878; background: #e7f1ff; }
.notice-pill.up { color: var(--red); background: var(--red-soft); }
.price-age { margin: 8px 2px 0; color: var(--muted); font-size: .75rem; }
.price-notice { margin: 4px 2px 0; color: var(--muted); font-size: .65rem; line-height: 1.35; }
.stale-notice { margin: 8px 0 0; color: var(--red); background: var(--red-soft); }
.app-block { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 12px; margin: 16px 0; padding: 16px; background: #fff8e5; border-color: #eddaac; }
.app-art { display: block; border-radius: 14px; }
.app-block h2 { margin: 0; font-size: clamp(1.24rem, 4vw, 1.5rem); line-height: 1.14; letter-spacing: -.035em; }
.app-benefits { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.app-benefits li { display: flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 650; }
.app-benefits .finder-icon { width: 17px; height: 17px; color: var(--gold-ink); }
.download-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.store-badge, .download-links .button-gold { min-height: 44px; border-radius: 8px; text-decoration: none; }
.store-badge { display: inline-flex; align-items: center; gap: 3px; padding: 4px 10px 4px 5px; background: #101418; color: var(--white); }
.store-badge small, .store-badge strong { display: block; line-height: 1.06; }
.store-badge small { font-size: .625rem; }
.store-badge strong { font-size: 1.05rem; }
.store-icon { width: 30px; height: 30px; }
.finder-tools, .row-actions { display: flex; gap: 8px; }
#brand-count { padding: 0 6px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); }
.my-stations { margin: 16px 0; }
.my-stations h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 1rem; }
.my-stations ul { list-style: none; }
.my-stations li { display: flex; flex: none; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.my-stations li .chip { border-color: transparent; }
.favourite-remove { font-size: 1.2rem; }
.favourite-name { overflow: hidden; text-overflow: ellipsis; max-width: 145px; }
.result-heading { margin: 20px 0 8px; }
.result-heading h2 { margin: 0; font-size: 1.2rem; line-height: 1.25; letter-spacing: -.025em; overflow-wrap: anywhere; }
.result-count { color: var(--muted); font-size: .8125rem; font-weight: 700; }
.sort-switch, .view-switch { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; background: #e8eef5; }
.sort-switch button, .view-switch button { border: 0; background: transparent; }
.sort-switch button[aria-pressed="true"], .view-switch button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.station-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 4px; list-style: none; max-height: min(680px, 75svh); overflow: auto; overscroll-behavior-y: contain; scrollbar-width: thin; }
.station { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); cursor: pointer; }
.station:hover, .station.active { border-color: var(--gold); }
.station.active { background: var(--gold-soft); }
.brand-chip { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: var(--surface); color: var(--blue); font-weight: 800; }
.brand-chip img { width: 100%; height: 100%; padding: 4px; object-fit: contain; background: var(--white); }
.station-name { display: block; text-align: left; min-height: 44px; background: none; border: 0; padding: 2px 0; line-height: 1.15; font-weight: 800; overflow-wrap: anywhere; }
.station-address { color: var(--muted); font-size: .75rem; line-height: 1.28; overflow-wrap: anywhere; }
.station-price { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.today-price strong { font-size: clamp(1.25rem, 4vw, 1.55rem); line-height: 1; letter-spacing: -.05em; }
.today-price span { font-size: .69rem; margin-left: 3px; color: var(--muted); font-weight: 650; }
.tomorrow-price { gap: 3px; margin-top: 4px; padding: 3px 5px; font-size: .6875rem; }
.icon-button { padding: 0; border: 0; background: transparent; }
.row-actions { display: grid; gap: 0; }
.row-actions .finder-icon { width: 17px; height: 17px; }
.star-button[aria-pressed="true"] { background: var(--gold-soft); color: var(--gold-ink); }
.star-button[aria-pressed="true"] .finder-icon { fill: var(--gold); }
.view-switch, .mobile-download { display: none; }
.map-panel {
  position: sticky; top: 96px; align-self: start; min-width: 0;
  height: max(440px, calc(100svh - 180px)); border-radius: 20px; isolation: isolate;
  overflow: hidden; border: 1px solid var(--line); box-shadow: var(--card-shadow);
}
#map { width: 100%; height: 100%; background: #e6edf2; font: inherit; }
.map-key { position: absolute; top: 12px; right: 12px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 8px; padding: 8px; max-width: calc(100% - 84px); background: var(--white); border-radius: 10px; box-shadow: var(--card-shadow); font-size: .75rem; font-weight: 750; z-index: 450; pointer-events: none; }
.map-key span { display: inline-flex; gap: 4px; align-items: center; }
.map-key i { width: 9px; height: 9px; flex: none; background: var(--pin-ink); border-radius: 50%; }
.tier-0 { --pin-ink: var(--green); --pin-fill: var(--green-soft); }
.tier-1 { --pin-ink: var(--gold-ink); --pin-fill: var(--gold-soft); }
.tier-2 { --pin-ink: var(--red); --pin-fill: var(--red-soft); }
.price-pin span {
  position: relative; display: grid; place-items: center; height: 24px; border: 1px solid var(--pin-ink);
  border-radius: 8px; color: var(--pin-ink); background: var(--pin-fill); box-shadow: 0 1px 3px #0b1f3a40;
  font-size: .8125rem; font-weight: 800; font-variant-numeric: tabular-nums;
  transition: transform .18s ease, box-shadow .18s ease;
}
.price-pin span::after { content: ""; position: absolute; bottom: -4px; width: 6px; height: 6px; background: inherit; border: solid var(--pin-ink); border-width: 0 1px 1px 0; transform: rotate(45deg); }
.price-pin.active span, .price-pin:hover span { transform: scale(1.15); box-shadow: 0 0 0 2px var(--navy), 0 2px 5px #0b1f3a50; }
#map .leaflet-control-zoom a { width: 44px; height: 44px; line-height: 44px; color: var(--navy); }
.tile-status { position: absolute; left: 12px; bottom: 18px; z-index: 500; background: var(--white); padding: 4px 8px; border-radius: 8px; color: var(--muted); font-size: .875rem; pointer-events: none; }

.finder-extras { padding-block: 32px; }
.finder-extras h2 { margin: 0; font-size: clamp(1.2rem, 2.8vw, 1.54rem); line-height: 1.25; letter-spacing: -.02em; }
.finder-extras p { margin: 8px 0; color: var(--muted); }
.history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.extra-card { min-width: 0; padding: clamp(14px, 2.3vw, 24px); }
.extra-card > p, #trend-chart, #weekday-chart, #forecast-strip { font-size: .875rem; color: var(--muted); }
.forecast-card { grid-column: 1 / -1; }
.forecast-card h2 { display: flex; align-items: center; gap: 8px; }
.forecast-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 0; margin: 12px 0 8px; list-style: none; }
.forecast-days li { display: grid; justify-items: center; gap: 4px; padding: 8px 0; border: 1px solid transparent; border-radius: 12px; background: var(--surface); color: var(--navy); font-size: .8125rem; }
.forecast-days li.best { background: var(--green-soft); border-color: #90c4ad; color: var(--green); }
.forecast-days li:is(.high, .up) .finder-icon { color: var(--red); }
.forecast-days li:is(.low, .down) .finder-icon { color: var(--green); }
.forecast-days li.best .finder-icon { fill: currentColor; }
.forecast-value { font-size: .6875rem; font-variant-numeric: tabular-nums; }
#trend-chart > svg { display: block; width: 100%; max-height: 208px; }
#trend-chart text { font-size: 13px; fill: var(--muted); }
.chart-rule { stroke: #c8d3df; }
.chart-area { fill: #f8e8bd; }
.chart-line { fill: none; stroke: var(--gold-ink); stroke-width: 2; stroke-linejoin: round; }
.text-link { font-size: .875rem; font-weight: 700; }
.weekday-bars { margin: 12px 0 0; padding: 0; list-style: none; }
.weekday-bars li { display: grid; grid-template-columns: 37px minmax(0, 1fr) minmax(68px, auto); gap: 8px; align-items: center; padding: 3px 0; font-variant-numeric: tabular-nums; }
.weekday-bars li span:last-child { text-align: right; }
.weekday-bars svg { width: 100%; height: 8px; background: #e5ecf3; border-radius: 4px; fill: #7898b5; }
.weekday-bars .cheapest { color: var(--green); font-weight: 750; }
.weekday-bars .cheapest svg { fill: var(--green); }
.city-section, .finder-faq { margin-top: 24px; }
.city-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.city-links a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font-weight: 750; text-decoration: none; }
.city-links a:hover { background: var(--gold-soft); }
.finder-faq h2 { margin-bottom: 8px; }
.finder-faq details { border-top: 1px solid var(--line); }
.finder-faq summary { padding-block: 12px; min-height: 44px; font-weight: 700; cursor: pointer; }

.finder dialog { width: min(460px, calc(100% - 32px)); max-height: min(620px, calc(100dvh - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--white); color: var(--navy); box-shadow: 0 16px 64px #0b1f3a38; }
.finder dialog::backdrop { background: #0b1f3a66; }
.sheet { display: grid; gap: 16px; padding: 16px; }
.sheet header, .sheet-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sheet h2 { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 1.3rem; }
.sheet-close { font-size: 1.25rem; }
.sheet > label { display: grid; gap: 4px; font-weight: 700; }
.sheet input[type="number"] { width: 100%; min-height: 44px; padding-inline: 8px; border: 1px solid #9badc0; border-radius: 8px; }
.sheet .button-gold { justify-content: center; border: 0; }
#brand-options { max-height: 44dvh; overflow: auto; padding: 4px; }
.brand-option { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; min-height: 48px; gap: 8px; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.brand-option:hover { background: var(--surface); }
.brand-option input { width: 20px; height: 20px; accent-color: var(--navy); }

@media (max-width: 899px) {
  .finder-grid, .finder-extras { width: calc(100% - 32px); }
  .finder-grid { grid-template-columns: minmax(0, 1fr); padding-top: 16px; gap: 12px; }
  .finder-panel { grid-column: 1; }
  .finder-intro h1 { font-size: clamp(1.18rem, 5vw, 1.8rem); }
  .view-switch { display: inline-flex; flex: none; }
  .view-switch button { gap: 4px; padding-inline: 8px; }
  .view-switch svg { width: 16px; height: 16px; }
  .map-panel { position: relative; top: auto; height: max(320px, calc(100svh - 290px)); width: 100%; }
  .finder:not(.map-view) .map-panel { position: absolute; top: 0; inset-inline: 0; visibility: hidden; pointer-events: none; }
  .map-view .finder-panel { display: none; }
  .station-list { max-height: none; overflow: visible; }
  .mobile-download { position: fixed; inset: auto 0 0; z-index: 1050; display: flex; align-items: center; gap: 8px; padding: 8px max(16px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: var(--white); box-shadow: 0 -4px 20px #0b1f3a0e; font-size: .875rem; }
  .mobile-download img { flex: none; border-radius: 8px; }
  .mobile-download a { margin-left: auto; flex: none; }
  .finder { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .finder-page { scroll-padding-top: 132px; scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (max-width: 699px) {
  .finder .top-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
  .finder .locate { width: 44px; padding: 0; }
  .finder .locate span { display: none; }
  .finder .locate svg { width: 20px; }
  .finder .suggestions { min-width: 0; }
}
@media (max-width: 620px) {
  .history-grid { grid-template-columns: minmax(0, 1fr); }
  .city-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finder dialog { margin-bottom: max(8px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  @keyframes card-enter { from { opacity: .85; } to { opacity: 1; } }
  .price-pin.active span, .price-pin:hover span { transform: none; }
}

/* Desktop: FuelWatch-style. Big map fills the screen; a slim sidebar holds the hero, filters and list;
   the app promo floats on the map; forecast, trend, cities and FAQ sit below the fold. */
@media (min-width: 900px) {
  .finder-grid {
    width: 100%; max-width: none; margin: 0; padding: 0; gap: 0;
    grid-template-columns: 400px minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr);
    height: calc(100svh - var(--finder-top, 77px)); min-height: 560px;
  }
  .finder-intro, #fuel-chips, #finder-message { grid-column: 1; }
  .finder-intro { padding: 16px 16px 8px; }
  .finder-intro h1 { font-size: 1.45rem; }
  .finder-intro .view-switch { display: none; }
  #fuel-chips { padding: 0 16px 8px; flex-wrap: wrap; overflow: visible; }
  #finder-message { margin: 0 16px 8px; }
  .finder-panel { grid-column: 1; grid-row: 4; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 24px; border-right: 1px solid var(--line); scrollbar-width: thin; }
  .finder-grid > :is(.finder-intro, #fuel-chips, #finder-message) { border-right: 1px solid var(--line); }
  .hero-card { padding: 16px; }
  .hero-price { font-size: 3rem; }
  .station-list { max-height: none; overflow: visible; }
  .map-panel { grid-column: 2; grid-row: 1 / -1; position: relative; top: auto; height: 100%; border-radius: 0; border: 0; box-shadow: none; }
  .app-block {
    position: absolute; z-index: 1001; right: 20px; bottom: 28px; width: 360px; margin: 0;
    box-shadow: 0 12px 40px #0b1f3a2e; animation: card-enter .5s ease-out both;
  }
  .finder-extras { padding-top: 32px; }
}

/* Map tags with brand logo (FuelWatch-style). */
.price-pin span { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 7px 0 3px; white-space: nowrap; }
.price-pin .pin-logo { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 6px; background: #fff; color: var(--navy); font-style: normal; font-size: .7rem; font-weight: 800; overflow: hidden; }
.price-pin .pin-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.price-pin b { font-weight: 800; }

/* Forecast + price history: the app's strongest features sit right under the hero card. */
.side-insights { display: grid; gap: 12px; margin: 12px 0 16px; }
.side-insights .extra-card { padding: 16px; border-radius: 20px; animation: card-enter .35s ease-out both; }
.side-insights .extra-card h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.15rem; }
.side-insights .extra-card > p { margin: 4px 0 8px; color: var(--muted); font-size: .8125rem; }
.side-insights .forecast-card { border: 2px solid var(--gold); background: linear-gradient(180deg, #fffaf0, #fff); }
.side-insights #trend-chart > svg { max-height: 150px; }
.history-grid { grid-template-columns: minmax(0, 1fr); }
