/*
Theme Name: Schädlingsinfo
Theme URI: https://schaedlingsbekaempfung-info.de
Author: Toni
Description: Ratgeber-Theme für schaedlingsbekaempfung-info.de — Schädlingslexikon A–Z, Ratgeber und Soforthilfe. Redesign 2026.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: schaedlingsinfo
*/

/* ================= Design-Tokens ================= */
:root {
	--green-950: #14290e;
	--green-900: #1c3a13;
	--green-800: #24511a;
	--green-700: #2d5a1e;   /* Schild-Grün aus dem Logo */
	--green-600: #3a7027;
	--leaf: #7cb454;        /* Blatt-Grün */
	--leaf-soft: #e9f2e0;
	--ink: #232830;         /* Anthrazit aus dem Logo */
	--ink-soft: #4b5563;
	--muted: #6b7280;
	--amber: #e8a020;       /* Punkt-Orange aus dem Logo */
	--amber-soft: #fdf3e0;
	--red: #c0392b;
	--red-soft: #fdeae7;
	--bg: #f6f8f3;
	--card: #ffffff;
	--line: #e4e8de;
	--radius: 14px;
	--radius-sm: 9px;
	--shadow: 0 1px 2px rgba(20, 41, 14, .06), 0 8px 24px -12px rgba(20, 41, 14, .14);
	--shadow-lift: 0 2px 4px rgba(20, 41, 14, .08), 0 16px 36px -14px rgba(20, 41, 14, .22);
	--font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
	--maxw: 1200px;
	--maxw-prose: 760px;
	/* Höhe der klebenden Kopfbereiche - wird pro Breakpoint überschrieben und
	   steuert, wohin Sprungmarken scrollen. */
	--sticky-top: 215px;
}

/* ================= Reset & Basis ================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-600); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; }
/* Fokusring: dunkelgrün erreicht auf hellen Flächen über 7:1 (Amber lag bei 2:1).
   Auf dunklen Flächen wird unten auf Weiß umgeschaltet. */
