/* ============================================================================
   Datei:       style.css
   Projekt:     Tankwächter – Spritpreis-Überwachung
   Autor:       Frank Albrecht (cl)
   Erstellt:    2026-08-11
   Beschreibung: Styling der Web-Startseite/Anmeldung (#28/#88). Leichtgewichtig,
                 self-hosted (keine externen Fonts/CDNs, CSP-freundlich). Blauer
                 Börsenchart-Hero (Bild + 12:00-Peak-SVG), Karten-Layout,
                 Sektions-Banner, dunkle Anmelde-Sektion (Bilder aus static/img/).

   Änderungen:
     2026-08-26  Frank Albrecht (cl)  Preise je Sorte und Messzeit auf der
                                      Stationskarte (#363)
     2026-08-26  Frank Albrecht (cl)  Zehntel-Cent-Ziffer hochgestellt
                                      (.pump-price) (#376)
     2026-08-31  Frank Albrecht (cl)  Fixierte Hauptnavigation (.site-nav),
                                      scroll-padding-top für Sprungmarken
                                      (#425)
     2026-09-01  Frank Albrecht (cl)  .chart-summary – Text-Zusammenfassung
                                      unter der Wirkungs-Grafik (#169)
     2026-09-02  Frank Albrecht (cl)  Hero- und Anmelde-Hintergrund über
                                      image-set() auf AVIF/WebP, JPEG bleibt
                                      als Fallback stehen (#171)
     2026-09-28  Frank Albrecht (cl)  .reference-prices im Meldeformular
                                      (#548)
   ============================================================================ */

:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --ink: #1c2321;
  --muted: #5a6360;
  --faint: #9aa39d;
  --accent: #1f7a44;
  --accent-dark: #155c33;
  --accent-soft: #e7f3ec;
  --warn: #d97706;
  --warn-soft: #fff4e6;
  --border: #d9ddd6;
  --error-bg: #fbe9e7;
  --error-ink: #a4241b;
  --shadow: 0 6px 24px rgba(28, 35, 33, 0.07);
}

* { box-sizing: border-box; }

/* Sprungmarken (z. B. /methode#aufschlag aus #394) landen sonst UNTER der
   klebenden Navigation. Der Wert liegt bewusst etwas über deren Höhe, damit
   die Zielüberschrift frei steht und nicht an der Leiste klebt (#425). */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.2rem;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

/* --- Kopf ---------------------------------------------------------------- */
.site-header {
  padding: 1.1rem 1rem;
  text-align: center;
  background: var(--surface);
}

/* --- Hauptnavigation (klebt oben, #425) ---------------------------------- */

/* Der Kopf darüber scrollt bewusst weg: Marke und Tagline dauerhaft stehen zu
   lassen kostete auf dem Telefon drei Zeilen Höhe – auf einer Rangliste der
   teuerste Platz. Die Leiste selbst bleibt. */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  /* Nur waagerecht scrollen. `overflow-x: auto` allein setzt overflow-y
     implizit auf `auto` und schnitte die Fokus-Umrandung oben und unten ab. */
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.site-nav-inner {
  display: flex;
  gap: 0.2rem;
  max-width: 60rem;
  margin: 0 auto;
  /* 0.35rem plus die 0.65rem des Eintrags ergeben 1rem – dieselbe Einrückung
     wie `.content`, damit der erste Eintrag über dem Text steht. */
  padding: 0 0.35rem;
  white-space: nowrap;
  /* Eine Zeile, notfalls seitlich scrollbar – statt auf schmalen Geräten in
     drei Zeilen umzubrechen und die halbe Höhe zu fressen.
     `min-width: max-content` statt `width: max-content; min-width: 100%`:
     Letzteres schlägt auf breiten Schirmen `max-width` (min gewinnt gegen max),
     die Leiste liefe dann über die volle Fensterbreite und stünde links neben
     der Textspalte statt darüber. */
  min-width: max-content;
}

.site-nav a {
  display: block;
  padding: 0.7rem 0.65rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  /* Platzhalter in der Farbe des Hintergrunds: Die Markierung der aktuellen
     Seite verändert damit die Breite der Einträge nicht. */
  border-bottom: 3px solid transparent;
}

