/* Local web fonts — no connection to Google Fonts required */
@font-face {
  font-family: "Barlow";
  src: url("fonts/barlow-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("fonts/barlow-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("fonts/barlow-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* TankTrend — design tokens
   asphalt chrome around a light map; prices set like station price totems */
:root {
  --asphalt:   #171B21;
  --panel:     #1F242C;
  --panel-2:   #262C36;
  --bg:        var(--asphalt);
  --text:      var(--ink);
  --line:      #313947;
  --ink:       #EDEFF2;
  --muted:     #98A1AD;
  --amber:     #FFB300;   /* action / diesel-sign amber */
  --pump:      #2FBF71;   /* cheap */
  --dear:      #E5484D;   /* expensive */
  --radius:    10px;
  --font-body: "Barlow", system-ui, sans-serif;
  --font-sign: "Barlow Condensed", "Barlow", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
* {
  scrollbar-width: thin;
  scrollbar-color: #596372 var(--asphalt);
}
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: var(--asphalt); }
*::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 3px solid var(--asphalt);
  border-radius: 999px;
  background: #596372;
}
*::-webkit-scrollbar-thumb:hover { background: var(--amber); }
*::-webkit-scrollbar-corner { background: var(--asphalt); }
html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;              /* no page scrollbar — panels scroll internally */
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--asphalt);
}
h2, h3 { margin: 0; font-family: var(--font-sign); font-weight: 600; letter-spacing: .02em; }
h2 { font-size: 17px; text-transform: uppercase; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: 12px; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- top bar ---------- */
.topbar {
  flex: 0 0 auto;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px;
  padding: 10px 16px;
  background: var(--asphalt);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-sign {
  font-family: var(--font-sign); font-weight: 500; font-size: 26px;
  letter-spacing: .06em; color: var(--ink);
}
.brand-sign b { color: var(--amber); font-weight: 600; }
.brand-sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.controls { display: flex; align-items: end; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.ctl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.ctl b { color: var(--ink); font-weight: 500; }
.ctl select, .ctl input[type="range"] { accent-color: var(--amber); }
.ctl select {
  background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px;
}
#fuel, #eval-fuel, #price-fuel { width: 132px; box-sizing: border-box; }
.btn {
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel-2); color: var(--ink); padding: 8px 14px;
}
.btn-primary { background: var(--amber); border-color: var(--amber); color: #1a1300; font-weight: 600; }
.btn-logout { border-color: rgba(255,179,0,.55); color: var(--amber); }
.btn-logout:hover { border-color: var(--amber); background: rgba(255,179,0,.08); }
.btn-primary:hover { filter: brightness(1.06); }

/* ---------- layout ---------- */
.layout {
  flex: 1 1 auto;
  min-height: 0;                 /* allow children to shrink -> internal scrolling */
  display: grid;
  grid-template-columns: 400px 1fr;
}
.sidebar {
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px; overflow-y: auto; overflow-x: hidden; min-height: 0; min-width: 0;
  border-right: 1px solid var(--line);
}
.sidebar-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; }
.main-view-tabs { display:none; min-width:0; gap:4px; padding:4px; border-radius:8px; background:var(--bg); }
.main-view-tab { flex:1; padding:7px 9px; border:0; border-radius:6px; background:transparent; color:var(--muted); font-size:12px; cursor:pointer; }
.main-view-tab:hover { color:var(--ink); }
.main-view-tab.active { background:var(--panel); color:var(--amber); box-shadow:0 0 0 1px var(--line); }
.main-view-panel[hidden] { display:none !important; }
.main-view-panel[data-main-panel="search"] { display:flex; flex-direction:column; gap:12px; }
.main-view-panel[data-main-panel="forecast"] { display:block; }
.desktop-nav { flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:6px 16px; border-bottom:1px solid var(--line); background:var(--asphalt); }
.desktop-nav-group { display:flex; align-items:center; gap:5px; }
.desktop-nav-label { margin-right:5px; color:var(--muted); font:10px var(--font-mono); letter-spacing:.05em; text-transform:uppercase; }
.desktop-nav-tools { padding-left:18px; border-left:1px solid var(--line); }
.desktop-nav .mobile-nav-item { min-width:auto; min-height:42px; border-color:var(--line); padding-inline:12px; }
.desktop-nav .mobile-nav-item.active { border-color:var(--amber); }
.mobile-nav { display:none; }
.mobile-nav-item { display:flex; align-items:center; justify-content:center; gap:7px; min-width:112px; padding:8px 15px; border:1px solid transparent; border-radius:7px; background:transparent; color:var(--muted); }
.mobile-nav-item:hover { color:var(--ink); background:rgba(255,255,255,.035); }
.mobile-nav-item span { font:19px/1 var(--font-sign); }
.mobile-nav-item .mobile-nav-wordmark { font-size:10px; letter-spacing:.08em; }
.mobile-nav-item b { color:inherit; font-size:12px; font-weight:500; }
.mobile-nav-item.active { border-color:rgba(255,179,0,.32); background:rgba(255,179,0,.1); color:var(--amber); }
#vehicle-btn, #account-btn { display:none; }
.sidebar-toolbar { grid-template-columns:1fr; justify-items:end; }

/* ---------- site footer / attribution ---------- */
.site-footer {
  flex: 0 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  padding: 6px 16px;
  background: var(--asphalt);
  border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted); line-height: 1.5;
}
.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer a:hover { color: var(--amber); }
.site-footer .imprint-link {
  font-family: var(--font-sign); letter-spacing: .03em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.site-footer .imprint-link:hover { color: var(--amber); }

/* ---------- geo search + language toggle ---------- */
.geo-row { display: flex; gap: 6px; }
.geo-row input {
  background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 10px; width: 180px;
}
.geo-row input::placeholder { color: var(--muted); }
.btn-lang {
  font-family: var(--font-mono); font-size: 12px;
  padding: 8px 10px; align-self: end;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

/* ---------- forecast module ---------- */
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.country-toggle { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg { background: transparent; color: var(--muted); border: 0; padding: 4px 12px; font-weight: 500; }
.seg.active { background: var(--amber); color: #1a1300; font-weight: 600; }

.forecast-body { margin-top: 10px; display: grid; gap: 10px; }
.reco {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel-2); border-radius: 8px; padding: 10px 12px;
}
.reco-arrow { font-size: 26px; line-height: 1; }
.reco-arrow.falling { color: var(--pump); }
.reco-arrow.rising  { color: var(--dear); }
.reco-arrow.stable  { color: var(--muted); }
.reco-text b { font-weight: 600; }
.reco-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.forecast-notes { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.forecast-notes li + li { margin-top: 4px; }

/* ---------- price color legend ---------- */
.legend {
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  padding: 2px 2px 6px; font-size: 12px; color: var(--muted);
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot {
  width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--muted); background: #10141a;
}
.legend .dot.cheap { border-color: var(--pump); }
.legend .dot.mid   { border-color: var(--amber); }
.legend .dot.dear  { border-color: var(--dear); }
.legend .dot.noprice { border-color: var(--line); }
.legend .dot.closed { border-style: dashed; border-color: var(--muted); }
.legend-note {
  font-size: 11px; color: var(--muted); margin: 0 2px 10px;
  font-style: italic;
}
.routing-availability {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 8px 0 12px; padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--amber) 55%, var(--line));
  border-radius: 7px; background: color-mix(in srgb, var(--amber) 9%, var(--panel));
  color: var(--ink); font-size: 12px; line-height: 1.45;
}
.routing-availability-icon { color: var(--amber); font-size: 15px; line-height: 1.15; }

/* ---------- forecast methodology info ---------- */
.chart-title-row { display: flex; justify-content: space-between; align-items: center; }
.info-btn {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel-2);
  color: var(--muted); font-family: var(--font-mono); font-size: 11px;
  line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center;
}
.info-btn:hover { color: var(--amber); border-color: var(--amber); }
.week-info {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin: 8px 0; font-size: 12.5px; line-height: 1.5;
}
.week-info ul { margin: 6px 0; padding-left: 18px; }
.week-info li + li { margin-top: 6px; }
.week-info .muted { margin: 8px 0 0; font-size: 11.5px; }

/* ---------- week forecast ---------- */
.week-block { position: relative; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.week-tooltip {
  position: absolute; z-index: 5; pointer-events: none;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 9px; font-size: 12px; line-height: 1.4; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.week-tooltip b { font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-weight: 400; }
.week-tooltip .tt-price { font-family: var(--font-sign); font-weight: 600; font-size: 17px; color: var(--amber); }
.week-tooltip .tt-range { font-size: 11px; color: var(--muted); }
.week-horizon-legend {
  display: grid;
  grid-template-columns: 3fr 3.5fr;
  gap: 12px;
  margin: 8px 8px 0 40px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.3;
}
.week-horizon-legend span:last-child { padding-left: 5px; }
#week-chart { cursor: crosshair; }
#week-chart { width: 100%; height: 150px; display: block; }
.week-drivers { margin-top: 10px; display: grid; gap: 6px; }
.driver {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 12.5px; color: var(--muted);
}
.driver a { color: var(--ink); text-decoration: none; }
.driver a:hover { text-decoration: underline; }
.driver-dir { font-family: var(--font-sign); font-weight: 600; width: 16px; text-align: center; }
.driver-dir.up   { color: var(--dear); }
.driver-dir.down { color: var(--pump); }
.driver-cat {
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 4px; padding: 0 5px;
  white-space: nowrap;
}
.driver-event { color: var(--amber); }

/* ---------- stats strip ---------- */
.stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  text-align: center; padding: 12px 14px 8px;
}
.stat-label {
  display: block; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.stat-price { font-family: var(--font-sign); font-weight: 600; font-size: 26px; }
.stat-mid .stat-price { color: var(--amber); }
.stat-price sup { font-size: .55em; top: -.55em; position: relative; }
.stat-meta { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* ---------- station list ---------- */
.list-wrap { display: flex; flex-direction: column; min-height: 0; }
.list-head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 2px 8px; }
.refresh-status {
  position: fixed; left: 50%; bottom: 22px; z-index: 100;
  transform: translateX(-50%); width: min(560px, calc(100vw - 28px));
  margin: 0; padding: 12px 15px;
  border: 1px solid var(--amber); border-radius: 8px;
  color: var(--text); background: rgba(16, 20, 26, .96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 179, 0, .15);
  font-size: 0.9rem; line-height: 1.4;
}
.best-choice {
  display: grid; gap: 4px; margin: 0 0 10px; padding: 12px 14px;
  border: 1px solid var(--amber); border-radius: 8px;
  background: rgba(255, 179, 0, .08);
}
.best-choice[hidden] { display: none; }
.best-choice strong { color: var(--amber); font-family: var(--font-sign); text-transform: uppercase; }
.best-choice span { line-height: 1.4; }
.best-choice small { color: var(--pump); }
.best-choice .air-caveat { color: var(--muted); line-height: 1.4; }
.station-sort { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.station-sort select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--text); }
.vehicle-dialog {
  width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: var(--text); box-shadow: 0 24px 70px rgba(0,0,0,.7);
}
.vehicle-dialog::backdrop { background: rgba(5, 8, 12, .78); backdrop-filter: blur(3px); }
.personal-page:not([hidden]) { position:static; flex:1 1 auto; width:min(820px,100%); max-width:none; max-height:none; margin:0 auto; border-width:0 1px; border-radius:0; box-shadow:none; overflow:auto; }
body.personal-view .layout { display:none; }
body.personal-view .personal-page > form,body.personal-view .account-dialog-body { min-height:100%; }
@media (min-width:901px) {
  body.personal-view .personal-page:not([hidden]) { overflow-y:scroll; scrollbar-gutter:stable; }
}
.vehicle-dialog form { padding: 22px; overflow: auto; }
.vehicle-dialog-intro { max-width: 54ch; margin: 0 0 16px; line-height: 1.45; }
.vehicle-form-section { margin-top: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: rgba(10,13,17,.28); }
.vehicle-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.vehicle-section-head > div { display: grid; gap: 2px; }
.vehicle-section-head strong { font-family: var(--font-sign); text-transform: uppercase; letter-spacing: .025em; }
.vehicle-section-head small { color: var(--muted); font-size: 11px; }
.vehicle-section-number { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border-radius: 6px; background: rgba(255,179,0,.12); color: var(--amber); font: 11px var(--font-mono); }
.vehicle-form-section .field { margin: 10px 0 0; }
.vehicle-form-section .catalog-note { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.4; }
.vehicle-comparison-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(190px,.8fr); align-items: stretch; gap: 12px; }
.vehicle-comparison-row .needed-fuel { align-self: end; min-height: 42px; box-sizing: border-box; align-items: center; }
.vehicle-delete-link { padding: 6px 0; border: 0; background: transparent; color: var(--dear); font: 12px var(--font-body); cursor: pointer; }
.vehicle-delete-link:hover { text-decoration: underline; }
.account-dialog-body { padding: 22px; overflow: auto; }
.account-dialog form { padding: 0; overflow: visible; }
.account-dialog #account-forgot { margin-top: 10px; padding: 4px 0; border: 0; background: transparent; color: var(--muted); }
.account-dialog #account-forgot:hover { color: var(--amber); text-decoration: underline; }
.account-hint { margin: -5px 0 8px; font-size: 12px; }
.account-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; margin: 14px 0; border-radius: 7px; background: var(--asphalt); }
.account-profile-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 14px 0 12px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: linear-gradient(135deg, var(--asphalt), rgba(255,179,0,.06)); }
.account-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--amber); color: #10141a; font: 600 21px var(--font-sign); text-transform: uppercase; }
.account-identity { min-width: 0; display: grid; gap: 3px; }
.account-identity span, .account-profile-stats span { color: var(--muted); font: 10px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.account-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.account-profile-stats > div { display: grid; gap: 4px; min-width: 0; padding: 14px; border-radius: 8px; background: var(--bg); }
.account-profile-stats strong { color: var(--text); font: 600 18px var(--font-sign); }
.account-profile-stats small { color: var(--muted); line-height: 1.35; }
.account-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.account-tabs { display:flex; gap:4px; margin:0 0 14px; padding:4px; border-radius:8px; background:var(--bg); overflow-x:auto; }
.account-tab { flex:1 0 auto; padding:8px 10px; border:0; border-radius:6px; background:transparent; color:var(--muted); font:12px var(--font-body); cursor:pointer; white-space:nowrap; }
.account-tab:hover { color:var(--text); }
.account-tab.active { background:var(--panel); color:var(--amber); box-shadow:0 0 0 1px var(--line); }
.account-tab-panel[hidden] { display:none !important; }
.account-tab-panel { min-height:120px; }
.account-tab-panel[data-account-panel="alerts"] > :last-child { margin-bottom:0; }
.account-favorites { margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(10,13,17,.28); }
.account-notifications { margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(10,13,17,.28); }
.notify-switch { display:flex; align-items:center; gap:9px; padding:8px 0; color:var(--text); font-size:13px; }
.notify-switch input { accent-color:var(--amber); width:17px; height:17px; }
.notify-area-form { margin-top:8px; padding-top:8px; border-top:1px solid var(--line); }
.notify-area-form[hidden] { display:none !important; }
.area-alerts-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.area-alerts-head > div { display:grid; gap:2px; }
.area-alerts-head strong { font-family:var(--font-sign); text-transform:uppercase; font-size:13px; }
.area-alerts-head span { font:10px var(--font-mono); }
.area-alert-list { display:grid; gap:7px; margin-top:9px; }
.area-alert-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:9px; padding:9px 10px; border-radius:7px; background:var(--bg); border:1px solid transparent; }
.area-alert-row.disabled { opacity:.58; }
.area-alert-toggle { width:17px; height:17px; accent-color:var(--amber); }
.area-alert-summary { min-width:0; padding:0; border:0; background:transparent; color:var(--text); text-align:left; cursor:pointer; }
.area-alert-summary strong,.area-alert-summary small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.area-alert-summary small { margin-top:2px; color:var(--muted); font-size:11px; }
.area-alert-summary:hover strong { color:var(--amber); }
.area-alert-delete { padding:5px 7px; border:0; background:transparent; color:var(--muted); cursor:pointer; }
.area-alert-delete:hover { color:var(--dear); }
.area-editor-actions { display:flex; gap:7px; margin-left:auto; }
.notify-address-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; }
.notify-address-row .btn { padding:8px 11px; }
.notify-area-form .dialog-actions { flex-wrap:wrap; }
.account-section-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.account-section-head > div { min-width:0; }
.account-section-head .value-badge { flex:0 0 auto; white-space:nowrap; }
.account-section-head strong { font-family: var(--font-sign); text-transform: uppercase; }
.account-section-head p { margin: 3px 0 0; font-size: 12px; line-height: 1.35; }
.favorites-list { display: grid; gap: 7px; }
.push-enable { width: 100%; margin: 0 0 10px; border-color: rgba(255,179,0,.45); }
.push-diagnostics { display:grid; gap:7px; margin:0 0 12px; padding:10px; border:1px solid var(--line); border-radius:7px; background:var(--bg); }
.push-status-line { display:flex; align-items:flex-start; gap:8px; font-size:12px; line-height:1.35; }
.push-status-line > span:first-child { flex:0 0 auto; color:var(--muted); }
.push-status-line.ok > span:first-child { color:var(--pump); }
.push-status-line.warn > span:first-child { color:var(--amber); }
.push-status-line.error > span:first-child { color:var(--dear); }
.push-diagnostic-checks { display:grid; gap:5px; margin-top:2px; padding-top:7px; border-top:1px solid var(--line); }
.push-diagnostic-checks details { font-size:11px; color:var(--muted); }
.push-diagnostic-checks summary { cursor:pointer; color:var(--text); }
.push-diagnostic-checks p { margin:4px 0 2px 19px; line-height:1.35; }
.favorite-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 6px; background: var(--bg); }
.favorite-open { min-width: 0; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.favorite-open strong, .favorite-open small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-open strong { font-size: 13px; }
.favorite-open small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.favorite-open:hover strong { color: var(--amber); }
.favorite-remove { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; }
.favorite-remove:hover { background: rgba(235,87,87,.12); color: var(--dear); }
.favorite-alert { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(90px,.7fr) minmax(150px,1fr) auto; align-items: end; gap: 7px; padding-top: 8px; border-top: 1px solid var(--line); }
.favorite-alert > strong { align-self: center; color: var(--muted); font: 11px var(--font-mono); text-transform: uppercase; }
.favorite-alert.reached > strong { color: var(--pump); }
.favorite-alert select, .favorite-alert input { box-sizing: border-box; width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--text); }
.favorite-alert label { display: grid; grid-template-columns: 1fr auto; gap: 3px 5px; align-items: center; color: var(--muted); font-size: 11px; }
.favorite-alert label span:first-child { grid-column: 1 / -1; }
.favorite-alert .btn { padding: 7px 9px; white-space: nowrap; }
.favorite-alert > small { grid-column: 2 / -1; color: var(--muted); font-size: 10px; }
.alert-delete { grid-column: 2 / -1; justify-self: start; padding: 2px 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.alert-delete:hover { color: var(--dear); text-decoration: underline; }
.account-settings-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.account-settings-card p { margin: 3px 0 0; font-size: 12px; }
.account-settings-card form { grid-column: 1 / -1; padding: 4px 0 0; border-top: 1px solid var(--line); }
.language-settings-card { margin:12px 0; }
.language-choice { display:inline-flex; padding:3px; border:1px solid var(--line); border-radius:7px; background:var(--bg); }
.language-option { min-width:82px; padding:7px 10px; border:0; border-radius:5px; background:transparent; color:var(--muted); font:11px var(--font-body); cursor:pointer; }
.language-option:hover { color:var(--text); }
.language-option.active { background:var(--amber); color:#17130a; font-weight:600; box-shadow:0 2px 8px rgba(0,0,0,.22); }
.commute-settings { display:grid; gap:12px; }
.commute-route-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.commute-route-grid .field { margin:0; }
.commute-weekdays { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.commute-weekdays input { position:absolute; opacity:0; pointer-events:none; }
.commute-weekdays span { display:grid; place-items:center; min-width:34px; padding:7px 8px; border:1px solid var(--line); border-radius:5px; color:var(--muted); cursor:pointer; }
.commute-weekdays input:checked + span { border-color:var(--amber); background:rgba(255,179,0,.14); color:var(--amber); }
.commute-recommendation { display:grid; gap:9px; padding:11px; border:1px solid var(--line); border-radius:7px; background:var(--bg); }
.commute-direction { display:flex; gap:5px; }
.commute-direction .active { border-color:var(--amber); color:var(--amber); }
.commute-result-card { display:grid; gap:5px; }
.commute-result-card strong { font-family:var(--font-sign); font-size:16px; }
.commute-result-card .commute-price { color:var(--pump); font:600 19px var(--font-sign); }
.commute-result-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:5px; }
.commute-map-pin { display:grid; place-items:center; width:34px; height:34px; border:2px solid #1a1300; border-radius:50%; background:var(--amber); color:#1a1300; font-size:19px; box-shadow:0 3px 12px rgba(0,0,0,.45); }
.commute-map-popup .maplibregl-popup-content { min-width:190px; display:grid; gap:5px; padding:14px 38px 14px 15px; border:1px solid rgba(255,179,0,.42); border-radius:8px; background:var(--panel); color:var(--text); box-shadow:0 12px 32px rgba(0,0,0,.55); font:13px/1.4 var(--font-body); }
.commute-map-popup .maplibregl-popup-content strong { color:var(--amber); font:600 16px var(--font-sign); text-transform:uppercase; }
.commute-map-popup .maplibregl-popup-content span { color:var(--muted); }
.commute-map-popup .maplibregl-popup-content b { color:var(--pump); font:600 18px var(--font-sign); }
.commute-map-popup .maplibregl-popup-close-button { top:5px; right:5px; display:grid; place-items:center; width:30px; height:30px; padding:0; border-radius:5px; color:var(--text); font-size:23px; line-height:1; }
.commute-map-popup .maplibregl-popup-close-button:hover { background:rgba(255,255,255,.08); color:var(--amber); }
.commute-map-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color:var(--panel); }
.commute-map-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color:var(--panel); }
.commute-map-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color:var(--panel); }
.commute-map-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color:var(--panel); }
.account-footer-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.account-delete-link { padding: 6px 0; border: 0; background: transparent; color: var(--dear); font: 12px var(--font-body); cursor: pointer; }
.account-delete-link:hover { text-decoration: underline; }
@media (max-width: 480px) {
  .account-profile-hero { grid-template-columns: auto minmax(0, 1fr); }
  .account-profile-hero .value-badge { grid-column: 2; justify-self: start; }
  .account-profile-stats { grid-template-columns: 1fr; }
  .account-settings-card { grid-template-columns: 1fr; }
  .language-settings-card > div:first-child { min-width:0; }
  .language-choice { box-sizing:border-box; width:100%; min-width:0; }
  .language-option { flex:1 1 50%; min-width:0; }
  .commute-route-grid { grid-template-columns:1fr; }
  .account-settings-card > .btn { justify-self: start; }
  .account-tab { flex:0 0 auto; }
  .favorite-alert { grid-template-columns: 1fr 1fr; }
  .favorite-alert > strong { grid-column: 1 / -1; }
  .favorite-alert > small, .alert-delete { grid-column: 1 / -1; }
  .savings-metrics { grid-template-columns:1fr; }
}
.vehicle-switcher { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.dialog-destination-nav { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; margin:2px 0 13px; padding:4px; border-radius:8px; background:var(--bg); }
.dialog-destination-nav button { min-width:0; min-height:44px; height:100%; display:flex; align-items:center; justify-content:center; padding:8px 5px; border:0; border-radius:6px; background:transparent; color:var(--muted); font-size:12px; line-height:1.2; overflow-wrap:anywhere; }
.dialog-destination-nav button:hover { color:var(--text); }
.dialog-destination-nav button.active { background:var(--panel-2); color:var(--amber); box-shadow:0 0 0 1px var(--line); }
@media (max-width:480px) { .dialog-destination-nav { grid-template-columns:repeat(3,minmax(0,1fr)); } }
.vehicle-switcher[hidden] { display: none !important; }
.vehicle-switcher .field { margin-bottom: 0; }
.premium-lock { display: grid; justify-items: start; gap: 8px; padding: 13px; border: 1px solid rgba(255,179,0,.4); border-radius: 8px; background: rgba(255,179,0,.08); }
.premium-lock b { color: var(--amber); font-family: var(--font-sign); text-transform: uppercase; }
.week-block.premium-locked > :not(.chart-title-row):not(#week-drivers) { display: none !important; }
.week-block.premium-locked .chart-title-row .info-btn { display: none !important; }
.week-block.premium-locked #week-drivers { margin-top: 10px; }
.install-nudge {
  position: fixed; right: 18px; bottom: 18px; z-index: 110;
  display: grid; grid-template-columns: 48px minmax(180px, 1fr); gap: 11px 13px;
  width: min(390px, calc(100vw - 28px)); box-sizing: border-box; padding: 14px;
  border: 1px solid var(--amber); border-radius: 10px;
  background: rgba(16, 20, 26, .98); color: var(--text);
  box-shadow: 0 18px 45px rgba(0,0,0,.62);
}
.install-nudge[hidden] { display: none; }
.install-nudge img { border-radius: 10px; }
.install-nudge-copy { display: grid; gap: 3px; align-content: center; }
.install-nudge-copy strong { font-family: var(--font-sign); text-transform: uppercase; }
.install-nudge-copy span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.install-nudge-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.compatibility-block { position:fixed; inset:0; z-index:10000; display:grid; place-items:center; padding:24px; background:#10141a; color:var(--text); text-align:center; }
.compatibility-block[hidden] { display:none; }
.compatibility-block > div { width:min(440px,100%); padding:24px; border:1px solid var(--line); border-radius:10px; background:var(--panel); }
.compatibility-block h1 { margin:18px 0 10px; font:24px var(--font-sign); text-transform:uppercase; }
.compatibility-block p { color:var(--muted); line-height:1.5; }
.falling-price-prompt { position:fixed; z-index:35; right:20px; bottom:20px; width:min(390px,calc(100vw - 28px)); display:grid; grid-template-columns:auto 1fr; gap:10px 12px; align-items:center; padding:14px; border:1px solid var(--pump); border-radius:9px; background:var(--panel); box-shadow:0 14px 40px rgba(0,0,0,.42); }
.falling-price-prompt[hidden] { display:none; }
.falling-price-prompt > div:nth-child(2) { display:grid; gap:3px; }
.falling-price-prompt span { color:var(--muted); font-size:11px; line-height:1.4; }
.falling-price-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; background:rgba(85,214,158,.1); color:var(--pump); font-size:24px; }
.falling-price-actions { grid-column:1 / -1; display:flex; justify-content:flex-end; gap:7px; }
.dialog-head { position: relative; display: flex; justify-content: space-between; padding-right: 42px; }
.dialog-head h2 { margin: 2px 0 8px; font-family: var(--font-sign); text-transform: uppercase; }
.eyebrow { color: var(--amber); font: 11px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 5px; margin: 12px 0; color: var(--muted); font-size: 12px; }
.field input, .field select {
  width: 100%; box-sizing: border-box; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--text); font: 14px var(--font-body);
}
.field input:focus, .field select:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.needed-fuel { display: flex; justify-content: space-between; gap: 12px; padding: 11px; background: var(--bg); border-radius: 6px; }
.needed-fuel strong { color: var(--amber); font-family: var(--font-mono); white-space: nowrap; }
.dialog-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.btn-danger { color: var(--dear); border-color: var(--dear); }
.form-error { color: var(--dear); font-size: 12px; }
.station-value { margin-top: 5px; color: var(--pump); font-size: 11px; line-height: 1.35; }
.station-value.break-even { color: var(--amber); }
.station-value.not-worth { color: var(--muted); }
.station-favorite-btn { margin-top: 9px; padding: 6px 9px; font-size: 12px; }
.station-refuel-btn { margin-top:9px; padding:6px 9px; font-size:12px; }
.refuel-dialog { width:min(520px,calc(100vw - 24px)); }
.refuel-comparison { display:grid; gap:5px; padding:12px; border-radius:7px; background:var(--bg); font-size:12px; line-height:1.4; }
.refuel-comparison strong { color:var(--amber); font-family:var(--font-mono); }
.savings-overview { margin-bottom:14px; padding:14px; border:1px solid var(--line); border-radius:8px; background:rgba(10,13,17,.28); }
.savings-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
.savings-metrics > div { display:grid; gap:3px; padding:10px; border-radius:6px; background:var(--bg); }
.savings-metrics span { color:var(--muted); font:9px var(--font-mono); text-transform:uppercase; }
.savings-metrics strong { font:600 17px var(--font-sign); color:var(--pump); }
.savings-recent { display:grid; gap:5px; margin-top:9px; }
.savings-row { display:flex; justify-content:space-between; gap:8px; padding:7px 8px; border-radius:5px; background:var(--bg); font-size:11px; }
.savings-row span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.savings-row strong.negative { color:var(--dear); }
.savings-disclaimer { margin:9px 0 0; font-size:10px; line-height:1.4; }
.savings-breakdown { display:flex; flex-wrap:wrap; gap:7px; margin-top:7px; }
.savings-breakdown span { flex:1 1 170px; display:flex; justify-content:space-between; gap:8px; padding:7px 9px; border:1px solid var(--line); border-radius:5px; color:var(--muted); font-size:11px; }
.savings-breakdown strong { color:var(--text); }
.loyalty-progress { display:grid; gap:6px; margin-top:10px; padding:10px; border-radius:6px; background:var(--bg); }
.loyalty-progress > div { display:flex; justify-content:space-between; gap:8px; font-size:11px; }
.loyalty-progress progress { width:100%; accent-color:var(--pump); }
.loyalty-progress small { color:var(--muted); font-size:9px; }
.trend-wait-btn { margin-left:auto; white-space:nowrap; }
.refuel-wait-saving { padding:9px; border:1px solid var(--pump); border-radius:6px; color:var(--pump); font-size:11px; }
.verification-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:10px 0; padding:11px; border:1px solid var(--amber); border-radius:7px; background:rgba(255,179,0,.08); }
.verification-banner[hidden] { display:none; }
.verification-banner div { display:grid; gap:3px; }
.verification-banner span { color:var(--muted); font-size:11px; }
.tutorial-dialog { width:min(460px,calc(100vw - 24px)); padding:0; border:1px solid var(--line); border-radius:10px; background:var(--panel); color:var(--text); }
.tutorial-card { display:grid; gap:14px; padding:24px; text-align:center; }
.tutorial-card h2,.tutorial-card p { margin:0; }
.tutorial-icon { display:grid; place-items:center; width:64px; height:64px; margin:4px auto; border:1px solid var(--pump); border-radius:50%; color:var(--pump); font-size:30px; background:rgba(85,214,158,.08); }
.tutorial-dots { display:flex; justify-content:center; gap:6px; }
.tutorial-dots i { width:7px; height:7px; border-radius:50%; background:var(--line); }
.tutorial-dots i.active { background:var(--pump); }
@media (max-width:520px){.verification-banner{align-items:stretch;flex-direction:column}.tutorial-card{padding:20px 16px}}
.station-favorite-btn.active { border-color: var(--amber); color: var(--amber); background: rgba(255,179,0,.08); }
.value-badge { display: inline-block; margin-right: 5px; padding: 1px 5px; border-radius: 4px; background: rgba(47,191,113,.16); color: var(--pump); font: 10px var(--font-mono); text-transform: uppercase; }
.station-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.station-list .empty { color: var(--muted); padding: 14px 4px; }
.station {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px;
  cursor: pointer; transition: border-color .12s ease;
}
.station:hover, .station.selected { border-color: var(--amber); }
.station > div:first-child { min-width: 0; flex: 1 1 auto; }
.station-name {
  font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.favorite-star { color: var(--amber); font-size: 12px; }
.favorites-empty { margin: 4px 0; font-size: 12px; }
.station-sub {
  font-size: 12.5px; color: var(--muted);
  overflow-wrap: break-word;
}

/* the totem: prices set like an illuminated price sign */
.totem {
  font-family: var(--font-sign); font-weight: 600; font-size: 26px;
  letter-spacing: .01em; color: var(--ink);
  background: #10141a; border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 10px 4px;
  box-shadow: inset 0 0 12px rgba(255, 179, 0, .07);
  white-space: nowrap; flex: 0 0 auto; width: max-content;
}
.totem sup { font-size: .55em; top: -.55em; position: relative; }
.totem.cheap { color: var(--pump); }
.totem.dear  { color: var(--dear); }

/* ---------- map ---------- */
.map-wrap { position: relative; }
#map { position: absolute; inset: 0; }
.map-hint {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  margin: 0; padding: 5px 12px; border-radius: 999px;
  background: rgba(23, 27, 33, .85); color: var(--muted);
  font-size: 12.5px; pointer-events: none; z-index: 2;
}

/* outer element is positioned by MapLibre (transform) — do NOT style it */
.marker-wrap { cursor: pointer; }
.marker-wrap.best {
  display: grid; justify-items: center;
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, .65));
}
.marker-best-badge {
  position: relative; z-index: 1;
  margin-bottom: 3px; padding: 3px 7px;
  border-radius: 999px; background: var(--amber); color: #1a1300;
  font: 600 10px var(--font-sign); letter-spacing: .035em;
  line-height: 1.2; text-transform: uppercase; white-space: nowrap;
}
.marker-wrap.best .marker-sign {
  border-color: var(--amber) !important;
  box-shadow: 0 0 0 3px rgba(255, 179, 0, .3);
}
.marker-sign {
  position: relative;
  width: max-content;
  font-family: var(--font-sign); font-weight: 600; font-size: 15px;
  background: #10141a; color: var(--ink);
  border: 2px solid var(--muted); border-radius: 6px;
  padding: 1px 6px 2px; line-height: 1.25; white-space: nowrap;
  box-sizing: border-box;
  margin-top: -4px;                 /* visual lift, NOT transform */
}
.marker-sign sup { font-size: .55em; }
.marker-sign.selected { border-color: var(--amber) !important; box-shadow: 0 0 0 3px rgba(255,179,0,.25); }

