/*
Theme Name: Energiesparbauwerke Ratgeber
Theme URI: https://energiesparbauwerke.de/
Description: Eigenständiges Theme für energiesparbauwerke.de – Archetyp "Bauphysik-Fachblatt mit Normen-Leiste".
Author: Zurynski, Oezdogan & Co GmbH
Version: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: t-energiesparbauwerke-de
*/

:root {
	--bg: #f7f9fa;
	--surface: #ffffff;
	--text: #1b2a30;
	--muted: #46565c;      /* Textvariante von #5d6f76 (7,6:1 auf Weiß) */
	--muted-line: #5d6f76; /* Originalton für Linien/Icons */
	--primary: #0b5d6b;
	--primary-dark: #08434e;
	--accent: #e8a317;
	--accent-tint: #fff4dc;
	--link: #0a6f94;
	--line: #d7e0e3;
	--line-strong: #b9c7cc;
	--tint: #eaf2f3;
	--foot: #14232a;
	--r: 2px;
	--font-h: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
	--font-b: "Source Sans 3", "Segoe UI", Arial, sans-serif;
	--wrap: 1220px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 17px/1.6 var(--font-b);
	overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-h); font-weight: 600; line-height: 1.25; color: var(--text); margin: 0 0 .5em; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Disclaimer vom Kern (nur gestalten, nie verstecken) ---------- */