.site-nav a:hover {
  color: var(--accent-dark);
  border-bottom-color: var(--border);
}

/* Die Leiste zeigt nicht nur Wege, sondern auch den Standort. Gekennzeichnet
   wird über `aria-current` statt über eine eigene Klasse – dieselbe Angabe
   trägt dann die Anzeige und die Ansage im Screenreader. */
.site-nav a[aria-current="page"] {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}

.site-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-dark);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.tagline { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.95rem; }

.content {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

h2 { font-size: 1.5rem; margin: 2.5rem 0 0.6rem; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; margin: 0 0 0.4rem; }

.section-lead { color: var(--muted); font-size: 1.05rem; max-width: 44rem; }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  margin: 1.75rem 0 1rem;
  padding: 2.4rem;
  border-radius: 20px;
  color: #eaf1fb;
  /* Zwei Deklarationen mit Absicht (#171): Ein Browser ohne image-set() verwirft
     die zweite komplett und behält das JPEG aus der ersten. Der Verzicht auf
     -webkit-image-set() ist gewollt – die Präfix-Form kennt kein type(), könnte
     die Formate also gar nicht unterscheiden. */
  background:
    linear-gradient(115deg, rgba(9, 20, 38, 0.94) 0%, rgba(13, 31, 60, 0.80) 52%,
      rgba(9, 20, 38, 0.92) 100%),
    url("/static/img/hero-chart.jpg") center / cover no-repeat;
  background:
    linear-gradient(115deg, rgba(9, 20, 38, 0.94) 0%, rgba(13, 31, 60, 0.80) 52%,
      rgba(9, 20, 38, 0.92) 100%),
    image-set(
      url("/static/img/hero-chart.avif") type("image/avif"),
      url("/static/img/hero-chart.webp") type("image/webp"),
      url("/static/img/hero-chart.jpg") type("image/jpeg")
    ) center / cover no-repeat;
  border: 1px solid #0b1830;
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #d6ffe7;
  background: rgba(55, 214, 122, 0.16);
  border: 1px solid rgba(55, 214, 122, 0.35);
  border-radius: 999px;
}

.hero h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.8rem;
  color: #ffffff;
}

