@font-face {
	font-family: Newsreader;
	src: url(fonts/Newsreader/Newsreader-VariableFont_opsz\,wght.ttf);
}

@font-face {
	font-family: IBM Plex Mono;
	src: url(fonts/IBM_Plex_Mono/IBMPlexMono-Regular.ttf);
}

:root {
	--paper: #f5f0e6;
	--paper-2: #ece5d6;
	--ink: #1f2a2b;
	--muted: #6e6a60;
	--rule: #d6cdb9;
	--teal: #0e5456;
	--teal-2: #2f7d7f;
	--up: #1c6f49;
	--down: #a8432f;
	--serif: "Newsreader", Georgia, serif;
	--mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
	box-sizing: border-box;
}

html {
	background: var(--paper);
}

body {
	margin: 0;
	color: var(--ink);
	font-family: var(--serif);
	font-size: 17px;
	line-height: 1.5;
  min-height: 100vh;		/* Fallback für ältere Browser */
	min-height: 100svh;		/* mindestens so hoch wie der sichtbare Bildschirm */
	display: flex;
	flex-direction: column;
}

main {
  flex: 1 0 auto;	
  width: 100%;	
}

a {
	color: var(--teal);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.wrap {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 24px;
}

/* Kopfzeile */
.masthead {
	border-bottom: 3px double var(--ink);
	background: var(--paper);
	position: sticky;
	top: 0;
	z-index: 5;
}

.mast-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 58px;
}

.brand {
	font-weight: 700;
	font-size: 20px;
	color: var(--ink);
	text-decoration: none;
	display: flex;
	gap: 10px;
	align-items: center;
}

.brand img {
	width: 28px;
}

.brand-mark {
	font-family: var(--mono);
	font-size: 12px;
	background: var(--teal);
	color: var(--paper);
	padding: 3px 6px;
	letter-spacing: .08em;
}

nav {
	display: flex;
	gap: 22px;
	align-items: center;
	font-family: var(--mono);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .06em;
}

nav a {
	color: var(--ink);
	text-decoration: none;
}

nav a:hover {
	color: var(--teal);
}

nav form {
	margin: 0;
}

button.link {
	background: none;
	border: 0;
	font: inherit;
	color: var(--muted);
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 0;
}

/* Titel */
.titleblock {
	padding: 36px 0 18px;
	border-bottom: 1px solid var(--rule);
}

.eyebrow {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--teal);
	margin: 0 0 8px;
}

h1 {
	font-size: 44px;
	line-height: 1.08;
	margin: 0 0 10px;
	font-weight: 700;
	letter-spacing: -.01em;
}

.meta {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--muted);
	margin: 0 0 16px;
}

.pulse {
	color: var(--teal);
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.actions form {
	margin: 0;
}

.btn {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .04em;
	background: var(--teal);
	color: var(--paper);
	border: 1px solid var(--teal);
	padding: 8px 12px;
	cursor: pointer;
}

.btn.ghost {
	background: transparent;
	color: var(--teal);
}

.btn:hover {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}

/* Abschnitte */
.block {
	padding: 30px 0 10px;
	border-bottom: 1px solid var(--rule);
}

h2 {
	font-size: 24px;
	margin: 0 0 6px;
	display: flex;
	align-items: baseline;
	gap: 12px;
}

.no {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--teal);
	border: 1px solid var(--teal);
	padding: 1px 6px;
}

.note {
	color: var(--muted);
	font-size: 15px;
	margin: 0 0 14px;
	font-style: italic;
}

.muted {
	color: var(--muted);
}

.small {
	font-size: 13px;
}

.mono {
	font-family: var(--mono);
	font-size: 13px;
}

.empty {
	color: var(--muted);
	font-style: italic;
}

.two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
}

.scroll {
	overflow-x: auto;
}

.chart {
	cursor: grab;
}

/* Tabellen */
table {
	width: 100%;
	border-collapse: collapse;
}

th {
	font-family: var(--mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--muted);
	text-align: left;
	font-weight: 500;
	padding: 6px 8px;
	border-bottom: 1px solid var(--ink);
}

td {
	padding: 7px 8px;
	border-bottom: 1px solid var(--rule);
	vertical-align: top;
}

.num {
	text-align: right;
	font-family: var(--mono);
	font-size: 13px;
	white-space: nowrap;
}

td.topic {
	font-weight: 600;
	white-space: nowrap;
}

/* Aufsteiger */
.risers td.head {
	font-size: 15px;
}

.risers td.head a {
	color: var(--ink);
	text-decoration: none;
}

.risers td.head a:hover {
	color: var(--teal);
	text-decoration: underline;
}

.deltacell {
	width: 250px;
}

.delta {
	position: relative;
	height: 20px;
	width: 240px;
}

.delta::before {
	content: "";
	position: absolute;
	left: 120px;
	top: 0;
	bottom: 0;
	border-left: 1px solid var(--ink);
}

.delta .bar {
	position: absolute;
	top: 5px;
	height: 10px;
}

.delta.up .bar {
	left: 121px;
	background: var(--up);
}

.delta.down .bar {
	right: 120px;
	background: var(--down);
	opacity: .8;
}

