:root{--akzent:#2e5b3c;--akzent-hell:#e7efe9;--akzent-dunkel:#8cc49b}
:root {
  --text: #1c1f1d;
  --leise: #5b625d;
  --linie: #dfe3df;
  --flaeche: #ffffff;
  --grund: #f6f7f4;
  --akzent-text: #ffffff;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8ebe8;
    --leise: #a3aba5;
    --linie: #333a35;
    --flaeche: #1b1f1c;
    --grund: #121513;
    --akzent: var(--akzent-dunkel);
    --akzent-hell: #233026;
    --akzent-text: #0f1310;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--grund);
}
a { color: var(--akzent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); letter-spacing: -.01em; }
h2 { font-size: 1.3rem; margin-top: 2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.huelle { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 30; }
.kopf .huelle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.logo { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: .5rem; }
.logo::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--akzent); box-shadow: inset 0 0 0 4px var(--flaeche), inset 0 0 0 9px var(--akzent); }
.kopf nav a { color: var(--leise); text-decoration: none; margin-left: 1rem; font-size: .95rem; }
.kopf nav a:hover { color: var(--akzent); }

main { padding: 1.25rem 0 3rem; }
.krumen { font-size: .875rem; color: var(--leise); margin-bottom: .75rem; }
.krumen ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.krumen li + li::before { content: "›"; margin-right: .25rem; color: var(--leise); }
.krumen a { color: var(--leise); }
.einleitung { font-size: 1.05rem; color: var(--leise); max-width: 50rem; }
.seitenkopf { margin-bottom: 1rem; }
.seitenkopf h1 { margin-bottom: .3rem; }
.seitenkopf .einleitung { margin: 0; }

.knopf { font: inherit; font-weight: 600; padding: .65rem 1rem; border-radius: 8px; border: 1px solid var(--akzent); background: var(--akzent); color: var(--akzent-text); cursor: pointer; text-decoration: none; display: inline-block; }
.knopf.zweit { background: transparent; color: var(--akzent); }
.knopf:disabled { opacity: .6; cursor: wait; }
.hinweis-klein { font-size: .875rem; color: var(--leise); margin-top: .5rem; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Karte mit Suche, Filtern und Liste ---------- */
.finder { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: .75rem; margin-bottom: 2rem; }
.leiste { display: flex; flex-wrap: wrap; gap: .5rem; }
.suchfeld { position: relative; flex: 1 1 260px; }
.suchfeld input, .leiste select { width: 100%; font: inherit; padding: .62rem .9rem; border: 1px solid var(--linie); border-radius: 8px; background: var(--grund); color: var(--text); }
.leiste select { width: auto; flex: 0 1 230px; }
.suchfeld input:focus, .leiste select:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
.vorschlaege { list-style: none; margin: .25rem 0 0; padding: 0; position: absolute; top: 100%; left: 0; right: 0; z-index: 20; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / .14); max-height: 340px; overflow: auto; }
.vorschlaege:empty { display: none; }
.vorschlaege button { all: unset; display: block; width: 100%; padding: .55rem .9rem; cursor: pointer; box-sizing: border-box; }
.vorschlaege button:hover, .vorschlaege button:focus { background: var(--akzent-hell); }
.vorschlaege small { color: var(--leise); margin-left: .4rem; }

.filterleiste { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .6rem; }
.filterleiste .gruppe { font-size: .78rem; color: var(--leise); margin-left: .6rem; text-transform: uppercase; letter-spacing: .04em; }
.filterleiste .gruppe:first-child { margin-left: 0; }
.chip { font: inherit; font-size: .875rem; padding: .28rem .75rem; border-radius: 999px; border: 1px solid var(--linie); background: var(--grund); color: var(--text); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--akzent); }
.chip[aria-pressed="true"] { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.filter-weg { all: unset; cursor: pointer; font-size: .85rem; color: var(--akzent); text-decoration: underline; margin-left: .5rem; white-space: nowrap; }
@media (max-width: 700px) {
  .filterleiste { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: thin; }
  .filterleiste > * { flex: 0 0 auto; }
}
.finder-info { font-size: .875rem; color: var(--leise); margin: .6rem 0; min-height: 1.4em; }
.finder-info b { color: var(--text); }

.flaeche { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.finder .karte { height: 58vh; min-height: 340px; border-radius: 8px; overflow: hidden; border: 1px solid var(--linie); background: var(--grund); }
.liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
@media (min-width: 920px) {
  .flaeche { grid-template-columns: minmax(0, 1fr) 370px; }
  .finder .karte, .liste-huelle { height: calc(100vh - 240px); min-height: 520px; max-height: 820px; }
  .liste-huelle { overflow-y: auto; padding-right: .3rem; scrollbar-width: thin; }
}
.treffer { border: 1px solid var(--linie); border-radius: 8px; padding: .6rem .8rem; background: var(--flaeche); cursor: pointer; }
.treffer:hover { border-color: var(--akzent); }
.treffer h3 { font-size: 1rem; margin: 0 0 .1rem; }
.treffer h3 a { text-decoration: none; }
.treffer h3 a:hover { text-decoration: underline; }
.treffer .meta { margin: 0; font-size: .875rem; color: var(--leise); }
.treffer .meta b { color: var(--text); }
.treffer-links { margin: .4rem 0 0; display: flex; gap: .9rem; font-size: .85rem; }
.auf-karte { all: unset; cursor: pointer; color: var(--akzent); text-decoration: underline; }
.liste .mehr { font-size: .875rem; color: var(--leise); padding: .4rem .2rem; }

.finder-klein { padding: 0; border: 0; background: none; margin: 1rem 0; }
.finder-klein .karte { height: 300px; min-height: 0; }
.bezugspunkt { width: 16px; height: 16px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 3px rgb(37 99 235 / .3), 0 1px 4px rgb(0 0 0 / .3); }

.maplibregl-popup-content { font: inherit; font-size: .9rem; line-height: 1.45; padding: .7rem .9rem; border-radius: 8px; background: var(--flaeche); color: var(--text); box-shadow: 0 6px 20px rgb(0 0 0 / .2); }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--flaeche); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip, .maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--flaeche); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--flaeche); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--flaeche); }
.maplibregl-popup-close-button { color: var(--leise); font-size: 1.25rem; padding: 0 .45rem; }
.pop strong { display: block; margin-right: 1rem; }
.pop strong a { text-decoration: none; }
.pop p { margin: .15rem 0 0; color: var(--leise); }
.pop .pop-links { display: flex; gap: .8rem; margin-top: .5rem; }

