/* Heftarchiv – Frontend. Übernimmt Schrift und Textfarbe des Themes. */
.fcsg-ha {
	--ha-akzent: #1b7a3a;
	--ha-bg: #fff;
	--ha-linie: rgba(0, 0, 0, .12);
	--ha-leise: rgba(0, 0, 0, .58);
	--ha-flaeche: rgba(0, 0, 0, .035);
	--ha-sticky: 0px;
	--ha-jahrspalte: 124px;
	font-family: inherit;
	line-height: 1.5;
	margin: 0 auto 3rem;
	max-width: 1180px;
}
.fcsg-ha *, .fcsg-ha *::before, .fcsg-ha *::after { box-sizing: border-box; }
.fcsg-ha [hidden] { display: none !important; }
.fcsg-ha .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Kopf ---------- */
.fcsg-ha__kopf { margin-bottom: 1.25rem; }
.fcsg-ha__titel { margin: 0 0 .25rem; }
.fcsg-ha__stat { margin: 0 0 1.25rem; color: var(--ha-leise); font-size: .95em; }

.fcsg-ha__suche {
	display: flex; align-items: center; gap: .5rem;
	border: 2px solid var(--ha-linie); border-radius: 999px;
	padding: .3rem .35rem .3rem 1rem; background: var(--ha-bg);
	transition: border-color .15s;
	max-width: 720px;
}
.fcsg-ha__suche:focus-within { border-color: var(--ha-akzent); }
.fcsg-ha__suche svg { flex: none; color: var(--ha-leise); }
.fcsg-ha__suche input[type="search"] {
	flex: 1; min-width: 0; border: 0 !important; outline: 0; background: transparent !important;
	font: inherit; font-size: 1.05em; padding: .55rem .25rem !important; box-shadow: none !important; margin: 0;
}
.fcsg-ha__suche button {
	flex: none; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--ha-akzent); color: #fff; font: inherit; font-weight: 600;
	padding: .6rem 1.2rem; line-height: 1.2; margin: 0;
}
.fcsg-ha__suche button:hover { filter: brightness(1.1); }
.fcsg-ha__tipp { font-size: .82em; color: var(--ha-leise); margin: .5rem 0 0 1rem; max-width: 700px; }

.fcsg-ha__filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.fcsg-ha__filter button {
	font: inherit; font-size: .9em; cursor: pointer; margin: 0;
	border: 1px solid var(--ha-linie); background: var(--ha-bg); color: inherit;
	border-radius: 999px; padding: .35rem .9rem; line-height: 1.3;
}
.fcsg-ha__filter button:hover { border-color: var(--ha-akzent); }
.fcsg-ha__filter button.is-aktiv { background: var(--ha-akzent); border-color: var(--ha-akzent); color: #fff; }

/* ---------- Jahresleiste ---------- */
.fcsg-ha__jahre {
	position: sticky; top: var(--ha-sticky); z-index: 5;
	display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: thin;
	background: var(--ha-bg); border-bottom: 1px solid var(--ha-linie);
	padding: .5rem 0; margin-bottom: 1.5rem;
}
.fcsg-ha__jahre a {
	flex: none; text-decoration: none !important; color: var(--ha-leise);
	font-size: .9em; font-variant-numeric: tabular-nums; padding: .2rem .55rem; border-radius: 6px;
}
.fcsg-ha__jahre a:hover { color: var(--ha-akzent); background: var(--ha-flaeche); }
.fcsg-ha__jahre a.is-aktiv { color: #fff; background: var(--ha-akzent); }

/* ---------- Zeitleiste ---------- */
.fcsg-ha__zeitleiste { list-style: none; margin: 0; padding: 0; position: relative; }
.fcsg-ha__zeitleiste::before {
	content: ""; position: absolute; top: .6rem; bottom: 0;
	left: calc(var(--ha-jahrspalte) - 22px); width: 2px; background: var(--ha-linie);
}
.fcsg-ha__jahr {
	display: grid; grid-template-columns: var(--ha-jahrspalte) 1fr; gap: 0 1.25rem;
	margin: 0 0 2.25rem; padding: 0; position: relative;
	scroll-margin-top: calc(var(--ha-sticky) + 4rem);
}
.fcsg-ha__jahrmarke {
	position: sticky; top: calc(var(--ha-sticky) + 3.6rem); align-self: start;
	margin: 0; padding: 0 1.9rem 0 0; font-size: 1.45em; line-height: 1.2; font-weight: 700;
	color: var(--ha-akzent); font-variant-numeric: tabular-nums; text-align: left;
}
.fcsg-ha__jahrmarke::after {
	content: ""; position: absolute; top: .38em; left: calc(var(--ha-jahrspalte) - 28px);
	width: 14px; height: 14px; border-radius: 50%;
	background: var(--ha-bg); border: 3px solid var(--ha-akzent);
}
.fcsg-ha__luecke { position: relative; margin: -1rem 0 2rem; padding: 0; height: 2.5rem; }
.fcsg-ha__luecke::before {
	content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--ha-jahrspalte) - 22px); width: 2px;
	background: var(--ha-bg); border-left: 2px dashed var(--ha-linie);
}
.fcsg-ha__luecke span { position: absolute; left: 0; top: .55rem; font-size: .8em; color: var(--ha-leise); }

