/* Webseiten-Baukasten – Grund-Stylesheet
   Farben, Schriften, Größen und Varianten kommen aus der Design-Seite der Verwaltung
   (inc/design.php erzeugt die CSS-Variablen inline im <head>). Die Werte hier sind nur Rückfallwerte. */
:root {
  --bg: #f5f3ee; --surface: #ffffff; --surface-2: #ece8df; --ink: #1e2622; --ink-2: #46524b; --muted: #6a776f;
  --line: #dad5ca; --heading: #1e2622; --accent: #2d5a43; --accent-ink: #ffffff; --accent-soft: #e2ece5;
  --link: #2d5a43; --link-hover: #a8452a; --clay: #a8452a;
  --header-bg: #ffffff; --header-text: #1e2622; --tagline: #6a776f; --header-border: #dad5ca;
  --menu-text: #46524b; --menu-bg: transparent; --menu-hover-text: #1e2622; --menu-hover-bg: #ece8df;
  --menu-active-text: #2d5a43; --menu-active-bg: #e2ece5;
  --sub-bg: #ffffff; --sub-text: #46524b; --sub-hover-bg: #ece8df; --sub-hover-text: #1e2622;
  --btn-bg: #2d5a43; --btn-text: #ffffff; --btn-hover-bg: #23493a; --btn-hover-text: #ffffff;
  --hero-text: #ffffff; --hero-overlay-color: #0a140e; --hero-overlay-alpha: .72;
  --footer-bg: #ffffff; --footer-text: #6a776f; --footer-link: #46524b;
  --chart: #2d5a43; --chart-fill: rgba(45, 90, 67, .12);
  --shadow: 0 1px 2px rgba(30, 38, 34, .06), 0 6px 20px rgba(30, 38, 34, .06);
  --radius: 10px; --btn-radius: 8px; --menu-radius: 8px; --transition: 200ms;
  --wrap: 1120px; --header-wrap: 1440px; --header-h: 68px; --logo-h: 50px; --hero-h: 420px; --hero-h-mobile: 220px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-menu: var(--font-body); --font-brand: var(--font-head);
  --sans: var(--font-body); --serif: var(--font-head); --head-weight: 600; --line-height: 1.65;
  --fs-body: 17px; --fs-h1: 38px; --fs-h2: 23px; --fs-h3: 18px; --fs-menu: 15px; --fs-submenu: 14px; --fs-brand: 21px;
  --fs-tagline: 13px; --fs-hero: 48px; --fs-hero-kicker: 13px; --fs-button: 16px; --fs-caption: 15px; --fs-footer: 14px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--line-height);
  display: flex; flex-direction: column; min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .18em; transition: color var(--transition); }
[data-underline="0"] .content a:not(.btn):not(:hover) { text-decoration: none; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Kopf */
.site-header { background: var(--header-bg); border-bottom: 1px solid var(--header-border); position: relative; z-index: 30; }
[data-sticky="1"] .site-header { position: sticky; top: 0; }
[data-hshadow="1"] .site-header { box-shadow: 0 2px 14px rgba(0, 0, 0, .12); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); max-width: var(--header-wrap); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--header-text); text-decoration: none; margin-right: auto; flex-shrink: 0; }
.brand:hover { color: var(--header-text); }
.brand img { height: var(--logo-h); width: auto; max-width: 260px; object-fit: contain; }
.brand strong { display: block; font-family: var(--font-brand); font-size: var(--fs-brand); font-weight: var(--head-weight); line-height: 1.1; letter-spacing: .01em; }
.brand small { display: block; white-space: nowrap; color: var(--tagline); font-size: var(--fs-tagline); }
.main-nav { min-width: 0; }
[data-menu-align="left"] .brand { margin-right: 24px; }
[data-menu-align="left"] .main-nav { margin-right: auto; }
[data-menu-align="center"] .brand { margin-right: 0; }
[data-menu-align="center"] .main-nav { margin: 0 auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
.nav-list > li { position: relative; }
.nav-item { display: flex; align-items: center; }
.nav-list a { display: block; padding: 8px 10px; border-radius: var(--menu-radius); color: var(--menu-text); background: var(--menu-bg);
  text-decoration: none; font-family: var(--font-menu); font-size: var(--fs-menu); white-space: nowrap;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition); }
