/* V1.7.1 AV10 - 19.10.2026 12:20 - mobil: gewählte Quelle steht in der Chip-Leiste direkt nach „Alle“
   V1.5.0 AV7 - 18.10.2026 19:25 - Filter-Blatt: Schließen-Knopf ✕ (44 px), Wisch-Geste; Quellenliste: „schließen“-Hinweis, Zeile „Liste schließen“
   V1.4.0 AV6 - 18.10.2026 19:10 - Zahlen nur noch gefüllt (ungelesen); mobil: ungelesene Chips vorn, aufklappbare Quellenliste .kb-mnav;
   „Zurück nach oben“ (Divi .et_pb_scroll_top) im krisenblick-Stil
   V1.3.0 AV5 - 18.10.2026 12:40 - Ticker-Zeile: Gruppe rechts mit „✓ Alle gelesen“ + Filter
   V1.2.0 AV4 - 17.10.2026 23:55 - Zahlen in Chips/Nav: heute = Umriss, neu = gefüllt; Hinweisleiste „neue Meldungen“; Logo-Endung .kb-tld;
   Quellenliste für „Über uns“ (ohne Schalter)
   V1.1.0 AV3 - 17.10.2026 23:00 - „gesehen“ nur noch über graue Titelfarbe statt Transparenz; Lade-Zustand der Liste; Chip-Ausblendung nur bei Überlauf (auch Desktop);
   Filter-Blatt: Zeile „Quellen“ mit Alle ab-/auswählen, inaktiver Button
   V1.0 AV1 - 17.10.2026 00:10 - Ursprüngliche Version: Inter lokal, Tokens, Komponenten für Ticker/Chips/Nav/Quellen-Seite/Filter-Blatt, Breakpoint 900px nach Entwürfen 3a/5a/6a/7a/7b */

/* ---------- Schrift ---------- */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/InterVariable-latin.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
.kb-root {
	--kb-ink: #141a24;
	--kb-paper: #ffffff;
	--kb-sand: #f3f1ec;
	--kb-rule: #ece9e3;
	--kb-text-2: #4b5563;
	--kb-muted: #6b7280;
	--kb-header-muted: #9fb3cf;
	--kb-accent: #1d4f8f;
	--kb-accent-line: #1d4f8f55;
	--kb-accent-border: #1d4f8f33;
	--kb-chip-border: #ffffff33;
	--kb-switch-off: #d1d5db;
	--kb-src: var(--kb-accent);
	--kb-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--kb-ease: 180ms ease-out;

	font-family: var(--kb-font);
	color: var(--kb-ink);
	-webkit-font-smoothing: antialiased;
	line-height: 1.4;
	box-sizing: border-box;
}
.kb-root *, .kb-root *::before, .kb-root *::after { box-sizing: inherit; }
/* Resets mit niedriger Spezifität (:where), damit Komponentenklassen darunter gewinnen */
.kb-root :where(h1, h2, h3, p) { margin: 0; padding: 0; font: inherit; color: inherit; }
.kb-root :where(a) { text-decoration: none; color: inherit; }
.kb-root :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: left; }
.kb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Mono-Rolle: Inter mit Tabellenziffern */
.kb-num { font-variant-numeric: tabular-nums; }
.kb-label {
	font-weight: 600;
	font-size: 11px;
	line-height: 1.2;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--kb-muted);
	font-variant-numeric: tabular-nums;
}