/* ---------- Übrige Bausteine ---------- */
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .5rem; list-style: none; padding: 0; margin: 0; }
.raster a { display: flex; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; text-decoration: none; color: var(--text); }
.raster a:hover { border-color: var(--akzent); }
.raster a.an { border-color: var(--akzent); box-shadow: inset 0 0 0 1px var(--akzent); }
.raster span { color: var(--leise); font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.chips a { display: inline-block; padding: .4rem .8rem; border-radius: 999px; background: var(--akzent-hell); color: var(--akzent); text-decoration: none; font-weight: 600; font-size: .925rem; }
.chips a:hover, .chips a.an { background: var(--akzent); color: var(--akzent-text); }
.chips span { font-weight: 400; opacity: .8; }

.marken { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; margin: .45rem 0 0; }
.marken li { font-size: .78rem; padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--linie); color: var(--leise); }

.zweispaltig { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .zweispaltig { grid-template-columns: minmax(0, 1fr) 320px; } }
.kasten { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.kasten h2 { margin-top: 0; font-size: 1.1rem; }
.fakten { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; }
.fakten dt { color: var(--leise); }
.fakten dd { margin: 0; }
.aktionen { display: flex; flex-direction: column; gap: .5rem; order: -1; }
@media (min-width: 860px) { .aktionen { order: 0; } }
.aktionen .knopf { text-align: center; }
.route { display: grid; gap: .3rem; }
.route > span { font-size: .875rem; color: var(--leise); }
.route > div { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.route .knopf { padding-left: .5rem; padding-right: .5rem; }
.quellen { font-size: .9rem; color: var(--leise); padding-left: 1.1rem; }
.quellen li { margin-bottom: .3rem; }
.hinweis { border-left: 3px solid var(--akzent); padding: .6rem 1rem; background: var(--akzent-hell); border-radius: 0 8px 8px 0; }

.kasten + .kasten { margin-top: 1rem; }
.nah { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.nah li { border: 1px solid var(--linie); border-radius: 8px; padding: .6rem .8rem; background: var(--flaeche); }
.nah a { font-weight: 600; text-decoration: none; }
.nah a:hover { text-decoration: underline; }
.nah .meta { display: block; font-size: .875rem; color: var(--leise); }
.ratgeber-kurz { margin-top: 1rem; padding: .9rem 1.1rem; }
.ratgeber-kurz ul { margin: 0; padding-left: 1.1rem; }
.ratgeber-kurz li { margin-bottom: .35rem; }
@media (max-width: 859px) { .ratgeber-kurz { display: none; } }

.artikel-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.artikel-liste a { display: block; height: 100%; padding: 1rem 1.1rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.artikel-liste a:hover { border-color: var(--akzent); }
.artikel-liste strong { display: block; color: var(--akzent); margin-bottom: .25rem; }
.artikel-liste span { font-size: .925rem; color: var(--leise); }
article.prosa { margin-bottom: 1rem; }
.prosa li { margin-bottom: .35rem; }
.prosa .hinweis { margin: 1.25rem 0; }
.hinweis.entwurf { border-left-color: #c2410c; }
code { font-size: .9em; background: var(--grund); border: 1px solid var(--linie); border-radius: 4px; padding: 0 .3em; overflow-wrap: anywhere; }

details.abc { margin-top: 2rem; }
details.abc summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; }
.abc h3 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
h2 small { font-weight: 400; color: var(--leise); font-size: .9rem; }
pre { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: .75rem 1rem; overflow-x: auto; }
mark { background: #ffe58a; color: #1c1f1d; padding: 0 .2em; }
.prosa { max-width: 46rem; }
.prosa h2 { font-size: 1.15rem; }

.fuss { border-top: 1px solid var(--linie); background: var(--flaeche); font-size: .875rem; color: var(--leise); padding: 1.5rem 0; }
.fuss .huelle { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.fuss a { color: var(--leise); }
.fuss nav a { margin-right: 1rem; }