.hero .hl { color: #46e08a; }

.lead { font-size: 1.1rem; margin: 0 0 1.3rem; }
.hero .lead { color: #c6d4ea; }
.hero .lead strong, .hero .lead em { color: #ffffff; }

.hero-art { display: flex; justify-content: center; }
.hero-chart { width: 100%; max-width: 420px; height: auto; }

/* --- Buttons ------------------------------------------------------------- */
.btn-primary,
.btn-secondary {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.65rem 1.3rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn-lg { padding: 0.85rem 1.7rem; font-size: 1.05rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(31, 122, 68, 0.28);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--accent);
}
.btn-secondary:hover { background: rgba(31, 122, 68, 0.08); }

/* --- Karten -------------------------------------------------------------- */
.cards { display: grid; gap: 1rem; margin-top: 1.1rem; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.steps-grid { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}
.card.muted { background: #fbfcfa; }
.card.accent { border-color: #bfe0cd; box-shadow: 0 6px 24px rgba(31, 122, 68, 0.12); }
.card.accent h3 { color: var(--accent-dark); }
.card p { margin: 0.3rem 0 0; color: var(--muted); }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
}

.check-list { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.check-list li { position: relative; padding-left: 1.5rem; margin: 0.4rem 0; }
.check-list li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--accent); font-weight: 700;
}
.check-list.neutral li::before { content: "•"; color: var(--faint); }

/* --- Vorgehen / Gesetz --------------------------------------------------- */
.law-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.2rem 0 1rem;
  padding: 0;
}
.law-facts span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid #bfe0cd;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

/* --- FAQ-Antwort (zitierfähig für KI-Suchen / AI Overviews) --------------- */
.faq-answer {
  font-size: 1.1rem;
  font-weight: 500;
  color: #1a2a3a;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.callout {
  background: #eef6f0;
  border: 1px solid #bfe0cd;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  font-size: 1.05rem;
}

/* --- Sektions-Bild (Banner) ---------------------------------------------- */
.section-banner {
  margin: 1.2rem 0 0.4rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  line-height: 0;
}
.section-banner img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

/* --- Hinweis-Block ------------------------------------------------------- */
.note {
  color: var(--muted);
  font-size: 0.95rem;
  border-left: 3px solid var(--accent);
  padding-left: 0.85rem;
  margin-top: 1.2rem;
}

.hint { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0 0.6rem; }

/* Referenzpreise im Meldeformular (#548): Preis samt Messzeit je Sorte, damit
   der Melder vor dem Absenden abgleichen kann, wann diese Werte gemessen
   wurden – ohne fette Randstriche der Stationskarte, dieselbe Zurückhaltung
   wie `.rec-measured`. */
.reference-prices {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}
.reference-prices li { margin: 0.15rem 0; }

/* --- Anmelde-Formular ---------------------------------------------------- */
.signup {
  margin-top: 2.5rem;
  scroll-margin-top: 1rem;
}
.signup.dark {
  padding: 2rem;
  border-radius: 20px;
  color: #eaf1fb;
  /* Doppelte Deklaration wie beim Hero – Begründung dort (#171). */
  background:
    linear-gradient(180deg, rgba(9, 20, 38, 0.94), rgba(11, 26, 50, 0.9)),
    url("/static/img/section-monitors.jpg") center / cover no-repeat;
  background:
    linear-gradient(180deg, rgba(9, 20, 38, 0.94), rgba(11, 26, 50, 0.9)),
    image-set(
      url("/static/img/section-monitors.avif") type("image/avif"),
      url("/static/img/section-monitors.webp") type("image/webp"),
      url("/static/img/section-monitors.jpg") type("image/jpeg")
    ) center / cover no-repeat;
  border: 1px solid #0b1830;
  box-shadow: var(--shadow);
}
.signup.dark h2 { margin-top: 0; color: #ffffff; }
.signup.dark > .note { color: #c6d4ea; border-left-color: #46e08a; }

/* Schrittfolge der Anmeldung (#284). Der Abschnitt ist dunkel, das Formular
   darin hell – Texte und Links AUSSERHALB der weißen Karte brauchen deshalb
   eigene Farben. Ohne sie fielen die Links auf die Browser-Vorgabe zurück
   (#0000ee) und wären auf dem dunklen Grund praktisch unlesbar. */
.signup.dark > .hint { color: #c6d4ea; }
.signup.dark > .hint a,
.signup.dark .steps a { color: #46e08a; }
.signup.dark > .hint a:hover,
.signup.dark .steps a:hover { color: #ffffff; }
.steps {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.signup.dark .steps strong { color: #ffffff; }
.signup.dark .steps .step-todo,
.signup.dark .steps span[aria-hidden] { color: #8fa6c6; }
/* Formular-Karte bleibt hell: Textfarbe wieder auf Ink zurücksetzen, damit die
   helle Hero-/Band-Textfarbe nicht in die weiße Karte durchschlägt. */
.signup.dark .signup-form { color: var(--ink); }
.signup-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
  max-width: 42rem;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0 0 1.1rem;
  padding: 0.8rem 1rem 1rem;
}
legend { font-weight: 600; padding: 0 0.4rem; }

.options { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; }
.option {
  display: flex; align-items: center; gap: 0.45rem;
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fbfcfa;
}
.option:hover { border-color: var(--accent); }
/* Untereinander statt nebeneinander (#511): Wo die Beschriftung ein ganzer
   Satz ist, laufen die Pillen sonst ineinander und sind nicht mehr als
   Auswahl erkennbar. */
.options.stacked { flex-direction: column; align-items: stretch; gap: 0.5rem; }
.options.stacked .option { border-radius: 10px; }
.option input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }

/* Auswahlfelder des Anmeldeformulars (Ortsteil, Umkreis) – #237. */
.field { display: block; margin: 0 0 0.9rem; }
.field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.field select {
  width: 100%;
  max-width: 30rem;
  padding: 0.5rem 0.6rem;
  font: inherit;
  color: inherit;
  background: #fbfcfa;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.field select:hover { border-color: var(--accent); }
.field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Nicht erfasste Ortsteile bleiben sichtbar, aber unwählbar – „gibt es nicht"
   wäre die falsche Aussage. */
.field option:disabled { color: var(--muted); }

.error {
  background: var(--error-bg);
  color: var(--error-ink);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font-weight: 500;
}

/* --- Ergebnis-Seite ------------------------------------------------------ */
.result h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); letter-spacing: -0.01em; }

/* Status-Banner der Erfolgsseite (z. B. „erneut gesendet", #143). */
.notice {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin: 0.8rem 0;
  font-weight: 500;
}

.resend { margin: 0.4rem 0 1rem; }

.subscribe-box {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem;
  margin: 1.2rem 0;
  box-shadow: var(--shadow);
}
.qr img {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem;
}
.subscribe-links { flex: 1 1 16rem; }
.app-open { margin: 0.3rem 0 0.5rem; }
.app-open .btn-primary { display: inline-block; }
.store-links {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0.2rem 0 0.9rem;
}
.store-links a { color: var(--accent-dark); white-space: nowrap; }
.subscribe-url a { color: var(--accent-dark); word-break: break-all; }
.topic code {
  background: #eef1ec;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  word-break: break-all;
}

/* --- Fuß ----------------------------------------------------------------- */
.site-footer {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}
.attribution { font-size: 0.82rem; }
.attribution a { color: var(--accent-dark); text-decoration: underline; }
.attribution a:hover { color: var(--accent); }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-bottom: 0.6rem;
}
.footer-nav a { color: var(--accent-dark); text-decoration: none; font-weight: 600; }
.footer-nav a:hover { text-decoration: underline; }

/* --- Rechtsseiten (Impressum / Datenschutz) ------------------------------ */
.legal { max-width: 44rem; }
.legal h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); letter-spacing: -0.01em; }
.legal h2 { font-size: 1.2rem; margin-top: 1.8rem; }
.legal address { font-style: normal; line-height: 1.7; margin: 0.4rem 0 0.8rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin: 0.35rem 0; }
.legal code {
  background: #eef1ec;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  word-break: break-word;
}

/* --- Responsiv ----------------------------------------------------------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 1.5rem; }
  .hero-art { order: -1; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .cards.two, .steps-grid { grid-template-columns: 1fr; }
}

/* --- Effektivitäts-Grafiken (/wirkung, #110) ----------------------------- */
.wirkung { max-width: 52rem; }
.wirkung h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); letter-spacing: -0.01em; }
.wirkung h2 { font-size: 1.25rem; margin-top: 2rem; }
.wirkung h3 { margin-top: 1.2rem; color: var(--muted); }

.disclaimer {
  background: var(--warn-soft);
  border: 1px solid #f2d9b0;
  border-left: 4px solid var(--warn);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin: 1.1rem 0 1.6rem;
  font-size: 0.95rem;
}

/* Sorten-Reiter (#336) teilen sich das Aussehen mit den übrigen Auswahlreihen –
   es ist dieselbe Geste: ein Chip pro Wahl, der aktive hervorgehoben. */
.city-picker, .station-picker, .fuel-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.6rem 0 1.2rem;
}
.picker-label { color: var(--muted); font-weight: 600; margin-right: 0.2rem; }
/* Enger am Inhalt als die Stadt-Auswahl: Die Rangliste steht direkt darunter
   und gehört sichtbar zum aktiven Reiter. */
.fuel-picker { margin-bottom: 0.6rem; }

.chip {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.3;
}
.chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.chip-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.chart {
  position: relative; /* Bezug für das absolut positionierte Hover-Tooltip (#221) */
  margin: 0.6rem 0 1.4rem;
  padding: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.chart-note { color: var(--muted); font-size: 0.88rem; margin: -0.8rem 0 1.4rem; }

/* Text-Zusammenfassung unter der Grafik (#169). Bewusst zurückhaltend: Sie sagt
   dasselbe wie das SVG darüber und darf es nicht überstrahlen – die Kante links
   ordnet sie der Grafik zu, statt sie als eigene Sektion zu setzen. */
.chart-summary {
  max-width: 44rem;
  margin: 0 0 1.6rem;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid var(--accent-soft);
}
.chart-summary h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.chart-summary p { margin: 0 0 0.7rem; }
.chart-summary .chart-note { margin: 0; }
.empty-note {
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin: 0.8rem 0 1.4rem;
}

/* Ortssuche in der Gebietsauswahl (#334): tritt ab AREA_SEARCH_MIN_OPTIONS
   wählbaren Gebieten an die Stelle der Chip-Reihe. Ohne JavaScript benutzbar –
   ein gewöhnliches GET-Formular, die <datalist> ist nur Komfort. */
.area-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.8rem 0;
}
.area-search input[type="search"] {
  flex: 1;
  min-width: 12rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--surface);
  color: var(--ink);
}
.area-search .btn-secondary { padding: 0.5rem 1rem; }

/* Städte-Übersicht auf /empfehlung ohne Filter (#333): eine Zeile je Stadt.
   Der Rahmen trägt die Heatmap-Farbe der günstigsten Station (inline gesetzt,
   #217), damit die Zeile dieselbe Aussage trägt wie die volle Karte. */
.city-summary { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.summary-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 10px;
}
.summary-city { font-weight: 600; min-width: 9rem; }
.summary-station { flex: 1; color: var(--muted); }
.summary-fuel { font-size: 0.9em; }
.summary-jump {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Inline-SVG-Diagramm (Klassen aus services/svg_chart.py). */
.jump-chart { display: block; max-width: 100%; height: auto; }
.jump-chart .grid { stroke: var(--border); stroke-width: 1; }
.jump-chart .grid-zero { stroke: var(--faint); stroke-width: 1.4; }
.jump-chart .axis-label { fill: var(--muted); font-size: 11px; font-family: system-ui, sans-serif; }
.jump-chart .axis-title { fill: var(--muted); font-size: 11px; font-family: system-ui, sans-serif; }
.jump-chart .legend-label { fill: var(--ink); font-size: 12px; font-family: system-ui, sans-serif; }
/* Marker für echte Datenlücken (fill = Reihenfarbe, inline gesetzt). */
.jump-chart .gap-marker { font-size: 11px; font-family: system-ui, monospace; font-weight: 600; }

/* Verteilungsband (#332): gefüllte Fläche zwischen 25. und 75. Perzentil. Die
   Deckkraft liegt hier, damit Median- und Stationslinien darauf lesbar bleiben;
   die Farbe setzt svg_chart.py inline. Gilt auch für den Legenden-Schlüssel,
   damit Legende und Fläche gleich aussehen. */
.jump-chart .band { fill-opacity: 0.18; }

/* Interaktion (#221): breite, unsichtbare Trefferfläche je Linie, damit sich die
   dünne Reihe leicht überfahren lässt. */
.jump-chart .hit {
  fill: none;
  stroke: transparent;
  stroke-width: 16;
  stroke-linejoin: round;
  stroke-linecap: round;
  pointer-events: stroke;
  cursor: pointer;
}
.jump-chart .series { transition: opacity 0.12s ease; }
/* Beim Hover über eine Linie die übrigen ausgrauen, die aktive betonen. */
.jump-chart.has-hover .series:not(.is-active) { opacity: 0.18; }
.jump-chart .series.is-active .line { stroke-width: 3.5; }
.jump-chart .series.is-active .marker { r: 3.4; }

/* Hover-Hinweis im Lead (dezent, nur ergänzend). */
.hover-hint { color: var(--muted); }

/* Gestyltes Tooltip (von static/wirkung.js positioniert). */
.chart-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  max-width: 240px;
  padding: 0.4rem 0.6rem;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.3;
  box-shadow: var(--shadow);
}
.chart-tip strong { display: block; font-weight: 600; }
.chart-tip .chart-tip-sub { display: block; margin-top: 0.1rem; color: #cbd5cf; font-size: 0.76rem; }

/* --- Tagesseite /empfehlung (#195) --------------------------------------- */
.empfehlung h1 { margin-bottom: 0.3rem; }

/* Datums-Navigation (blättern). */
.rec-datenav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 1rem 0 0.4rem;
}
.rec-currentday { font-weight: 700; color: var(--accent-dark); }
.chip-disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
}
.rec-tolatest { text-align: center; margin: 0 0 1.2rem; font-size: 0.9rem; }
.rec-tolatest a { color: var(--accent-dark); }