/* ---------- detail card ---------- */
.detail {
  position: absolute; right: 14px; bottom: 14px; z-index: 3;
  width: min(400px, calc(100% - 28px));
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
}
.detail-close {
  position: absolute; top: 6px; right: 6px; z-index:2;
  display:grid; place-items:center; width:38px; height:38px; padding:0;
  background:transparent; border:1px solid transparent; border-radius:7px;
  color:var(--muted); font-size:28px; line-height:1; cursor:pointer;
}
.detail-close:hover { background:rgba(255,255,255,.06); border-color:var(--line); color:var(--text); }
.detail-close:focus-visible { outline:2px solid var(--amber); outline-offset:2px; }
.detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; padding-right: 18px; }
.detail-best-choice {
  display: inline-block; margin: 7px 0 0; padding: 4px 8px;
  border: 1px solid var(--amber); border-radius: 999px;
  background: rgba(255, 179, 0, .12); color: var(--amber);
  font: 600 11px var(--font-sign); letter-spacing: .035em;
  line-height: 1.25; text-transform: uppercase;
}
.detail-best-choice[hidden] { display: none; }
.detail-chart { margin-top: 12px; }
.chart-title { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.week-title-group { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.week-title-group .chart-title { margin-bottom:0; }
.experimental-badge {
  display:inline-flex; align-items:center; padding:3px 7px;
  border:1px solid var(--amber); border-radius:999px;
  background:rgba(255,179,0,.12); color:var(--amber);
  font:600 10px var(--font-sign); letter-spacing:.04em; text-transform:uppercase;
}
.experimental-notice {
  margin:9px 0 11px; padding:9px 10px;
  border-left:3px solid var(--amber); border-radius:0 6px 6px 0;
  background:rgba(255,179,0,.08); color:var(--muted);
  font-size:12px; line-height:1.45;
}
.experimental-notice strong { color:var(--amber); }
#history-chart { width: 100%; height: 120px; display: block; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .desktop-nav { display:none; }
  html { width:100%; max-width:100%; overflow-x:hidden; overflow-x:clip; }
  body { width:100%; max-width:100%; overflow-x:hidden; overflow-x:clip; overflow-y:auto; height:auto; display:block; }
  body.personal-view { position:fixed; inset:0; width:100%; height:100vh; height:100dvh; overflow:hidden; padding-bottom:0; }
  body.personal-view > .topbar,
  body.personal-view > .site-footer { display:none; }
  body.personal-view .personal-page:not([hidden]) { display:block; position:absolute; inset:0 0 78px; width:100%; max-width:100%; min-width:0; margin:0; height:auto; min-height:0; border:0; overflow-x:hidden; overflow-x:clip; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
  body.personal-view .account-dialog-body { width:100%; min-width:0; overflow-x:hidden; overflow-x:clip; }
  .layout { grid-template-columns: 1fr; height: auto; }
  .map-wrap { order: -1; height: 45vh; position: relative; }
  .sidebar { border-right: 0; border-top: 1px solid var(--line); overflow: visible; }
  .topbar { grid-template-columns: 1fr; justify-items:center; gap: 12px; }
  .brand { justify-content:center; }
  .controls { width:min(100%,680px); justify-content:center; margin-inline:auto; }
  .ctl { align-items:center; }
  .geo-row input { width:180px; }
  .vehicle-dialog { margin: auto; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .vehicle-switcher { grid-template-columns: 1fr; }
  .vehicle-comparison-row { grid-template-columns: 1fr; }
  body { padding-bottom:calc(78px + env(safe-area-inset-bottom)); }
  .sidebar-toolbar { grid-template-columns:1fr; justify-items:center; }
  #vehicle-btn, #account-btn, #header-logout { display:none !important; }
  .mobile-nav { position:fixed !important; z-index:900; inset:auto 0 0 0; width:auto; max-width:none; min-width:0; min-height:78px; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); align-items:center; padding:5px max(5px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left)); border-top:1px solid var(--line); background:rgba(23,27,33,.98); box-shadow:0 -8px 24px rgba(0,0,0,.35); }
  .mobile-nav-item { width:100%; max-width:100%; min-width:0; min-height:54px; overflow:hidden; display:grid; justify-items:center; align-content:center; gap:3px; padding:6px 2px 5px; border:0; border-radius:7px; background:transparent; color:var(--muted); }
  .mobile-nav-item span { height:24px; font:22px/1 var(--font-sign); }
  .mobile-nav-item .mobile-nav-wordmark { padding-top:4px; font-size:12px; letter-spacing:.08em; }
  .mobile-nav-item b { overflow:hidden; max-width:100%; color:inherit; font-size:12px; line-height:1.15; font-weight:500; text-overflow:ellipsis; white-space:nowrap; }
  .mobile-nav-item.active { background:rgba(255,179,0,.11); color:var(--amber); }
  .install-nudge { left:14px; right:14px; bottom:88px; width:auto; }
  .falling-price-prompt { left:14px; right:14px; bottom:88px; width:auto; }
}

@media (max-width: 600px) {
  .topbar { padding:12px; }
  .controls {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:end;
    gap:10px;
    width:min(100%,420px);
  }
  .controls .ctl { width:100%; min-width:0; align-items:stretch; }
  .controls .ctl > span { text-align:center; }
  .controls .ctl:nth-of-type(3) { grid-column:1 / -1; }
  .controls .ctl select, #fuel { width:100%; }
  .geo-row { width:100%; }
  .geo-row input { width:auto; min-width:0; flex:1; }
  .controls > .btn { width:100%; }
  #locate, #install-btn, #header-logout { grid-column:1 / -1; }
  #lang-toggle { grid-column:1 / -1; justify-self:center; width:88px; }
  .commute-settings,
  .commute-settings > *,
  .commute-route-grid,
  .commute-route-grid .field,
  .notify-address-row,
  .notify-address-row input,
  .commute-result-card { min-width:0; max-width:100%; }
  .commute-result-card { overflow-wrap:anywhere; }
  .account-tab-panel[data-account-panel="commute"] { width:100%; min-width:0; overflow:hidden; }
  body.personal-view .account-tabs { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
  .commute-direction .btn,
  .commute-result-actions .btn { min-width:0; white-space:normal; }
}

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

/* price-less stations (AT legal top-5 rule) */
.totem.noprice { color: var(--muted); box-shadow: none; }
.marker-sign.noprice { color: var(--muted); opacity: .75; }

/* opening status badges */
.badge {
  display: inline-block; font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: .03em;
  padding: 1px 6px; border-radius: 4px; vertical-align: middle;
  margin-left: 2px;
}
.badge.open   { background: rgba(47,191,113,.15); color: var(--pump); }
.badge.closed { background: rgba(229,72,77,.15);  color: var(--dear); }
.marker-sign.closed {
  border-style: dashed; border-color: var(--muted) !important;
  opacity: .65;
}
.marker-sign.closed::after {
  content: "✕"; position: absolute; top: -6px; right: -6px;
  background: var(--dear); color: #fff; font-size: 9px;
  width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
}

/* Austrian prices that were not confirmed by the latest E-Control lookup */
.station:has(.totem.stale) { border-style: dashed; }
.totem.stale {
  color: var(--amber);
  border-style: dashed;
  opacity: .82;
}
.marker-sign.stale {
  color: var(--amber);
  border-style: dashed;
  opacity: .82;
}
.stale-clock {
  position: absolute; top: -7px; right: -7px;
  width: 15px; height: 15px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber); color: #10141a;
  font: 700 10px/1 var(--font-mono);
}
.stale-text { color: var(--amber) !important; }

.week-summary {
  margin: 9px 0 4px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.week-country {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--amber);
  margin-bottom: 5px;
}
.week-official-stand {
  margin-bottom: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.week-summary-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  font-size: 13px;
}
.week-summary-main b { color: var(--ink); }
.week-summary-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}
.week-summary-meta strong { color: var(--amber); font-weight: 500; }