.ps-disclaimer { background: var(--accent-tint); color: var(--text); border-bottom: 1px solid #ecd59a; font: 15px/1.5 var(--font-b); padding: 9px 0; }
.ps-disclaimer__inner { max-width: var(--wrap); padding: 0 24px; }

/* ---------- Topbar mit Normenstand ---------- */
.topbar { background: var(--primary-dark); color: #e6eef0; font: 500 14px/1.4 var(--font-h); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #fff; }
.normen-leiste { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.normen-leiste .badge { background: transparent; border: 1px solid #8fb4bb; color: #fff; padding: 1px 7px; border-radius: var(--r); font-size: 13px; letter-spacing: .02em; }
.normen-leiste .badge.is-stand { background: var(--accent); border-color: var(--accent); color: #14232a; font-weight: 600; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.logo svg { width: 46px; height: 46px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font: 600 25px/1.1 var(--font-h); letter-spacing: -.01em; color: var(--text); }
.logo-name b { color: var(--primary); font-weight: 600; }
.logo-sub { font: 500 13px/1.3 var(--font-h); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: 4px; }
.header-search { display: flex; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); min-width: 300px; }
.header-search input { border: 0; background: transparent; padding: 9px 12px; font: 16px var(--font-b); color: var(--text); flex: 1; min-width: 0; }
.header-search button { border: 0; background: var(--primary); color: #fff; padding: 0 14px; font: 500 15px var(--font-h); cursor: pointer; border-radius: 0 var(--r) var(--r) 0; }
.nav-toggle { display: none; }

/* ---------- Hauptnavigation + Mega ---------- */
.hauptnav { background: var(--surface); border-bottom: 3px solid var(--primary); position: relative; }
.hauptnav > .wrap > ul { list-style: none; margin: 0; padding: 0; display: flex; }
.hauptnav li { position: static; }
.hauptnav > .wrap > ul > li > a, .hauptnav .mega-btn {
	display: flex; align-items: center; gap: 7px; padding: 13px 18px; font: 500 16px/1.2 var(--font-h);
	color: var(--text); text-decoration: none; border: 0; background: none; cursor: pointer; border-right: 1px solid var(--line);
}
.hauptnav > .wrap > ul > li:first-child > a { border-left: 1px solid var(--line); }
.hauptnav > .wrap > ul > li > a:hover, .hauptnav .mega-btn:hover, .hauptnav .is-current > a { background: var(--tint); color: var(--primary-dark); }
.hauptnav .nav-rechner > a { color: var(--primary); }
.hauptnav .nav-rechner > a::before { content: "="; display: inline-block; width: 18px; height: 18px; line-height: 16px; text-align: center; border: 1px solid currentColor; border-radius: var(--r); font-size: 14px; }
.mega-btn .caret { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); }
.mega {
	display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
	background: var(--surface); border-top: 1px solid var(--line); border-bottom: 3px solid var(--primary);
	box-shadow: 0 12px 24px rgba(20,35,42,.12);
}
.has-mega:hover .mega, .has-mega:focus-within .mega, .has-mega.is-open .mega { display: block; }
.mega .wrap { display: grid; grid-template-columns: 1.1fr 1.4fr 1fr; gap: 32px; padding-top: 22px; padding-bottom: 24px; }
.mega h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li { margin: 0 0 8px; }
.mega a { color: var(--link); text-decoration: none; }
.mega a:hover { text-decoration: underline; }
.mega .mega-hint { font-size: 15px; color: var(--muted); }
.mega-schnitt { display: flex; gap: 14px; align-items: flex-start; }
.mega-schnitt svg { width: 72px; flex: none; }

/* ---------- Allgemeine Bausteine ---------- */
.label { display: inline-block; font: 600 12px/1 var(--font-h); text-transform: uppercase; letter-spacing: .1em; color: var(--primary-dark); background: var(--tint); border: 1px solid #c3d8dc; padding: 4px 7px; border-radius: var(--r); }
.label-accent { background: var(--accent-tint); border-color: #ecd59a; color: #5b3f00; }
.meta { font-size: 15px; color: var(--muted); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--text); margin: 0 0 18px; padding-bottom: 6px; }
.sec-head h2 { font-size: 21px; margin: 0; text-transform: none; }
.sec-head a { font: 500 15px var(--font-h); white-space: nowrap; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.btn { display: inline-block; background: var(--primary); color: #fff; text-decoration: none; padding: 10px 16px; border-radius: var(--r); font: 500 15px/1.2 var(--font-h); border: 0; cursor: pointer; }
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-ghost:hover { background: var(--tint); color: var(--primary-dark); }

/* ---------- Startseite: Titelstory + Kurznews ---------- */
.home-top { padding: 28px 0 8px; }
.aufmacher-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 28px; }
.titelstory { display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.titelstory-bild { position: relative; background: linear-gradient(90deg, #c63d2f 0%, #e8812a 24%, #f2c94c 40%, #6cbf8f 58%, #2f86a6 76%, #2b4b8c 100%); padding: 0; border-bottom: 1px solid var(--line); }
.titelstory-bild svg { display: block; width: 100%; height: auto; }
.titelstory-bild .skala { position: absolute; right: 12px; top: 10px; background: rgba(255,255,255,.92); border-radius: var(--r); font: 500 12px/1.3 var(--font-h); color: var(--text); padding: 4px 8px; }
.titelstory-text { padding: 22px 26px 24px; }
.titelstory h2 { font-size: 32px; line-height: 1.2; margin: 10px 0 12px; }
.titelstory h2 a { color: var(--text); text-decoration: none; }
.titelstory h2 a:hover { color: var(--primary); text-decoration: underline; }
.titelstory .lead { font-size: 18px; }
.kurznews { display: flex; flex-direction: column; }
.kurznews .sec-head { margin-bottom: 0; }
.kurznews ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; flex: 1; }
.kurznews li { border-bottom: 1px solid var(--line); padding: 16px 0; display: grid; grid-template-columns: 54px 1fr; gap: 12px; }
.kurznews li:last-child { border-bottom: 0; }
.kurznews .datum { font: 600 13px/1.25 var(--font-h); color: var(--primary-dark); text-align: center; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 6px 2px; background: var(--surface); align-self: start; }
.kurznews .datum span { display: block; font-size: 20px; color: var(--text); }
.kurznews h3 { font-size: 17px; margin: 4px 0 4px; line-height: 1.3; }
.kurznews h3 a { color: var(--text); text-decoration: none; }
.kurznews h3 a:hover { color: var(--primary); text-decoration: underline; }
.kurznews p { font-size: 16px; margin: 0; color: var(--muted); }

/* Chips Schnellzugriff */
.chips { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 26px 0 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); }
.chips .chips-titel { font: 600 13px var(--font-h); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-right: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font: 500 15px/1 var(--font-h); color: var(--primary-dark); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 8px 11px; background: var(--bg); }
.chip:hover { border-color: var(--primary); background: var(--tint); }
.chip small { font: 400 13px var(--font-b); color: var(--muted); }

/* Hauptbereich mit Sidebar */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; padding-top: 34px; padding-bottom: 40px; }
.themenblock { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
.themenblock:first-of-type { padding-top: 4px; }
.themenblock .schnitt { width: 92px; }
.themenblock .schnitt svg { width: 92px; height: 92px; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.themenblock h3 { font-size: 22px; margin: 0 0 4px; }
.themenblock .beschr { color: var(--muted); font-size: 16px; margin-bottom: 12px; }
.teaser3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.teaser3 li { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--primary); border-radius: var(--r); padding: 12px 14px 14px; }
.teaser3 li.is-glossar { border-top-color: var(--accent); }
.teaser3 .art { font: 600 12px/1.2 var(--font-h); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: block; margin-bottom: 6px; }
.teaser3 a { font: 600 16px/1.3 var(--font-h); color: var(--text); text-decoration: none; }
.teaser3 a:hover { color: var(--primary); text-decoration: underline; }
.teaser3 .quelle { display: block; font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.35; }

/* Glossar-Ausschnitt */
.glossar-home { margin-top: 30px; }
.az { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; padding: 0; list-style: none; }
.az a, .az span { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; font: 600 14px var(--font-h); border: 1px solid var(--line-strong); border-radius: var(--r); text-decoration: none; background: var(--surface); color: var(--primary-dark); }
.az a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.az span { color: #9aa9ae; border-color: var(--line); background: transparent; }
.glossar-liste { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 28px; margin: 0; }
.glossar-liste div { border-top: 1px solid var(--line); padding: 12px 0; }
.glossar-liste dt { font: 600 17px var(--font-h); }
.glossar-liste dt a { color: var(--text); text-decoration: none; }
.glossar-liste dt a:hover { color: var(--primary); text-decoration: underline; }
.glossar-liste dd { margin: 3px 0 0; font-size: 16px; color: var(--muted); }

/* Quellen und Normen */
.quellen-home { padding: 6px 0 44px; }
.quellen-tabelle { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); font-size: 16px; }
.quellen-tabelle th, .quellen-tabelle td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; word-break: normal; overflow-wrap: normal; hyphens: manual; }
.quellen-tabelle th { font: 600 13px var(--font-h); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--tint); }
.quellen-tabelle .norm { font: 600 15px var(--font-h); white-space: nowrap; }
.tabelle-scroll { overflow-x: auto; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 22px; }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 18px; }
.widget h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.widget .header-search { min-width: 0; width: 100%; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.35; }
.widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.widget li a { text-decoration: none; font-weight: 600; color: var(--text); }
.widget li a:hover { color: var(--primary); text-decoration: underline; }
.widget .az { margin-bottom: 10px; }
.widget .az li { border: 0; padding: 0; }
.widget .az a, .widget .az span { width: 28px; height: 28px; font-size: 13px; }
.widget-glossar p { font-size: 15px; color: var(--muted); margin: 0; }
.anzeige-box { border: 1px solid #d9c58f; border-top: 4px solid var(--accent); background: #fffcf4; position: relative; }
.anzeige-box .anzeige-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.anzeige-box .anzeige-kopf span { font: 600 12px var(--font-h); text-transform: uppercase; letter-spacing: .12em; color: #5b3f00; background: var(--accent-tint); border: 1px solid #ecd59a; padding: 3px 7px; border-radius: var(--r); }
.anzeige-box h2 { border: 0; padding: 0; margin: 0 0 8px; font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text); }
.anzeige-box p { font-size: 15.5px; line-height: 1.5; color: var(--text); margin-bottom: 10px; }
.anzeige-box .klein { font-size: 14px; color: var(--muted); margin: 10px 0 0; }

/* ---------- Artikel ---------- */
.breadcrumb { font-size: 15px; color: var(--muted); padding: 18px 0 0; }
.breadcrumb a { color: var(--link); }
.artikel-grid { display: grid; grid-template-columns: 220px minmax(0, 700px) 280px; gap: 36px; padding: 18px 0 48px; justify-content: space-between; }
.toc { position: sticky; top: 16px; align-self: start; font-size: 15px; }
.toc details { border: 0; }
.toc summary { list-style: none; font: 600 13px var(--font-h); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding-bottom: 8px; border-bottom: 2px solid var(--text); margin-bottom: 8px; cursor: default; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; border-bottom: 1px solid var(--line); }
.toc a { hyphens: auto; overflow-wrap: break-word; display: grid; grid-template-columns: 26px 1fr; padding: 8px 0; color: var(--text); text-decoration: none; line-height: 1.35; }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 600 12px/1.9 var(--font-h); color: var(--muted); }
.toc a:hover, .toc a.is-active { color: var(--primary); }
.toc a.is-active { font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); padding-left: 0; }
.artikel-kopf h1 { font-size: 38px; line-height: 1.18; margin: 12px 0 14px; }
.artikel-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 15px; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin-bottom: 22px; }
.artikel-meta strong { color: var(--text); font-weight: 600; }
.faktenbox { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--r); padding: 18px 20px 8px; margin: 0 0 30px; }
.faktenbox h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .1em; color: var(--primary-dark); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.faktenbox ul { margin: 0; padding: 0; list-style: none; }
.faktenbox li { position: relative; padding: 0 0 12px 22px; font-size: 17px; line-height: 1.5; }
.faktenbox li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; background: var(--accent); }
.qref { font: 600 13px var(--font-h); color: var(--link); text-decoration: none; white-space: nowrap; vertical-align: 1px; margin-left: 2px; }
.qref:hover { text-decoration: underline; }