/* ---------- Karten ---------- */
.fcsg-ha__karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 1.25rem; }
.fcsg-ha__heft { display: flex; flex-direction: column; min-width: 0; }
.fcsg-ha__cover {
	display: block; aspect-ratio: 210 / 297; overflow: hidden; border-radius: 4px;
	background: var(--ha-flaeche); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 6px 18px -8px rgba(0,0,0,.25);
	transition: transform .18s, box-shadow .18s;
}
a.fcsg-ha__cover[href]:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 12px 24px -8px rgba(0,0,0,.3); }
.fcsg-ha__cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; margin: 0; }
.fcsg-ha__platzhalter {
	display: flex; align-items: center; justify-content: center; height: 100%; padding: 1rem;
	text-align: center; font-weight: 700; color: var(--ha-akzent);
}
.fcsg-ha__info { padding-top: .7rem; }
.fcsg-ha__reihe { display: block; font-size: .72em; letter-spacing: .06em; text-transform: uppercase; color: var(--ha-leise); }
.fcsg-ha__name { margin: .1rem 0 .1rem; font-size: 1.05em; line-height: 1.3; }
.fcsg-ha__untertitel { margin: 0 0 .15rem; font-size: .88em; line-height: 1.35; }
.fcsg-ha__meta { margin: 0 0 .4rem; font-size: .85em; color: var(--ha-leise); }
.fcsg-ha__pdf { font-size: .88em; font-weight: 600; color: var(--ha-akzent); text-decoration: none; }
.fcsg-ha__pdf:hover { text-decoration: underline; }
.fcsg-ha__pdf.is-fehlt { color: var(--ha-leise); font-weight: 400; font-style: italic; }

/* ---------- Suchergebnis ---------- */
.fcsg-ha__ergebnis { margin-top: 1.5rem; }
.fcsg-ha__ergebniskopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; }
.fcsg-ha__ergebniszahl { margin: 0; font-weight: 600; font-size: 1.1em; }
.fcsg-ha__zurueck { font: inherit; font-size: .9em; background: none; border: 0; color: var(--ha-akzent); cursor: pointer; text-decoration: underline; padding: 0; }
.fcsg-ha__lade, .fcsg-ha__leer, .fcsg-ha__hinweis { color: var(--ha-leise); }

.fcsg-ha__verlauf {
	display: flex; align-items: flex-end; gap: 3px; height: 92px;
	padding: .5rem 0 1.4rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--ha-linie); overflow-x: auto;
}
.fcsg-ha__balken {
	flex: 1 0 22px; max-width: 46px; height: 100%; position: relative;
	display: flex; flex-direction: column; justify-content: flex-end; text-decoration: none !important;
}
.fcsg-ha__balken span { display: block; background: var(--ha-akzent); opacity: .75; border-radius: 3px 3px 0 0; }
.fcsg-ha__balken:hover span { opacity: 1; }
.fcsg-ha__balken small { position: absolute; bottom: -1.3rem; left: 50%; transform: translateX(-50%); font-size: .68em; color: var(--ha-leise); white-space: nowrap; }

.fcsg-ha__karten--treffer { grid-template-columns: 1fr; gap: 1rem; }
.fcsg-ha__heft--treffer {
	flex-direction: row; gap: 1.1rem; align-items: flex-start;
	padding: 1rem; border: 1px solid var(--ha-linie); border-radius: 8px; background: var(--ha-bg);
}
.fcsg-ha__heft--treffer .fcsg-ha__cover { flex: none; width: 92px; }
.fcsg-ha__heft--treffer .fcsg-ha__info { padding-top: 0; flex: 1; min-width: 0; }
.fcsg-ha__fundstellen { list-style: none; margin: .4rem 0 0; padding: 0; }
.fcsg-ha__fundstellen li { display: flex; gap: .7rem; padding: .45rem 0; border-top: 1px solid var(--ha-linie); font-size: .9em; line-height: 1.45; margin: 0; }
.fcsg-ha__seite {
	flex: none; min-width: 3.6em; font-weight: 600; color: var(--ha-akzent); text-decoration: none; font-variant-numeric: tabular-nums;
}
a.fcsg-ha__seite:hover { text-decoration: underline; }
.fcsg-ha__snippet { min-width: 0; overflow-wrap: anywhere; }
.fcsg-ha__snippet mark { background: color-mix(in srgb, var(--ha-akzent) 22%, transparent); color: inherit; padding: 0 .1em; border-radius: 2px; }
.fcsg-ha__mehr { font: inherit; font-size: .85em; margin-top: .3rem; background: none; border: 0; padding: 0; color: var(--ha-akzent); cursor: pointer; text-decoration: underline; }

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
	.fcsg-ha { --ha-jahrspalte: 0px; }
	.fcsg-ha__zeitleiste::before { left: 6px; }
	.fcsg-ha__jahr { grid-template-columns: 1fr; padding-left: 1.75rem; }
	.fcsg-ha__jahrmarke { position: relative; top: 0; margin-bottom: .75rem; padding: 0; }
	.fcsg-ha__jahrmarke::after { left: -1.75rem; top: .3em; }
	.fcsg-ha__luecke { padding-left: 1.75rem; }
	.fcsg-ha__luecke::before { left: 6px; }
	.fcsg-ha__luecke span { left: 1.75rem; }
	.fcsg-ha__karten { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
	.fcsg-ha__karten--treffer { grid-template-columns: 1fr; }
	.fcsg-ha__heft--treffer { padding: .8rem; gap: .8rem; }
	.fcsg-ha__heft--treffer .fcsg-ha__cover { width: 64px; }
	.fcsg-ha__fundstellen li { flex-direction: column; gap: .1rem; }
	.fcsg-ha__suche button { padding: .6rem .9rem; }
}