.week-summary-warning {
  margin-top: 7px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 179, 0, .35);
  border-radius: 6px;
  background: rgba(255, 179, 0, .08);
  color: var(--amber);
  font-size: 11px;
  line-height: 1.4;
}

/* Forecast evaluation page
   The map shell intentionally locks body scrolling and lets its panels scroll.
   This administration page is a normal document, so explicitly undo all
   three shell constraints (fixed height, flex layout, hidden overflow). */
body.analysis-page {
  height: auto;
  min-height: 100vh;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg, #171c24);
  color: var(--text, #EDEFF2);
}
.admin-page { height: auto; min-height: 100vh; display: block; overflow: auto; }
.admin-shell { width: min(1100px, calc(100% - 32px)); margin: 32px auto 70px; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.admin-heading h1 { margin: 4px 0 12px; font-family: var(--font-sign); text-transform: uppercase; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.admin-table th, .admin-table td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: left; }
.admin-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.analysis-topbar { position: static; }
.analysis-topbar .brand-sign { color: inherit; text-decoration: none; }
.analysis-controls { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.analysis-layout { width: min(1180px, calc(100% - 32px)); margin: 28px auto 60px; display: grid; gap: 18px; }
.analysis-intro h1, .analysis-section h2 { margin-top: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.forecast-input-grid { grid-template-columns:repeat(4,minmax(0,1fr)); margin:16px 0; }
.metric-card { display: grid; gap: 7px; }
.metric-label { color: var(--muted, #98A1AD); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.metric-card strong { font-family: "Barlow Condensed", sans-serif; font-size: 2rem; }
.metric-card small { color: var(--muted, #98A1AD); }
.analysis-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.table-wrap { overflow-x: auto; }
.analysis-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.analysis-table th, .analysis-table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid #313947; white-space: nowrap; }
.analysis-table th { color: #98A1AD; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.analysis-table code, .version-row code { font-family: "IBM Plex Mono", monospace; font-size: .78rem; }
.version-list { display: grid; gap: 8px; }
.version-row { display: grid; grid-template-columns: minmax(180px,1fr) 90px repeat(3, minmax(130px, auto)); gap: 12px; padding: 10px 0; border-bottom: 1px solid #313947; }
.err-pos { color: #ffbd45; }
.err-neg { color: #55d69e; }
.skill-pos { color: #55d69e; }
.maturity { display: inline-block; padding: 2px 6px; border: 1px solid; border-radius: 999px; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; }
.maturity-low { color: #ffbd45; border-color: rgba(255,189,69,.45); }
.maturity-mid { color: #9ecbff; border-color: rgba(158,203,255,.45); }
.maturity-good { color: #55d69e; border-color: rgba(85,214,158,.45); }
.price-chart-wrap { position: relative; width: 100%; margin-top: 12px; }
#price-chart { display: block; width: 100%; height: 360px; cursor: crosshair; }
.price-tooltip { position: absolute; }
.price-chart-legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font: 11px var(--font-mono); }
.price-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.price-chart-legend i { display: inline-block; width: 20px; }
.legend-line { height: 2px; background: var(--amber); }
.legend-band { height: 9px; background: rgba(255,179,0,.18); border: 1px solid rgba(255,179,0,.35); }
.price-up { color: var(--dear); }
.price-down { color: var(--pump); }
@media (max-width: 820px) { .metric-grid,.forecast-input-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .analysis-controls { width: 100%; } }
@media (max-width: 520px) { .metric-grid { grid-template-columns: 1fr; } .version-row { grid-template-columns: 1fr; } #price-chart { height: 280px; } }

/* per-headline forecast contribution */
.driver-ct {
  margin-left: auto; flex: 0 0 auto;
  font-family: var(--font-mono); font-size: 10.5px; white-space: nowrap;
}
.driver-ct.up   { color: var(--dear); }
.driver-ct.down { color: var(--pump); }
.driver-ct.zero { color: var(--muted); }

.driver-dir.zero { color: var(--muted); }
.driver-other { border-top: 1px dashed var(--line); padding-top: 6px; }
