/* Extracted from index.html <style> */
:root {
	--bg: #fff;
	--fg: #141414;
	--muted: #6b7280;
	--accent: #0047ff;
	--border: #e5e7eb;
	--surface: #f7f7f8;
	/* Readability controls */
	--size-base: 20px;
	--font-body-sans: system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
	--font-body: var(--font-body-sans);
	/* Icon tinting (external SVGs via <img>) */
	--icon-filter: none;
}

/* Force Light mode overrides */
:root[data-theme='light'] {
	/* When user explicitly selects Light, use this accent */
	--accent: #66a3ff;
}

/* Dark mode - manual override */
:root[data-theme='dark'] {
	--bg: #0b0c0f;
	--fg: #e7e7ea;
	--muted: #a1a1aa;
	--accent: #66a3ff;
	--border: #2a2b32;
	--surface: #121318;
	--icon-filter: invert(1) brightness(0.85);
}

/* Dark mode - system preference (only if no manual override) */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) {
		--bg: #0b0c0f;
		--fg: #e7e7ea;
		--muted: #a1a1aa;
		--accent: #66a3ff;
		--border: #2a2b32;
		--surface: #121318;
		--icon-filter: invert(1) brightness(0.85);
	}
}

html {
	scroll-behavior: smooth
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font-body);
	line-height: 1.75;
	font-size: var(--size-base);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

header.hero {
	padding: clamp(2rem, 6vw, 5rem) 1.25rem 1.5rem;
	background: linear-gradient(180deg, rgba(0, 0, 0, .06), transparent), var(--surface);
	border-bottom: 1px solid var(--border);
}

.wrap {
	max-width: 105ch;
	margin: 0 auto;
}

h1 {
	font-size: clamp(1.8rem, 4.2vw, 3rem);
	letter-spacing: .2px;
	margin: 0 0 .25rem 0;
}

h2 {
	border-bottom: 1px solid var(--border);
}

.subtitle {
	color: var(--muted);
	font-size: 1.05rem;
	margin-top: .35rem
}

/* Magazine/article layout */
main {
	padding: 1.25rem;
}

.article {
	column-gap: 2.2rem;
	column-fill: balance;
}

/* Readability enhancements: prevent awkward column breaks and long-word overflow */
.article h2,
.article h3,
.article h4,
.article figure,
.article .teaser {
	break-inside: avoid;
	page-break-inside: avoid;
}

.article p,
.article li {
	overflow-wrap: anywhere;
}

::selection {
	background: var(--accent);
	color: #fff;
}

/* Single column by default; 2 columns on larger screens */
@media (min-width: 980px) {
	.article {
		column-count: 2;
		column-gap: 2.5rem;
	}
}

.deck {
	color: var(--muted);
	font-size: 1.05rem;
	margin: .35rem 0 0;
	max-width: 70ch;
}

.meta {
	color: var(--muted);
	font-size: .95rem;
	margin-top: .35rem;
}

.reader-controls {
	display: flex;
	gap: .5rem;
	flex-wrap: wrap;
	align-items: center;
	margin-top: .75rem;
}

.reader-controls .sep {
	color: var(--muted);
}

/* Unified styling for ALL reader controls buttons (size/theme/lang) */
.reader-controls button {
	appearance: none;
	background: var(--surface);
	color: var(--fg);
	border: 1px solid var(--border);
	border-radius: .5rem;
	padding: .35rem .6rem;
	height: 2rem;
	cursor: pointer;
	font: inherit;
	font-size: .9rem;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .35rem;
}

.reader-controls button:hover {
	filter: brightness(0.97);
}

.reader-controls button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* Pressed/active toggle state (used by theme buttons) */
.reader-controls button[aria-pressed='true'] {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

/* External <img> based icons need tinting via filter since currentColor doesn't inherit */
.reader-controls button img {
	display: block;
	width: 1em;
	height: 1em;
	filter: var(--icon-filter);
	pointer-events: none;
}

/* Ensure active (pressed) button icons become white for contrast */
.reader-controls button[aria-pressed='true'] img {
	filter: brightness(0) invert(1);
}

section {
	break-inside: avoid;
	padding: .25rem 0 1rem;
}

section h2 {
	font-size: 1rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--muted);
	margin: .75rem 0 .25rem;
	font-weight: 700;
}

