/* Glossar (#753) und Häufige Fragen: Einträge als aufklappbare Zeilen, A–Z-Leiste, Suche, Bereichsfilter, dunkler Kopf. Nur Tokens aus am-design.css. */
.entry-content > .am-gl { position: relative; max-width: 772px; margin-top: var(--am-space-4); }
.am-gl [hidden] { display: none !important; }
.am-gl *, .am-gl *::before, .am-gl *::after { box-sizing: border-box; }

/* Randspalten-Hülle: schmal ohne eigene Box, damit die A–Z-Leiste an der ganzen Liste mitläuft */
.am-gl__seite, .am-gl__seite-innen { display: contents; }

/* Werkzeuge: Suche, Bereiche, Stand (erst mit JavaScript sichtbar) */
.am-gl__werkzeug { display: grid; gap: 14px; margin: 0 0 18px; }
.am-gl__suche { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--am-text); }
.am-gl .am-gl__suche input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--am-line); border-radius: 3px; background: var(--am-paper); color: var(--am-text); font: 400 16px/1.2 var(--am-font-body); transition: all 0.3s ease-in-out; }
.am-gl .am-gl__suche input:focus-visible { outline: 2px solid var(--am-sea); outline-offset: 2px; border-color: var(--am-sea); }
.am-gl__bereiche { display: flex; flex-wrap: wrap; gap: 6px; }
.am-gl button.am-gl__bereich { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--am-line); border-radius: 3px; background: transparent; color: var(--am-text); font: 600 14px/1.2 var(--am-font-body); letter-spacing: 0; text-transform: none; cursor: pointer; transition: all 0.3s ease-in-out; }
.am-gl button.am-gl__bereich span { font-weight: 400; font-size: 12px; color: var(--am-text-muted); font-variant-numeric: tabular-nums; }
.am-gl button.am-gl__bereich:hover { background: var(--am-surface); color: var(--am-text); }
.am-gl button.am-gl__bereich[aria-pressed="true"] { background: var(--am-sea); border-color: var(--am-sea); color: var(--am-paper); }
.am-gl button.am-gl__bereich[aria-pressed="true"] span { color: inherit; }
.am-gl button:focus-visible { outline: 2px solid var(--am-sea); outline-offset: 2px; }
.am-gl__zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.am-gl__stand { margin: 0; font-size: 14px; color: var(--am-text-muted); }
.am-gl button.am-gl__alle { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--am-link); font: 600 14px/1.2 var(--am-font-body); letter-spacing: 0; text-transform: none; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; transition: all 0.3s ease-in-out; }
.am-gl button.am-gl__alle:hover { background: none; color: var(--am-accent); }

/* A–Z-Leiste: am Handy und Tablet oben mitlaufend, breit in der Randspalte */
.am-gl__abc { display: flex; gap: 2px; margin: 0 0 8px; padding: 6px 0; overflow-x: auto; scrollbar-width: none; background: var(--am-bg); border-bottom: 1px solid var(--am-line); }
.am-gl__abc::-webkit-scrollbar { display: none; }
.am-gl--js .am-gl__abc { position: sticky; top: var(--am-gl-kopf, 0px); z-index: 5; }
.am-gl__abc a, .am-gl__abc span { flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 36px; min-height: 44px; border-radius: 3px; font: 600 15px/1 var(--am-font-body); }
.entry-content .am-gl__abc a { color: var(--am-text); text-decoration: none; transition: all 0.3s ease-in-out; }
.entry-content .am-gl__abc a:hover { background: var(--am-surface); color: var(--am-accent); }
.entry-content .am-gl__abc a.is-leer { color: var(--am-line); pointer-events: none; }
.am-gl__abc span { color: var(--am-line); }

/* Buchstabengruppen */
.am-gl__buchstabe { scroll-margin-top: calc(var(--am-gl-kopf, 70px) + 64px); }
/* Nur sichtbare Gruppen zeichnen (seit 23.10.2026): spart am Handy Rechenzeit bei über 10.000 Elementen; Inhalt, Suche und Sprungmarken bleiben */
.am-gl__buchstabe { content-visibility: auto; contain-intrinsic-size: auto 900px; }
.am-gl__buchstabe > h2 { margin: var(--am-space-4) 0 0; padding-bottom: 6px; border-bottom: 2px solid var(--am-text); font-size: 2rem; line-height: 1; }
.am-gl__buchstabe:first-of-type > h2 { margin-top: var(--am-space-3); }

