:root {
  --ink: #eaf5ee;
  --muted: #93aaa4;
  --line: rgba(196, 233, 210, 0.13);
  --panel: rgba(13, 39, 38, 0.76);
  --panel-strong: #102f2d;
  --green: #b7f32c;
  --aqua: #41e1b7;
  --gold: #f7bf53;
  --red: #f07b74;
  --shadow: 0 22px 60px rgba(0, 6, 5, 0.32);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #071a1a;
  line-height: 1.45;
  overflow-x: hidden;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.ambient { position: fixed; z-index: -1; border-radius: 999px; filter: blur(3px); pointer-events: none; }
.ambient-one { width: 780px; height: 570px; top: -360px; left: -180px; background: radial-gradient(circle, rgba(36, 126, 107, .35), transparent 67%); }
.ambient-two { width: 620px; height: 480px; top: 380px; right: -380px; background: radial-gradient(circle, rgba(139, 177, 36, .17), transparent 68%); }
.topbar { height: 86px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 770; letter-spacing: -.05em; text-decoration: none; font-size: 22px; }
.brand > span:last-child span { color: var(--green); }
.brand-mark { width: 27px; height: 27px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; transform: skewY(-16deg); }
.brand-mark i { display: block; border-radius: 3px; background: var(--green); }
.brand-mark i:nth-child(2) { transform: translateY(5px); background: var(--aqua); }
.brand-mark i:nth-child(3) { transform: translateY(10px); background: #e5f9c0; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.topbar-note { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.logout-button, .add-city-button { min-height: 34px; color: var(--aqua); border: 1px solid rgba(65,225,183,.28); border-radius: 8px; padding: 0 10px; background: transparent; font-size: 11px; font-weight: 750; }
.logout-button:hover, .add-city-button:hover { color: var(--ink); background: rgba(65,225,183,.1); }
.pulse { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 5px rgba(65,225,183,.12); }
.hero { min-height: 292px; padding: 63px 0 48px; display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; }
.eyebrow { margin: 0 0 10px; color: var(--aqua); text-transform: uppercase; letter-spacing: .13em; font-size: 10px; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(42px, 6vw, 72px); line-height: .98; letter-spacing: -.065em; margin-bottom: 20px; max-width: 760px; }
h1 em { font-style: normal; color: var(--green); }
h2 { font-size: 30px; letter-spacing: -.045em; margin: 0; }
h3 { font-size: 20px; letter-spacing: -.035em; margin: 0; }
.hero-copy { max-width: 590px; color: var(--muted); font-size: 16px; margin: 0; }
.hero-meta { width: 240px; flex: none; border-top: 1px solid var(--line); }
.hero-meta-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.hero-meta strong { color: var(--ink); font-size: 12px; }
.panel { border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); border-radius: 20px; backdrop-filter: blur(12px); }
.nearby-panel { padding: 30px; }
.panel-heading { display: flex; justify-content: space-between; gap: 24px; }
.nearby-heading { align-items: flex-start; }
.muted { color: var(--muted); font-size: 13px; margin: 4px 0 0; max-width: 350px; }
.location-actions { display: flex; gap: 10px; margin: 24px 0; }
.primary-button, .secondary-button, .icon-button { border: 0; min-height: 44px; border-radius: 11px; font-weight: 760; transition: transform .15s ease, filter .15s ease, background .15s ease; }
.primary-button:hover, .secondary-button:hover, .icon-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.primary-button { color: #132100; background: var(--green); padding: 0 16px; }
.secondary-button { color: var(--ink); background: #254846; padding: 0 17px; }
.location-form { display: flex; gap: 8px; flex: 1; }
.location-form input { min-width: 0; flex: 1; height: 44px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: rgba(4,18,17,.54); outline: none; padding: 0 14px; }
.location-form input:focus { border-color: rgba(183,243,44,.7); box-shadow: 0 0 0 3px rgba(183,243,44,.12); }
.nearby-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.nearby-empty { grid-column: 1 / -1; padding: 20px; border: 1px dashed var(--line); color: var(--muted); border-radius: 13px; font-size: 13px; }
.nearby-card { min-width: 0; padding: 16px; border-radius: 14px; background: rgba(2, 16, 15, .48); border: 1px solid rgba(183,243,44,.18); display: flex; flex-direction: column; gap: 10px; }
.nearby-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.distance { color: var(--green); font-size: 13px; font-weight: 800; white-space: nowrap; }
.station-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 760; letter-spacing: -.02em; }
.station-address { height: 38px; color: var(--muted); font-size: 11px; line-height: 1.35; overflow: hidden; }
.fuel-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.fuel-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 7px; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.fuel-badge.available { color: #d9ff8d; background: rgba(183,243,44,.16); }
.fuel-badge.maybe_available { color: #ffe0a3; background: rgba(247,191,83,.16); }
.fuel-badge.not_available, .fuel-badge.no_data { color: #b0c0bc; background: rgba(147,170,164,.12); }
.route-link { color: var(--aqua); font-size: 11px; font-weight: 700; text-decoration: none; }
.dashboard-head { padding: 74px 0 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.dashboard-controls { display: flex; gap: 9px; }
.select-wrap select { appearance: none; border: 1px solid var(--line); border-radius: 11px; min-height: 43px; min-width: 175px; color: var(--ink); background: #153a38; padding: 0 38px 0 14px; background-image: linear-gradient(45deg, transparent 50%, var(--aqua) 50%), linear-gradient(135deg, var(--aqua) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; outline: none; }
.icon-button { width: 43px; color: var(--ink); background: #254846; font-size: 21px; line-height: 1; }
.icon-button.loading { animation: spin 1s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.metric-card { min-height: 155px; padding: 19px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(22,57,54,.96), rgba(11,31,30,.82)); }
.metric-card p { margin-bottom: 19px; color: var(--muted); font-size: 12px; }
.metric-card strong { display: block; color: var(--green); font-size: 42px; letter-spacing: -.065em; line-height: .9; }
.metric-95 strong { color: var(--aqua); }.metric-any strong { color: #f6e6b0; }.metric-sync strong { font-size: 27px; color: var(--ink); letter-spacing: -.04em; }
.metric-card span { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 12px; margin-top: 12px; }
.chart-panel, .insights-panel { padding: 25px; min-height: 340px; }
.graph-heading { align-items: flex-start; }
.segmented, .fuel-filter { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); background: rgba(3,18,17,.46); border-radius: 9px; }
.segmented button, .fuel-filter button { color: var(--muted); background: transparent; border: 0; border-radius: 6px; padding: 6px 9px; font-size: 11px; font-weight: 800; }
.segmented button.active, .fuel-filter button.active { color: #122200; background: var(--green); }
.chart { height: 210px; padding-top: 18px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-empty { height: 100%; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 12px; }
.chart-grid { stroke: rgba(210,244,225,.11); stroke-width: 1; }.chart-label { fill: #809a93; font-size: 10px; }.chart-area { fill: url(#chartGradient); }.chart-line { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }.chart-point { fill: var(--green); stroke: #0d2928; stroke-width: 2; }
.chart-legend { margin-top: 9px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }.legend-dot.available { background: var(--green); }.legend-dot.maybe { background: var(--gold); }.legend-dot.unavailable { background: #71847e; }
.insight-list { margin-top: 25px; border-top: 1px solid var(--line); }
.insight-row { display: flex; justify-content: space-between; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }.insight-row strong { color: var(--ink); font-size: 13px; }
.brand-list { margin-top: 18px; display: grid; gap: 8px; }.brand-row { display: grid; grid-template-columns: minmax(70px, 1fr) 1.5fr auto; gap: 8px; align-items: center; color: var(--muted); font-size: 11px; }.brand-bar { height: 5px; overflow: hidden; background: rgba(234,245,238,.1); border-radius: 99px; }.brand-bar i { display: block; height: 100%; background: var(--aqua); border-radius: inherit; }.brand-row b { color: var(--ink); font-size: 10px; }
.map-panel { margin-top: 12px; padding: 25px; }.map-heading { align-items: flex-start; }.map-legend { display: flex; gap: 11px; color: var(--muted); font-size: 11px; }.station-map { position: relative; height: 245px; overflow: hidden; margin-top: 20px; border-radius: 14px; border: 1px solid var(--line); background-color: #0c2927; background-image: linear-gradient(rgba(183,243,44,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(183,243,44,.06) 1px, transparent 1px), radial-gradient(ellipse at 15% 70%, rgba(65,225,183,.13), transparent 35%), radial-gradient(ellipse at 80% 30%, rgba(183,243,44,.09), transparent 38%); background-size: 34px 34px, 34px 34px, auto, auto; }.map-empty { display: grid; height: 100%; place-items: center; color: var(--muted); font-size: 13px; }.station-dot { position: absolute; width: 12px; height: 12px; border: 2px solid rgba(7,26,26,.8); border-radius: 50%; transform: translate(-50%, -50%); transition: transform .15s ease; }.station-dot:hover, .station-dot:focus { transform: translate(-50%, -50%) scale(1.5); z-index: 2; outline: 2px solid var(--ink); }.station-dot.available { background: var(--green); }.station-dot.maybe { background: var(--gold); }.station-dot.unavailable { background: #71847e; }.map-note { color: var(--muted); font-size: 11px; margin: 11px 0 0; }
.station-section { padding-bottom: 65px; }.station-head { padding-top: 55px; }.station-list { display: grid; gap: 8px; }.station-row { display: grid; grid-template-columns: minmax(165px, .9fr) minmax(210px, 1.5fr) 166px 112px; align-items: center; column-gap: 20px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 13px; background: rgba(13,39,38,.55); }.station-row.highlight { border-color: var(--green); box-shadow: 0 0 0 3px rgba(183,243,44,.1); }.station-row .station-address { height: auto; }.station-time { color: var(--muted); font-size: 11px; }.station-confidence { color: var(--muted); font-size: 11px; text-align: right; }.station-list-empty { border: 1px dashed var(--line); border-radius: 13px; padding: 22px; color: var(--muted); font-size: 13px; }.footer { min-height: 80px; padding-bottom: 24px; color: #829994; display: flex; justify-content: space-between; gap: 20px; font-size: 11px; }.footer code { color: #b2cec5; }.toast { position: fixed; right: 20px; bottom: 20px; z-index: 10; max-width: 360px; padding: 12px 15px; border-radius: 10px; color: #ecffe2; background: #285445; box-shadow: var(--shadow); font-size: 13px; transform: translateY(130%); opacity: 0; transition: all .25s ease; }.toast.show { transform: translateY(0); opacity: 1; }.toast.error { color: #ffe5e2; background: #703d3a; }.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* Real map, source freshness, and compact station history. */
.source-freshness { display: grid; gap: 6px; margin-top: 13px; }.source-freshness-item { color: var(--muted); font-size: 11px; }.source-freshness-item b { color: #cae6dc; font-weight: 600; }.source-error { color: #ffb1a8; }
.nearby-fuel-filter { margin: 14px 0 18px; }.nearby-fuel-filter span { align-self: center; color: var(--muted); font-size: 12px; white-space: nowrap; }.nearby-card .station-address { height: auto; min-height: 0; overflow: visible; }
.station-map { height: 360px; background: #d9e4dc; background-image: none; }.station-map .leaflet-container { height: 100%; width: 100%; font: 12px/1.4 Inter, Arial, sans-serif; }.station-map .leaflet-popup-content { color: #173630; }.station-map .fuel-badge { display: inline-block; margin-top: 4px; font-size: 10px; }.station-map .leaflet-popup-content .fuel-badge.available { color: #173600; background: #c7f56b; }.station-map .leaflet-popup-content .fuel-badge.maybe_available { color: #4d2d00; background: #ffd77b; }.station-map .leaflet-popup-content .fuel-badge.not_available, .station-map .leaflet-popup-content .fuel-badge.no_data { color: #34433f; background: #d3dfdb; }.station-map .leaflet-control-attribution { font-size: 10px; }
.station-search-frame { max-width: 780px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(13,39,38,.55); }.station-search-frame input { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid #31534a; border-radius: 10px; color: var(--ink); background: #0a2422; outline: none; }.station-search-frame input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(183,243,44,.1); }.station-search-results { display: grid; gap: 5px; padding: 10px 1px 0; color: var(--muted); font-size: 12px; }.station-search-result { display: flex; justify-content: space-between; gap: 16px; padding: 9px 10px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); text-align: left; background: transparent; cursor: pointer; }.station-search-result:hover { border-color: var(--line); background: rgba(183,243,44,.06); }.station-search-result span { display: grid; gap: 3px; min-width: 0; }.station-search-result small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }.station-search-result em { flex: 0 0 auto; color: var(--green); font-size: 11px; font-style: normal; }.station-history { margin-top: 12px; padding: 13px; border-top: 1px solid var(--line); }.station-history-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }.station-history-head > div { display: grid; gap: 4px; }.station-history .station-address { height: auto; margin: 8px 0; overflow: visible; }.station-history-chart { margin-top: 12px; }.station-history-chart svg { display: block; width: 100%; height: 68px; }.station-history-chart small { color: var(--muted); font-size: 10px; }.station-history-line { fill: none; stroke-width: 2.5; }.station-history-line.ai92 { stroke: var(--green); }.station-history-line.ai95 { stroke: #52d9c1; }.price-chip { padding: 4px 7px; border-radius: 7px; color: #c9e8df; background: #183c35; font-size: 11px; }
.station-source { color: var(--aqua); font-size: 11px; }
.auth-dialog, .city-dialog { width: min(100% - 32px, 410px); color: var(--ink); border: 1px solid rgba(183,243,44,.25); border-radius: 19px; background: #103431; box-shadow: 0 30px 90px rgba(0,0,0,.55); padding: 0; }.auth-dialog::backdrop, .city-dialog::backdrop { background: rgba(2,13,12,.84); backdrop-filter: blur(8px); }.auth-form, .city-form { position: relative; display: grid; gap: 14px; padding: 32px; }.auth-form .brand-mark { margin-bottom: 5px; }.auth-form h2, .city-form h2 { margin: 0; font-size: 29px; }.auth-form p:not(.eyebrow):not(.auth-error), .city-form p:not(.eyebrow):not(.auth-error) { margin: -3px 0 3px; color: var(--muted); font-size: 13px; }.auth-form input, .city-form input { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--ink); background: rgba(2,16,15,.6); padding: 0 14px; min-height: 47px; }.auth-form input:focus, .city-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(183,243,44,.11); }.auth-form input { text-align: center; font-size: 27px; letter-spacing: .35em; font-weight: 800; }.city-form label { color: var(--muted); font-size: 12px; font-weight: 700; }.auth-error { min-height: 18px; margin: -5px 0 0; color: #ffaaa3; font-size: 12px; }.dialog-close { position: absolute; top: 11px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; font-size: 23px; line-height: 1; }.dialog-close:hover { color: var(--ink); background: rgba(255,255,255,.08); }

@media (max-width: 900px) { .nearby-cards { grid-template-columns: repeat(3, 1fr); }.metrics { grid-template-columns: repeat(2, 1fr); }.dashboard-grid { grid-template-columns: 1fr; }.insights-panel { min-height: auto; }.brand-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }.station-row { grid-template-columns: minmax(150px, 1fr) 1.2fr 150px; }.station-confidence { display: none; } }
@media (max-width: 640px) { .shell { width: min(100% - 28px, 1180px); }.topbar { height: 69px; }.topbar-note { font-size: 11px; }.hero { min-height: auto; display: block; padding: 41px 0 34px; }.hero-meta { width: 100%; margin-top: 28px; }.nearby-panel, .chart-panel, .insights-panel, .map-panel { padding: 18px; border-radius: 16px; }.panel-heading, .nearby-heading, .dashboard-head { align-items: flex-start; flex-direction: column; }.location-actions, .location-form { width: 100%; flex-direction: column; }.location-form input { width: 100%; }.nearby-cards { grid-template-columns: repeat(2, 1fr); }.dashboard-head { padding-top: 50px; }.dashboard-controls { width: 100%; }.select-wrap { flex: 1; }.select-wrap select { width: 100%; }.metrics { grid-template-columns: repeat(2, 1fr); }.metric-card { min-height: 132px; padding: 15px; }.metric-card strong { font-size: 35px; }.metric-sync strong { font-size: 22px; }.map-heading { gap: 13px; }.map-legend { flex-wrap: wrap; }.station-head { gap: 15px; }.fuel-filter { width: 100%; overflow-x: auto; }.fuel-filter button { flex: 1; white-space: nowrap; }.station-row { display: grid; grid-template-columns: 1fr auto; row-gap: 10px; padding: 14px; }.station-row .station-address { grid-column: 1 / -1; }.station-row .fuel-badges { justify-content: flex-end; }.station-time { display: none; }.footer { display: block; }.footer span { display: block; margin-bottom: 7px; } }
@media (max-width: 390px) { h1 { font-size: 39px; }.nearby-cards { grid-template-columns: 1fr; }.metrics { gap: 7px; }.metric-card { padding: 12px; }.metric-card p { font-size: 11px; }.chart-legend { display: block; }.chart-legend span { display: block; margin-bottom: 5px; } }

.station-history-chart svg { height: 132px; }
.station-history-line.ai100 { stroke: #ffd36a; }
.station-history-line.diesel { stroke: #ff9d71; }