/* ---------- Header: Chips ---------- */
.kb-chips {
	display: flex;
	gap: 8px;
	flex-wrap: nowrap;
	white-space: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.kb-chips::-webkit-scrollbar { display: none; }
.kb-chips.is-overflow {
	mask-image: linear-gradient(90deg, #000 88%, transparent);
	-webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
	padding-right: 24px;
}
.kb-chips .kb-chip[hidden], .kb-nav .kb-nav-item[hidden] { display: none; }
.kb-chips .kb-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
	font-size: 13px;
	line-height: 1;
	padding: 7px 12px;
	border-radius: 999px;
	color: #fff;
	border: 1px solid var(--kb-chip-border);
	background: transparent;
	transition: background var(--kb-ease);
	flex-shrink: 0;
}
.kb-chips .kb-chip:hover { background: rgba(255, 255, 255, .08); }
.kb-chips .kb-chip.is-active { background: #fff; color: var(--kb-ink); border-color: #fff; }
.kb-chip .kb-count {
	font-weight: 600;
	font-size: 10px;
	line-height: 1;
	padding: 2px 4px;
	border-radius: 999px;
	border: 1px solid currentColor;
	color: var(--kb-header-muted);
	background: transparent;
	font-variant-numeric: tabular-nums;
	min-width: 16px;
	text-align: center;
}
.kb-chip .kb-count.is-new { background: var(--kb-src); border-color: var(--kb-src); color: #fff; }
.kb-chip[data-src=""] .kb-count.is-new { background: var(--kb-header-muted); border-color: var(--kb-header-muted); color: var(--kb-ink); }
.kb-chips .kb-chip.is-active .kb-count { color: var(--kb-muted); }
.kb-chips .kb-chip.is-active .kb-count.is-new { background: var(--kb-ink); border-color: var(--kb-ink); color: #fff; }
.kb-chip .kb-count:empty { display: none; }

/* ---------- Header: Stand ---------- */
.kb-stand {
	font-weight: 500;
	font-size: 12px;
	line-height: 1.4;
	color: var(--kb-header-muted);
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* ---------- Linke Spalte ---------- */
.kb-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 80px; }
.kb-nav-label { padding: 4px 0 8px; }
.kb-nav-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 9px 12px;
	border-radius: 8px;
	font-weight: 500;
	font-size: 14px;
	line-height: 1.2;
	transition: background var(--kb-ease);
}
.kb-nav-item:hover { background: var(--kb-sand); }
.kb-nav-item.is-active { background: var(--kb-sand); }
.kb-nav-name { display: flex; align-items: center; gap: 10px; }
.kb-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--kb-src); flex-shrink: 0; }
.kb-dot-ink { background: var(--kb-ink); }
.kb-nav-item .kb-count { font-weight: 500; font-size: 11px; color: var(--kb-muted); font-variant-numeric: tabular-nums; min-width: 18px; text-align: center; }
.kb-nav-item .kb-count.is-new { font-weight: 600; color: #fff; background: var(--kb-src); border-radius: 999px; padding: 2px 6px; }
.kb-nav-item[data-src=""] .kb-count.is-new { background: var(--kb-ink); }

/* ---------- Mobile Quellenliste (nur unter 900 px sichtbar) ---------- */
.kb-mnav { display: none; }
.kb-mnav-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	padding: 10px 0;
	border-top: 1px solid var(--kb-rule);
}
.kb-mnav-sum { font-weight: 600; font-size: 11px; color: var(--kb-accent); font-variant-numeric: tabular-nums; }
.kb-mnav-hint { margin-left: auto; font-weight: 500; font-size: 12px; color: var(--kb-accent); }
.kb-mnav-toggle .kb-caret { margin-left: 6px; font-size: 11px; color: var(--kb-accent); transition: transform var(--kb-ease); }
.kb-mnav-toggle[aria-expanded="true"] .kb-caret { transform: rotate(180deg); }
.kb-mnav-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; padding: 0 0 10px; }
.kb-mnav-list[hidden] { display: none; }
.kb-mnav-toggle .kb-mnav-sum { margin-right: auto; }
.kb-mnav-close {
	grid-column: 1 / -1;
	margin-top: 6px;
	padding: 10px;
	text-align: center;
	font-weight: 500;
	font-size: 13px;
	color: var(--kb-accent);
	border-top: 1px solid var(--kb-rule);
}
.kb-mnav-list .kb-nav-item { padding: 8px 6px; font-size: 12px; gap: 6px; min-width: 0; }
.kb-mnav-list .kb-nav-item .kb-nav-name { gap: 7px; min-width: 0; white-space: nowrap; }
.kb-mnav-list .kb-nav-item .kb-count { flex-shrink: 0; }