[data-menu-upper="1"] .nav-list > li > .nav-item > a, [data-menu-upper="1"] .nav-list > li > a { text-transform: uppercase; letter-spacing: .05em; }
/* Hover-Varianten Hauptmenü */
[data-menu-hover="background"] .nav-list > li > a:hover, [data-menu-hover="background"] .nav-item > a:hover { background: var(--menu-hover-bg); color: var(--menu-hover-text); }
[data-menu-hover="underline"] .nav-list > li > a:hover, [data-menu-hover="underline"] .nav-item > a:hover { color: var(--menu-hover-text); box-shadow: inset 0 -3px 0 var(--menu-hover-text); border-radius: 0; }
[data-menu-hover="text"] .nav-list > li > a:hover, [data-menu-hover="text"] .nav-item > a:hover { color: var(--menu-hover-text); }
.nav-list a[aria-current="page"], .nav-list .is-active-parent > .nav-item > a { background: var(--menu-active-bg); color: var(--menu-active-text); font-weight: 600; }
/* Untermenü (1 Ebene) */
.sub-toggle { background: none; border: 0; color: var(--menu-text); cursor: pointer; padding: 6px 4px; margin-left: -4px; border-radius: var(--menu-radius); font: inherit; line-height: 1; }
.sub-toggle::before { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--transition); }
.has-sub.is-open > .nav-item .sub-toggle::before { transform: translateY(2px) rotate(-135deg); }
.sub-nav { list-style: none; margin: 0; padding: 6px; position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--sub-bg);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 40;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity var(--transition), transform var(--transition), visibility var(--transition); }
.has-sub:hover > .sub-nav, .has-sub:focus-within > .sub-nav, .has-sub.is-open > .sub-nav { opacity: 1; visibility: visible; transform: none; }
.sub-nav a { color: var(--sub-text); background: transparent; font-size: var(--fs-submenu); white-space: normal; }
.sub-nav a:hover { background: var(--sub-hover-bg); color: var(--sub-hover-text); box-shadow: none; border-radius: var(--menu-radius); }
.sub-nav a[aria-current="page"] { background: var(--menu-active-bg); color: var(--menu-active-text); }
.nav-list > li:last-child > .sub-nav { left: auto; right: 0; }
/* Menü-Knopf */
.nav-toggle { display: none; background: none; border: 1px solid var(--header-border); border-radius: 8px; width: 44px; height: 40px; position: relative; cursor: pointer; color: var(--header-text); }
.nav-toggle span:first-child, .nav-toggle span:first-child::before, .nav-toggle span:first-child::after {
  position: absolute; left: 11px; width: 20px; height: 2px; background: currentColor; content: ""; transition: transform .2s;
}
.nav-toggle span:first-child { top: 19px; }
.nav-toggle span:first-child::before { left: 0; top: -6px; }
.nav-toggle span:first-child::after { left: 0; top: 6px; }
.nav-toggle[aria-expanded="true"] span:first-child { background: transparent; }
.nav-toggle[aria-expanded="true"] span:first-child::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:first-child::after { transform: translateY(-6px) rotate(-45deg); }

/* Kompaktes Menü (☰): per JavaScript, sobald das Menü nicht mehr in eine Zeile passt;
   ohne JavaScript greift die Breiten-Regel darunter */
.site-header.compact .nav-toggle { display: block; }
.site-header.compact .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--header-bg); border-bottom: 1px solid var(--header-border); box-shadow: var(--shadow); display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.site-header.compact .main-nav.open { display: block; }
.site-header.compact .nav-list { flex-direction: column; justify-content: flex-start; padding: 8px 16px 16px; }
.site-header.compact .nav-list a { padding: 12px; white-space: normal; }
.site-header.compact .nav-item a { flex: 1; }
.site-header.compact .sub-toggle { padding: 12px 14px; }
.site-header.compact .sub-nav { position: static; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 2px solid var(--line); border-radius: 0; margin: 0 0 6px 14px; padding: 0 0 0 6px; min-width: 0; background: transparent; }
.site-header.compact .has-sub.is-open > .sub-nav { display: block; }
.site-header.compact .sub-nav a { color: var(--menu-text); }
.site-header.compact .sub-nav a:hover { background: var(--menu-hover-bg); color: var(--menu-hover-text); }
.site-header.compact .sub-nav a[aria-current="page"] { background: var(--menu-active-bg); color: var(--menu-active-text); }
.site-header.compact .sub-toggle { color: var(--menu-text); }
@media (max-width: 1080px) {
  .no-js .nav-toggle { display: block; }
  .no-js .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--header-bg); border-bottom: 1px solid var(--header-border); box-shadow: var(--shadow); display: none; }
  .no-js .main-nav.open { display: block; }
  .no-js .nav-list { flex-direction: column; padding: 8px 16px 16px; }
  .no-js .nav-list a { padding: 12px; }
  .no-js .sub-nav { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; margin-left: 14px; }
}
@media (max-width: 420px) {
  .brand small { white-space: normal; }
}