.delta .dval {
	position: absolute;
	font-family: var(--mono);
	font-size: 12px;
	top: 1px;
}

.delta.up .dval {
	color: var(--up);
}

.delta.down .dval {
	color: var(--down);
}

/* Heatmap */
.heat th {
	text-align: center;
	padding: 6px 2px;
	white-space: nowrap;
}

.heat td.cell {
	text-align: center;
	font-family: var(--mono);
	font-size: 12px;
	padding: 6px 2px;
	border: 2px solid var(--paper);
	min-width: 46px;
}

.heat td.cell.empty {
	background: var(--paper-2);
}

.heat tr.totals td {
	color: var(--muted);
	background: none;
	font-size: 11px;
}

.heat td.topic {
	font-size: 15px;
	padding-right: 14px;
}

/* Umfragen */
.tabs {
	display: flex;
	gap: 4px;
	margin: 6px 0 10px;
}

.tab {
	font-family: var(--mono);
	font-size: 12px;
	text-decoration: none;
	color: var(--ink);
	border: 1px solid var(--ink);
	padding: 4px 10px;
}

.tab.active {
	background: var(--ink);
	color: var(--paper);
}

svg.chart {
	width: 100%;
	height: auto;
	display: block;
	margin: 4px 0 14px;
}

svg.chart .grid {
	stroke: var(--rule);
	stroke-width: 1;
}

svg.chart .axis {
	font-family: var(--mono);
	font-size: 11px;
	fill: var(--muted);
}

svg.chart .endlabel {
	font-family: var(--mono);
	font-size: 12px;
	font-weight: 600;
}

.polls td {
	font-size: 15px;
}

/* Wikipedia & DIP */
.wiki td {
	font-size: 15px;
}

.wiki .pos {
	color: var(--up);
}

.wiki .neg {
	color: var(--down);
}

.sparkcell {
	width: 130px;
	color: var(--teal);
}

svg.spark {
	width: 120px;
	height: 26px;
	display: block;
}

.dip {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dip li {
	padding: 8px 0;
	border-bottom: 1px solid var(--rule);
	font-size: 15px;
	line-height: 1.4;
}

.tag {
	font-family: var(--mono);
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: .06em;
	background: var(--teal);
	color: var(--paper);
	padding: 1px 6px;
	margin-right: 6px;
}

/* Lagebrief */
.brief {
	background: #fffdf8;
	border: 1px solid var(--rule);
	border-top: 4px solid var(--teal);
	padding: 22px 28px;
	max-width: 760px;
}

.brief h3 {
	font-size: 19px;
	margin: 18px 0 6px;
}

.brief h3:first-child {
	margin-top: 0;
}

.brief ul {
	padding-left: 20px;
	margin: 0 0 8px;
}

.briefs-layout {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 32px;
	padding: 26px 0;
}

.brief-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.brief-list li {
	border-bottom: 1px solid var(--rule);
}

.brief-list a {
	display: block;
	padding: 8px 6px;
	text-decoration: none;
	color: var(--ink);
}

.brief-list li.active a {
	background: var(--paper-2);
	border-left: 3px solid var(--teal);
}

/* Karten */
.maps {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 36px;
}

.maptitle {
	font-size: 17px;
	margin: 0 0 8px;
}

.map-modes {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 10px;
}

.map-modes button {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: .04em;
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--rule);
	padding: 4px 9px;
	cursor: pointer;
	transition: all .2s;
}

.map-modes button:hover {
	border-color: var(--ink);
}

.map-modes button.active {
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}

.map-stage {
	position: relative;
}

svg.map {
	width: 100%;
	height: auto;
	max-height: 520px;
	display: block;
	overflow: visible;
}

svg.map .region {
	stroke: var(--paper);
	stroke-width: 1;
	stroke-linejoin: round;
	fill-rule: evenodd;
	cursor: default;
	outline: none;
	transition: opacity .3s ease, filter .3s ease, fill .5s ease;
	transform-box: fill-box;
	transform-origin: center;
	animation: region-in .7s cubic-bezier(.2,.7,.2,1) both;
	animation-delay: calc(var(--i) * 45ms);
}

svg.map .region.link {
	cursor: pointer;
}

.mapbox.hovering svg.map .region {
	opacity: .38;
	filter: saturate(.35);
}

svg.map .lifted {
	pointer-events: none;
	stroke: var(--ink);
	stroke-width: 1.6;
	stroke-linejoin: round;
	fill-rule: evenodd;
	transform-box: fill-box;
	transform-origin: center;
	transform: translateY(-4px) scale(1.045);
	filter: drop-shadow(0 10px 14px rgba(31, 42, 43, .32)) drop-shadow(0 2px 3px rgba(31, 42, 43, .25));
	animation: lift-up .28s cubic-bezier(.2,.8,.2,1.2) both;
}

svg.map .labels text {
	font-family: var(--mono);
	font-size: 10px;
	font-weight: 600;
	fill: var(--ink);
	text-anchor: middle;
	dominant-baseline: middle;
	paint-order: stroke;
	stroke: rgba(245, 240, 230, .85);
	stroke-width: 3px;
	pointer-events: none;
	transition: opacity .3s;
}