.entry-content { font-size: 18px; line-height: 1.68; }
.entry-content > * { margin-top: 0; }
.entry-content h2 { font-size: 26px; margin: 1.7em 0 .6em; padding-top: .6em; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.entry-content h3 { font-size: 20px; margin: 1.5em 0 .5em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .55em; }
.entry-content ol li::marker { font-family: var(--font-h); font-weight: 600; color: var(--primary); }
.entry-content ul li::marker { color: var(--primary); }
.entry-content strong { font-weight: 700; }
.entry-content sub { font-size: .7em; }
.entry-content .wp-block-table { margin: 1.4em 0 1.8em; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.entry-content th, .entry-content td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); word-break: normal; overflow-wrap: normal; hyphens: manual; }
.entry-content th:last-child, .entry-content td:last-child { border-right: 0; }
.entry-content thead th { background: var(--tint); font: 600 15px/1.35 var(--font-h); color: var(--primary-dark); border-bottom: 2px solid var(--primary); }
.entry-content tbody tr:nth-child(even) td { background: #fafcfc; }
.entry-content tbody td:first-child { font-weight: 600; }
.entry-content figcaption, .entry-content .wp-element-caption { font-size: 15px; color: var(--muted); padding: 10px 12px; border-top: 1px solid var(--line); background: var(--bg); margin: 0; }
.entry-content blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.entry-content .anzeige { position: relative; background: #fffcf4; border: 1px solid #d9c58f; border-top: 4px solid var(--accent); border-radius: var(--r); padding: 34px 20px 8px; margin: 1.8em 0; font-size: 17px; }
.entry-content .anzeige-label { position: absolute; top: 10px; left: 20px; font: 600 12px/1 var(--font-h); text-transform: uppercase; letter-spacing: .12em; color: #5b3f00; background: var(--accent-tint); border: 1px solid #ecd59a; padding: 4px 7px; border-radius: var(--r); }
.entry-content .belegstatus, .entry-content .beleg { font-size: 15px; color: var(--muted); border-left: 3px solid var(--line-strong); padding-left: 12px; }

.quellenkasten { margin: 40px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.quellenkasten h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 10px; }
.quellenkasten ol { list-style: none; margin: 0; padding: 0; }
.quellenkasten li { display: grid; grid-template-columns: 40px 1fr; padding: 7px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.4; scroll-margin-top: 16px; }
.quellenkasten li:target { background: var(--accent-tint); }
.quellenkasten .nr { font: 600 14px var(--font-h); color: var(--primary-dark); }
.quellenkasten .host { display: block; font-size: 14px; color: var(--muted); }
.quellenkasten .hinweis { font-size: 15px; color: var(--muted); margin: 12px 0 0; }
.weitere { margin-top: 36px; }
.weitere ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.weitere li { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--primary); padding: 12px 14px; border-radius: var(--r); }
.weitere a { font: 600 16px/1.3 var(--font-h); color: var(--text); text-decoration: none; }
.weitere a:hover { color: var(--primary); text-decoration: underline; }

/* ---------- Seiten ---------- */
.seite-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding: 18px 0 52px; }
.seite-inhalt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 30px 34px 26px; }
.seite-inhalt h1 { font-size: 34px; margin: 6px 0 18px; }
.seite-inhalt .entry-content { font-size: 17.5px; }
.seite-inhalt .entry-content h2 { font-size: 22px; }
.seite-voll { padding: 18px 0 52px; max-width: 900px; }