/* Kopfbild */
.hero {
  position: relative; min-height: var(--hero-h); background: #2b3a31 center/cover no-repeat;
  display: flex; align-items: flex-end; color: var(--hero-text);
}
@media (max-width: 1079px) { .hero { min-height: max(var(--hero-h-mobile), min(var(--hero-h), 45vw)); } }
.hero.is-draggable { cursor: grab; user-select: none; }
.hero.is-dragging { cursor: grabbing; }
.hero-hint { position: absolute; top: 12px; right: 16px; z-index: 2; background: rgba(0,0,0,.55); color: #fff; font-size: .8rem; padding: 4px 10px; border-radius: 99px; opacity: 0; transition: opacity .25s; pointer-events: none; }
.hero.is-draggable:hover .hero-hint { opacity: 1; }
.hero.is-dragging .hero-hint { opacity: 0; }
.hero::before { pointer-events: none; content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, var(--hero-overlay-color)); opacity: var(--hero-overlay-alpha); }
.hero .wrap { position: relative; padding-bottom: 28px; }
.hero-kicker { margin: 0; text-transform: uppercase; letter-spacing: .12em; font-size: var(--fs-hero-kicker); opacity: .9; }
.hero-title { margin: 4px 0 0; font-family: var(--font-head); font-size: var(--fs-hero); font-weight: var(--head-weight); line-height: 1.1; text-shadow: 0 2px 12px rgba(0,0,0,.35); }