.mapbox.hovering svg.map .labels text {
	opacity: .25;
}

svg.map .labels text.callout {
	font-size: 9px;
}

svg.map .labels .leader {
	stroke: var(--ink);
	stroke-width: .8;
	opacity: .55;
}

svg.map .labels .pin {
	fill: var(--ink);
	stroke: rgba(245, 240, 230, .9);
	stroke-width: 1;
}

svg.map .labels .leader, svg.map .labels .pin {
	pointer-events: none;
	transition: opacity .3s;
}

.mapbox.hovering svg.map .labels .leader, .mapbox.hovering svg.map .labels .pin {
	opacity: .2;
}

@keyframes region-in {
	from {
		opacity: 0;
		transform: translateY(8px) scale(.97);
	}
}

@keyframes lift-up {
	from {
		transform: translateY(0) scale(1);
		filter: drop-shadow(0 0 0 rgba(0,0,0,0));
	}
}

.map-tip {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 4;
	pointer-events: none;
	min-width: 230px;
	max-width: 290px;
	background: rgba(255, 253, 248, .97);
	border: 1px solid var(--rule);
	border-top: 3px solid var(--teal);
	box-shadow: 0 14px 34px rgba(31, 42, 43, .18);
	padding: 10px 12px 9px;
	opacity: 0;
	transition: opacity .18s ease, transform .08s linear;
}

.map-tip.on {
	opacity: 1;
}

.map-tip .tk {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--teal);
	margin: 0 0 2px;
}

.map-tip .tt {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.2;
}

.map-tip .tt span {
	font-family: var(--mono);
	font-size: 11px;
	font-weight: 500;
	color: var(--muted);
	margin-left: 4px;
}

.map-tip .tf {
	font-family: var(--mono);
	font-size: 10.5px;
	color: var(--muted);
	margin: 7px 0 0;
}

.tbar {
	display: grid;
	grid-template-columns: 52px 1fr auto;
	gap: 8px;
	align-items: center;
	margin: 3px 0;
	font-size: 13px;
}

.tbar .tname {
	font-weight: 600;
	white-space: nowrap;
}

.tbar .ttrack {
	height: 8px;
	background: var(--paper-2);
	position: relative;
	overflow: hidden;
}

.tbar .ttrack i {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	animation: grow .5s ease-out both;
}

.tbar .tval {
	font-family: var(--mono);
	font-size: 11.5px;
	white-space: nowrap;
}

@keyframes grow {
	from {
		width: 0 !important;
	}
}

.theads {
	margin: 0;
	padding-left: 16px;
	font-size: 13px;
	line-height: 1.35;
}

.theads li {
	margin: 3px 0;
}

.map-legend {
	margin-top: 8px;
}

.lg-row {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
}

.lg-item {
	font-family: var(--mono);
	font-size: 11px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.lg-item i {
	width: 11px;
	height: 11px;
	display: inline-block;
}

.lg-scale {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--mono);
	font-size: 11px;
}

.lg-scale i {
	flex: 0 0 160px;
	height: 9px;
}

.lg-note {
	font-size: 13px;
	color: var(--muted);
	font-style: italic;
	margin: 4px 0 0;
}

.map-caption {
	font-family: var(--mono);
	font-size: 10.5px;
	color: var(--muted);
	margin: 6px 0 0;
}

/* Lagebrief-Karten */
.cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin: 6px 0 14px;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: var(--ink);
	background: #fffdf8;
	border: 1px solid var(--rule);
	padding: 18px 20px 14px;
	overflow: hidden;
	transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, border-color .25s;
}

.card::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	height: 3px;
	width: 34%;
	background: var(--teal);
	transition: width .35s ease;
}

.card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 32px rgba(31, 42, 43, .13);
	border-color: var(--ink);
}

.card:hover::before {
	width: 100%;
}

.card.feature {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	column-gap: 32px;
	padding: 24px 28px 18px;
}

.card.feature .kicker, .card.feature h3, .card.feature .teaser {
	grid-column: 1;
}

.card.feature .points {
	grid-column: 2;
	grid-row: 1 / span 3;
	align-self: start;
}

.card.feature .cmeta {
	grid-column: 1 / -1;
}

.card .kicker {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--teal);
	margin: 0 0 8px;
}

.card .new {
	background: var(--teal);
	color: var(--paper);
	padding: 1px 5px;
	margin-left: 6px;
	letter-spacing: .06em;
}

.card h3 {
	font-size: 21px;
	line-height: 1.2;
	margin: 0 0 8px;
}

.card.feature h3 {
	font-size: 30px;
}

.card .teaser {
	font-size: 15.5px;
	color: #3b4545;
	margin: 0 0 12px;
	flex: 1;
}

.card .points {
	margin: 0;
	padding: 0;
	list-style: none;
	border-left: 1px solid var(--rule);
	padding-left: 18px;
}

.card .points li {
	font-size: 14.5px;
	margin: 0 0 10px;
	padding-left: 14px;
	position: relative;
}

.card .points li::before {
	content: "→";
	position: absolute;
	left: 0;
	color: var(--teal);
	font-family: var(--mono);
	font-size: 12px;
	top: 2px;
}

