/* Länder-Ranking: Kachelkarte links, Tabelle rechts; stapelt sich auf dem Handy. */
.lr-app {
	--lr-bg: #ffffff;
	--lr-fg: #17201a;
	--lr-muted: #5d6a61;
	--lr-line: #dfe5df;
	--lr-soft: #f2f5f1;
	--lr-accent: #1f6b2c;
	--lr-empty: #eceeea;
	--lr-s0: #e6f2e1; --lr-s1: #c8e4bd; --lr-s2: #a3d095; --lr-s3: #79b96a;
	--lr-s4: #4f9c45; --lr-s5: #317c30; --lr-s6: #1e5e23;
	--lr-ink-light: #17201a; --lr-ink-dark: #ffffff;
	--lr-display: inherit;
	--lr-body: inherit;
	font-family: var(--lr-body);
	color: var(--lr-fg);
	background: var(--lr-bg);
	border: 1px solid var(--lr-line);
	border-radius: 10px;
	padding: 16px;
	display: grid;
	grid-template-columns: minmax(0, 1fr);   /* Inhalt darf die Spalte nicht aufweiten */
	gap: 14px;
	font-variant-numeric: tabular-nums;
	line-height: 1.4;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .lr-app {
		--lr-bg: #141a16; --lr-fg: #e8ede8; --lr-muted: #9aa69d; --lr-line: #2b352e; --lr-soft: #1c241f;
		--lr-accent: #8fd07f; --lr-empty: #232a25;
		--lr-s0: #1d3020; --lr-s1: #234528; --lr-s2: #2b5f31; --lr-s3: #3a7c3d;
		--lr-s4: #559d4f; --lr-s5: #7bbd6c; --lr-s6: #a7da96;
		--lr-ink-light: #e8ede8; --lr-ink-dark: #0f1711;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] .lr-app {
	--lr-bg: #141a16; --lr-fg: #e8ede8; --lr-muted: #9aa69d; --lr-line: #2b352e; --lr-soft: #1c241f;
	--lr-accent: #8fd07f; --lr-empty: #232a25;
	--lr-s0: #1d3020; --lr-s1: #234528; --lr-s2: #2b5f31; --lr-s3: #3a7c3d;
	--lr-s4: #559d4f; --lr-s5: #7bbd6c; --lr-s6: #a7da96;
	--lr-ink-light: #e8ede8; --lr-ink-dark: #0f1711;
	color-scheme: dark;
}

.lr-app * { box-sizing: border-box; }
.lr-app button { font: inherit; }

.lr-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.lr-tab {
	flex: 0 0 auto; border: 1px solid var(--lr-line); background: var(--lr-bg); color: var(--lr-fg);
	border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 0.875rem; white-space: nowrap;
}
.lr-subtabs { margin-top: 6px; }
.lr-subtabs .lr-tab { border-radius: 6px; padding: 4px 10px; font-size: 0.8125rem; }
.lr-tab:hover { border-color: var(--lr-accent); }
.lr-tab[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.lr-tab[aria-disabled="true"]:hover { border-color: var(--lr-line); }
.lr-tab[aria-selected="true"] { background: var(--lr-accent); border-color: var(--lr-accent); color: var(--lr-bg); font-weight: 600; }
.lr-tab:focus-visible, .lr-tile:focus-visible, .lr-row:focus-visible, .lr-select:focus-visible { outline: 2px solid var(--lr-accent); outline-offset: 2px; }

.lr-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; justify-content: space-between; }
.lr-title { font-family: var(--lr-display); font-size: 1.35rem; font-weight: 700; margin: 0; line-height: 1.15; text-wrap: balance; }
.lr-sub { color: var(--lr-muted); font-size: 0.85rem; margin: 2px 0 0; }
.lr-controls { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.lr-metric { display: flex; gap: 8px; align-items: center; font-size: 0.85rem; color: var(--lr-muted); }
.lr-select { font: inherit; font-size: 0.875rem; color: var(--lr-fg); background: var(--lr-bg); border: 1px solid var(--lr-line); border-radius: 6px; padding: 5px 8px; }

.lr-body { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; align-items: start; }
.lr-app[data-map="0"] .lr-body { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 680px) { .lr-body { grid-template-columns: minmax(0, 1fr); } }

.lr-mapwrap { position: relative; display: grid; gap: 8px; }
.lr-map { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; max-width: 300px; }
.lr-tile {
	aspect-ratio: 1; border: 0; border-radius: 6px; padding: 4px; cursor: pointer;
	display: flex; flex-direction: column; justify-content: space-between; text-align: left;
	background: var(--lr-empty); color: var(--lr-muted); min-width: 0; max-width: 100%;
}
.lr-tile .lr-code { font-family: var(--lr-display); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; }
.lr-tile .lr-val { font-size: 0.72rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-tile[data-active="1"] { box-shadow: 0 0 0 2px var(--lr-bg), 0 0 0 4px var(--lr-fg); }
.lr-legend { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--lr-muted); }
.lr-legend .lr-sw { display: flex; gap: 2px; }
.lr-legend .lr-sw i { width: 14px; height: 10px; border-radius: 2px; display: block; }
.lr-legend .lr-none { width: 14px; height: 10px; border-radius: 2px; background: var(--lr-empty); display: inline-block; }

.lr-tip {
	position: absolute; z-index: 5; pointer-events: none; min-width: 160px; max-width: 240px;
	background: var(--lr-bg); color: var(--lr-fg); border: 1px solid var(--lr-line); border-radius: 8px;
	padding: 8px 10px; font-size: 0.8rem; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}
.lr-tip strong { display: block; margin-bottom: 2px; }
.lr-tip span { color: var(--lr-muted); }

.lr-tablewrap { min-width: 0; }
.lr-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.lr-table th { text-align: left; font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--lr-muted); padding: 6px 8px; border-bottom: 1px solid var(--lr-line); }
.lr-table th.lr-num, .lr-table td.lr-num { text-align: right; }
.lr-table td { padding: 7px 8px; border-bottom: 1px solid var(--lr-line); vertical-align: top; }
.lr-row { cursor: pointer; }
.lr-row:hover td { background: var(--lr-soft); }
.lr-row[data-active="1"] td { background: var(--lr-soft); }
.lr-row[data-empty="1"] td { color: var(--lr-muted); }
.lr-pos { width: 2.5em; font-weight: 700; }
.lr-main { font-weight: 600; }
.lr-clubs td { padding-top: 0; background: var(--lr-soft); font-size: 0.82rem; color: var(--lr-muted); }
.lr-clubs ul { margin: 0; padding: 0 0 6px; list-style: none; display: grid; gap: 2px; }
.lr-clubs li { display: flex; justify-content: space-between; gap: 12px; }

.lr-foot { font-size: 0.75rem; color: var(--lr-muted); border-top: 1px solid var(--lr-line); padding-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.lr-empty-note { color: var(--lr-muted); }

@media (prefers-reduced-motion: no-preference) {
	.lr-tile { transition: background-color 200ms ease, color 200ms ease; }
}

/* Umrisskarte */
.lr-app[data-map="geo"] .lr-body { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
@media (max-width: 680px) { .lr-app[data-map="geo"] .lr-body { grid-template-columns: minmax(0, 1fr); } }
.lr-geomap { position: relative; max-width: 420px; }
.lr-geo { display: block; width: 100%; height: auto; }
.lr-st { cursor: pointer; outline: none; }
.lr-st path, .lr-st circle { stroke: var(--lr-bg); stroke-width: 1.4; stroke-linejoin: round; transition: opacity 0.12s; }
.lr-st:hover path, .lr-st:hover circle { opacity: 0.82; }
.lr-st:focus-visible path, .lr-st:focus-visible circle { stroke: var(--lr-accent); stroke-width: 3; }
.lr-st[data-active="1"] path, .lr-st[data-active="1"] circle { stroke: var(--lr-fg); stroke-width: 3; }
.lr-glabel { text-anchor: middle; pointer-events: none; font-size: 13px; }
.lr-gcode { font-weight: 700; letter-spacing: 0.04em; }
.lr-gval { font-size: 11px; font-weight: 600; }
.lr-detail { border: 1px solid var(--lr-line); border-radius: 8px; padding: 10px 12px; background: var(--lr-soft); font-size: 0.85rem; }
.lr-dhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lr-dhead h4 { margin: 0; font-size: 0.95rem; }
.lr-close { border: 0; background: transparent; color: var(--lr-muted); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.lr-close:hover { color: var(--lr-fg); }
.lr-detail h5 { margin: 10px 0 2px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--lr-muted); }
.lr-clublist { list-style: none; margin: 0; padding: 0; }
.lr-clublist li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; border-bottom: 1px solid var(--lr-line); }
.lr-clublist li:last-child { border-bottom: 0; }
.lr-clublist li span:last-child { color: var(--lr-muted); white-space: nowrap; }

/* Rückblick */
.lr-app {
	--lr-series-1: #2a78d6; --lr-series-2: #eb6834; --lr-series-3: #1baf7a; --lr-series-4: #eda100;
	--lr-gray: #b9c0ba;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .lr-app {
		--lr-series-1: #3987e5; --lr-series-2: #d95926; --lr-series-3: #199e70; --lr-series-4: #c98500;
		--lr-gray: #46514a;
	}
}
:root[data-theme="dark"] .lr-app {
	--lr-series-1: #3987e5; --lr-series-2: #d95926; --lr-series-3: #199e70; --lr-series-4: #c98500;
	--lr-gray: #46514a;
}
.lr-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.lr-chip {
	display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--lr-line); background: var(--lr-bg);
	color: var(--lr-fg); border-radius: 6px; padding: 3px 8px; cursor: pointer; font-size: 0.8125rem; font-weight: 600;
}
.lr-chip[aria-pressed="true"] { border-color: var(--lr-fg); }
.lr-chip[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.lr-chip:focus-visible { outline: 2px solid var(--lr-accent); outline-offset: 2px; }
.lr-chip-sw { display: block; width: 10px; height: 10px; border-radius: 2px; background: var(--lr-gray); }
.lr-chartwrap { position: relative; }
.lr-chart { display: block; width: 100%; height: auto; }
.lr-grid { stroke: var(--lr-line); stroke-width: 1; }
.lr-axis { fill: var(--lr-muted); font-size: 11px; }
.lr-cov { font-size: 10px; opacity: 0.85; }
.lr-line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.lr-line-bg { stroke: var(--lr-gray); stroke-width: 1.25; }
.lr-line-hl { stroke-width: 2.25; }
.lr-line-run { stroke-dasharray: 4 4; }
.lr-dot { stroke: var(--lr-bg); stroke-width: 2; }
.lr-endlabel { fill: var(--lr-fg); font-size: 11px; font-weight: 700; }
.lr-cross { stroke: var(--lr-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.lr-chart-tip { min-width: 170px; }
.lr-tip-row { display: flex; justify-content: space-between; gap: 10px; }
.lr-tip .lr-tip-row span { color: var(--lr-fg); }
.lr-tip .lr-tip-row span:last-child { font-weight: 600; }
.lr-note { margin: 0; color: var(--lr-muted); font-size: 0.8rem; }
.lr-caption { text-align: left; font-weight: 600; font-size: 0.85rem; padding: 0 0 6px; }

.lr-explain { border-left: 3px solid var(--lr-accent); background: var(--lr-soft); border-radius: 0 6px 6px 0; padding: 8px 12px; font-size: 0.82rem; color: var(--lr-muted); }
.lr-explain p { margin: 0; }
.lr-explain p + p { margin-top: 4px; }

/* Seite pro Bundesland */
.lr-statepage h2 { font-family: var(--lr-display); font-size: 1.15rem; margin: 10px 0 0; }
.lr-statepage h3 { font-size: 0.95rem; margin: 10px 0 2px; }
.lr-statepage p { margin: 0; }
.lr-lead { font-size: 1.02rem; }
.lr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.lr-kpi { background: var(--lr-soft); border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; }
.lr-kpi-v { font-size: 1.4rem; font-weight: 700; line-height: 1.1; }
.lr-kpi-l { font-size: 0.75rem; color: var(--lr-muted); }
.lr-statelinks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.lr-statepage a { color: var(--lr-accent); }
.lr-detail a { color: var(--lr-accent); font-weight: 600; }

/* Tabellen ohne waagerechten Rollbalken: lange Namen brechen um, auf schmalen Bildschirmen kleinere Schrift und Abstände */
.lr-table { table-layout: auto; }
.lr-table th, .lr-table td { overflow-wrap: break-word; hyphens: auto; }
.lr-table td.lr-num, .lr-table th.lr-num { white-space: nowrap; }
@media (max-width: 600px) {
	.lr-app { padding: 12px; }
	.lr-table { font-size: 0.82rem; }
	.lr-table th { font-size: 0.64rem; letter-spacing: 0.02em; padding: 5px 4px; }
	.lr-table td { padding: 6px 4px; }
	.lr-pos { width: 2em; }
}
@media (max-width: 520px) {
	.lr-review-table th:last-child, .lr-review-table td:last-child { display: none; }
}

/* Verlauf einer Liga */
.lr-history { display: grid; gap: 8px; border-top: 1px solid var(--lr-line); padding-top: 12px; }
.lr-history .lr-title { font-size: 1.05rem; }

/* Länderumschalter */
.lr-countries ul { list-style: none; display: flex; gap: 6px; margin: 0 0 10px; padding: 0; }
.lr-country { display: inline-block; padding: 6px 14px; border: 1px solid #dfe5df; border-radius: 999px; font-size: 0.9rem; text-decoration: none; color: inherit; }
a.lr-country:hover { border-color: #1f6b2c; }
.lr-country[aria-current="page"] { background: #1f6b2c; border-color: #1f6b2c; color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .lr-country { border-color: #2b352e; }
	:root:not([data-theme="light"]) a.lr-country:hover { border-color: #8fd07f; }
	:root:not([data-theme="light"]) .lr-country[aria-current="page"] { background: #8fd07f; border-color: #8fd07f; color: #141a16; }
}
:root[data-theme="dark"] .lr-country { border-color: #2b352e; }
:root[data-theme="dark"] .lr-country[aria-current="page"] { background: #8fd07f; border-color: #8fd07f; color: #141a16; }

/* Startseite: Länderauswahl */
.lr-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.lr-card { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--lr-line); border-radius: 12px; background: var(--lr-soft); color: var(--lr-fg); text-decoration: none; }
.lr-card-map { width: 100%; height: 150px; margin-bottom: 6px; }
.lr-card-map path { stroke: var(--lr-bg); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lr-card-map circle { stroke: var(--lr-bg); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.lr-card-legend { color: var(--lr-muted); font-size: 0.82rem; margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lr-card-legend .lr-sw { display: flex; gap: 2px; }
.lr-card-legend .lr-sw i { width: 14px; height: 10px; border-radius: 2px; display: block; }
.lr-card:hover, .lr-card:focus-visible { border-color: var(--lr-accent); }
.lr-card-code { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; color: var(--lr-muted); }
.lr-card-name { font-size: 1.3rem; font-weight: 700; }
.lr-card-sub { color: var(--lr-muted); font-size: 0.9rem; }
.lr-card-go { color: var(--lr-accent); font-weight: 600; margin-top: 4px; }

/* Methodik */
.lr-methodik h2 { font-family: var(--lr-display); font-size: 1.3rem; margin: 18px 0 0; }
.lr-methodik h3 { font-size: 1rem; margin: 14px 0 2px; }
.lr-methodik p, .lr-methodik ul, .lr-methodik ol { margin: 0; }
.lr-methodik ul, .lr-methodik ol { padding-left: 1.3em; display: grid; gap: 4px; }
.lr-methodik a, .lr-foot a { color: var(--lr-accent); }
.lr-toc { border: 1px solid var(--lr-line); border-radius: 10px; padding: 10px 14px; background: var(--lr-soft); }
.lr-toc ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