/* Inhalt */
.content { flex: 1; padding-top: 36px; padding-bottom: 56px; }
h1, h2, h3, h4 { color: var(--heading); }
.content > h1 { font-family: var(--font-head); font-size: var(--fs-h1); font-weight: var(--head-weight); line-height: 1.15; margin: 0 0 20px; }
.prose h2, .content h2 { font-family: var(--font-head); font-size: var(--fs-h2); font-weight: var(--head-weight); line-height: 1.25; margin: 1.8em 0 .5em; }
.prose h3 { font-family: var(--font-body); font-size: var(--fs-h3); font-weight: var(--head-weight); line-height: 1.3; margin: 1.5em 0 .4em; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose li h3 { margin-top: .8em; }
.prose blockquote { margin: 1.4em 0; padding: 12px 20px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.prose img { border-radius: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; }
.outro { margin-top: 32px; }
.content > .prose:first-of-type > :first-child { margin-top: 0; }
small { color: var(--muted); }
@media (max-width: 600px) {
  .prose img[style*="float"] { float: none !important; display: block; margin: 0 auto 16px !important; }
}

/* Chronik */
.chronik-heading { margin-top: 1.2em; }
.chronik { list-style: none; margin: 24px 0; padding: 0; position: relative; max-width: 860px; }
.chronik::before { content: ""; position: absolute; left: 104px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.chronik-item { display: grid; grid-template-columns: 92px 1fr; gap: 28px; padding: 10px 0; position: relative; }
.chronik-item::before { content: ""; position: absolute; left: 99px; top: 19px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.chronik-year { font-family: var(--font-head); font-weight: var(--head-weight); font-size: calc(var(--fs-body) * 1.05); line-height: 1.6; color: var(--accent); text-align: right; }
.chronik-text p { margin: 0 0 .5em; }
@media (max-width: 600px) {
  .chronik::before { left: 6px; }
  .chronik-item { grid-template-columns: 1fr; gap: 2px; padding-left: 28px; }
  .chronik-item::before { left: 1px; top: 16px; }
  .chronik-year { text-align: left; }
}

/* Tabelle */
.table-blocks { display: grid; gap: 16px; margin: 24px 0; }
.table-blocks.is-split { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-items: start; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data-table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); padding: 8px 12px; }
.data-table td { padding: 6px 12px; border-top: 1px solid var(--line); }
.data-table td.num, .data-table th:not(:first-child) { text-align: right; }
.data-table tbody tr:hover { background: var(--accent-soft); }

/* Diagramm */
.chart { margin: 24px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 8px; }
.chart-title { font: 600 1.05rem/1.3 var(--sans); margin-bottom: 8px; }
.chart-box { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--muted); stroke-width: 1; }
.chart .tick { fill: var(--muted); font: 12px var(--sans); }
.chart .line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--chart-fill); }
.chart circle.dot { fill: var(--chart); stroke: var(--surface); stroke-width: 2; r: 4; transition: r .1s; }
.chart circle.dot.on { r: 6; }
.chart rect.bar { fill: var(--chart); }
.chart rect.bar.on { opacity: .75; }
.chart .crosshair { stroke: var(--muted); stroke-dasharray: 3 3; opacity: 0; }
.chart .crosshair.on { opacity: 1; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: 6px; font-size: .85rem; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
.chart-tip b { font-variant-numeric: tabular-nums; }
.chart-note { margin: 6px 0 0; font-size: .8rem; color: var(--muted); }

/* Galerie */
.gallery { display: grid; gap: 20px; margin: 24px 0; }
.gallery.cols-1 { grid-template-columns: 1fr; }
.gallery.cols-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.gallery.cols-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.gallery.cols-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.gallery-item { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
[data-cards="shadow"] .gallery-item, [data-cards="shadow"] .markers-stage { box-shadow: var(--shadow); }
.gallery-link { display: block; position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.gallery-link img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
[data-img-zoom="1"] .gallery-link:hover img { transform: scale(1.04); }
.gallery-badge { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: .78rem; padding: 4px 10px; border-radius: 99px; }
.gallery-item figcaption { padding: 12px 14px 14px; font-size: var(--fs-caption); }
.gallery-item figcaption strong { display: block; font-size: calc(var(--fs-caption) * 1.08); }
.gallery-item figcaption span { color: var(--ink-2); display: block; margin-top: 2px; }
.cols-3 .gallery-link, .cols-4 .gallery-link { aspect-ratio: 3 / 4; }
.cols-3 .gallery-link img, .cols-4 .gallery-link img { object-position: top; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8,12,10,.94); display: flex; align-items: center; justify-content: center; padding: 48px 56px; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 4px; }
.lightbox figcaption { color: #e9eee9; text-align: center; margin-top: 12px; font-size: .95rem; }
.lightbox figcaption small { color: #a8b3ac; display: block; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox { padding: 56px 8px; } .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; } }

/* Video */
.video { margin: 24px 0 32px; }
.video h2 { margin-top: 0; }
.video-box { background: #000; border-radius: var(--radius); overflow: hidden; }
.video-box video { display: block; width: 100%; max-height: 80vh; }

/* Bild mit Markierungen */
.markers { margin: 20px 0; }
.markers-tools { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-bottom: 10px; font-size: .92rem; }
.markers-hint { color: var(--muted); }
.switch { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.markers-stage { position: relative; border-radius: var(--radius); overflow: hidden; }
.markers-stage img { display: block; width: 100%; height: auto; }
.markers-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mk { fill: transparent; stroke: transparent; stroke-width: 4; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .15s, stroke .15s; }
.mk:hover, .mk.on, .show-all .mk { fill: rgba(255, 214, 102, .22); stroke: #ffd666; }
.mk.on { fill: rgba(255, 214, 102, .38); }
.markers-tip { position: absolute; pointer-events: none; background: rgba(15,20,17,.9); color: #fff; padding: 5px 10px; border-radius: 6px; font-size: .9rem; transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; }
.markers-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.markers-list button { font: inherit; font-size: .88rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; cursor: pointer; }
.markers-list button:hover, .markers-list button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.markers-orig { font-size: .88rem; color: var(--muted); }

/* Karte / Einbettungen mit Zustimmung */
.map { margin-top: 40px; }
.consent-embed { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; text-align: center; }
.consent-embed.is-video { aspect-ratio: 16 / 9; }
.consent-inner { max-width: 420px; padding: 20px; }
.consent-inner p { margin: 0 0 10px; }
.consent-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-link { font-size: .9rem; }

/* Formular */
.contact { max-width: 640px; margin: 24px 0; display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
.field input, .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.field.check label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.field.check input { width: auto; margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn { display: inline-block; font-family: var(--font-body); font-weight: 600; font-size: var(--fs-button); line-height: 1.3; background: var(--btn-bg); color: var(--btn-text);
  border: 2px solid var(--btn-bg); border-radius: var(--btn-radius); padding: 10px 20px; cursor: pointer; text-decoration: none; justify-self: start;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition); }
[data-btn-upper="1"] .btn { text-transform: uppercase; letter-spacing: .05em; }
.btn:hover { color: var(--btn-text); }
[data-btn-hover="color"] .btn:hover, [data-btn-hover="lift"] .btn:hover, [data-btn-hover="grow"] .btn:hover { background: var(--btn-hover-bg); border-color: var(--btn-hover-bg); color: var(--btn-hover-text); }
[data-btn-hover="lift"] .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
[data-btn-hover="grow"] .btn:hover { transform: scale(1.04); }
[data-btn-hover="outline"] .btn:hover { background: transparent; color: var(--btn-bg); }
.notice { padding: 14px 18px; border-radius: var(--radius); margin: 20px 0; }
.notice ul { margin: 0; padding-left: 1.2em; }
.notice.ok { background: var(--accent-soft); border: 1px solid var(--accent); }
.notice.err { background: #fbe9e4; border: 1px solid var(--clay); color: #6d2412; }


/* Fuß */
.site-footer { background: var(--footer-bg); border-top: 1px solid var(--line); padding: 24px 0 28px; font-size: var(--fs-footer); color: var(--footer-text); }
.footer-nav { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-nav a { color: var(--footer-link); }
.footer-nav a:hover { color: var(--link-hover); }
.footer-meta, .footer-note { margin: 0; }
.top-anchor { position: absolute; top: 0; left: 0; }

/* Redaktions-/Vorschau-Leiste */
.editor-bar, .preview-bar { background: #1e2622; color: #fff; font-size: .85rem; display: flex; gap: 16px; align-items: center; padding: 6px 16px; }
.editor-bar a { color: #b9e3c9; }
.editor-bar span { font-weight: 600; }
.preview-bar { background: var(--clay); justify-content: space-between; flex-wrap: wrap; font-weight: 600; position: sticky; top: 0; z-index: 40; padding: 8px 16px; }
.preview-back { background: #fff; color: #1e2622; padding: 6px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.preview-back:hover { background: #f1e5df; color: #1e2622; }
.prose table { margin: 1.2em 0; max-width: 100%; display: block; overflow-x: auto; background: var(--surface); }
.prose th { background: var(--surface-2); text-align: left; }

@media print {
  .site-header, .site-footer, .editor-bar, .nav-toggle, .consent-embed, .markers-tools { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Sprungziele nicht unter dem festen Kopfbereich verstecken */
.content [id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Zeitungsfundstellen */
.finds { margin: 16px 0 32px; }
.finds-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: sticky; top: var(--header-h); z-index: 5; background: var(--bg); padding: 10px 0; }
.finds-tools input, .finds-tools select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.finds-tools input { flex: 1 1 240px; min-width: 0; }
.finds-tools select { max-width: 100%; }
.finds-count { color: var(--muted); font-size: .9rem; }
.finds-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.chip { font: inherit; font-size: .85rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 99px; padding: 4px 12px; cursor: pointer; }
.chip span { color: var(--muted); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.on span { color: inherit; opacity: .8; }
.finds-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.find { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.find-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.find-head time { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.find-paper { color: var(--ink-2); font-size: .92rem; }
.find-tag { font-size: .72rem; background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 1px 8px; }
.find-text { font-family: var(--serif); font-size: var(--fs-caption); margin: 6px 0; color: var(--ink-2); overflow-wrap: anywhere; }
.find-text mark { background: #ffe9a8; color: #1e2622; padding: 0 2px; border-radius: 2px; }
.finds-more { margin-top: 14px; }
.finds-source { margin-top: 12px; }
.chronik-text em { color: var(--muted); font-style: normal; font-size: .9rem; }

/* Popup (Datenschutz im Kontaktformular) */
.popup { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.popup[open] { display: flex; flex-direction: column; }
.popup::backdrop { background: rgba(10, 16, 12, .6); }
.popup-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.popup-head h2 { margin: 0; font-family: var(--font-head); font-weight: var(--head-weight); font-size: var(--fs-h2); line-height: 1.2; }
.popup-close { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted); width: 40px; height: 40px; border-radius: 8px; }
.popup-close:hover { background: var(--surface-2); color: var(--ink); }
.popup-body { overflow-y: auto; padding: 16px 20px; max-width: none; font-size: .95rem; overscroll-behavior: contain; }
.popup-body h2 { font-size: 1.15rem; }
.popup-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }

/* Bildausrichtung aus dem Editor */
.prose .img-left { float: left; margin: 4px 24px 12px 0; max-width: 50%; }
.prose .img-right { float: right; margin: 4px 0 12px 24px; max-width: 50%; }
.prose .img-center { display: block; margin: 16px auto; }
.prose .img-full { display: block; width: 100%; }
.prose::after { content: ""; display: table; clear: both; }
@media (max-width: 600px) { .prose .img-left, .prose .img-right { float: none; max-width: 100%; margin: 0 0 16px; } }

/* dichte Zeitreihen: Punkte nur beim Überfahren */
.chart svg.dense circle.dot { opacity: 0; }
.chart svg.dense circle.dot.on { opacity: 1; }