/* ---------- Ticker ---------- */
.kb-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 0 0 2px;
}
.kb-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-filter-btn { font-weight: 500; font-size: 13px; color: var(--kb-accent); white-space: nowrap; flex-shrink: 0; }
.kb-bar-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.kb-read-all { font-weight: 500; font-size: 13px; color: var(--kb-accent); white-space: nowrap; }
.kb-read-all[hidden] { display: none; }
.kb-read-all:hover, .kb-filter-btn:hover { text-decoration: underline; }
.kb-filter-btn .kb-caret { font-size: 11px; }

.kb-group-label { padding: 14px 0 6px; }
.kb-group + .kb-group .kb-group-label { padding-top: 18px; }

.kb-item {
	display: grid;
	grid-template-columns: 56px 1fr;
	gap: 16px;
	padding: 14px 0;
	border-top: 1px solid var(--kb-rule);
	cursor: pointer;
	transition: opacity var(--kb-ease);
	outline-offset: 4px;
}
.kb-item:focus-visible { outline: 2px solid var(--kb-accent); }
.kb-item.seen .kb-title { color: var(--kb-text-2); }
.kb-time { font-weight: 500; font-size: 13px; line-height: 1.4; font-variant-numeric: tabular-nums; color: var(--kb-ink); }
.kb-body { min-width: 0; }
.kb-title {
	font-weight: 500;
	font-size: 17px;
	line-height: 1.35;
	text-wrap: pretty;
	transition: color var(--kb-ease);
	overflow-wrap: anywhere;
}
@media (hover: hover) {
	.kb-item:hover .kb-title, .kb-item.seen:hover .kb-title { color: var(--kb-accent); }
}
.kb-teaser {
	display: none;
	margin-top: 8px;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.5;
	color: var(--kb-text-2);
	border-left: 2px solid var(--kb-src);
	padding-left: 12px;
	opacity: 0;
	transition: opacity var(--kb-ease);
}
.kb-item.is-open .kb-teaser, .kb-root.teaser-always .kb-teaser { display: block; opacity: 1; }
.kb-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.kb-badge {
	display: inline-block;
	font-weight: 600;
	font-size: 10px;
	line-height: 1;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #fff;
	background: var(--kb-src);
	padding: 5px 7px;
	border-radius: 3px;
	white-space: nowrap;
}
.kb-open { display: none; font-weight: 500; font-size: 13px; color: var(--kb-accent); white-space: nowrap; }
.kb-item.is-open .kb-open, .kb-root.teaser-always .kb-open { display: inline; }
.kb-open:hover { text-decoration: underline; }