section p {
	margin: .25rem 0 .9rem;
	-webkit-hyphens: auto;
	hyphens: auto;
}

/* Überschriften-Block */
.subtitles {
	margin: 2.5rem 0 1.5rem;
}

/* H2: etwas größer, kräftiger, enger geführt, mit Akzentlinie */
.subtitles h2 {
	font-size: 1.5rem;
	/* fallback for older browsers (no clamp support, e.g., IE) */
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: 0.005em;
	margin: 0 0 0.4rem;
}

.subtitles h2::after {
	content: "";
	display: block;
	width: 3rem;
	/* kurzer Akzent */
	height: 2px;
	background: currentColor;
	opacity: 0.3;
	margin-top: 0.35rem;
}

/* Unterzeile: kleiner, ruhiger, farblich zurückgenommen */
.subtitles .subtitle {
	font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.1rem);
	line-height: 1.35;
	color: rgba(0, 0, 0, 0.65);
	/* passe bei Dark Mode an */
	margin: 0.3rem 0 0;
}

/* Optional: Dark Mode Feinschliff, falls du data-theme="dark" nutzt */
:root[data-theme="dark"] .subtitles .subtitle {
	color: rgba(255, 255, 255, 0.7);
}

/* Subtitles wrapper: left accent like teaser, no bottom border on h2 */
.subtitles {
	padding-left: .6rem;
	margin: .6rem 0 .5rem;
}

.subtitles h2 {
	border-bottom: 1px solid var(--border);
	margin: .1rem 0 .1rem;
}

.subtitles .subtitle {
	margin: 0;
}

/* Figure and image styling inside article */
.article figure {
	break-inside: avoid;
	page-break-inside: avoid;
	margin: .5rem 0 1rem;
	border: 1px solid var(--border);
	border-radius: .5rem;
	background: var(--bg);
	overflow: hidden;
}

.article figure img {
	display: block;
	width: 100%;
	height: auto;
}

.article figure figcaption {
	padding: .45rem .6rem;
	color: var(--muted);
	font-size: .9rem;
	border-top: 1px solid var(--border);
}

/* Thumbnail variant for inline image */
.article figure.thumb {
	max-width: 360px;
	float: right;
	margin: .25rem 0 1rem 1rem;
}

@media (max-width: 699px) {
	.article figure.thumb {
		float: none;
		margin: .5rem 0 1rem;
	}
}

/* Side-by-side figure (image left, text right) */
.article figure.side {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: start;
	gap: 1rem;
	max-width: 100%;
	float: none;
	margin: .75rem 0 1.25rem;
	padding: .6rem .75rem;
	background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 120%);
	position: relative;
}

.article figure.side::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 6px;
	border-radius: 4px 0 0 4px;
}

.article figure.side img {
	width: 400px;
	max-width: 100%;
	height: auto;
	border-radius: .4rem;
	object-fit: cover;
}

.article figure.side figcaption {
	border-top: none;
	padding: .2rem 0 0;
	font-size: .85rem;
	line-height: 1.5;
}

/* Photo credit line beneath side figure */
.article figure.side .credit {
	grid-column: 1 / -1;
	margin-top: .35rem;
	font-size: .7rem;
	color: var(--muted);
	letter-spacing: .04em;
}

@media (max-width:980px) {
	.article figure.side {
		grid-template-columns: 1fr;
	}

	.article figure.side img {
		width: 100%;
	}
}

/* Signature styling */
.signature {
	color: var(--muted);
	font-size: 1rem;
}

/* Teaser boxes inside article */
.teaser {
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 4px solid var(--accent);
	border-radius: .6rem;
	padding: .9rem 1rem 1rem;
	margin: .75rem 0 1.25rem;
	font-size: clamp(1.02rem, 0.98rem + 0.5vw, 1.15rem);
	line-height: 1.5;
}

.wrap>.teaser {
	max-width: 58ch;
}

.teaser h3 {
	font-size: 1.05rem;
	font-weight: 600;
	text-transform: none;
	letter-spacing: .01em;
	margin: .1rem 0 .55rem;
}

.teaser-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
}