/* Einträge */
.am-gl__eintrag { border-bottom: 1px solid var(--am-line); scroll-margin-top: calc(var(--am-gl-kopf, 70px) + 64px); }
.am-gl__eintrag > summary { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 6px 10px 2px; list-style: none; cursor: pointer; transition: all 0.3s ease-in-out; }
.am-gl__eintrag > summary::-webkit-details-marker { display: none; }
.am-gl__eintrag > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 3px 0; border-right: 2px solid var(--am-text-muted); border-bottom: 2px solid var(--am-text-muted); transform: rotate(45deg); transition: transform 0.3s ease-in-out; }
.am-gl__eintrag[open] > summary::after { transform: translateY(3px) rotate(-135deg); }
.am-gl__eintrag > summary:hover { background: var(--am-surface); }
.am-gl__eintrag > summary:hover .am-gl__begriff { color: var(--am-accent); }
.am-gl__eintrag > summary:focus-visible { outline: 2px solid var(--am-sea); outline-offset: -2px; }
.am-gl__begriff { flex: 1 1 auto; min-width: 0; font-family: var(--am-font-head); font-size: 1.15rem; font-weight: 600; line-height: 1.25; color: var(--am-text); overflow-wrap: anywhere; transition: color 0.3s ease-in-out; }
.am-gl__tag { flex: none; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--am-text-muted); }
.am-gl__eintrag--verweis .am-gl__begriff { font-weight: 400; font-style: italic; }
.am-gl__eintrag:target > summary, .am-gl__eintrag.is-ziel > summary { box-shadow: inset 3px 0 0 var(--am-accent); }
.am-gl__text { padding: 0 6px 16px 2px; }
.am-gl__text p { margin: 0 0 8px; font-size: 1rem; line-height: 1.65; color: var(--am-text); max-width: none; }
.am-gl__text p:last-child { margin-bottom: 0; }
.am-gl__text .am-gl__siehe, .am-gl__text .am-gl__beleg { font-size: 14px; line-height: 1.5; color: var(--am-text-soft); }
.am-gl__text .am-gl__beleg { color: var(--am-text-muted); font-size: 13px; }
.entry-content .am-gl__beleg a { color: inherit; }
.am-gl__leer { margin: var(--am-space-3) 0; padding: 14px 18px; border-left: 3px solid var(--am-ochre); background: var(--am-surface); }