/* Rangliste je Stadt. */
.rec-city { margin: 1.6rem 0 0.4rem; }
.rec-city h2 {
  margin: 0 0 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--accent-soft);
}
.rec-fuel { margin: 1rem 0 0.5rem; color: var(--muted); font-size: 1rem; }

/* Kennzahl-Kopfzeile über der Rangliste (#335): die Antwort, bevor der Beleg
   kommt. Neutraler Grund, kein Grün: Direkt darunter liegen die Heatmap-Karten,
   deren Farbe eine Aussage trägt (grün = am wenigsten erhöht, #217). Eine grün
   hinterlegte Zeile darüber liest sich wie die beste Karte der Liste und nimmt
   der Skala ihre Bedeutung. Hervorgehoben sind nur die Zahlen. */
.rec-headline {
  margin: 0 0 0.9rem;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.5;
}
.rec-headline strong { color: var(--ink); }

.rec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
/* Hintergrund + Rahmen kommen als Inline-Farbwert aus dem View-Builder
   (Heatmap grün→rot, #217); die Werte hier sind nur Fallback ohne Farbwert. */
.rec-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.rec-rank {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  /* Neutral (statt Grün), damit das Rang-Abzeichen auch auf einer roten Karte
     nicht „gut" suggeriert – die Kartenfarbe trägt die Aufschlags-Aussage. */
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.rec-body { flex: 1 1 auto; min-width: 0; }
.rec-name { margin: 0; font-weight: 700; }
.rec-addr { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.9rem; }
.rec-metrics {
  margin: 0.35rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  font-size: 0.92rem;
}
.rec-price { color: var(--muted); }

/* Preise je Sorte auf der sortenübergreifenden Karte (#363). Eine umbrechende
   Zeile statt einer Tabelle: es sind höchstens drei Paare, und auf dem Telefon
   sollen sie einfach umbrechen statt zu scrollen. */
.rec-fuels {
  margin: 0.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
  font-size: 0.92rem;
}
/* Der Preis trägt die Aussage, der Sortenname ordnet nur zu – deshalb steht er
   zurück statt gleichberechtigt daneben. */
.rec-fuel-name { color: var(--muted); }
.rec-fuel-price { white-space: nowrap; }

/* Zapfsäulen-Preis: 2,02 mit hochgestellter Zehntel-Cent-Ziffer (#376).

   `line-height: 0` am <sup> ist der Punkt, an dem es sonst schiefgeht: Ohne
   das wächst die Zeilenbox um die Hochstellung, und in der Rangliste stehen
   die Zeilen mit Preis weiter auseinander als die ohne. Die Größe ist bewusst
   nicht kleiner als 0.72em – darunter ist die Ziffer auf dem Telefon nicht
   mehr sicher zu lesen, und sie gehört zum Preis.

   `tabular-nums` hält die Ziffern gleich breit, damit die Preise in der
   Tabellenspalte untereinander fluchten. */
.pump-price {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pump-price sup {
  font-size: 0.72em;
  line-height: 0;
  vertical-align: super;
}

/* Messzeit (#363): Beleg, nicht Kennzahl. Kleiner und zurückgenommen, damit sie
   die Rangfolge nicht überlagert – gelesen wird sie erst bei Nachfrage. */
.rec-measured {
  margin: 0.25rem 0 0;
  color: var(--faint);
  font-size: 0.82rem;
}
.rec-route {
  flex: 0 0 auto;
  align-self: center;
  padding: 0.45rem 0.9rem;
  /* Halbtransparentes Weiß, damit der Button auf jeder Heatmap-Farbe (grün bis
     rot) klar lesbar bleibt. */
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.rec-route:hover { background: rgba(255, 255, 255, 0.95); }

/* Beschwerdestelle (#511). Bewusst als Textlink und nicht als zweiter Button:
   Der Weg muss auffindbar sein, aber er steht neben der Route und darf ihr
   nicht die Aufmerksamkeit nehmen. */
.rec-report {
  flex: 0 0 auto;
  align-self: center;
  margin-left: 0.6rem;
  color: var(--muted);
  text-decoration: underline;
  font-size: 0.82rem;
}
.rec-report:hover { color: var(--ink); }

/* --- Rangliste ab Rang 4: kompakte Tabelle (#337) ------------------------
   Die Karten oben tragen die Entscheidung, die Tabelle die Vollständigkeit.
   Aufklappbar über <details> – natives HTML, kein JavaScript, und der Inhalt
   steht auch zugeklappt im Quelltext (Suchmaschinen, Vorlesen). */
.rec-more { margin: 0.6rem 0 0; }
.rec-more > summary {
  cursor: pointer;
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 600;
}
.rec-more > summary:hover { border-color: var(--accent); }
/* Erklärtabelle im Fließtext (/methode Teil B, #395). Eigene Klasse statt
   .rec-table: Dort steht in jeder Zelle eine Zahl und `white-space: nowrap`
   hält die Spalten schmal – hier stehen ganze Sätze, die umbrechen müssen. */
.legal-table-wrap {
  overflow-x: auto;
  margin: 0.9rem 0 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.legal-table th,
.legal-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.legal-table thead th {
  background: var(--surface);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}
.legal-table tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 480px) {
  .legal-table { font-size: 0.86rem; }
  .legal-table th,
  .legal-table td { padding: 0.4rem 0.5rem; }
}

/* Auf schmalen Schirmen darf die Tabelle scrollen statt die Seite zu sprengen;
   der Rahmen zeigt, dass rechts noch etwas steht. */
.rec-table-wrap {
  margin-top: 0.5rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.rec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.rec-table th,
.rec-table td {
  padding: 0.45rem 0.7rem;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.rec-table thead th {
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
/* Hintergrund + Balken links kommen als Inline-Farbwert aus dem View-Builder
   (Heatmap grün→rot, #217) – dieselbe Aussage wie auf den Karten. */
.rec-table tbody tr {
  border-left: 4px solid var(--border);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.rec-table tbody tr:last-child { border-bottom: 0; }
/* Der Name ist die einzige Spalte, die umbrechen darf – sonst schiebt eine
   lange Marke die Zahlen aus dem Bild. */
.rec-t-name { white-space: normal; font-weight: 600; min-width: 9rem; }
.rec-t-rank { color: var(--muted); font-variant-numeric: tabular-nums; }
.rec-t-jump { font-weight: 600; font-variant-numeric: tabular-nums; }
.rec-t-price { color: var(--muted); font-variant-numeric: tabular-nums; }
.rec-t-route a { color: var(--accent-dark); font-weight: 600; }
.rec-th-short { display: none; }

/* Nur für Screenreader: Die Route-Spalte braucht eine Überschrift, sichtbar
   wäre sie über einem Link-Wort doppelt. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .rec-card { flex-wrap: wrap; }
  .rec-route { order: 3; margin-left: calc(2rem + 0.9rem); }
  .rec-report { order: 4; margin-left: 0.8rem; }
  /* Übersicht (#333): auf schmalen Schirmen untereinander statt nebeneinander. */
  .summary-row { flex-wrap: wrap; }
  .summary-station { flex-basis: 100%; }
  /* Tabelle (#337): enger setzen, damit alle Spalten ohne waagerechtes
     Scrollen passen – die Route-Spalte ist die handelnde und darf nicht aus
     dem Bild rutschen. Auf dem Telefon wird die Seite am häufigsten geöffnet,
     weil die ntfy-Nachricht dort ankommt. */
  .rec-table th,
  .rec-table td { padding: 0.4rem 0.25rem; }
  .rec-table { font-size: 0.78rem; }
  .rec-t-name { min-width: 0; word-break: break-word; }
  .rec-th-long { display: none; }
  .rec-th-short { display: inline; }
}

/* --- /wirkung: Zeitfenster-Steuerung (#202) ------------------------------ */
.wirkung-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.2rem 0 0.6rem;
}
.wirkung-pager {
  margin-left: auto;
  display: inline-flex;
  gap: 0.4rem;
}
@media (max-width: 560px) {
  .wirkung-pager { margin-left: 0; }
}

/* --- Nicht-Prod-Wasserzeichen (#554) -------------------------------------- */
.env-banner {
  background: #b4245c;
  color: #fff;
  text-align: center;
  padding: 0.35rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}