:focus-visible { outline: 3px solid var(--green-700); outline-offset: 2px; border-radius: 3px; }
.site-footer :focus-visible,
.cta-box :focus-visible { outline-color: #fff; }

.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
/* Sprunglink muss bei Tastaturfokus sichtbar werden */
.screen-reader-text:focus,
.screen-reader-text:focus-visible {
	position: fixed; left: 12px; top: 12px; z-index: 100;
	width: auto; height: auto; overflow: visible;
	clip: auto; clip-path: none; white-space: normal;
	padding: 12px 20px; background: var(--card); color: var(--green-800);
	font-weight: 700; border-radius: var(--radius-sm); box-shadow: var(--shadow-lift);
}
/* Sprungziel nicht unter dem Sticky-Header parken */
#content, [id] { scroll-margin-top: 112px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.icon, .icon svg, .steckbrief-title svg { width: 1.2em; height: 1.2em; vertical-align: -0.22em; }
svg { display: inline-block; }

/* ================= Header ================= */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
}
.header-bar { display: flex; align-items: center; gap: 24px; min-height: 96px; }
.site-logo img { height: 72px; width: auto; }
.site-logo { display: flex; align-items: center; flex-shrink: 0; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-suche { display: none; }   /* nur im aufgeklappten Mobilmenü */
/* Flex-Zentrierung statt Zeilenhöhe: sonst sitzt der Text in der Pille
   je nach Schriftart minimal zu hoch. */
.main-nav a {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 40px; border-radius: 99px;
	/* Die Schrift hat mehr Ober- als Unterlänge (Ascent 17, Descent 4), dadurch
	   säßen die Buchstaben geometrisch zentriert rund 0,7 px zu tief.
	   Das zusätzliche untere Innenmaß hebt sie optisch in die Mitte. */
	padding: 0 17px 1.5px;
	font-weight: 600; font-size: .98rem; line-height: 1; color: var(--ink);
	transition: background-color .15s ease, color .15s ease;
}
.main-nav a:hover { background: var(--leaf-soft); color: var(--green-800); }
.main-nav a:active { background: #dcead0; }
.main-nav .current-menu-item a, .main-nav a[aria-current="page"] {
	background: var(--green-700); color: #fff;
}
.main-nav .current-menu-item a:hover { background: var(--green-600); color: #fff; }

.header-search-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
	border: 1px solid var(--line); background: #fff; color: var(--ink);
	cursor: pointer;
}
.header-search-btn:hover { background: var(--leaf-soft); }
.header-search-btn svg { width: 19px; height: 19px; }

.nav-toggle-btn {
	display: none; width: 44px; height: 44px; border: 1px solid var(--line);
	border-radius: var(--radius-sm); background: #fff; cursor: pointer; padding: 10px;
}
.nav-toggle-btn span { display: block; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; transition: .2s; }

/* Header-Suchleiste (aufklappbar) */
.header-search { display: none; border-top: 1px solid var(--line); padding: 14px 0; background: #fff; }
.header-search.open { display: block; }
.header-search form { display: flex; gap: 10px; max-width: 640px; margin: 0 auto; }

/* ================= Suche (Formulare) ================= */
.search-field {
	flex: 1; padding: 13px 18px; font-size: 1rem; font-family: inherit;
	border: 2px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink);
}
.search-field:focus-visible { border-color: var(--green-700); }
.search-submit {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 22px; border: 0; border-radius: 99px; cursor: pointer;
	background: var(--green-700); color: #fff; font-weight: 700; font-size: 1rem; font-family: inherit;
}
.search-submit:hover { background: var(--green-600); }
.search-submit svg { width: 17px; height: 17px; }

/* ================= Buttons & Badges ================= */
.btn {
	display: inline-flex; align-items: center; gap: 9px;
	padding: 12px 22px; border-radius: 99px; font-weight: 700; font-size: .98rem;
	background: var(--green-700); color: #fff; border: 0; cursor: pointer;
}
.btn:hover { background: var(--green-600); color: #fff; }
.btn svg { width: 17px; height: 17px; }
.btn-ghost { background: transparent; color: var(--green-800); border: 2px solid var(--green-700); }
.btn-ghost:hover { background: var(--leaf-soft); color: var(--green-800); }

.badge {
	display: inline-block; padding: 4px 12px; border-radius: 99px;
	font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.risk-gesundheit { background: var(--red-soft); color: #96271b; }
.risk-hygiene    { background: #fdeedd; color: #9a5b10; }
.risk-vorrat     { background: var(--amber-soft); color: #8a6206; }
.risk-material   { background: #ece7fb; color: #574194; }
.risk-pflanze    { background: #e2f2e5; color: #22662e; }
.risk-laestling  { background: #e8ebef; color: #48505c; }
.risk-nuetzling  { background: var(--leaf-soft); color: var(--green-800); }

/* ================= Hero (Startseite) ================= */
/* Hero mit eingebetteter Illustration: Bildhintergrund und Flächenfarbe sind
   identisch (#fbebd1), dadurch geht die Zeichnung übergangslos in die Fläche über. */
.hero {
	--hero-cream: #fbebd1;
	background-color: var(--hero-cream);
	color: var(--ink);
	padding: 76px 0 84px; position: relative; overflow: hidden;
	border-bottom: 1px solid #ecdfc4;
	min-height: 600px; display: flex; align-items: center;
}
/* Die Illustration steht immer vollstaendig im Bild: Hoehe = Hero-Hoehe, Breite
   proportional. Ihre linke Kante wird per Maske in die Flaeche ausgeblendet,
   deshalb entsteht dort keine sichtbare Bildkante - egal wie breit der Bildschirm ist. */
.hero-illu {
	position: absolute; right: 0; bottom: 0; z-index: 0;
	height: 100%; width: auto; max-width: none; object-fit: contain; object-position: right bottom;
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .55) 14%, #000 30%);
	mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .55) 14%, #000 30%);
	pointer-events: none;
}
/* Noten, die aus der Tröte des Rattenfängers steigen.
   Der Container deckt exakt dieselbe Fläche wie die Illustration ab, dadurch
   sitzen die Noten in Prozentangaben immer an der Trötenöffnung. */
.hero-noten {
	position: absolute; right: 0; bottom: 0; z-index: 1;
	height: 100%; aspect-ratio: 1536 / 1024;
	pointer-events: none;
}
/* Trötenöffnung liegt bei 92,2 % Breite / 45,7 % Höhe der Illustration.
   Die Verzögerungen folgen dem Rhythmus von Vivaldis „Frühling" bei 120 BPM
   (ein Schlag = 0,5 s). Alle Noten teilen sich denselben 8-Sekunden-Takt
   (vier Takte), dadurch schließt sich die Schleife nahtlos. */
.hero-noten .note {
	position: absolute; left: 92%; top: 42%;
	font-size: clamp(1.1rem, 1.6vw, 1.7rem); line-height: 1;
	color: #c8862a;
	opacity: 0;
	animation: note-flug 8s linear infinite;
	will-change: transform, opacity;
}
.hero-noten .note-1 { animation-delay: 0s;    }
.hero-noten .note-2 { animation-delay: .5s;  font-size: clamp(.9rem, 1.3vw, 1.4rem); }
.hero-noten .note-3 { animation-delay: 1.5s; }
.hero-noten .note-4 { animation-delay: 2s;   font-size: clamp(1rem, 1.45vw, 1.55rem); }
.hero-noten .note-5 { animation-delay: 3s;   font-size: clamp(.85rem, 1.2vw, 1.3rem); }
.hero-noten .note-6 { animation-delay: 4s;   }
.hero-noten .note-7 { animation-delay: 5.5s; font-size: clamp(.9rem, 1.3vw, 1.45rem); }
.hero-noten .note-8 { animation-delay: 6.5s; font-size: clamp(1rem, 1.5vw, 1.6rem); }

/* Sichtbarer Flug in den ersten 45 % (3,6 s), danach wartet die Note
   unsichtbar auf ihren nächsten Einsatz — so bleibt der Takt erhalten. */
@keyframes note-flug {
	0%    { opacity: 0;   transform: translate(0, 0) rotate(-8deg) scale(.7); }
	4%    { opacity: .85; }
	16%   { transform: translate(16px, -74px) rotate(10deg) scale(1); }
	32%   { opacity: .5;  transform: translate(30px, -150px) rotate(-6deg) scale(1.05); }
	45%   { opacity: 0;   transform: translate(40px, -224px) rotate(12deg) scale(1.1); }
	45.1% { opacity: 0;   transform: translate(0, 0) rotate(-8deg) scale(.7); }
	100%  { opacity: 0;   transform: translate(0, 0) rotate(-8deg) scale(.7); }
}

/* Wer reduzierte Bewegung eingestellt hat, sieht die Noten ruhig stehen */
@media (prefers-reduced-motion: reduce) {
	.hero-noten .note { animation: none; opacity: .5; }
	.hero-noten .note-2 { transform: translate(18px, -60px) rotate(8deg); }
	.hero-noten .note-3 { transform: translate(32px, -120px) rotate(-5deg); }
	.hero-noten .note-4,
	.hero-noten .note-5,
	.hero-noten .note-6,
	.hero-noten .note-7,
	.hero-noten .note-8 { display: none; }
}

/* Cremeschleier ueber der linken Haelfte: haelt den Textbereich auch dann ruhig,
   wenn die Illustration bei schmaleren Fenstern weit nach links reicht. */
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(90deg,
		var(--hero-cream) 0%, rgba(251, 235, 209, .88) 32%, rgba(251, 235, 209, .45) 46%, rgba(251, 235, 209, 0) 58%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero-text { max-width: 590px; }
.hero h1 { color: #155234; font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 16px; }
.hero p.sub { color: #4d5a45; font-size: 1.12rem; max-width: 560px; margin-bottom: 28px; }
.hero form { display: flex; gap: 10px; max-width: 560px; }
.hero .search-field {
	border-color: #e2d3b4; background: #fff; padding: 15px 22px; font-size: 1.05rem;
	box-shadow: 0 2px 10px rgba(90, 70, 30, .07);
}
.hero .search-field:focus { border-color: var(--green-600); }
.hero-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 22px; }
.hero-chips .chips-label { font-size: .85rem; font-weight: 600; color: #685e42; margin-right: 4px; }
.hero-chips a {
	padding: 7px 15px; border-radius: 99px; font-size: .88rem; font-weight: 600;
	background: rgba(255, 255, 255, .6); color: var(--green-800); border: 1px solid #e6d7b8;
}
.hero-chips a:hover { background: #fff; border-color: var(--leaf); }
.hero-stats { display: flex; gap: 34px; margin-top: 36px; }
.hero-stats .stat b { display: block; font-size: 1.55rem; font-weight: 800; color: var(--green-700); }
.hero-stats .stat span { font-size: .88rem; color: #685e42; }

/* ================= Sektionen ================= */
.section { padding: 58px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.section-head h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.section-head .more { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.section-head .more svg { width: 15px; height: 15px; vertical-align: -2px; }
.section-sub { color: var(--muted); margin: -18px 0 26px; max-width: 640px; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Soforthilfe-Karten */
.help-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.help-card {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 24px 22px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
	display: block; color: var(--ink);
}
.help-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); color: var(--ink); }
.help-card .hc-icon {
	display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center;
	border-radius: 12px; background: var(--leaf-soft); color: var(--green-700); margin-bottom: 14px;
}
.help-card .hc-icon svg { width: 24px; height: 24px; }
.help-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.help-card p { margin: 0; font-size: .92rem; color: var(--muted); }

/* Beitrags-Karten */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-card {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
	display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.post-card .pc-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--leaf-soft); }
.post-card .pc-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card .pc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h2, .post-card h3 { margin: 0; font-size: 1.08rem; line-height: 1.35; font-weight: 700; }
.post-card h2 a, .post-card h3 a { color: var(--ink); }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--green-700); }
.post-card .pc-excerpt { font-size: .92rem; color: var(--muted); margin: 0; }
.post-card .pc-meta { margin-top: auto; padding-top: 10px; font-size: .82rem; color: var(--muted); display: flex; gap: 14px; align-items: center; }
.post-card .pc-meta svg { width: 14px; height: 14px; vertical-align: -2px; }
.thumb-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--leaf); }
.thumb-fallback svg { width: 38%; height: 38%; opacity: .8; }

/* ================= Lexikon A–Z ================= */
.alpha-nav {
	position: sticky; top: 96px; z-index: 30;
	background: rgba(246, 248, 243, .97); backdrop-filter: blur(6px);
	padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.alpha-nav .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.alpha-letters { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.alpha-nav a, .alpha-nav span.dead {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 34px; height: 34px; padding: 0 6px; border-radius: var(--radius-sm);
	font-weight: 700; font-size: .92rem;
}
.alpha-nav a { background: #fff; border: 1px solid var(--line); color: var(--green-800); }
.alpha-nav a:hover { background: var(--green-700); border-color: var(--green-700); color: #fff; }
/* Inaktive Buchstaben: vorher 1,58:1 — jetzt lesbar, aber klar zurückgenommen */
.alpha-nav span.dead { color: #8b937f; }
.lex-filter { position: relative; width: 100%; max-width: 380px; color: var(--muted); }
.lex-filter svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; pointer-events: none; }
.lex-filter input {
	width: 100%; padding: 10px 16px 10px 42px; border: 2px solid var(--line); border-radius: 99px;
	font-family: inherit; font-size: .95rem; background: #fff; color: var(--ink);
}
.lex-filter input:focus-visible { border-color: var(--green-700); }

.letter-group { padding-top: 10px; }
.letter-group h2 {
	display: flex; align-items: center; gap: 14px; margin: 26px 0 16px;
	font-size: 1.5rem; color: var(--green-800); scroll-margin-top: var(--sticky-top);
}
.letter-group h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lex-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lex-card {
	display: flex; align-items: center; gap: 13px; padding: 11px 14px;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
	color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
.lex-card:hover { border-color: var(--leaf); box-shadow: var(--shadow); color: var(--green-800); }
.lex-card img, .lex-card .thumb-fallback {
	width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
	background: var(--leaf-soft);
}
.lex-card > span:last-child { min-width: 0; }
.lex-card .lex-name { font-weight: 600; font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; }
.lex-card .badge { margin-top: 3px; padding: 2px 8px; font-size: .68rem; }
.lex-hidden { display: none !important; }
.lex-empty { color: var(--muted); padding: 30px 0; text-align: center; display: none; }

/* ================= Bestimmungshilfe ================= */
.best-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 40px; padding: 20px 20px 70px; align-items: start; }
.best-panel { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 112px; }

.best-upload h2, .best-filter h2 { margin: 0 0 14px; font-size: 1.05rem; }
.upload-feld {
	display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
	padding: 26px 18px; border: 2px dashed var(--line); border-radius: var(--radius-sm);
	background: var(--bg); cursor: pointer; color: var(--muted); font-size: .92rem;
}
.upload-feld:hover, .upload-feld.ist-ziel { border-color: var(--leaf); background: var(--leaf-soft); color: var(--green-800); }
.upload-feld input { position: absolute; width: 1px; height: 1px; opacity: 0; }
/* Das Eingabefeld ist optisch versteckt - der Fokus muss am Label sichtbar werden */
.upload-feld:has(input:focus-visible) { outline: 3px solid var(--green-700); outline-offset: 2px; }
/* display:flex wuerde das hidden-Attribut aushebeln - daher explizit ausblenden */
.upload-feld[hidden] { display: none; }
.upload-icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: var(--green-700); }
.upload-icon svg { width: 19px; height: 19px; }

.upload-vorschau { margin: 0; }
.upload-vorschau img {
	width: 100%; height: auto; display: block;
	border-radius: var(--radius-sm); border: 1px solid var(--line);
	background: var(--bg);
}
.upload-vorschau figcaption {
	display: flex; justify-content: flex-end;
	margin-top: 10px; padding-bottom: 2px;
}
.btn-link { background: none; border: 0; padding: 4px 2px; color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; }
.btn-link:hover { color: var(--red); }
.upload-hinweis { font-size: .8rem; color: var(--muted); margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); line-height: 1.5; }

.filter-gruppe { margin-bottom: 18px; }
.filter-gruppe h3 { margin: 0 0 8px; font-size: .9rem; color: var(--green-800); }
.chip-set { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
	display: inline-block; padding: 6px 12px; border-radius: 99px;
	border: 1px solid var(--line); background: #fff; font-size: .82rem; color: var(--ink-soft);
}
.chip:hover span { border-color: var(--leaf); }
.chip input:checked + span { background: var(--green-700); border-color: var(--green-700); color: #fff; font-weight: 600; }
.chip input:focus-visible + span { outline: 3px solid var(--green-700); outline-offset: 2px; }

.ergebnis-kopf { margin-bottom: 20px; }
.ergebnis-kopf h2 { margin: 0 0 4px; font-size: 1.4rem; }
.ergebnis-kopf .section-sub { margin: 0; }
.best-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.best-karte {
	display: flex; gap: 12px; align-items: center; padding: 10px;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink);
	transition: border-color .12s, box-shadow .12s;
}
.best-karte:hover { border-color: var(--leaf); box-shadow: var(--shadow); color: var(--green-800); }
.best-karte .bk-media { flex-shrink: 0; }
.best-karte img, .best-karte .thumb-fallback { width: 62px; height: 62px; border-radius: 8px; object-fit: cover; background: var(--leaf-soft); display: block; }
.best-karte .bk-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.best-karte .bk-titel { font-weight: 600; font-size: .93rem; line-height: 1.25; overflow-wrap: anywhere; }
.best-karte .badge { align-self: flex-start; padding: 2px 8px; font-size: .66rem; }
.best-karte .bk-merkmal { font-size: .78rem; color: var(--muted); line-height: 1.35; }
.best-leer { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; text-align: center; }
.best-leer h3 { margin: 0 0 8px; }
.best-leer p { margin: 0; color: var(--muted); }

/* Sprungmarke zu den Alternativen */
.page-head-anker { margin: 14px 0 0; }
.page-head-anker a {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 9px 16px; border-radius: 99px;
	background: var(--leaf-soft); color: var(--green-800);
	font-weight: 600; font-size: .92rem;
}
.page-head-anker a:hover { background: var(--green-700); color: #fff; }
.page-head-anker svg { width: 15px; height: 15px; transform: rotate(90deg); }

/* Alternative Bestimmungswege */
.best-alternativen { margin-top: 52px; padding-top: 34px; border-top: 1px solid var(--line); scroll-margin-top: 120px; }
.best-alternativen > h2 { margin: 0 0 6px; font-size: 1.3rem; }
.best-alternativen .section-sub { margin: 0 0 22px; max-width: 720px; }
.alt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 22px; }
.alt-karte {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	padding: 20px; display: flex; flex-direction: column; gap: 8px;
}
.alt-karte h3 { margin: 0; font-size: 1rem; color: var(--green-800); }
.alt-karte p { margin: 0; font-size: .89rem; color: var(--ink-soft); line-height: 1.55; }
.alt-link {
	margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px;
	font-weight: 600; font-size: .88rem;
}
.alt-link svg { width: 14px; height: 14px; }

/* Mitlaufende Foto-Miniatur — nur dort nötig, wo das Panel nicht mehr klebt */
.foto-dock { display: none; }

@media (max-width: 1000px) {
	.best-layout { grid-template-columns: 1fr; gap: 24px; }
	.best-panel { position: static; }

	.foto-dock:not([hidden]) {
		display: block; position: fixed; right: 12px; bottom: 12px; z-index: 60;
	}
	.foto-dock-bild {
		display: block; padding: 0; border: 3px solid #fff; border-radius: var(--radius-sm);
		background: var(--bg); cursor: pointer; overflow: hidden; line-height: 0;
		box-shadow: 0 6px 22px -6px rgba(20, 41, 14, .45);
		transition: width .18s ease, height .18s ease;
	}
	.foto-dock-bild img {
		display: block; width: 84px; height: 84px; object-fit: cover;
		transition: width .18s ease, height .18s ease;
	}
	/* Angetippt: größer für den genauen Vergleich */
	.foto-dock.gross .foto-dock-bild img { width: min(62vw, 320px); height: auto; max-height: 62vh; object-fit: contain; }
	.foto-dock.gross .foto-dock-bild { background: #fff; }

	.foto-dock-zu {
		position: absolute; top: -10px; left: -10px;
		width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer;
		background: var(--ink); color: #fff; font-size: 1.1rem; line-height: 1;
		box-shadow: var(--shadow); padding: 0;
	}
	.foto-dock-zu:hover { background: var(--red); }
	.foto-dock-bild:focus-visible, .foto-dock-zu:focus-visible { outline: 3px solid var(--green-700); outline-offset: 2px; }
}

/* ================= Single: gemeinsam ================= */
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 28px 0 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--green-700); }
.breadcrumb .sep { margin: 0 7px; color: #8b937f; }

.article-head { max-width: var(--maxw-prose); margin: 0 0 8px; }
.article-head .badge { margin-bottom: 14px; }
.article-head h1 { margin: 0 0 16px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: .88rem; color: var(--muted); margin-bottom: 0; }
.article-meta svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }

.single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 44px; padding: 18px 0 64px; }
.single-main { min-width: 0; }
.single-aside { display: flex; flex-direction: column; gap: 22px; align-self: start; }
.single-aside.is-sticky { position: sticky; top: 112px; /* wird per JS an die Sidebar-Höhe angepasst */ }

.prose { font-size: 1.04rem; max-width: var(--maxw-prose); }
.prose h2 { scroll-margin-top: 110px; padding-bottom: .25em; border-bottom: 2px solid var(--leaf-soft); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--green-600); font-weight: 700; }
/* Breite Tabellen scrollen in ihrem eigenen Rahmen, statt die Seite aufzuschieben */
.tabelle-scroll {
	overflow-x: auto; -webkit-overflow-scrolling: touch;
	margin: 1.4em 0; border-radius: var(--radius-sm);
	scrollbar-width: thin;
}
.tabelle-scroll:focus-visible { outline: 3px solid var(--green-700); outline-offset: 2px; }
.prose table { width: 100%; min-width: 460px; border-collapse: collapse; margin: 0; font-size: .95rem; background: #fff; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.prose th, .prose td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.prose thead th { background: var(--green-700); color: #fff; font-weight: 700; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose img { border-radius: var(--radius); }
.prose a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--leaf); text-underline-offset: 3px; }

/* Info-Boxen im Content */
.box { border-radius: var(--radius-sm); padding: 16px 20px; margin: 1.5em 0; border-left: 4px solid; }
.box p { margin: 0; }
.box p + p { margin-top: .6em; }
.box-warn { background: var(--amber-soft); border-color: var(--amber); }
.box-tip { background: var(--leaf-soft); border-color: var(--leaf); }

/* Beitragsbild im Artikel */
.single-hero-img { border-radius: var(--radius); overflow: hidden; margin: 14px 0 34px; box-shadow: var(--shadow); max-width: var(--maxw-prose); }
.single-hero-img img { width: 100%; height: auto; display: block; }

/* Bildnachweis: rueckt dicht unters Bild, haelt aber Abstand zum Fliesstext */
.bild-credit { font-size: .76rem; color: var(--muted); margin: -26px 0 30px; line-height: 1.5; }
.bild-credit a { color: var(--muted); text-decoration: underline; }
.bild-credit a:hover { color: var(--green-700); }
.aside-box .bild-credit { margin: 10px 4px 2px; }

/* ================= Sidebar-Module ================= */
.aside-box {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	padding: 22px; box-shadow: var(--shadow);
}
.aside-box h2, .aside-box h3 { margin: 0 0 14px; font-size: 1.05rem; }

.steckbrief { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.steckbrief-title { margin: 0 0 12px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; color: var(--green-800); }
.steckbrief dl { margin: 0; }
.sb-row { display: grid; grid-template-columns: 122px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.sb-row:last-child { border-bottom: 0; }
.sb-row dt { font-weight: 700; font-size: .85rem; color: var(--green-800); }
.sb-row dd { margin: 0; font-size: .9rem; color: var(--ink-soft); }

.toc-box ol { margin: 0; padding-left: 1.2em; font-size: .92rem; }
.toc-box li { margin-bottom: .5em; }
.toc-box a { color: var(--ink-soft); font-weight: 600; }
.toc-box a:hover { color: var(--green-700); }

.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { border-bottom: 1px dashed var(--line); }
.related-list li:last-child { border-bottom: 0; }
.related-list a { display: flex; align-items: center; gap: 12px; padding: 9px 0; color: var(--ink); font-weight: 600; font-size: .93rem; }
.related-list a:hover { color: var(--green-700); }
.related-list img, .related-list .thumb-fallback { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--leaf-soft); }

.cta-box { background: linear-gradient(140deg, var(--green-900), var(--green-700)); color: #fff; border-radius: var(--radius); padding: 24px; }
.cta-box h3 { color: #fff; margin: 0 0 8px; font-size: 1.1rem; }
.cta-box p { color: #d7e3cd; font-size: .92rem; margin-bottom: 16px; }
.cta-box .btn { background: var(--amber); color: var(--green-950); }
.cta-box .btn:hover { background: #f0ad3a; }

/* Wege zum Fachbetrieb */
.profi-cta .cta-liste { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.profi-cta .cta-liste li { font-size: .89rem; color: #d7e3cd; line-height: 1.5; }
.profi-cta .cta-liste strong { color: #fff; }
.cta-inline {
	display: inline-flex; align-items: center; gap: 5px; margin-top: 4px;
	color: var(--amber); font-weight: 600; font-size: .86rem;
}
.cta-inline:hover { color: #f7c463; }
.cta-inline svg { width: 13px; height: 13px; }

.alt-links { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.alt-links .alt-link { margin-top: 0; padding-top: 0; }

/* ================= FAQ ================= */
.faq-block { max-width: var(--maxw-prose); margin-top: 40px; }
.faq-block h2 { margin-bottom: .8em; }
.faq-item {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
	margin-bottom: 10px; overflow: hidden;
}
.faq-item summary {
	padding: 15px 44px 15px 20px; font-weight: 700; cursor: pointer; position: relative; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
	content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
	font-size: 1.35rem; font-weight: 400; color: var(--green-700); transition: transform .18s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item[open] summary { color: var(--green-800); }
/* Ring nach innen, sonst schneidet overflow:hidden des Containers ihn weg */
.faq-item summary:focus-visible { outline: 3px solid var(--green-700); outline-offset: -3px; }
.faq-a { padding: 0 20px 16px; color: var(--ink-soft); font-size: .97rem; }
.faq-a p { margin: 0; }

/* ================= Archiv / Suche ================= */
.page-head { padding: 44px 0 8px; max-width: 820px; }
.page-head .kicker { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green-600); }
.page-head h1 { margin: 6px 0 10px; }
.page-head p { color: var(--muted); font-size: 1.05rem; }

.pagination { display: flex; gap: 7px; justify-content: center; margin: 44px 0 10px; flex-wrap: wrap; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 10px; border-radius: var(--radius-sm);
	background: #fff; border: 1px solid var(--line); font-weight: 700; color: var(--green-800);
}
.pagination .page-numbers.current { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.pagination .page-numbers:hover:not(.current) { background: var(--leaf-soft); }

.search-count { color: var(--muted); margin-bottom: 26px; }
.no-results { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 44px; text-align: center; max-width: 620px; margin: 30px auto; }

/* ================= Prose-Seiten (Impressum etc.) ================= */
.page-narrow { max-width: var(--maxw-prose); margin: 0 auto; padding: 20px 20px 70px; }
.page-narrow h1 { margin: 40px 0 20px; }

/* ================= Footer ================= */

/* Silhouette über dem Footer: die Zeichnung trägt exakt die Footer-Farbe und
   steht auf dem hellen Seitenhintergrund — der Zug läuft optisch in den
   dunklen Footer hinein. Der negative Abstand unten lässt die Bodenlinie
   mit der Footerkante verschmelzen. */
.footer-silhouette {
	margin: 70px 0 0; padding: 0 20px;
	line-height: 0;
}
/* Eigener Rahmen in Bildgröße, damit die Noten unabhängig von der
   Seitenbreite immer an der Trötenöffnung sitzen. */
.footer-silhouette-inner { position: relative; max-width: var(--maxw); margin: 0 auto; }
.footer-silhouette img {
	display: block; width: 100%; height: auto;
	/* -11px: die Bodenlinie der Zeichnung endet oberhalb der Bildkante,
	   dieser Versatz lässt sie exakt mit der Footerkante zusammenfallen. */
	margin: 0 0 -11px;
}

/* Noten aus der Tröte — Öffnung liegt bei 4,8 % Breite / 33,6 % Höhe.
   Gleicher Takt wie im Hero: 8 Sekunden, vier Takte bei 120 BPM. */
.footer-noten { position: absolute; inset: 0; pointer-events: none; }
.footer-noten .fnote {
	position: absolute; left: 4.4%; top: 31%;
	font-size: clamp(.85rem, 1.15vw, 1.25rem); line-height: 1;
	color: #b0771f; opacity: 0;
	animation: fnote-flug 8s linear infinite;
	will-change: transform, opacity;
}
.footer-noten .fnote-1 { animation-delay: 0s;   }
.footer-noten .fnote-2 { animation-delay: .5s;  font-size: clamp(.72rem, .95vw, 1.05rem); }
.footer-noten .fnote-3 { animation-delay: 1.5s; }
.footer-noten .fnote-4 { animation-delay: 3s;   font-size: clamp(.8rem, 1.05vw, 1.15rem); }
.footer-noten .fnote-5 { animation-delay: 4s;   }
.footer-noten .fnote-6 { animation-delay: 5.5s; font-size: clamp(.75rem, 1vw, 1.1rem); }

/* Die Tröte zeigt nach links unten, die Noten steigen entsprechend
   nach links oben auf. Sichtbarer Flug in den ersten 45 % (3,6 s). */
@keyframes fnote-flug {
	0%    { opacity: 0;   transform: translate(0, 0) rotate(8deg) scale(.7); }
	5%    { opacity: .8; }
	18%   { transform: translate(-11px, -28px) rotate(-8deg) scale(1); }
	32%   { opacity: .45; transform: translate(-20px, -56px) rotate(6deg) scale(1.05); }
	45%   { opacity: 0;   transform: translate(-28px, -84px) rotate(-10deg) scale(1.1); }
	45.1% { opacity: 0;   transform: translate(0, 0) rotate(8deg) scale(.7); }
	100%  { opacity: 0;   transform: translate(0, 0) rotate(8deg) scale(.7); }
}

@media (prefers-reduced-motion: reduce) {
	.footer-noten .fnote { animation: none; opacity: .45; }
	.footer-noten .fnote-2 { transform: translate(-13px, -32px) rotate(-8deg); }
	.footer-noten .fnote-3 { transform: translate(-23px, -62px) rotate(6deg); }
	.footer-noten .fnote-4,
	.footer-noten .fnote-5,
	.footer-noten .fnote-6 { display: none; }
}

.site-footer { background: var(--green-950); color: #b9c9ab; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 44px; padding: 52px 0 40px; }
.site-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 14px; letter-spacing: .04em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #b9c9ab; }
.site-footer a:hover { color: #fff; }
.footer-brand p { font-size: .92rem; max-width: 380px; }
.footer-notiz {
	margin-top: 16px; padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, .12);
}
/* Zahlenreihe: die Zahlen wachsen mit, so wie die Folge selbst.
   Nur sie ist verlinkt — der Satz darunter bleibt reiner Text. */
.fib-zahlen {
	display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0;
	font-variant-numeric: tabular-nums; letter-spacing: .01em;
	color: #9db08d; line-height: 1.3;
	text-decoration: none;
}
.fib-zahlen span { position: relative; padding-right: 15px; transition: color .2s ease; }
.fib-zahlen span::after {
	content: "→"; position: absolute; right: 2px;
	color: rgba(255, 255, 255, .28); font-size: .78em;
}
.fib-zahlen span:last-child { padding-right: 0; }
.fib-zahlen span:last-child::after { content: none; }

/* Von klein nach groß — bildet das Wachstum ab */
.fib-zahlen span:nth-child(1)  { font-size: .74rem; }
.fib-zahlen span:nth-child(2)  { font-size: .77rem; }
.fib-zahlen span:nth-child(3)  { font-size: .80rem; }
.fib-zahlen span:nth-child(4)  { font-size: .84rem; }
.fib-zahlen span:nth-child(5)  { font-size: .88rem; }
.fib-zahlen span:nth-child(6)  { font-size: .93rem; }
.fib-zahlen span:nth-child(7)  { font-size: .99rem; }
.fib-zahlen span:nth-child(8)  { font-size: 1.06rem; }
.fib-zahlen span:nth-child(9)  { font-size: 1.14rem; }
.fib-zahlen span:nth-child(10) { font-size: 1.23rem; font-weight: 600; }
.fib-zahlen span:nth-child(11) { font-size: 1.34rem; font-weight: 700; color: var(--leaf); }
.fib-zahlen .fib-mehr { font-size: 1.34rem; color: rgba(255, 255, 255, .38); padding-left: 4px; }

.fib-zahlen:hover { color: #cddcc0; }
.fib-zahlen:hover span:nth-child(11) { color: #a8d47c; }
.fib-zahlen:hover span::after { color: rgba(255, 255, 255, .5); }
.fib-zahlen:focus-visible { outline: 3px solid #fff; outline-offset: 4px; border-radius: var(--radius-sm); }

.fib-text {
	margin: 10px 0 0;
	font-size: .88rem; color: #cddcc0; line-height: 1.5;
}
.footer-brand .logo-badge {
	display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
	color: #fff; font-weight: 800; font-size: 1.15rem;
}
.footer-brand .logo-badge svg { width: 30px; height: 30px; color: var(--leaf); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0; font-size: .85rem; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ================= Responsive ================= */
@media (max-width: 1100px) {
	.hero { min-height: 520px; }
	.hero-text { max-width: 480px; }
}
@media (max-width: 1000px) {
	:root { --sticky-top: 260px; }
	.help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lex-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.single-layout { grid-template-columns: 1fr; gap: 10px; }
	.single-aside, .single-aside.is-sticky { flex-direction: column; position: static; }
	.single-aside .steckbrief { order: -1; }
}
/* Die Desktop-Kopfzeile braucht rund 875 px. Darunter auf Burger-Menü
   umschalten, sonst läuft sie über den Rand (gemessen 91 px Überlauf bei 768 px). */
@media (max-width: 900px) {
	.header-bar { min-height: 76px; gap: 14px; }
	.site-logo img { height: 54px; }
	.nav-toggle-btn { display: block; margin-left: auto; }
	.header-search-btn { display: none; }
	.main-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lift);
		margin: 0; padding: 10px 20px 16px; z-index: 60;
	}
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; gap: 2px; }
	.main-nav a { border-radius: var(--radius-sm); padding: 0 14px 1.5px; min-height: 46px; justify-content: flex-start; }
	.nav-suche { display: block; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
	.nav-suche form { display: flex; gap: 8px; }
	.nav-suche .search-field { padding: 10px 16px; font-size: .95rem; min-width: 0; }
	.nav-suche .search-submit { padding: 10px 16px; flex-shrink: 0; }
	.alpha-nav { top: 76px; }
}
@media (max-width: 700px) {
	:root { --sticky-top: 320px; }
	body { font-size: 16px; }
	.hero {
		/* Mobil: Illustration vollstaendig als Band unter dem Text */
		padding: 40px 0 calc(66.7vw + 16px); min-height: 0; display: block;
	}
	.hero::before { background: none; }
	.hero-noten { height: auto; width: 100%; right: 0; left: 0; }
	.hero-illu {
		height: auto; width: 100%; right: 0; left: 0;
		-webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .6) 12%, #000 26%);
		mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .6) 12%, #000 26%);
	}
	.hero-text { max-width: 100%; }
	.hero form { flex-direction: column; }
	.hero .search-submit { justify-content: center; }
	.hero-stats { gap: 22px; flex-wrap: wrap; }
	.help-grid, .card-grid { grid-template-columns: 1fr; }
	.lex-grid { grid-template-columns: 1fr; }
	.lex-filter { max-width: 100%; }
	.footer-grid { grid-template-columns: 1fr; gap: 30px; }
	.section { padding: 40px 0; }
}
