/* Schnur Archiv – Frontend. Farben/Schriften kommen aus Elementor, sofern gesetzt. */
.sa-archiv, .sa-single, .sa-doc-page {
	--sa-accent: var(--e-global-color-primary, #1f3a5f);
	--sa-ink: var(--e-global-color-text, #1d1d1b);
	--sa-muted: #6a6a66;
	--sa-paper: #f3f2ee;
	--sa-line: rgba(0, 0, 0, .12);
	--sa-radius: 4px;
	color: var(--sa-ink);
	font-family: inherit;
}
.sa-archiv *, .sa-archiv *::before, .sa-archiv *::after, .sa-doc-page *, .sa-doc-page *::before, .sa-doc-page *::after { box-sizing: border-box; }
.sa-archiv .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Suche & Filter ---------- */
.sa-bar { display: flex; flex-direction: column; gap: 16px; margin: 0 0 10px; padding: clamp(16px, 3vw, 24px); background: var(--sa-paper); border-radius: 8px; }
.sa-search { position: relative; display: block; max-width: 620px; }
.sa-search svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--sa-accent); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.sa-search input { width: 100%; height: 52px; padding: 0 18px 0 48px; border: 2px solid transparent; border-radius: 999px; background: #fff; color: var(--sa-ink); font: inherit; font-size: 17px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.sa-search input:focus { outline: none; border-color: var(--sa-accent); }

.sa-kinds, .sa-years { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.sa-kinds button, .sa-years button { flex: 0 0 auto; border-radius: 999px; font: inherit; line-height: 1.2; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }

/* Art: kräftige Hauptauswahl */
.sa-kinds button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 2px solid var(--sa-accent); background: #fff; color: var(--sa-accent); font-size: 16px; font-weight: 600; }
.sa-kinds button span { display: inline-block; min-width: 24px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--sa-accent) 12%, #fff); font-size: 13px; text-align: center; }
.sa-kinds button:hover { background: color-mix(in srgb, var(--sa-accent) 8%, #fff); color: var(--sa-accent); }
.sa-kinds button.is-active { background: var(--sa-accent); color: #fff; }
.sa-kinds button.is-active span { background: rgba(255,255,255,.22); color: #fff; }

/* Jahr: ruhigere Zweitauswahl */
.sa-years button { padding: 7px 15px; border: 1px solid var(--sa-line); background: #fff; color: var(--sa-ink); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.sa-years button:hover:not(:disabled) { border-color: var(--sa-accent); color: var(--sa-accent); background: #fff; }
.sa-years button.is-active { background: var(--sa-ink); border-color: var(--sa-ink); color: #fff; }
.sa-years button:disabled { opacity: .35; cursor: default; }
.sa-kinds button:focus-visible, .sa-years button:focus-visible, .sa-card:focus-visible, .sa-more:focus-visible { outline: 3px solid var(--sa-accent); outline-offset: 3px; }

.sa-count { margin: 14px 0 0; color: var(--sa-muted); font-size: 15px; }

/* ---------- Jahresabschnitte ---------- */
.sa-year { margin-top: 44px; }
.sa-year-h { display: flex; align-items: center; gap: 16px; margin: 0 0 22px; font-family: inherit; font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--sa-accent); font-variant-numeric: tabular-nums; }
.sa-year-h::after { content: ""; flex: 1; height: 3px; border-radius: 2px; background: var(--sa-accent); opacity: .18; }
.sa-year-h span { order: 2; padding: 4px 11px; border-radius: 999px; background: color-mix(in srgb, var(--sa-accent) 10%, #fff); font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--sa-accent); }

/* ---------- Kacheln ---------- */
.sa-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 30px 22px; }
@media (max-width: 600px) { .sa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; } }
.sa-item { margin: 0; padding: 0; }
.sa-item::before { display: none; }
.sa-item.is-hidden, .sa-year.is-hidden { display: none; }

.sa-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 6px; background: #fff; color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 6px 18px -8px rgba(0,0,0,.25); transition: transform .2s ease, box-shadow .2s ease; }
.sa-card:hover { color: inherit; text-decoration: none; transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 16px 32px -12px rgba(0,0,0,.35); }
.sa-paper { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--sa-paper); }
.sa-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.sa-noimg { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(0deg, transparent 0 14px, rgba(0,0,0,.05) 14px 15px); }

/* Art-Etikett auf dem Bild: Anträge dunkel, Zeitung hell */
.sa-kind { position: absolute; left: 8px; top: 8px; padding: 4px 10px; border-radius: 3px; background: #fff; color: var(--sa-ink); font-size: 12px; font-weight: 700; line-height: 1.3; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.sa-item--antrag .sa-kind { background: var(--sa-ink); color: #fff; }
.sa-badge { position: absolute; right: 8px; bottom: 8px; padding: 3px 8px; border-radius: 3px; background: rgba(255,255,255,.94); color: var(--sa-ink); font-size: 12px; font-weight: 600; line-height: 1.3; box-shadow: 0 1px 2px rgba(0,0,0,.15); }

/* der Titel-Balken unter jedem Beitrag */
.sa-cap { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; background: var(--sa-accent); color: #fff; }
.sa-cap time { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.78); font-variant-numeric: tabular-nums; }
.sa-title { font-size: 16px; font-weight: 700; line-height: 1.3; color: #fff; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sa-card:hover .sa-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.sa-empty { margin: 40px 0; font-size: 17px; color: var(--sa-muted); }
.sa-reset { padding: 0; border: 0; background: none; color: var(--sa-accent); font: inherit; text-decoration: underline; cursor: pointer; }
.sa-more-wrap { text-align: center; margin: 44px 0 10px; }
.sa-more, .sa-btn { display: inline-block; padding: 12px 28px; border: 2px solid var(--sa-accent); border-radius: 999px; background: #fff; color: var(--sa-accent); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.sa-more:hover, .sa-btn:hover { background: var(--sa-accent); color: #fff; }

/* ---------- Lightbox ---------- */
.sa-lb { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: #16181b; color: #f2f2f0; }
.sa-lb::backdrop { background: rgba(0,0,0,.8); }
.sa-lb-inner { display: grid; grid-template-columns: minmax(0, 1fr) 360px; height: 100%; }
.sa-lb-stage { overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 56px 64px; }
.sa-lb-stage img { display: block; max-width: 100%; max-height: calc(100dvh - 112px); width: auto; height: auto; background: #fff; cursor: zoom-in; }
.sa-lb-stage.is-zoom img { max-height: none; cursor: zoom-out; }
.sa-lb-stage iframe { width: 100%; height: calc(100dvh - 112px); border: 0; background: #fff; }
.sa-lb-info { overflow: auto; padding: 64px 28px 28px; background: #1f2226; }
.sa-lb-meta { margin: 0 0 8px; font-size: 14px; color: #b8bcc2; }
.sa-lb-title { margin: 0 0 14px; font-family: inherit; font-size: 24px; line-height: 1.25; color: #fff; }
.sa-lb-summary { margin: 0 0 18px; font-size: 16px; line-height: 1.6; color: #dcdde0; }
.sa-lb-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.sa-lb-pages button { padding: 5px 12px; border: 1px solid #50555c; border-radius: 3px; background: transparent; color: #f2f2f0; font: inherit; font-size: 14px; cursor: pointer; }
.sa-lb-pages button.is-active { background: #f2f2f0; color: #16181b; }
.sa-lb-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.sa-lb-links a { display: inline-block; padding: 10px 18px; border-radius: 999px; background: #f2f2f0; color: #16181b; font-weight: 600; font-size: 15px; text-decoration: none; }
.sa-lb-links a + a { background: transparent; color: #f2f2f0; border: 1px solid #50555c; }
.sa-lb-close, .sa-lb-prev, .sa-lb-next { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; }
.sa-lb-close:hover, .sa-lb-prev:hover, .sa-lb-next:hover { background: rgba(255,255,255,.22); }
.sa-lb button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sa-lb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sa-lb-close { top: 10px; right: 10px; }
.sa-lb-prev, .sa-lb-next { top: 50%; transform: translateY(-50%); }
.sa-lb-prev { left: 8px; }
.sa-lb-next { right: 368px; }
@media (max-width: 900px) {
	.sa-lb-inner { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
	.sa-lb-stage { padding: 56px 12px 12px; }
	.sa-lb-stage img { max-height: calc(62dvh - 60px); }
	.sa-lb-info { max-height: 38dvh; padding: 16px 18px 20px; }
	.sa-lb-title { font-size: 19px; }
	.sa-lb-summary { font-size: 15px; }
	.sa-lb-prev, .sa-lb-next { top: 30%; width: 40px; height: 40px; }
	.sa-lb-next { right: 8px; }
}
body.sa-lb-open { overflow: hidden; }

/* ---------- Detailseite ---------- */
.sa-single { max-width: 900px; }
.sa-single-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 18px; font-size: 15px; color: var(--sa-muted); }
.sa-single-meta time { font-weight: 600; color: var(--sa-accent); }
.sa-single-body { font-size: 18px; line-height: 1.65; max-width: 68ch; }
.sa-single-docs { display: flex; flex-direction: column; gap: 24px; margin: 28px 0; }
.sa-doc { margin: 0; }
.sa-doc img { display: block; max-width: 100%; height: auto; border: 1px solid var(--sa-line); background: #fff; }
.sa-doc figcaption { margin-top: 8px; font-size: 14px; color: var(--sa-muted); }
.sa-kw { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; padding: 0; }
.sa-kw li { margin: 0; padding: 4px 12px; border: 1px solid var(--sa-line); border-radius: 999px; font-size: 14px; }
.sa-fulltext { margin: 0 0 24px; padding: 14px 18px; border: 1px solid var(--sa-line); border-radius: var(--sa-radius); }
.sa-fulltext summary { cursor: pointer; font-weight: 600; }
.sa-back a { color: var(--sa-accent); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
	.sa-card { transition: none; }
	.sa-card:hover { transform: none; }
}

/* =========================================================
   Beitragsseite
   ========================================================= */
.sa-doc-wrap { max-width: 1180px; margin: 0 auto; padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 32px) 64px; }

.sa-crumbs { display: flex; gap: 8px; align-items: center; margin-bottom: 22px; font-size: 14px; color: var(--sa-muted); }
.sa-crumbs a { color: var(--sa-muted); text-decoration: none; }
.sa-crumbs a:hover { color: var(--sa-accent); text-decoration: underline; }

.sa-doc-head { max-width: 860px; margin-bottom: clamp(24px, 4vw, 40px); }
.sa-doc-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; }
.sa-doc-kicker time { font-size: 16px; font-weight: 600; color: var(--sa-accent); font-variant-numeric: tabular-nums; }
.sa-tag { display: inline-block; padding: 3px 11px; border: 1px solid var(--sa-accent); border-radius: 999px; color: var(--sa-accent); font-size: 13px; font-weight: 600; line-height: 1.4; }
.sa-doc-title { margin: 0 0 16px; font-family: inherit; font-size: clamp(1.75rem, 3.6vw, 2.75rem); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: var(--sa-ink); text-wrap: balance; }
.sa-doc-lead { margin: 0; max-width: 64ch; font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.65; color: #3d3d3a; }

.sa-doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .sa-doc-layout { grid-template-columns: 1fr; } }

/* Dokument wie ein Blatt auf dem Tisch */
.sa-desk { display: flex; justify-content: center; padding: clamp(14px, 4vw, 44px); background: var(--sa-paper); border-radius: 6px; }
.sa-sheet { margin: 0; max-width: 100%; }
.sa-sheet[hidden] { display: none; }
.sa-sheet-zoom { display: block; padding: 0; border: 0; background: #fff; cursor: zoom-in; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 18px 40px -18px rgba(0,0,0,.35); }
.sa-sheet-zoom:focus-visible { outline: 3px solid var(--sa-accent); outline-offset: 4px; }
.sa-sheet-img { display: block; width: auto; max-width: 100%; height: auto; max-height: 82vh; }

.sa-viewer-bar { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 14px; font-size: 14px; color: var(--sa-muted); }
.sa-pg { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--sa-line); border-radius: 50%; background: #fff; color: var(--sa-ink); cursor: pointer; }
.sa-pg:hover:not(:disabled) { border-color: var(--sa-accent); color: var(--sa-accent); background: #fff; }
.sa-pg:disabled { opacity: .35; cursor: default; }
.sa-pg svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sa-pg-label b { color: var(--sa-ink); }

.sa-thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.sa-thumb { position: relative; width: 60px; height: 78px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 3px; background: #fff; cursor: pointer; box-shadow: 0 0 0 1px var(--sa-line); }
.sa-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.sa-thumb span { position: absolute; right: 3px; bottom: 3px; min-width: 18px; padding: 0 4px; border-radius: 2px; background: rgba(255,255,255,.92); color: var(--sa-ink); font-size: 11px; font-weight: 700; line-height: 16px; }
.sa-thumb.is-active { border-color: var(--sa-accent); box-shadow: none; }
.sa-thumb:hover { background: #fff; }

/* Seitenleiste */
.sa-doc-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 28px; }
@media (max-width: 900px) { .sa-doc-side { position: static; } }
.sa-facts { margin: 0; border-top: 1px solid var(--sa-line); }
.sa-facts > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--sa-line); }
.sa-facts dt { margin: 0; font-size: 14px; color: var(--sa-muted); }
.sa-facts dd { margin: 0; font-size: 15px; font-weight: 600; }

.sa-actions { display: flex; flex-direction: column; gap: 10px; }
.sa-actions .sa-btn { width: 100%; text-align: center; }
.sa-btn--solid { background: var(--sa-accent); color: #fff; }
.sa-btn--solid:hover { filter: brightness(1.12); color: #fff; }

.sa-side-block h2 { margin: 0 0 10px; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--sa-ink); }
.sa-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; }
.sa-chips li { margin: 0; }
.sa-chips li::before { display: none; }
.sa-chips a { display: inline-block; padding: 5px 12px; border: 1px solid var(--sa-line); border-radius: 999px; color: var(--sa-ink); font-size: 14px; text-decoration: none; }
.sa-chips a:hover { border-color: var(--sa-accent); color: var(--sa-accent); }

/* Älter / Neuer */
.sa-doc-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: clamp(40px, 6vw, 64px) 0 0; padding-top: 24px; border-top: 1px solid var(--sa-line); }
@media (max-width: 640px) { .sa-doc-nav { grid-template-columns: 1fr; } }
.sa-doc-nav a { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--sa-line); border-radius: 6px; color: var(--sa-ink); text-decoration: none; }
.sa-doc-nav a:hover { border-color: var(--sa-accent); }
.sa-doc-nav-newer { flex-direction: row-reverse; text-align: right; }
.sa-doc-nav-thumb { flex: 0 0 52px; width: 52px; height: 66px; overflow: hidden; border-radius: 2px; background: var(--sa-paper); }
.sa-doc-nav-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.sa-doc-nav-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sa-doc-nav-text small { font-size: 13px; color: var(--sa-muted); }
.sa-doc-nav-text strong { font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.sa-doc-more { margin-top: clamp(40px, 6vw, 64px); }
.sa-doc-more h2 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 20px; font-family: inherit; font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 300; color: var(--sa-accent); }
.sa-doc-more h2::after { content: ""; flex: 1; height: 1px; background: var(--sa-line); }
.sa-doc-more .sa-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sa-doc-back { margin: 40px 0 0; text-align: center; }

/* Vergrößerung */
.sa-zoom { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: #16181b; }
.sa-zoom::backdrop { background: rgba(0,0,0,.85); }
.sa-zoom-stage { width: 100%; height: 100%; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 56px 16px 16px; }
.sa-zoom-stage img { display: block; max-width: 100%; max-height: 100%; background: #fff; cursor: zoom-in; }
.sa-zoom-stage.is-full { align-items: flex-start; justify-content: flex-start; }
.sa-zoom-stage.is-full img { max-width: none; max-height: none; cursor: zoom-out; margin: 0 auto; }
.sa-zoom-close { position: fixed; top: 10px; right: 10px; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.sa-zoom-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Arten umbrechen statt scrollen, damit alle sichtbar sind */
.sa-kinds { flex-wrap: wrap; overflow: visible; }
@media (max-width: 600px) {
	.sa-kinds button { padding: 8px 14px; font-size: 15px; }
	.sa-cap { padding: 10px 11px 12px; }
	.sa-title { font-size: 15px; }
	.sa-kind { font-size: 11px; padding: 3px 8px; }
}