/* Schmal: Bereichsknöpfe in einer wischbaren Zeile statt fünf Reihen */
@media (max-width: 800px) {
	.am-gl__bereiche { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
	.am-gl__bereiche::-webkit-scrollbar { display: none; }
	.am-gl button.am-gl__bereich { flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 480px) {
	.am-gl__tag { display: none; }
	.am-gl__begriff { font-size: 1.08rem; }
}

/* Breit: Suche, Bereiche und Buchstaben als mitlaufende Randspalte neben der Liste */
@media (min-width: 1180px) {
	/* Mindesthöhe: auch eine kurze Trefferliste trägt die Randspalte, sonst ragt sie ins Inhaltsverzeichnis darunter */
	.entry-content > .am-gl--js { min-height: 780px; }
	.am-gl--js .am-gl__seite, .am-gl--js .am-gl__seite-innen { display: block; }
	.am-gl--js .am-gl__seite { position: absolute; top: 0; bottom: 0; left: calc(100% + 48px); width: 280px; }
	.am-gl--js .am-gl__seite-innen { position: sticky; top: calc(var(--am-gl-kopf, 70px) + 24px); max-height: calc(100vh - var(--am-gl-kopf, 70px) - 48px); overflow-y: auto; }
	.am-gl--js .am-gl__abc { position: static; flex-wrap: wrap; overflow: visible; margin: 18px 0 0; padding: 12px 0 0; border-bottom: 0; border-top: 1px solid var(--am-line); background: none; }
	.am-gl--js .am-gl__abc a, .am-gl--js .am-gl__abc span { min-width: 38px; min-height: 40px; }
	.am-gl--js .am-gl__werkzeug { margin: 0; }
	.am-gl--js .am-gl__buchstabe:first-of-type > h2 { margin-top: 0; }
}

/* Buchstabenleiste der Fragen-Seite: Themen statt Buchstaben */
.am-gl__abc--woerter a, .am-gl__abc--woerter span { padding: 0 10px; font-size: 14px; white-space: nowrap; }

/* Dunkler Kopf (.am-glk): Titel, großes Suchfeld, Zeichnung, Bereichs-Kacheln – Tokens wie .am-hero lokal umgeschaltet */
body:has(.am-glk) { overflow-x: clip; }
body:has(.am-glk) .am-breadcrumbs { display: none; }
/* Beitragsbild nur für Vorschau und Suche (og:image), nicht über dem dunklen Kopf */
body:has(.am-glk) .featured-image.page-header-image { display: none; }
.entry-content > .am-glk { max-width: none; }
.am-glk {
	--am-bg: hsl(210 28% 14%);
	--am-surface: hsl(210 22% 19%);
	--am-line: hsl(210 14% 34%);
	--am-text: hsl(42 33% 93%);
	--am-text-soft: hsl(40 18% 82%);
	--am-text-muted: hsl(40 10% 70%);
	--am-accent: hsl(4 80% 66%);
	--am-link: hsl(90 25% 70%);
	color-scheme: dark;
	margin: -64px calc(50% - 50vw) var(--am-space-4);
	padding: clamp(1.75rem, 3.5vw, 2.5rem) 0 clamp(1.25rem, 3vw, 2rem);
	background: linear-gradient(180deg, hsl(205 30% 17%) 0%, hsl(205 28% 15%) 45%, hsl(196 36% 15%) 100%);
	color: var(--am-text-soft);
}
.am-glk *, .am-glk *::before, .am-glk *::after { box-sizing: border-box; }
.am-glk [hidden] { display: none !important; }
.am-glk :is(a, button, input):focus-visible { outline: 2px solid var(--am-accent); outline-offset: 2px; }
.am-glk-in { width: min(1152px, 100% - 48px); margin-inline: auto; }
.am-glk-oben { display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 22vw, 300px); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.am-glk-crumbs { margin: 0 0 var(--am-space-2); font-size: 14px; color: var(--am-text-muted); }
/* Theme-Regel .inside-article a färbt Links grün – im dunklen Kopf hell halten */
.inside-article .am-glk-crumbs a { color: var(--am-text-soft); text-decoration: none; }
.inside-article .am-glk-crumbs a:hover, .inside-article .am-glk-crumbs a:focus { color: var(--am-accent); text-decoration: underline; }
.am-glk .am-glk-h1 { font-family: var(--am-font-head); font-size: clamp(2.6rem, 5.5vw, 4rem); line-height: 1; letter-spacing: -0.025em; margin: 0 0 0.25em; color: var(--am-text); }
.entry-content .am-glk .am-lead { margin: 0 0 var(--am-space-2); max-width: 42em; font-family: var(--am-font-body); font-size: 1.08rem; line-height: 1.65; color: var(--am-text-soft); }
.am-glk .am-lead strong { color: var(--am-text); }
.am-glk-feld { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 18px; border: 1px solid hsl(210 14% 44%); border-radius: 4px; background: hsl(210 26% 11%); color: var(--am-text-muted); cursor: text; transition: all 0.3s ease-in-out; }
.am-glk-feld:focus-within { border-color: var(--am-accent); box-shadow: 0 0 0 3px hsl(4 80% 66% / 0.25); color: var(--am-text); }
.am-glk-feld svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.am-glk .am-glk-feld input { flex: 1; min-width: 0; height: 58px; padding: 0; border: 0; background: transparent; color: var(--am-text); font: 400 1.1rem/1.2 var(--am-font-body); outline: none; box-shadow: none; }
.am-glk .am-glk-feld input:focus-visible { outline: none; }
.am-glk .am-glk-feld input::placeholder { color: var(--am-text-muted); opacity: 1; }
.am-glk-nur-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.am-glk-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-top: 6px; }
.am-glk-stand { margin: 0; font-size: 14px; color: var(--am-text-muted); }
.am-glk button.am-glk-zeigen { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--am-link); font: 600 14px/1 var(--am-font-body); text-transform: none; letter-spacing: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.am-glk button.am-glk-zeigen:hover { color: var(--am-accent); background: none; }
.am-glk-fakten { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--am-text-muted); }
.am-glk-fakten li { margin: 0; }
.am-glk-fakten b { font: 600 1.6rem/1 var(--am-font-head); color: var(--am-text); margin-right: 4px; }
.entry-content .am-glk .am-tafel { margin: 0; padding: 12px 12px 8px; background: hsl(45 40% 97%); border-radius: 4px; box-shadow: 0 24px 50px -24px hsl(210 40% 4% / 0.8); }
.entry-content .am-glk .am-tafel figcaption { font-size: 11px; line-height: 1.4; color: hsl(210 10% 36%); }
.am-glk-symbol { display: block; width: 100%; aspect-ratio: 1; background: var(--am-mega-ico) center / contain no-repeat; filter: drop-shadow(0 24px 30px hsl(210 40% 4% / 0.6)); }
.am-glk-raster { display: grid; grid-template-columns: repeat(var(--am-glk-spalten, 8), minmax(0, 1fr)); margin: clamp(1.25rem, 3vw, 2rem) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--am-line); }
.am-glk-raster li { margin: 0; display: grid; border-left: 1px solid var(--am-line); }
.am-glk-raster li:first-child { border-left: 0; }
.inside-article .am-glk .am-glk-kachel { display: grid; grid-template-rows: auto 1fr auto auto; gap: 6px; min-height: 112px; padding: 12px; color: var(--am-text-soft); text-decoration: none; font: 600 14px/1.25 var(--am-font-body); transition: all 0.3s ease-in-out; }
.inside-article .am-glk .am-glk-kachel:hover { background: hsl(205 30% 20%); color: var(--am-text); }
.inside-article .am-glk .am-glk-kachel[aria-pressed="true"] { background: hsl(205 26% 23%); box-shadow: inset 0 -3px 0 var(--am-accent); color: var(--am-text); }
.am-glk-kachel svg { width: 26px; height: 26px; fill: none; stroke: hsl(90 25% 70%); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* Themen-Kacheln der Fragen-Seite: farbiges Menüsymbol der Rubrik (Variable aus .am-mega__link--<symbol>, Snippet #11) */
.am-glk-ico { display: block; width: 32px; height: 32px; background: var(--am-mega-ico) left center / contain no-repeat; }
.am-glk-kachel b { font: 600 1.7rem/1 var(--am-font-head); color: var(--am-text); }
.am-glk-kachel i { display: block; height: 3px; border-radius: 2px; background: linear-gradient(90deg, hsl(90 25% 62%) calc(var(--anteil) * 100%), hsl(210 14% 28%) 0); }
@media (max-width: 1000px) {
	/* Kacheln vor der Zeichnung: Abschnitt als Spalte, Hülle .am-glk-oben löst sich auf */
	.am-glk { display: flex; flex-direction: column; }
	.am-glk-oben { display: contents; }
	.am-glk-text { order: 1; width: min(1152px, 100% - 48px); margin-inline: auto; }
	.am-glk > .am-glk-in:last-child { order: 2; }
	.am-glk-oben > :not(.am-glk-text) { order: 3; width: min(320px, 100% - 48px); margin: var(--am-space-4) auto 0; }
	.entry-content .am-glk .am-tafel { margin: var(--am-space-4) auto 0; }
	.am-glk-oben > .am-glk-symbol { width: 120px; }
	.am-glk-raster { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.am-glk-raster li:nth-child(4n + 1) { border-left: 0; }
	.am-glk-raster li:nth-child(n + 5) { border-top: 1px solid var(--am-line); }
}
@media (max-width: 560px) {
	.am-glk-in, .am-glk-text { width: calc(100% - 32px); }
	/* Handy: Zahlen stehen schon in den Kacheln */
	.am-glk-fakten { display: none; }
	.entry-content .am-glk .am-lead { font-size: 1rem; line-height: 1.6; }
	.am-glk-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--am-space-3); }
	.am-glk-raster li:nth-child(n) { border-left: 0; border-top: 1px solid var(--am-line); }
	.am-glk-raster li:nth-child(2n) { border-left: 1px solid var(--am-line); }
	.am-glk-raster li:nth-child(-n + 2) { border-top: 0; }
	.inside-article .am-glk .am-glk-kachel { min-height: 104px; }
}

@media (prefers-reduced-motion: reduce) {
	.am-gl *, .am-gl *::before, .am-gl *::after, .am-glk * { transition: none !important; }
}
@media print {
	.am-gl__werkzeug, .am-gl__abc, .am-glk-feld, .am-glk-raster { display: none !important; }
	.am-gl__eintrag > summary::after { display: none; }
}