.card .cmeta {
	display: flex;
	justify-content: space-between;
	font-family: var(--mono);
	font-size: 11px;
	color: var(--muted);
	border-top: 1px solid var(--rule);
	padding-top: 9px;
	margin: 0;
}

.card .more {
	color: var(--teal);
	transition: transform .25s;
}

.card:hover .more {
	transform: translateX(4px);
}

.brief h1 {
	font-size: 30px;
	margin: 0 0 6px;
}

.brief h1 + p {
	font-size: 18px;
	color: #3b4545;
	font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
	svg.map .region, svg.map .lifted, .tbar .ttrack i {
		animation: none;
	}

	.card, svg.map .lifted {
		transition: none;
	}
}

/* Status */
.status td {
	font-size: 14px;
}

.status .dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--teal-2);
	margin-right: 8px;
}

.status tr.bad .dot {
	background: var(--down);
}

.status tr.bad td {
	color: var(--down);
}

/* Login */
.login {
	max-width: 380px;
	margin: 80px auto;
}

.login form {
	display: grid;
	gap: 10px;
}

.login label {
	font-family: var(--mono);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .08em;
}

.login input {
	font: inherit;
	padding: 10px 12px;
	border: 1px solid var(--ink);
	background: #fffdf8;
}

.error {
	color: var(--down);
	font-family: var(--mono);
	font-size: 13px;
}

.foot {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--muted);
	line-height: 1.6;
}

.foot .footer-links {
  display: flex;
  flex-direction: column;
}

.foot .sources {
  background-color: var(--paper-2);
  padding-block: 1em;
}

.foot .footer,
.foot .sub-footer,
.foot .sources {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 0;
}

.foot .footer-wrapper {
  max-width: 1080px;
  padding-inline: 24px;
}

.footer .footer-wrapper {
  width: 100%;
  padding-block: 1em;
  margin-top: 4em;
}

@media (max-width: 760px) {
	h1 {
		font-size: 32px;
	}

	.two, .briefs-layout, .maps, .cards {
		grid-template-columns: 1fr;
	}

	.card.feature {
		display: flex;
	}

	.card.feature h3 {
		font-size: 24px;
	}

	.card .points {
		border-left: 0;
		padding-left: 0;
		margin-bottom: 10px;
	}

	.risers td.head, .risers th:last-child {
		display: none;
	}

	.risers td.topic {
		white-space: normal;
	}

	.deltacell {
		width: auto;
	}

	.delta {
		width: auto;
		height: auto;
	}

	.delta::before, .delta .bar {
		display: none;
	}

	.delta .dval {
		position: static;
	}

	.brand {
		font-size: 17px;
		white-space: nowrap;
	}

	nav {
		gap: 12px;
		font-size: 11px;
	}

	.actions .btn {
		font-size: 11px;
		padding: 6px 9px;
	}
}

.hero {
	min-height: calc(100svh - 61px);
	display: grid;
	grid-template-columns: 1.15fr 1fr;  /* links Text, rechts die Uhr */
	grid-template-rows: 1fr auto;  /* darunter die Kennzahlen über die ganze Breite */
	column-gap: 56px;
	align-items: center;
	border-bottom: none;
	overflow: hidden;
	position: relative;
}

.hero .intro {
	grid-column: 1;
	grid-row: 1;
}

.hero .zr-uhr {
	grid-column: 2;
	grid-row: 1;
	width: min(430px, 100%);
	justify-self: center;
}

.hero a {
	scroll-behavior: smooth;
}

.hero .stats {
	grid-column: 1 / -1;
	grid-row: 2;
	width: 100%;
	z-index: 2;
}

.hero th {
	font-size: 32px;
	line-height: 1;
	border-bottom: 0;
	font-weight: 800;
	border-top: 1px solid var(--rule);
	padding-inline: 1rem;
	padding-top: 3rem;
	width: 25%;
	color: var(--teal);
}

.hero td {
	font-size: 11px;
	line-height: 0.1 !important;
	font-family: var(--mono);
	border-bottom: 0;
	padding-inline: 1rem;
	padding-bottom: 3rem;
}

.hero th:not(:last-child), .hero td:not(:last-child) {
	border-right: 1px solid var(--rule);
}

.hero th:first-child, .hero td:first-child {
	padding-left: 0;
}

/* Meine Einordnung */
.note {
	max-width: 760px;
	margin-top: 18px;
	display: grid;
	gap: 6px;
}

.note label {
	font-family: var(--mono);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--teal);
}

.note p {
	margin: 0;
}

.note textarea {
	font: inherit;
	font-size: 16px;
	line-height: 1.5;
	padding: 12px 14px;
	border: 1px solid var(--rule);
	background: #fffdf8;
	resize: vertical;
}

.note textarea:focus {
	outline: 2px solid var(--teal);
	outline-offset: -1px;
}

.note .btn {
	justify-self: start;
}

/* --- Umfrage-Chart (interaktiv) --- */
.pollchart {
	margin: 4px 0 14px;
}

.pc-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin-bottom: 6px;
}