/* Neu-Linie */
.kb-newline {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	color: var(--kb-accent);
	font-weight: 600;
	font-size: 10px;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.kb-newline::before, .kb-newline::after { content: ""; flex: 1; height: 1px; background: var(--kb-accent-line); }

.kb-more {
	display: block;
	margin-top: 16px;
	text-align: center;
	font-weight: 500;
	font-size: 13px;
	color: var(--kb-accent);
	padding: 10px;
	border: 1px solid var(--kb-accent-border);
	border-radius: 8px;
	transition: background var(--kb-ease);
}
.kb-more:hover { background: var(--kb-sand); }
.kb-more.is-loading { opacity: .6; pointer-events: none; }
.kb-empty { color: var(--kb-muted); padding: 24px 0; }
.kb-list { transition: opacity var(--kb-ease); }
.kb-list[aria-busy="true"] { opacity: .5; pointer-events: none; }
.kb-more[hidden] { display: none; }
.kb-fresh {
	position: fixed;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	z-index: 60;
	background: var(--kb-accent);
	color: #fff;
	font-weight: 600;
	font-size: 13px;
	padding: 10px 16px;
	border-radius: 999px;
	box-shadow: 0 4px 16px rgba(20, 26, 36, .25);
	white-space: nowrap;
	cursor: pointer;
}
.kb-fresh[hidden] { display: none; }
.kb-fresh:hover { background: var(--kb-ink); }

/* Logo-Endung „.de“ (Divi-Text-Modul im Kopf und Footer) */
.kb-tld { color: #9fb3cf; }
.kb-group[hidden], .kb-item[hidden], .kb-newline[hidden] { display: none; }

/* ---------- Filter-Blatt ---------- */
.kb-sheet {
	border: 0;
	padding: 0;
	margin: auto;
	width: min(100%, 440px);
	max-width: 100%;
	background: var(--kb-paper);
	color: var(--kb-ink);
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(20, 26, 36, .2);
	font-family: var(--kb-font);
}
.kb-sheet::backdrop { background: rgba(20, 26, 36, .45); }
.kb-sheet-form { padding: 10px 16px 20px; }
.kb-sheet-grip { width: 36px; height: 4px; border-radius: 2px; background: var(--kb-switch-off); margin: 0 auto 14px; }
.kb-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.kb-sheet-title { font-weight: 600; font-size: 16px; }
.kb-sheet-reset { font-weight: 500; font-size: 13px; color: var(--kb-accent); }
.kb-sheet-head-actions { display: flex; align-items: center; gap: 4px; }
.kb-sheet-close {
	width: 44px; height: 44px;
	margin-right: -10px;
	display: grid; place-items: center;
	font-size: 20px; line-height: 1;
	color: var(--kb-ink);
	border-radius: 50%;
	text-align: center;
}
.kb-sheet-close:hover { background: var(--kb-sand); }
.kb-sheet-grip { touch-action: none; }
.kb-sheet-label { padding: 16px 0 6px; }
.kb-sheet-label-row { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 0 6px; }
.kb-sheet-all { font-weight: 500; font-size: 13px; color: var(--kb-accent); }
.kb-sheet-sources { max-height: 40vh; overflow-y: auto; }
.kb-sheet-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-top: 1px solid var(--kb-rule);
	cursor: pointer;
}
.kb-sheet-name { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; }
.kb-count-new { font-weight: 500; font-size: 11px; color: var(--kb-muted); font-variant-numeric: tabular-nums; }
.kb-count-new:empty { display: none; }
.kb-check {
	appearance: none;
	width: 20px; height: 20px;
	border-radius: 5px;
	border: 2px solid var(--kb-switch-off);
	background: #fff;
	margin: 0;
	flex-shrink: 0;
	display: grid; place-items: center;
	cursor: pointer;
}
.kb-check:checked { border-color: var(--kb-src); background: var(--kb-src); }
.kb-check:checked::after { content: "✓"; color: #fff; font-weight: 700; font-size: 13px; line-height: 1; }
.kb-switch {
	appearance: none;
	width: 40px; height: 24px;
	border-radius: 12px;
	background: var(--kb-switch-off);
	position: relative;
	margin: 0;
	flex-shrink: 0;
	cursor: pointer;
	transition: background var(--kb-ease);
}
.kb-switch::after {
	content: ""; position: absolute; top: 2px; left: 2px;
	width: 20px; height: 20px; border-radius: 50%;
	background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
	transition: left var(--kb-ease);
}
.kb-switch:checked { background: var(--kb-src); }
.kb-sheet-row .kb-switch:checked { background: var(--kb-ink); }
.kb-switch:checked::after { left: 18px; }
.kb-sheet-link { display: block; margin-top: 14px; font-weight: 500; font-size: 13px; color: var(--kb-accent); }
.kb-sheet .kb-sheet-apply, .kb-root .kb-primary {
	display: block;
	width: 100%;
	margin-top: 14px;
	background: var(--kb-ink);
	color: #fff;
	text-align: center;
	font-weight: 600;
	font-size: 14px;
	padding: 13px;
	border-radius: 10px;
	font-variant-numeric: tabular-nums;
}
.kb-sheet .kb-sheet-apply:disabled { background: var(--kb-switch-off); color: var(--kb-ink); cursor: not-allowed; }

/* ---------- Quellen-Seite ---------- */
.kb-page-title { font-weight: 600; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; }
.kb-page-sub { font-weight: 400; font-size: 14px; line-height: 1.5; color: var(--kb-muted); margin-top: 6px; }
.kb-source-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.kb-source-list > li { margin: 0; padding-left: 0; }
.kb-source {
	display: grid;
	grid-template-columns: 14px 1fr;
	gap: 16px;
	align-items: start;
	padding: 16px 0;
	border-top: 1px solid var(--kb-rule);
}
.kb-source-bar { width: 14px; height: 14px; border-radius: 4px; background: var(--kb-src); margin-top: 3px; }
.kb-source-main { min-width: 0; }
.kb-source-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kb-source-name { font-weight: 600; font-size: 16px; line-height: 1.2; }
.kb-source-link { font-weight: 500; font-size: 13px; color: var(--kb-accent); white-space: nowrap; }
.kb-source-link:hover { text-decoration: underline; }
.kb-source-desc { font-weight: 400; font-size: 13px; line-height: 1.45; color: var(--kb-text-2); margin-top: 3px; }
.kb-source-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-weight: 500; font-size: 12px; color: var(--kb-muted); font-variant-numeric: tabular-nums; }
.kb-source-error { color: #a00; }

/* ---------- Mobil (3a, 6a, 7a) ---------- */
@media (max-width: 899px) {
	.kb-mnav { display: block; margin-top: 6px; }
	/* Reihenfolge mobil: „Alle“ – gewählte Quelle – Quellen mit Ungelesenem – Rest (je in der eingestellten Reihenfolge) */
	.kb-chips .kb-chip { order: 3; }
	.kb-chips .kb-chip.has-unread { order: 2; }
	.kb-chips .kb-chip.is-active { order: 1; }
	.kb-chips .kb-chip[data-src=""] { order: 0; }
	.kb-chip { font-size: 12px; padding: 6px 10px; }
	.kb-stand { font-size: 11px; line-height: 1.35; }
	.kb-stand-sep { display: none; }
	.kb-stand-date, .kb-stand-upd { display: block; }
	.kb-nav { display: none; }
	.kb-bar { padding-top: 0; }
	.kb-filter-btn, .kb-read-all { font-size: 11px; }
	.kb-bar-actions { gap: 12px; }
	.kb-item { grid-template-columns: 44px 1fr; gap: 10px; padding: 10px 0; }
	.kb-time { font-size: 12px; }
	.kb-title { font-size: 14px; }
	.kb-teaser { margin-top: 6px; font-size: 13px; line-height: 1.45; padding-left: 10px; }
	.kb-meta { margin-top: 6px; }
	.kb-badge { padding: 4px 6px; }
	.kb-open { font-size: 12px; }
	.kb-more { margin-top: 14px; }
	.kb-sheet {
		width: 100%;
		max-width: 100vw;
		margin: auto 0 0;
		border-radius: 16px 16px 0 0;
		box-shadow: 0 -8px 30px rgba(20, 26, 36, .2);
		max-height: 88vh;
	}
	.kb-page-title { font-size: 22px; }
	.kb-page-sub { font-size: 13px; }
	.kb-source-list { gap: 10px; }
	.kb-source {
		grid-template-columns: 4px 1fr;
		gap: 12px;
		border: 1px solid var(--kb-rule);
		border-radius: 12px;
		padding: 14px 14px 14px 0;
		overflow: hidden;
	}
	.kb-source-bar { width: 4px; height: auto; border-radius: 0; margin: -14px 0; align-self: stretch; }
	.kb-source-name { font-size: 15px; }
	.kb-source-desc { margin-top: 4px; }
	.kb-source-stats { font-size: 11px; margin-top: 8px; }
}

/* Ohne JS: Teaser und Link immer sichtbar, Chips ohne Zähler */
@media (scripting: none) {
	.kb-teaser { display: block; opacity: 1; }
	.kb-open { display: inline; }
	.kb-filter-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.kb-root *, .kb-sheet * { transition: none !important; }
}

/* ---------- „Zurück nach oben“ (Divi-Theme-Option) im krisenblick-Stil ---------- */
.et_pb_scroll_top.et-pb-icon {
	right: 20px;
	bottom: 24px;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 50%;
	background: #141a24;
	color: #fff;
	font-size: 24px;
	line-height: 44px;
	text-align: center;
	box-shadow: 0 4px 16px rgba(20, 26, 36, .25);
	transition: background .18s ease-out, transform .18s ease-out;
}
.et_pb_scroll_top.et-pb-icon:hover {
	background: #1d4f8f;
	transform: translateY(-2px);
}
@media (max-width: 899px) {
	.et_pb_scroll_top.et-pb-icon {
		right: 16px;
		bottom: 16px;
		width: 40px;
		height: 40px;
		line-height: 40px;
		font-size: 22px;
	}
}