/* Glossar-Seite */
.glossar-seite .az { position: sticky; top: 0; background: var(--surface); padding: 10px 0; z-index: 2; border-bottom: 1px solid var(--line); }
.glossar-gruppe { margin-top: 18px; scroll-margin-top: 60px; }
.glossar-gruppe > h2 { font-size: 26px; color: var(--primary); border-bottom: 2px solid var(--text); padding-bottom: 4px; margin: 0 0 4px; border-top: 0; padding-top: 0; }
.glossar-eintrag { padding: 14px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 60px; }
.glossar-eintrag:target { background: var(--accent-tint); }
.glossar-eintrag h3 { font-size: 19px; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.glossar-eintrag p { margin: 0; font-size: 17px; }
.glossar-eintrag .bezug { display: block; font-size: 15px; color: var(--muted); margin-top: 4px; }

/* Rechner */
.rechner { border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); padding: 20px; margin: 24px 0; }
.rechner h2 { margin-top: 0 !important; padding-top: 0 !important; border-top: 0 !important; }
.rechner table { width: 100%; border-collapse: collapse; font-size: 16px; }
.rechner th, .rechner td { padding: 6px 6px; text-align: left; border-bottom: 1px solid var(--line); word-break: normal; overflow-wrap: normal; hyphens: manual; }
.rechner th { font: 600 14px var(--font-h); color: var(--muted); }
.rechner input, .rechner select { width: 100%; font: 16px var(--font-b); padding: 8px 9px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--text); }
.rechner .felder { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.rechner label { font: 500 14px var(--font-h); color: var(--muted); display: block; margin-bottom: 4px; }
.rechner .aktionen { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.ergebnis { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); padding: 12px 16px; font-size: 17px; }
.ergebnis strong { font: 600 22px var(--font-h); }
.ergebnis .ok { color: #1f6b3a; font-weight: 600; }
.ergebnis .nok { color: #9b2a1c; font-weight: 600; }
.rechner .zeile-weg { background: none; border: 1px solid var(--line-strong); color: var(--muted); border-radius: var(--r); cursor: pointer; padding: 6px 9px; font-size: 15px; }

/* Liste (Suche/Archiv) */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 14px; }
.liste h2 { font-size: 22px; margin: 8px 0 6px; }
.liste h2 a { color: var(--text); text-decoration: none; }
.liste h2 a:hover { color: var(--primary); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--foot); color: #c9d6da; font-size: 16px; }
.site-footer a { color: #8fd3e6; }
.site-footer a:hover { color: #fff; }
.footer-spalten { display: grid; grid-template-columns: 1fr 1.2fr 1.4fr; gap: 40px; padding: 44px 0 30px; }
.site-footer h2 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid #2f444d; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; line-height: 1.4; }
.site-footer .norm-kuerzel { display: inline-block; min-width: 92px; color: #f2c25a; font: 600 14px var(--font-h); }
.site-footer p { margin: 0 0 10px; line-height: 1.55; }
.site-footer .abgrenzung { border: 1px solid #2f444d; padding: 12px 14px; border-radius: var(--r); font-size: 15px; color: #c9d6da; }
.footer-unten { border-top: 1px solid #2f444d; padding: 18px 0 26px; font-size: 15px; color: #c9d6da; }
.footer-unten .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.footer-unten nav a { margin-right: 16px; }
.betreiber { color: #e6eef0; }
.bildnachweis { font-size: 14px; }

/* ---------- 404 ---------- */
.nicht-gefunden { padding-top: 48px; padding-bottom: 60px; max-width: 720px; }
.nicht-gefunden h1 { font-size: 34px; }

/* ---------- Responsiv ---------- */
@media (max-width: 1180px) {
	.artikel-grid { grid-template-columns: 200px minmax(0, 1fr); }
	.artikel-grid .sidebar { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 980px) {
	.aufmacher-grid, .layout, .seite-grid { grid-template-columns: minmax(0, 1fr); }
	.footer-spalten { grid-template-columns: 1fr 1fr; }
	.footer-spalten > :last-child { grid-column: 1 / -1; }
	.hauptnav > .wrap > ul > li > a, .hauptnav .mega-btn { padding: 12px 12px; font-size: 15px; }
	.header-search { min-width: 220px; }
	.sidebar { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
	.artikel-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
	.toc summary { cursor: pointer; border-bottom: 0; margin: 0; padding: 0; display: flex; justify-content: space-between; }
	.toc summary::after { content: "+"; font-size: 18px; line-height: 1; }
	.toc details[open] summary::after { content: "–"; }
	.toc details[open] summary { margin-bottom: 8px; }
}
@media (max-width: 760px) {
	.wrap { padding: 0 16px; }
	.ps-disclaimer__inner { padding: 0 16px; }
	.topbar .wrap { font-size: 13px; }
	.topbar .heute { display: none; }
	.site-header .wrap { padding-top: 12px; padding-bottom: 12px; gap: 10px; }
	.logo svg { width: 38px; height: 38px; }
	.logo-name { font-size: 20px; }
	.logo-sub { font-size: 11px; letter-spacing: .1em; }
	.site-header .header-search { display: none; }
	.nav-toggle { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: var(--r); padding: 9px 12px; font: 500 15px var(--font-h); cursor: pointer; }
	.nav-toggle .bars { width: 18px; height: 2px; background: currentColor; box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }
	.hauptnav { border-bottom-width: 2px; }
	.hauptnav > .wrap { padding: 0; }
	.hauptnav > .wrap > ul { display: none; flex-direction: column; }
	.hauptnav.is-open > .wrap > ul { display: flex; }
	.hauptnav > .wrap > ul > li > a, .hauptnav .mega-btn { border: 0; border-top: 1px solid var(--line); padding: 13px 16px; width: 100%; font-size: 16px; justify-content: space-between; }
	.hauptnav > .wrap > ul > li:first-child > a { border-left: 0; }
	.has-mega:hover .mega, .has-mega:focus-within .mega { display: none; }
	.has-mega.is-open .mega { display: block; position: static; box-shadow: none; border-bottom: 0; background: var(--bg); }
	.mega .wrap { grid-template-columns: 1fr; gap: 16px; padding: 14px 16px; }
	.hauptnav.is-open .mobile-suche { display: block; padding: 12px 16px; border-top: 1px solid var(--line); }
	.mobile-suche .header-search { display: flex; min-width: 0; }
	.titelstory h2 { font-size: 25px; }
	.titelstory-bild .skala { position: static; display: block; border-radius: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 12px; }
	.titelstory-text { padding: 16px 16px 18px; }
	.chips { padding: 12px; }
	.themenblock { display: block; }
	.themenblock .schnitt { float: left; margin: 2px 12px 6px 0; }
	.themenblock .teaser3 { clear: both; }
	.themenblock .schnitt, .themenblock .schnitt svg { width: 56px; height: 56px; }
	.teaser3 { grid-template-columns: minmax(0,1fr); gap: 10px; }
	.glossar-liste { grid-template-columns: minmax(0,1fr); }
	.sidebar, .artikel-grid .sidebar { grid-template-columns: minmax(0, 1fr); display: flex; }
	.artikel-kopf h1 { font-size: 28px; }
	.entry-content { font-size: 17px; }
	.entry-content h2 { font-size: 22px; }
	.entry-content table { min-width: 560px; font-size: 15.5px; }
	.weitere ul { grid-template-columns: minmax(0,1fr); }
	.seite-inhalt { padding: 20px 16px; }
	.seite-inhalt h1 { font-size: 27px; }
	.rechner { padding: 14px; }
	.rechner .felder { grid-template-columns: 1fr 1fr; }
	.rechner-schichten thead { display: none; }
	.rechner-schichten tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
	.rechner-schichten td { border: 0; padding: 0; }
	.rechner-schichten td:first-child { grid-column: 1 / -1; }
	.footer-spalten { grid-template-columns: minmax(0,1fr); gap: 28px; }
	.quellen-tabelle .norm { white-space: normal; }
}
.mobile-suche { display: none; }
@media print { .topbar, .hauptnav, .sidebar, .toc { display: none; } }