.pc-ranges {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.pc-ranges button {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: .04em;
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--rule);
	padding: 4px 9px;
	cursor: pointer;
	transition: all .2s;
}

.pc-ranges button:hover {
	border-color: var(--ink);
}

.pc-ranges button.active {
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}

.pc-period {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--muted);
}

.pc-today {
	margin-left: auto;
	font-family: var(--mono);
	font-size: 11px;
	background: transparent;
	color: var(--teal);
	border: 1px solid var(--teal);
	padding: 4px 9px;
	cursor: pointer;
}

.pc-today:hover {
	background: var(--teal);
	color: var(--paper);
}

.pc-stage {
	position: relative;
}

svg.pc-svg {
	margin: 0;
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

svg.pc-svg:focus {
	outline: none;
}

svg.pc-svg:focus-visible {
	outline: 2px solid var(--teal);
	outline-offset: 2px;
}

.pollchart.dragging svg.pc-svg {
	cursor: grabbing;
}

svg.pc-svg .line {
	fill: none;
	stroke-width: 2;
	stroke-linejoin: round;
	stroke-linecap: round;
}

svg.pc-svg .raw {
	opacity: .28;
}

svg.pc-svg .tick {
	stroke: var(--rule);
}

svg.pc-svg .endlabel {
	font-family: var(--mono);
	font-size: 11px;
	font-weight: 600;
	fill: var(--ink);
}

svg.pc-svg .endlabel .delta {
	fill: var(--muted);
	font-weight: 400;
}

svg.pc-svg .cross {
	stroke: var(--ink);
	stroke-width: 1;
	stroke-dasharray: 3 3;
	opacity: .5;
}

svg.pc-svg .hdot {
	stroke: var(--paper);
	stroke-width: 2;
}

.pc-tip {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 3;
	pointer-events: none;
	min-width: 170px;
	background: rgba(255, 253, 248, .97);
	border: 1px solid var(--rule);
	border-top: 3px solid var(--teal);
	box-shadow: 0 10px 26px rgba(31, 42, 43, .16);
	padding: 8px 10px 7px;
	font-family: var(--mono);
	font-size: 12px;
	opacity: 0;
	transition: opacity .15s;
}

.pc-tip.on {
	opacity: 1;
}

.pc-tip .tk {
	margin: 0 0 5px;
	font-weight: 600;
}

.pc-tip .tr {
	display: grid;
	grid-template-columns: 9px 1fr auto;
	gap: 7px;
	align-items: center;
	line-height: 1.6;
}

.pc-tip .tr i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
}

.pc-tip .tr b {
	font-weight: 600;
}

.pc-tip .tn {
	margin: 5px 0 0;
	color: var(--muted);
	font-size: 11px;
}

svg.pc-svg .ev {
	stroke: var(--ink);
	stroke-width: 1;
	opacity: .35;
}

svg.pc-svg .ev.ereignis {
	stroke-dasharray: 2 3;
	opacity: .45;
	stroke: var(--muted);
}

svg.pc-svg .evlabel {
	font-family: var(--mono);
	font-size: 10px;
	fill: var(--ink);
	font-weight: 600;
}

svg.pc-svg .evlabel.ereignis {
	fill: var(--muted);
	font-weight: 400;
}

.pc-tip .tev {
	margin: -2px 0 6px;
	font-size: 11px;
	color: var(--teal);
	font-weight: 600;
}

.pc-tip .tev.ereignis {
	color: var(--muted);
	font-weight: 400;
}

.pc-events {
	font-family: var(--mono);
	font-size: 11px;
	background: transparent;
	color: var(--muted);
	border: 1px dashed var(--rule);
	padding: 4px 9px;
	cursor: pointer;
}

.pc-events.active {
	color: var(--ink);
	border-style: solid;
	border-color: var(--ink);
}

svg.pc-svg .endl {
	cursor: pointer;
}

svg.pc-svg .endl rect {
	fill: transparent;
}

svg.pc-svg .line, svg.pc-svg .endl {
	transition: opacity .2s, stroke-width .2s;
}

.pollchart.focus svg.pc-svg .line:not(.on) {
	opacity: .12;
}

.pollchart.focus svg.pc-svg .raw:not(.on) {
	opacity: .04;
}

.pollchart.focus svg.pc-svg .raw.on {
	opacity: .55;
}

.pollchart.focus svg.pc-svg .endl:not(.on) {
	opacity: .3;
}

.pollchart.focus svg.pc-svg .line.on {
	stroke-width: 3;
}

.pollchart.focus .pc-tip .tr:not(.hl) {
	opacity: .4;
}

/* Themenfarben für die Bundestags-Tags */
.tag-migration {
	--tag: #00616e;
}

.tag-wirtschaft {
	--tag: #2c516b;
}

.tag-preise {
	--tag: #8f520d;
}

.tag-wohnen {
	--tag: #944123;
}

.tag-sozial {
	--tag: #6b3a6e;
}

.tag-steuern {
	--tag: #7b5f06;
}

.tag-klima {
	--tag: #2a6736;
}

.tag-sicherheit {
	--tag: #525b2b;
}

.tag-europa {
	--tag: #234993;
}