.teaser-toggle {
	appearance: none;
	background: var(--bg);
	color: var(--accent);
	border: 1px solid var(--accent);
	border-radius: .45rem;
	padding: .35rem .65rem;
	font: inherit;
	font-size: .75rem;
	line-height: 1.1;
	cursor: pointer;
}

.teaser-toggle:hover {
	filter: brightness(0.95);
}

.teaser-toggle[aria-pressed='true'] {
	background: var(--accent);
	color: #fff;
}

.teaser ul {
	list-style: none;
	margin: .35rem 0 0;
	padding: 0;
	display: grid;
	gap: .55rem;
}

@media (min-width:700px) {
	.teaser ul {
		grid-template-columns: 1fr 1fr;
	}
}

.teaser li {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: .5rem;
	padding: .55rem .65rem .6rem;
	display: flex;
	flex-direction: column;
	gap: .15rem;
}

.teaser li:hover {
	border-color: var(--accent);
}

.teaser li a.teaser-link {
	font-weight: 700;
	text-decoration: none;
	font-size: 1em;
	line-height: 1.25;
	transition: color 0.2s ease;
}

.teaser li a.teaser-link:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.teaser li a.teaser-link:hover {
	text-decoration: none;
	color: var(--accent);
}

.teaser li .teaser-desc {
	font-size: .85em;
	line-height: 1.35;
	color: var(--muted);
	font-weight: 400;
}

.teaser li .teaser-desc:before {
	content: "";
}

.teaser h3 {
	margin: 0 0 .3rem;
	font-size: 1.05rem;
	letter-spacing: .01em;
}

.teaser p {
	margin: .25rem 0 0;
	font-size: .95em;
}

/* Compact mode: hide descriptions, tighten spacing */
.teaser.compact .teaser-desc {
	display: none;
}

.teaser.compact ul {
	gap: .4rem;
}

.teaser.compact li {
	padding: .5rem .65rem;
}

.teaser .podcast-item {
	grid-column: 1 / -1;
	margin-top: 0.4rem;
	padding: 0;
	border: none;
	background: transparent;
}

/* Slightly smaller subtitles inside the article body */
.article .subtitle {
	font-size: .95rem;
	color: var(--muted);
	margin: .2rem 0 .5rem;
}

/* Video/Chatbot presentation classes */
.demands {
	background: var(--surface);
	padding: 1rem 1rem 1.1rem;
	border: 1px solid var(--border);
	border-radius: .6rem;
}

.demands h3 {
	margin-top: 0;
}

.video-container {
	margin: .75rem 0 1rem;
}

/* Responsive Vimeo embed */
.video-embed {
	position: relative;
	padding-top: 56.25%;
}

.video-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 1px solid var(--border);
	border-radius: .5rem;
	background: #000;
}

.video-title {
	margin-top: .5rem;
	font-weight: 600;
	font-size: .95rem;
}

.video-note {
	font-size: .85rem;
	color: var(--muted);
	margin-top: .5rem;
}

/* Consent placeholder overlay inside 16:9 box */
.video-embed .consent-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, rgba(0, 0, 0, .04), rgba(0, 0, 0, .08));
	border: 1px solid var(--border);
	border-radius: .5rem;
	padding: 1rem;
}

.video-embed .consent-inner {
	max-width: 70ch;
	text-align: center;
	background: var(--bg);
	color: var(--fg);
	border: 1px dashed var(--border);
	border-radius: .5rem;
	padding: .85rem;
}

.video-embed .consent-inner a {
	color: var(--accent);
}

.video-embed .consent-actions {
	margin-top: .5rem;
	display: flex;
	justify-content: center;
}

.video-embed .consent-actions button {
	appearance: none;
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: .4rem;
	padding: .45rem .75rem;
	cursor: pointer;
	font: inherit;
}

/* Heading icon layout using flex (replaces inline vertical-align approach) */
#video-chatbot h3 {
	display: flex;
	align-items: center;
	gap: .45em;
	flex-wrap: wrap;
	/* allow long titles to wrap while keeping icon at start */
}

