/* kraftstoffbilliger.de – Basis-Styles (mobile first, ohne Framework) */
:root {
  --blue: #0a66d8;
  --blue-dark: #0750ab;
  --blue-deep: #0b2a5b;
  --blue-soft: #e8f1fd;
  --green: #12805c;
  --green-soft: #e3f5ee;
  --red: #c0392b;
  --red-soft: #fdecea;
  --ink: #142033;
  --muted: #5b6b82;
  --line: #dfe6ef;
  --bg: #f4f7fb;
  --card: #fff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 38, 77, .06), 0 4px 16px rgba(16, 38, 77, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
sup { font-size: .62em; top: -.55em; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.15rem; color: var(--blue-deep); }
.logo b { color: var(--blue); }
.logo:hover { text-decoration: none; }
.logo-icon { width: 28px; height: 28px; fill: var(--blue); }
.main-nav { display: flex; gap: 4px; overflow-x: auto; margin-left: auto; scrollbar-width: none; }
.main-nav a { white-space: nowrap; padding: 8px 12px; border-radius: 999px; color: var(--ink); font-weight: 500; font-size: .95rem; }
.main-nav a:hover { background: var(--blue-soft); color: var(--blue); text-decoration: none; }
@media (max-width: 720px) {
  .header-inner { padding-top: 8px; padding-bottom: 4px; }
  .main-nav { margin: 0 -16px; padding: 0 12px 6px; width: calc(100% + 32px); }
}
.crumbs { font-size: .85rem; color: var(--muted); padding-top: 12px; padding-bottom: 4px; }
.crumbs a { color: var(--muted); }

/* Hero */
.hero { background: linear-gradient(140deg, #0a66d8 0%, #0750ab 55%, #0b2a5b 100%); color: #fff; padding: 40px 0 72px; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.1rem; color: rgba(255,255,255,.9); max-width: 720px; }
.hero-compact { padding: 28px 0 56px; }
.search-card { background: #fff; color: var(--ink); border-radius: 18px; box-shadow: 0 12px 40px rgba(6, 30, 70, .25); padding: 18px; margin-top: 20px; }
.search-row { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .search-row { grid-template-columns: 1fr 200px auto; align-items: end; } }
.lift { margin-top: -44px; position: relative; }

/* Forms */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
input, select, textarea { width: 100%; font: inherit; color: inherit; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 14px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10,102,216,.15); }
.field { position: relative; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer; background: var(--blue); color: #fff; }
.btn:hover { background: var(--blue-dark); text-decoration: none; }
.btn-light { background: var(--blue-soft); color: var(--blue); }
.btn-light:hover { background: #d6e7fb; }
.btn-block { width: 100%; }
.btn-geo { background: none; border: 0; color: var(--blue); font-weight: 600; cursor: pointer; padding: 6px 0; font: inherit; font-size: .9rem; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); margin-top: 4px; overflow: hidden; }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 14px; font: inherit; cursor: pointer; }
.suggest button:hover, .suggest button.active { background: var(--blue-soft); }

/* Layout-Bausteine */
.section { padding-top: 28px; padding-bottom: 28px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 16px; }
.grid > .card, .grid > .stat { margin-top: 0; }
.card + .grid, .grid + .card, .grid + .grid { margin-top: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 980px) { .layout-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.stat .label { color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 1.9rem; font-weight: 700; color: var(--blue-deep); font-variant-numeric: tabular-nums; }
.stat .trend { font-size: .9rem; font-weight: 600; }
.up { color: var(--red); } .down { color: var(--green); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.chip { display: inline-block; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); font-weight: 600; font-size: .9rem; }
.chip:hover { border-color: var(--blue); text-decoration: none; }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge-open { background: var(--green-soft); color: var(--green); }
.badge-closed { background: #eef1f5; color: var(--muted); }
.badge-best { background: var(--green); color: #fff; }
.facts { margin: 0; padding: 0; list-style: none; }
.facts li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.facts li:last-child { border-bottom: 0; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.summary { background: var(--blue-soft); border-left: 4px solid var(--blue); border-radius: 10px; padding: 14px 16px; }

/* Ergebnisliste */
.stations { list-style: none; margin: 0; padding: 0; }
.station { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.station:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.station:last-child { border-radius: 0 0 var(--radius) var(--radius); border-bottom: 0; }
.station:hover, .station.hl { background: #f7fbff; }
.station a.name { color: var(--ink); font-weight: 600; }
.station .brand { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.station .addr { font-size: .88rem; color: var(--muted); }
.station .price { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--blue-deep); text-align: right; }
.station .price.best { color: var(--green); }
.station .price.none { font-size: .85rem; font-weight: 500; color: var(--muted); }
.station .dist { font-size: .8rem; color: var(--muted); text-align: right; }
.station.closed .name, .station.closed .price { color: var(--muted); }
.list-wrap { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Tabellen */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.today td { font-weight: 700; background: var(--blue-soft); }
.table-wrap { overflow-x: auto; }

/* Karte */
.map { height: 360px; border-radius: var(--radius); overflow: hidden; background: #e6edf5; position: relative; }
.map-full { height: calc(100vh - 160px); min-height: 420px; }
.fl-attr { position: absolute; left: 8px; bottom: 6px; z-index: 2; font-size: 11px; background: rgba(255,255,255,.85); padding: 2px 6px; border-radius: 6px; }
.fl-attr a { color: #334; }
.fl-hover { width: 18px; height: 18px; border-radius: 50%; background: rgba(10,102,216,.25); border: 2px solid var(--blue); pointer-events: none; }
.pin { background: var(--blue); color: #fff; font: 700 12px/1 var(--font); padding: 5px 7px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.25); cursor: pointer; white-space: nowrap; position: relative; }
.pin::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: inherit; }
.pin { border-color: var(--blue); }
.pin.green { background: var(--green); border-color: var(--green); }
.pin.red { background: var(--red); border-color: var(--red); }
.pin.grey { background: #8a97a8; border-color: #8a97a8; }
.pin.hl { transform: scale(1.18); z-index: 5; }
.maplibregl-popup-content { border-radius: 10px; font: 14px/1.4 var(--font); }

/* Diagramme (SVG, serverseitig) */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 13px var(--font); }
@media (max-width: 600px) { .chart .axis { font-size: 22px; } }
.chart .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; }
.chart .area { opacity: .12; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: .7rem; }
.heat div { aspect-ratio: 1; border-radius: 3px; }
.heat .h-label { aspect-ratio: auto; color: var(--muted); display: flex; align-items: center; }
.heat .h-hour { aspect-ratio: auto; color: var(--muted); text-align: center; }
.bars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 140px; }
.bars span { background: var(--blue); border-radius: 3px 3px 0 0; min-height: 2px; }
.bars span.best { background: var(--green); }

/* FAQ */
details { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px; }
summary { font-weight: 600; cursor: pointer; }
details[open] summary { margin-bottom: 8px; }

/* Footer */
.site-footer { background: var(--blue-deep); color: #c7d4ea; margin-top: 48px; padding: 36px 0 20px; }
.site-footer a { color: #fff; display: block; padding: 3px 0; }
.site-footer h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: #8fa6cc; margin-bottom: 10px; }
.site-footer .muted { color: #a9bbd9; font-size: .9rem; }
.logo-footer { color: #fff; margin-bottom: 10px; }
.logo-footer b { color: #7fb6ff; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 14px; font-size: .85rem; }
.footer-bottom a { display: inline; color: #c7d4ea; }
.bars-axis { display: flex; justify-content: space-between; margin-top: 4px; }

/* Gestapelte Boxen mit festem Abstand (Spalten, Seitenleisten) */
.stack > * + *, aside > * + * { margin-top: 16px; }
.stack > .card, aside > .card { margin-top: 0; }
.stack > * + .card, aside > * + .card { margin-top: 16px; }
[id] { scroll-margin-top: 84px; }
.card h2 { font-size: 1.2rem; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.card-head h2, .card-head .chips { margin: 0; }
.section-tight { margin: 24px 0; }
.notice { color: var(--muted); }

/* Kopfbereich einer Detailseite */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.page-head h1 { margin: 6px 0 4px; }
.page-head p { margin: 0 0 6px; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.brand-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 600px) { .page-head-actions, .page-head-actions .btn { width: 100%; } }

/* Preiskacheln */
.price-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 8px; }
.price-tile { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; border-top: 4px solid var(--blue); }
.price-tile .label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.price-tile .value { font-size: 1.9rem; font-weight: 700; color: var(--blue-deep); font-variant-numeric: tabular-nums; line-height: 1.2; }
.price-tile .value small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.price-tile-extra { border-top-color: #9fb3cc; }
.price-tile-extra .value { font-size: 1.5rem; }

/* Öffnungszeiten, eingebettete Details */
table.hours td { padding: 7px 6px; }
details.embed { box-shadow: none; padding: 0; margin: 14px 0 0; background: none; border-top: 1px solid var(--line); padding-top: 12px; }
details.embed summary { font-size: .92rem; color: var(--blue); }
details.embed textarea { font: 12px/1.4 ui-monospace, Consolas, monospace; margin-top: 6px; }