.tag-demokratie {
	--tag: #822b31;
}

.tag-bildung {
	--tag: #55438e;
}

.tag-gesundheit {
	--tag: #12695c;
}

.tag-infrastruktur {
	--tag: #474e55;
}

.tag-gleichstellung {
	--tag: #8e3665;
}

.dip .tag {
	background: var(--tag, var(--teal));
}

.dip .tag-sonstiges {
	background: transparent;
	color: var(--muted);
	box-shadow: inset 0 0 0 1px var(--rule);
}

/* --- Konten, Merkliste, Exporte --- */
nav .nav-cta {
	border: 1px solid var(--ink);
	padding: 3px 8px;
}

nav .nav-cta:hover {
	background: var(--ink);
	color: var(--paper);
}

form.mark {
	display: inline;
	margin: 0;
}

.star {
	background: none;
	border: 0;
	padding: 0 2px;
	cursor: pointer;
	font-size: 15px;
	line-height: 1;
	color: var(--muted);
	vertical-align: -1px;
}

.star:hover, .star.on {
	color: #b8860b;
}

.hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.brief-tools {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.brief-tools .btn {
	text-decoration: none;
}

.brief-tools .star {
	font-size: 20px;
}

.marks {
	list-style: none;
	margin: 0;
	padding: 0;
}

.marks li {
	padding: 8px 0;
	border-bottom: 1px solid var(--rule);
	font-size: 15px;
	line-height: 1.4;
}

.stack {
	display: grid;
	gap: 6px;
	max-width: 360px;
}

.stack input {
	font: inherit;
	padding: 6px 8px;
	border: 1px solid var(--rule);
	background: #fffdf8;
}

.stack .btn {
	justify-self: start;
	margin-top: 6px;
}

.okmsg {
	color: var(--teal);
	font-family: var(--mono);
	font-size: 13px;
}

.btn.danger {
	background: var(--down);
	border-color: var(--down);
}

.stack.danger {
	margin-top: 18px;
	padding-top: 12px;
	border-top: 1px solid var(--rule);
}

.pc-save {
	font-family: var(--mono);
	font-size: 11px;
	background: transparent;
	color: var(--muted);
	border: 1px solid var(--rule);
	padding: 3px 8px;
	cursor: pointer;
	vertical-align: middle;
}

.pc-save:hover {
	color: var(--ink);
	border-color: var(--ink);
}

.pc-save:disabled {
	opacity: .5;
	cursor: progress;
}

.maptitle .pc-save {
	margin-left: 8px;
	font-weight: 400;
}

.legal {
	max-width: 720px;
}

.legal h2 {
	font-size: 20px;
	margin: 26px 0 6px;
}

/* --- Ortskarte: Suchfeld + Kreis-/Gemeindekarte --- */
.ort-search {
	position: relative;
	margin: 0 0 10px;
}

.ort-search input {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-size: 15px;
	padding: 7px 10px 7px 30px;
	border: 1px solid var(--rule);
	background: #fffdf8 no-repeat 9px 50% / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='5' fill='none' stroke='%236e6a60' stroke-width='1.6'/%3E%3Cpath d='M10.5 10.5l4 4' stroke='%236e6a60' stroke-width='1.6'/%3E%3C/svg%3E");
}

.ort-search input:focus {
	outline: none;
	border-color: var(--ink);
}

.ort-search ul {
	position: absolute;
	z-index: 6;
	left: 0;
	right: 0;
	top: 100%;
	margin: 2px 0 0;
	padding: 4px 0;
	list-style: none;
	background: #fffdf8;
	border: 1px solid var(--ink);
	box-shadow: 0 12px 28px rgba(31, 42, 43, .16);
	max-height: 340px;
	overflow-y: auto;
}

.ort-search li {
	padding: 6px 10px;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	gap: 10px;
	align-items: baseline;
}

.ort-search li b {
	font-weight: 600;
}

.ort-search li span {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ort-search li[aria-selected="true"], .ort-search li:hover {
	background: var(--paper-2);
}

.ort-search li.none {
	color: var(--muted);
	cursor: default;
}

.ort-map.loading {
	opacity: .45;
	transition: opacity .2s;
}

.map-modes .map-delta {
	font-family: var(--mono);
	font-size: 11px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-left: 6px;
	padding: 3px 8px;
	border: 1px dashed var(--rule);
	cursor: pointer;
	user-select: none;
}

.map-modes .map-delta.off {
	opacity: .4;
}

.map-modes .map-delta input {
	margin: 0;
	accent-color: var(--ink);
}

svg.map .hl-outline {
	fill: none;
	stroke: var(--ink);
	stroke-width: 2.2;
	stroke-linejoin: round;
	pointer-events: none;
}

.mapbox.hovering svg.map .hl-outline {
	opacity: .35;
}

/* ++++++++++++++++++ ABOUT +++++++++++++++++++ */
.about-img {
  width: 60%;
  aspect-ratio: 4/5;
  padding: 8px;
  border: var(--teal) 2px solid;
  object-fit: cover;
}

.about-wer .about-img {
  justify-content: end !important;
}

.daten th {
	border-bottom: 1px solid var(--rule);
	vertical-align: top;
	font-family: var(--serif);
	font-size: 15px;
}

.daten td {
	vertical-align: top;
}

/* --- Zeitgeist-Radar-Uhr --- */
.zr-uhr {
	width: 160px;
	height: auto;
	display: block;
}

.zr-uhr .zr-sektor, .zr-uhr .zr-minutenzeiger, .zr-uhr .zr-stundenzeiger {
	transform-box: view-box;
	transform-origin: 160px 160px;
}

/* 60 s / 5 Umdrehungen = 12 s */
.zr-uhr .zr-sektor {
	animation: zr-radar 12s linear infinite;
}

/* kleiner Nachschwinger */
.zr-uhr .zr-minutenzeiger, .zr-uhr .zr-stundenzeiger {
	transition: transform .45s cubic-bezier(.3, 1.6, .5, 1);
}

@keyframes zr-radar {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.zr-uhr .zr-sektor {
		animation: none;
	}

	.zr-uhr .zr-minutenzeiger, .zr-uhr .zr-stundenzeiger {
		transition: none;
	}
}

/* --- Wochenbilanz: laufende Woche als Vorschau --- */
.live {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--muted);
	margin: -6px 0 16px;
}

.live b {
	color: var(--ink);
	font-weight: 500;
}

.live-tag {
	display: inline-block;
	border: 1px dashed var(--teal);
	color: var(--teal);
	padding: 0 6px;
	margin-right: 6px;
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.heat th.partial {
	color: var(--teal);
}

.heat td.cell.partial {
	opacity: .45;
	outline: 1px dashed var(--teal);
	outline-offset: -3px;
}

/* --- Handy-Anpassungen: Heatmap, Umfragen, Karten, Wikipedia, Bundestag --- */
/* Themenspalte bleibt beim Scrollen stehen */
.heat td.topic, .heat thead th:first-child {
	position: sticky;
	left: 0;
	z-index: 2;
	background: var(--paper);
	box-shadow: 6px 0 6px -6px rgba(31, 42, 43, .25);
}

.pc-legend {
	display: none;
}

.pollchart.compact .pc-legend {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	margin: 8px 0 4px;
}

.pc-legend .lg {
	font-family: var(--mono);
	font-size: 11.5px;
	display: grid;
	grid-template-columns: 9px minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 5px;
	text-align: left;
	background: transparent;
	border: 1px solid var(--rule);
	color: var(--ink);
	padding: 6px 7px;
	cursor: pointer;
	min-width: 0;
}

.pc-legend .lg .nm {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pc-legend .lg i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
}

.pc-legend .lg b {
	font-weight: 600;
}

.pc-legend .lg span:last-child {
	color: var(--muted);
	min-width: 3.2em;
	text-align: right;
}

.pc-legend .lg.on {
	border-color: var(--ink);
	background: var(--paper-2);
}

.pollchart.focus .pc-legend .lg:not(.on) {
	opacity: .45;
}

.map-tip .tgo {
	margin: 6px 0 0;
	font-family: var(--mono);
	font-size: 11px;
	color: var(--teal);
}

.dip .tag {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: 1px;
}

@media (max-width: 760px) {
	.heat td.topic {
		font-size: 13px;
		min-width: 112px;
		max-width: 130px;
		white-space: normal;
		line-height: 1.25;
		padding-right: 8px;
	}

	.heat td.cell {
		min-width: 40px;
	}

	.wiki {
		width: 100%;
		table-layout: fixed;
	}

	.wiki td {
		font-size: 14px;
		padding: 7px 4px;
		overflow-wrap: anywhere;
	}

	.wiki td:nth-child(2) {
		width: 70px;
	}

	.wiki td:nth-child(3) {
		width: 54px;
	}

	.wiki .sparkcell {
		width: 64px;
	}

	.wiki svg.spark {
		width: 60px;
	}

	.dip .tag {
		font-size: 9px;
		letter-spacing: .03em;
		padding: 1px 5px;
	}

	.dip li {
		font-size: 14px;
	}
}

/* Grid-Spalten dürfen schmaler werden als ihr Inhalt (sonst läuft die Tabelle über) */
.two > * {
	min-width: 0;
}

/* --- Handy: Kopfzeile und Hero passen in die Bildschirmbreite --- */
@media (max-width: 760px) {
	.hero .intro {
		width: 100%;
	}

	.hero {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto auto;
	}

	.hero .zr-uhr {
		grid-column: 1;
		grid-row: 2;
		width: min(300px, 80vw);
		margin: 24px auto 0;
	}

	.hero .stats {
		grid-row: 3;
		margin-top: 28px;
	}

	.hero .stats table {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.hero .stats thead, .hero .stats tbody, .hero .stats tr {
		display: contents;
	}

	.hero th, .hero td {
		width: auto;
		padding-inline: 0 10px;
		border-right: 0 !important;
	}

	.hero th {
		font-size: 26px;
		padding-top: 16px;
	}

	.hero td {
		line-height: 1.3 !important;
		padding-bottom: 14px;
		white-space: normal;
	}

	.hero th:nth-child(1) {
		grid-area: 1 / 1;
	}

	.hero td:nth-child(1) {
		grid-area: 2 / 1;
	}

	.hero th:nth-child(2) {
		grid-area: 1 / 2;
	}

	.hero td:nth-child(2) {
		grid-area: 2 / 2;
	}

	.hero th:nth-child(3) {
		grid-area: 3 / 1;
	}

	.hero td:nth-child(3) {
		grid-area: 4 / 1;
	}

	.hero th:nth-child(4) {
		grid-area: 3 / 2;
	}

	.hero td:nth-child(4) {
		grid-area: 4 / 2;
	}
}

@media (max-width: 480px) {
	.brand-name {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.mast-inner {
		height: auto;
		min-height: 58px;
		padding-block: 8px;
		gap: 10px;
	}

	nav {
		gap: 10px;
		font-size: 10.5px;
		flex-wrap: wrap;
		justify-content: flex-end;
		row-gap: 4px;
	}
}

/* auch die Zeile „Meldungen“ bleibt beim Scrollen lesbar */
.heat tr.totals td.topic {
	background: var(--paper);
}

/* --- Desktop: beide Karten in gemeinsamen Zeilen (Titel · Suche · Ansichten · Karte · Legende · Quelle),
       damit Karten und Legenden auf derselben Höhe beginnen. Die Hüllen (.mapbox, .ort-map) lösen sich
       per display: contents auf, ihre Teile setzen sich direkt in das Raster. --- */
@media (min-width: 761px) {
	.maps {
		grid-template-rows: repeat(6, auto);
		row-gap: 0;
	}

	.maps .mapcol {
		display: grid;
		grid-row: span 6;
		grid-template-rows: subgrid;
		min-width: 0;
	}

	.maps .mapbox, .maps .ort-map {
		display: contents;
	}

	.maps .maptitle {
		grid-row: 1;
	}

	.maps .ort-search {
		grid-row: 2;
	}

	.maps .map-modes {
		grid-row: 3;
		align-self: end;
	}

	/* Bundesländer: Knöpfe direkt unter dem Titel */
	.maps .mapcol:not(#ortkarte) .map-modes {
		grid-row: 2;
		align-self: start;
	}

	.maps .map-stage {
		grid-row: 4;
		align-self: start;
	}

	.maps .map-legend {
		grid-row: 5;
	}

	.maps .map-caption {
		grid-row: 6;
	}

	.maps .ort-map > .empty {
		grid-row: 4;
	}

	.maps .ort-frag {
		display: none;
	}

	/* .ort-map selbst hat keine Box mehr */
	.maps .ort-map.loading .map-stage {
		opacity: .45;
		transition: opacity .2s;
	}
}

/* --- Desktop: Bundestag-Liste so hoch wie die Wikipedia-Spalte, Rest per Scrollen / Pfeil --- */
.dip-more {
	display: none;
}

@media (min-width: 761px) {
	.two #bundestag {
		display: flex;
		flex-direction: column;
	}

	.two #bundestag .dip {
		flex: 1 1 0;
		height: 0;
		overflow: hidden;  /* height 0: bestimmt die Zeilenhöhe nicht mit · hidden: Mausrad scrollt die Seite, nur der Pfeil die Liste */
		-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
		mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
	}

	.two #bundestag .dip.at-end {
		-webkit-mask-image: none;
		mask-image: none;
	}

	.dip-more:not([hidden]) {
		display: block;
		align-self: center;
		margin: 6px 0 4px;
		width: 34px;
		height: 34px;
		border-radius: 50%;
		border: 1px solid var(--ink);
		background: var(--paper);
		color: var(--ink);
		font-size: 16px;
		line-height: 1;
		cursor: pointer;
		transition: transform .25s, background .15s;
	}

	.dip-more:hover {
		background: var(--ink);
		color: var(--paper);
	}

	.dip-more.up {
		transform: rotate(180deg);
	}
}

/* --- Radar-Punkte auf der Uhr --- */
.zr-uhr .zr-dot {
	fill: #0E5456;
}

.zr-uhr .zr-ping {
	fill: none;
	stroke: #0E5456;
	stroke-width: 2;
	transform-box: fill-box;
	transform-origin: center;
	animation: zr-ping 1.6s ease-out 1 both;
}

@keyframes zr-ping {
	from {
		transform: scale(1);
		opacity: .9;
	}

	to {
		transform: scale(5);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.zr-uhr .zr-ping {
		display: none;
	}
}

/* --- Umfragen: Bundesland als Auswahlliste im Reiter-Stil --- */
.tab-select {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 0;
}

.tab-select select {
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	color: inherit;
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 4px 28px 4px 10px;
	cursor: pointer;
}

.tab-select::after {
	content: "";
	position: absolute;
	right: 10px;
	top: 50%;
	width: 6px;
	height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}

.tab-select select:focus-visible {
	outline: 2px solid var(--teal);
	outline-offset: 2px;
}

.tab-select.active select option {
	color: var(--ink);
	background: var(--paper);
}

.tab-select button {
	font: inherit;
	background: transparent;
	color: inherit;
	border: 0;
	border-left: 1px solid currentColor;
	padding: 4px 10px;
	cursor: pointer;
}