/* Removed unused <svg> icon rule in video/chatbot headings (using <img>) */
/* Support external SVGs via <img> and tint them in dark mode */
#video-chatbot h3 img {
	display: block;
	width: 1.15em;
	height: 1.15em;
	flex: 0 0 auto;
	filter: var(--icon-filter);
}

/* Make entire chat preview clickable without text underline */
.chat-preview-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.chat-preview-link:hover {
	text-decoration: none;
}

.chat-preview-link:hover .chat-embed {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* Chat header block styled like the chat UI */
.chat-hero {
	border: 1px solid var(--border);
	background: var(--bg);
	border-radius: .5rem;
	padding: 1rem;
}

.chat-hero-top {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem .75rem;
	align-items: baseline;
}

.chat-hero-name {
	font-weight: 700;
	font-size: 1.05rem;
}

.chat-hero-badge {
	color: var(--muted);
	font-size: .95rem;
}

.chat-hero-langs {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin: .5rem 0 .25rem;
	color: var(--muted);
}

.chat-hero-langs .lang {
	display: inline-block;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--fg);
	border-radius: .4rem;
	padding: .1rem .45rem;
	font-size: .8rem;
}

.chat-hero-langs .lang.active {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.chat-hero-bio {
	margin: .25rem 0 .25rem;
	font-weight: 600;
}

.chat-hero-desc {
	margin: .25rem 0 0;
}

/* Chat preview area with same height as video (16:9) */
.chat-embed {
	position: relative;
	padding-top: 56.25%;
	border: 1px solid var(--border);
	border-radius: .5rem;
	background: var(--surface);
}

.chat-embed-inner {
	position: absolute;
	inset: 0;
	padding: .75rem;
	overflow: auto;
	display: flex;
	flex-direction: column;
	gap: .5rem;
}

.msg {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: .5rem;
	padding: .5rem .65rem;
	max-width: 90%;
	font-size: .95em;
}

.msg.bot {
	align-self: flex-start;
}

.msg.user {
	align-self: flex-end;
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

/* Layout for #video-chatbot: match article breakpoint (>=980px) */
#video-chatbot {
	display: grid;
	gap: 1.75rem;
	grid-template-columns: 1fr;
	max-width: 105ch;
	margin: 40px auto;
	/* Visual differentiation from article */
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: .75rem;
	padding: clamp(1rem, 2.5vw, 1.5rem);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

#video-chatbot>h2,
#video-chatbot>p.subtitle,
#video-chatbot>p.intro {
	max-width: 75ch;
}

#video-chatbot>section {
	padding-top: .25rem;
}

@media (min-width: 980px) {

	/* Align with `.article` two-column breakpoint and spacing */
	#video-chatbot {
		grid-template-columns: 1fr 1fr;
		align-items: start;
		column-gap: 2.2rem;
		row-gap: 1.75rem;
	}

	#video-chatbot>h2,
	#video-chatbot>p.subtitle,
	#video-chatbot>p.intro {
		grid-column: 1 / -1;
	}
}

#video-chatbot .demands {
	font-size: .95em;
}

/* Keep spacing for sections moved into wrapper */
#video-chatbot .media-pair>section {
	padding-top: .25rem;
}

/* Equal-height media cards using a wrapper that spans both grid columns */
@media (min-width: 980px) {
	#video-chatbot .media-pair {
		grid-column: 1 / -1;
		display: flex;
		gap: 2.2rem;
		align-items: stretch;
	}

	#video-chatbot .media-pair>section {
		flex: 1;
		display: flex;
	}

	#video-chatbot .media-pair>section .demands {
		flex: 1;
		display: flex;
		flex-direction: column;
	}
}

/* Make the section title feel distinct (no uppercase; accent bar) */
#video-chatbot>h2 {
	text-transform: none;
	letter-spacing: 0;
	border-bottom: none;
	margin: .40rem 0 0;
	padding-left: .75rem;
	position: relative;
	font-size: clamp(1.25rem, 2.2vw, 1.6rem);
}

#video-chatbot>h2::before {
	content: '';
	position: absolute;
	inset: .2em auto .2em 0;
	width: 4px;
	background: var(--accent);
	border-radius: 2px;
}

#video-chatbot>p.subtitle {
	color: var(--muted);
}

/* Print: keep clean without container background */
@media print {
	#video-chatbot {
		background: #fff;
		border: none;
		box-shadow: none;
		padding: 0;
		border-radius: 0;
	}

	#video-chatbot>h2::before {
		display: none;
	}
}

/* Footer + helpers */
footer {
	color: var(--muted);
	font-size: .95rem;
	border-top: 1px solid var(--border);
	margin-top: 2rem;
	padding: 1.25rem;
}

.top {
	position: fixed;
	inset: auto 1rem 1rem auto;
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: .5rem .75rem;
	cursor: pointer;
	font: inherit;
	display: none;
	box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
}

.top.show {
	display: inline-block;
}

a {
	color: var(--accent);
	text-decoration: none;
	position: relative;
}

a:hover {
	text-decoration: underline;
}

/* Cookie Consent Banner (local copy for /roadMovie pages) */
.cookie-consent {
	position: fixed;
	bottom: .75rem;
	left: 50%;
	transform: translateX(-50%);
	width: min(92vw, 960px);
	background: var(--bg);
	color: var(--fg);
	padding: .85rem;
	z-index: 1000;
	border: 1px solid var(--border);
	border-radius: .6rem;
	box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.cookie-consent-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	z-index: 999;
}

.cookie-consent.hidden,
.cookie-consent-overlay.hidden {
	display: none;
}

.cookie-consent-content a {
	color: var(--accent);
}

.cookie-consent-buttons {
	margin-top: .5rem;
	display: flex;
	gap: .5rem;
	justify-content: flex-end;
}

.cookie-consent .accept {
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: .4rem;
	padding: .45rem .75rem;
	cursor: pointer;
}

.cookie-consent .decline {
	background: var(--surface);
	color: var(--fg);
	border: 1px solid var(--border);
	border-radius: .4rem;
	padding: .45rem .75rem;
	cursor: pointer;
}

/* JS-enhanced tooltips (uses a single .ui-tooltip appended to <body>) */
.ui-tooltip {
	position: fixed;
	z-index: 1000;
	max-width: min(92vw, 320px);
	background: var(--fg);
	color: var(--bg);
	padding: 8px 10px;
	border-radius: 6px;
	font-size: 0.85rem;
	line-height: 1.4;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	pointer-events: none;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity .12s ease-out, transform .12s ease-out;
}

.ui-tooltip.show {
	opacity: 1;
	transform: translateY(0);
}

.ui-tooltip::after {
	content: '';
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
}

.ui-tooltip[data-pos='top']::after {
	bottom: -12px;
	border-top-color: var(--fg);
}

.ui-tooltip[data-pos='bottom']::after {
	top: -12px;
	border-bottom-color: var(--fg);
}


/* Print-friendly improvements */
@media print {
	header.hero {
		background: #fff;
		border: none;
		padding: 0 0 .5rem;
	}

	.wrap {
		max-width: none;
	}

	.article {
		column-count: 2;
		column-gap: 2cm;
		column-rule: 0.5pt solid #999;
	}

	.top {
		display: none !important;
	}
}

#play-podcast {
	width: 100%;
	background: var(--accent);
	color: var(--fg);
	border: 1px solid var(--border);
	border-radius: .5rem;
	padding: .55rem .7rem .6rem;
	/* allow natural height for multi-line text */
	height: auto;
	min-height: 2.2rem;
	cursor: pointer;
	font: inherit;
	line-height: 1.25;
	display: inline-flex;
	align-items: flex-start;
	/* top-align icon with first line */
	justify-content: flex-start;
	/* left align contents */
	gap: .5rem;
	flex-wrap: wrap;
	/* permit wrapping of long text */
	white-space: normal;
	/* ensure wrapping */
	text-align: left;
	/* left-align multi-line text */
}

#play-podcast:hover {
	filter: brightness(0.97);
}

#play-podcast img {
	display: block;
	width: 1.1em;
	height: 1.1em;
	filter: var(--icon-filter);
	pointer-events: none;
	margin-top: .15rem;
	/* minor vertical alignment tweak for left layout */
}

/* Responsive refinement: tighten horizontal padding on narrow screens */
@media (max-width: 420px) {
	#play-podcast {
		padding: .5rem .6rem .55rem;
	}
}