/*
Theme Name: Runge
Theme URI: https://susannerunge.de
Author: Liam Kaufmann
Description: Custom theme for artist Susanne Runge
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: runge
*/

/* Lato — lokal (SIL Open Font License), Latin + Latin-Extended */
@font-face {
	font-family: Lato;
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url( "assets/fonts/lato-latin-ext-italic-400.woff2" ) format( "woff2" );
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: Lato;
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url( "assets/fonts/lato-latin-italic-400.woff2" ) format( "woff2" );
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: Lato;
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url( "assets/fonts/lato-latin-ext-normal-400.woff2" ) format( "woff2" );
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: Lato;
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url( "assets/fonts/lato-latin-normal-400.woff2" ) format( "woff2" );
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: Lato;
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url( "assets/fonts/lato-latin-ext-normal-700.woff2" ) format( "woff2" );
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: Lato;
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url( "assets/fonts/lato-latin-normal-700.woff2" ) format( "woff2" );
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

:root {
	--runge-bg: #fbfbfb;
	--runge-fg: #050505;
	--runge-header-pad-x: 1.75rem;
	/* Abstand Seitentitel/Menü zur Oberkante — etwas mehr Luft über dem (großen) Seitentitel. */
	--runge-header-pad-top: 1rem;
	--runge-menu-left: 70%;
	/* Seitentitel („Susanne Runge") etwas größer als die Menüpunkte + Abstand darunter */
	--runge-site-title-size: 1.1em;
	--runge-site-title-gap: 0.25rem;
	/* Platz unter fixiertem Seitentitel (eine Zeile, konsistent mit Menü-top) */
	--runge-fixed-title-padding-main: 4rem;
	--runge-link-underline-thickness: 0.8px;
	--runge-link-underline-offset: 2px;
	/* Hauptmenü: gedämpft vs. voll; Hover nur Farbe, keine andere Strichstärke */
	--runge-nav-muted: #3f3f3f;
	--runge-nav-strong: var(--runge-fg);
	/* Volle obere Kante: nur Unschärfe, keine Aufhellung */
	--runge-header-blur: 8px;
	/* Höhe der Unschärfe-Leiste (von viewport-Oberkante) */
	--runge-header-blur-strip-height: 7rem;
	/* Masken-Verlauf: bis hierhin volle Stärke, darunter weiches Auslaufen */
	--runge-header-blur-mask-solid: 38%;
	/* Menü-Blur-Overlay: weicher Übergang unten (Höhe des Ausblendbereichs) */
	--runge-menu-blur-bottom-fade: 3.25rem;
	/* Detailseiten: einheitliche Slot-Höhe für Hauptbild — unabhängig von Inline-Galerie; Bild per object-fit im Rahmen */
	--runge-single-main-img-slot-h: min(76dvh, calc(100dvh - var(--runge-fixed-title-padding-main) - 4rem));
	/*
	 * Schätzung der im Dokumentenfluss liegenden Header-Höhe (.site-header, ohne fixed-Cluster).
	 * min-height(main) = 100dvh − offset → offset darf nicht größer sein als der klein mögliche Header,
	 * sonst wird main zu kurz. Bei Bedarf feinjustieren (kleineres offset = höheres main = Footer weiter unten).
	 */
	--runge-main-fill-offset: 3.75rem;
}

html {
	-webkit-text-size-adjust: 100%;
	height: 100%;
}

body { 
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: var(--runge-bg);
	color: var(--runge-fg);
	font-family: "Optima Pro", Optima, Lato, system-ui, -apple-system, sans-serif;
	font-size: 18px;
	line-height: 1.45;
}

a {
	color: inherit;
}

a:hover,
a:focus {
	text-decoration: none;
}

/* Nur Tastatur-Fokus sichtbar — vermeidet „Punkte-Rahmen“ nach Mausklick */
a:focus {
	outline: none;
}

a:focus-visible {
	outline: 1px dotted currentColor;
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Header: vertical menu block, top-right (text left-aligned inside block)
   -------------------------------------------------------------------------- */

.site-header {
	flex-shrink: 0;
	position: relative;
	min-height: 1px;
	padding: 1rem 1.75rem 2.5rem;
}

/*
 * Volle Breite oben: nur backdrop-blur, kein zusätzlicher Farbfilm
 * (unter Safari ggf. minimal transparente Schicht nötig — praktisch unsichtbar).
 */
.site-header::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: calc(env(safe-area-inset-top, 0px) + var(--runge-header-blur-strip-height));
	z-index: 140;
	pointer-events: none;
	backdrop-filter: blur(var(--runge-header-blur));
	-webkit-backdrop-filter: blur(var(--runge-header-blur));
	background: transparent;
	/* Weiche untere Kante: Unschärfe läuft aus (kein harter Schnitt) */
	-webkit-mask-image: linear-gradient(
		to bottom,
		#000 0,
		#000 var(--runge-header-blur-mask-solid),
		transparent 100%
	);
	mask-image: linear-gradient(
		to bottom,
		#000 0,
		#000 var(--runge-header-blur-mask-solid),
		transparent 100%
	);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.site-header::before {
		display: none;
	}

	.main-navigation::before {
		display: none;
	}
}

.site-header__cluster {
	position: fixed;
	top: var(--runge-header-pad-top);
	z-index: 200;
	/* Ab ~70 % bis rechts Rand: genug Platz für lange Menüzeilen (mit nowrap) */
	left: var(--runge-menu-left);
	right: var(--runge-header-pad-x);
	transform: none;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--runge-site-title-gap);
	max-width: none;
	box-sizing: border-box;
	width: auto;
	min-width: 0;
	text-align: left;
	line-height: 1.1;
	isolation: isolate;
}

.site-header__cluster > * {
	position: relative;
	z-index: 1;
}

.site-title {
	margin: 0;
	padding: 0;
	font-size: var(--runge-site-title-size);
	font-weight: 400;
	line-height: 1.1;
}

/* Browser-Default (z. B. margin auf h1) neutralisieren */
.site-header__cluster h1.site-title {
	margin: 0;
	font-size: var(--runge-site-title-size);
	font-weight: 400;
}

/* Gleiche Farb-/Gewichtslogik wie Hauptmenü */
.site-title a {
	text-decoration: none;
	color: var(--runge-nav-muted);
	font-weight: 400;
}

.site-title a:hover,
.site-title a:focus {
	text-decoration: none;
	color: var(--runge-nav-strong);
}

/* Startseite (Name-Link = aktueller Kontext), wie .current-menu-item */
body.home .site-title a,
body.front-page .site-title a {
	color: var(--runge-nav-strong);
}

/* Nav: gleiche Zeilenhöhe / Abstände wie Site-Titel */
.main-navigation {
	margin: 0;
	padding: 0;
	line-height: 1.1;
	width: 100%;
	min-width: 0;
	position: relative;
	/* Kein overflow: scroll/auto — sonst wird die Nav zum Scroll-Container; Browser
	   erzwingen dann oft auch vertikales Scrollen (Scrollbar), sobald Untermenüs höher werden. */
	overflow: visible;
}

/*
 * Unschärfe nur hinter der Menü-Navigation (nicht hinter dem Namen links oben im Cluster),
 * sonst wirkt backdrop-filter auf dem ganzen Cluster und verwischt den Seitentitel.
 */
@media (min-width: 40.0625rem) {
	.main-navigation::before {
		content: "";
		position: absolute;
		inset: 0;
		z-index: 0;
		pointer-events: none;
		opacity: 0;
		transition: opacity 0.22s ease;
		backdrop-filter: blur(var(--runge-header-blur));
		-webkit-backdrop-filter: blur(var(--runge-header-blur));
		background: rgba(251, 251, 251, 0.07);
		-webkit-mask-image: linear-gradient(
			to bottom,
			#000 0,
			#000 calc(100% - var(--runge-menu-blur-bottom-fade)),
			transparent 100%
		);
		mask-image: linear-gradient(
			to bottom,
			#000 0,
			#000 calc(100% - var(--runge-menu-blur-bottom-fade)),
			transparent 100%
		);
		-webkit-mask-repeat: no-repeat;
		mask-repeat: no-repeat;
		-webkit-mask-size: 100% 100%;
		mask-size: 100% 100%;
	}

	.main-navigation > * {
		position: relative;
		z-index: 1;
	}

	.main-navigation:has(#primary-menu > .menu-item-has-children:hover)::before,
	.main-navigation:has(#primary-menu > .menu-item-has-children:focus-within)::before {
		opacity: 1;
	}

	@media (prefers-reduced-motion: reduce) {
		.main-navigation::before {
			transition: none;
		}
	}
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	line-height: 1.1;
}

.main-navigation li {
	margin: 0;
	padding: 0;
	line-height: 1.1;
}

/* Untermenüs (oberste Ebene): zu bis Hover/Fokus — Desktop */
.main-navigation #primary-menu > .menu-item-has-children > .sub-menu {
	display: none;
}

.main-navigation #primary-menu > .menu-item-has-children:hover > .sub-menu,
.main-navigation #primary-menu > .menu-item-has-children:focus-within > .sub-menu {
	display: block;
}

/* Schmale Viewports: siehe Hamburger-Menü + .is-sub-open für Untermenüs (assets/js/mobile-nav.js) */

/* Untermenüs: unter dem Punkt einrücken, vertikal untereinander wie die Hauptliste */
.main-navigation ul.sub-menu {
	margin: 0.2rem 0 0;
	padding: 0 0 0.15rem 0.85rem;
	border: 0;
	list-style: none;
}

.main-navigation .sub-menu li {
	margin-top: 0.12rem;
}

.main-navigation .sub-menu a {
	display: block;
}

.main-navigation a {
	display: inline-block;
	text-decoration: none;
	padding: 0;
	line-height: 1.1;
	font-weight: 400;
	color: var(--runge-nav-muted);
	white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation a:focus {
	text-decoration: none;
	color: var(--runge-nav-strong);
}

/* Aktuelle Seite / aktiver Zweig im Menü — wie Hover: volle Farbe, gleiche Strichstärke */
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a,
.main-navigation .current-menu-parent > a {
	color: var(--runge-nav-strong);
}

/* Menüpunkt „CV“: im Menü unter „CSS-Klassen“ z. B. `cv` eintragen */
.main-navigation .cv a,
.main-navigation .menu-item-cv a {
	text-transform: uppercase;
}


/* Screen reader */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	display: block;
	height: auto;
	width: auto;
	left: 0.5rem;
	top: 0.5rem;
	padding: 0.75rem 1rem;
	z-index: 100000;
	background: var(--runge-bg);
	box-shadow: 0 0 0 2px var(--runge-fg);
}

/* --------------------------------------------------------------------------
   Content spacing (Platz für oben rechts fixiertes Menü)
   -------------------------------------------------------------------------- */

.site-main {
	flex: 1 0 auto;
	min-height: calc(100dvh - var(--runge-main-fill-offset) - env(safe-area-inset-bottom, 0px));
	padding-left: 1.75rem;
	padding-right: 1.75rem;
	padding-top: 0.5rem;
	padding-bottom: 2rem;
}

/* Seitentitel: bündig mit Menü (top), über volle Breite zentriert, Versalien */
.site-main--fixed-page-title {
	padding-top: var(--runge-fixed-title-padding-main);
}

.site-main--fixed-page-title .page-header {
	position: fixed;
	top: var(--runge-header-pad-top);
	left: var(--runge-header-pad-x);
	right: var(--runge-header-pad-x);
	z-index: 150;
	box-sizing: border-box;
	width: auto;
	max-width: none;
	margin: 0;
	padding: 0 0.25rem;
	text-align: center;
}

.site-main--fixed-page-title .page-title,
.site-main--fixed-page-title .entry-title.page-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/*
 * Standard-Seiten (page.php): gleiche Maximalbreite wie Beiträge — CV etc. sind oft als Seite
 * angelegt; Tabellen (Jahr | Text) brauchen wie beim Post-CV genug Platz (vorher 42rem zu schmal).
 */
body.page-template-default.page .site-main.site-main--fixed-page-title .entry-content,
body.single-post .site-main.site-main--fixed-page-title .entry-content {
	box-sizing: border-box;
	max-width: min(66rem, 100%);
	margin-left: auto;
	margin-right: auto;
}

/* Gutenberg-Tabellen (z. B. CV: Jahr | Eintrag) — Frontend + Block-Editor (.editor-styles-wrapper) */
.entry-content .wp-block-table,
.editor-styles-wrapper .wp-block-table {
	margin: 1.25rem 0;
	margin-left: 0;
	margin-right: 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.entry-content .wp-block-table table,
.editor-styles-wrapper .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	font-size: inherit;
	line-height: inherit;
}

.entry-content .wp-block-table th,
.entry-content .wp-block-table td,
.editor-styles-wrapper .wp-block-table th,
.editor-styles-wrapper .wp-block-table td {
	vertical-align: top;
	padding: 0.5rem 0 0.5rem 0;
	padding-right: 0.75rem;
	border: 0;
	border-bottom: 1px solid rgba(5, 5, 5, 0.1);
	text-align: left;
}

.entry-content .wp-block-table tr:last-child th,
.entry-content .wp-block-table tr:last-child td,
.editor-styles-wrapper .wp-block-table tr:last-child th,
.editor-styles-wrapper .wp-block-table tr:last-child td {
	border-bottom: 0;
}

.entry-content .wp-block-table td:first-child,
.entry-content .wp-block-table th:first-child,
.editor-styles-wrapper .wp-block-table td:first-child,
.editor-styles-wrapper .wp-block-table th:first-child {
	width: 5.5rem;
	min-width: 5.5rem;
	max-width: 7rem;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	padding-right: 1rem;
	border-right: 1px solid rgba(5, 5, 5, 0.08);
}

.entry-content .wp-block-table td:not(:first-child),
.entry-content .wp-block-table th:not(:first-child),
.editor-styles-wrapper .wp-block-table td:not(:first-child),
.editor-styles-wrapper .wp-block-table th:not(:first-child) {
	word-wrap: break-word;
	overflow-wrap: break-word;
	padding-left: 0.35rem;
}

/* Leere Zeilen (vom Editor angelegt): keine „Notenlinien“ */
.entry-content .wp-block-table tbody tr:not(:has(td:not(:empty))):not(:has(th:not(:empty))),
.editor-styles-wrapper .wp-block-table tbody tr:not(:has(td:not(:empty))):not(:has(th:not(:empty))) {
	display: none;
}

.entry-content .wp-block-table tbody tr:has(> td:nth-child(1) > p:only-child:empty):has(> td:nth-child(2) > p:only-child:empty),
.editor-styles-wrapper .wp-block-table tbody tr:has(> td:nth-child(1) > p:only-child:empty):has(> td:nth-child(2) > p:only-child:empty) {
	display: none;
}

/* Streifen-Stil im Editor/Frontend zurücknehmen */
.entry-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd),
.editor-styles-wrapper .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: transparent;
}

/* Editor: Breite wie CV-Beitrag im Frontend */
.editor-styles-wrapper .is-root-container.block-editor-block-list__layout {
	max-width: 66rem;
	margin-left: auto;
	margin-right: auto;
}

/* Kachel-Übersichten (Arbeiten / Ausstellungen / Startseite): Raster + Kacheltitel … */
.site-main--portfolio-overview {
	/* Weniger “Rand”, mehr nutzbare Fläche – näher am Original. */
	padding-left: 0.75rem;
	padding-right: 0.75rem;
}

.site-main--portfolio-overview .post-grid {
	max-width: none;
	/* „Atmen“ wie im Original, aber responsiv: groß auf großen Screens, klein genug damit 2×klein+1×gross passt. */
	row-gap: clamp(2.75rem, 4.5vw, 5rem);
	column-gap: clamp(2.25rem, 4.2vw, 4.25rem);
}

/* Flex-Wrap wie im Original:
   feste Zielbreiten (em) + sauberes, vorhersehbares Responsive Verhalten. */
.site-main--portfolio-overview .post-grid {
	display: flex;
	flex-wrap: wrap;
	align-items: center; /* innerhalb einer Reihe: Kacheln mittig */
	/* Stabileres Wrap-Verhalten: Restbreite bleibt symmetrisch an den Rändern, Abstand kommt über gap. */
	justify-content: center;
}

/* Mittelweg: auf sehr breiten Viewports etwas weniger “Rand”, ohne Wrap sprunghaft zu machen. */
@media (min-width: 70rem) {
	.site-main--portfolio-overview .post-grid {
		justify-content: space-evenly;
	}
}

.site-main--portfolio-overview .post-grid__link {
	text-align: center;
}

.site-main--portfolio-overview .post-grid__thumb {
	margin-bottom: 0.55rem;
}

/* Zielbreiten wie im Couch-Original (figure.klein / .mittel / .gross). */
.site-main--portfolio-overview .post-grid__item {
	flex: 0 1 auto;
	min-width: 0;
}

.site-main--portfolio-overview .post-grid__item--klein {
	flex-basis: 19rem;
	max-width: 19rem;
	min-width: 18.25rem;
}

.site-main--portfolio-overview .post-grid__item--mittel {
	flex-basis: 28.5rem;
	max-width: 28.5rem;
	min-width: 26.5rem;
}

.site-main--portfolio-overview .post-grid__item--gross {
	flex-basis: 38rem;
	max-width: 38rem;
	min-width: 35.5rem;
}

@media (max-width: 42rem) {
	.site-main--portfolio-overview .post-grid__item--klein,
	.site-main--portfolio-overview .post-grid__item--mittel,
	.site-main--portfolio-overview .post-grid__item--gross {
		flex-basis: min(40em, 100%);
		max-width: min(40em, 100%);
		min-width: 0;
	}
}

.page-intro {
	margin: 0 0 1.5rem;
	font-size: inherit;
	line-height: 1.45;
	max-width: 42rem;
}

.page-intro p:first-child {
	margin-top: 0;
}

/* Startseite & Atelierphase-Seite: Intro zweispaltig (Bild links, Text rechts), darunter Abschnitte */
.site-main--home .front-page__intro,
.site-main--atelierphase .front-page__intro {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
	align-items: start;
	gap: clamp(1.75rem, 4.5vw, 3.25rem);
	max-width: min(72rem, 100%);
	margin-left: auto;
	margin-right: auto;
	margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

/* Zweispaltig: Textblock vertikal zur Bildhöhe mittig (nicht mobil einspaltig — sonst schmal/zentrierte Kacheln) */
@media (min-width: 53rem) {
	.site-main--home .front-page__intro:not(.front-page__intro--text-only):not(.front-page__intro--media-only),
	.site-main--atelierphase .front-page__intro:not(.front-page__intro--text-only):not(.front-page__intro--media-only) {
		align-items: center;
	}
}

.site-main--home .front-page__intro-media,
.site-main--atelierphase .front-page__intro-media {
	margin: 0;
	padding: 0;
	min-width: 0;
}

.site-main--home .front-page__intro-img,
.site-main--atelierphase .front-page__intro-img {
	display: block;
	width: 100%;
	height: auto;
}

.site-main--home .front-page__intro-text,
.site-main--atelierphase .front-page__intro-text {
	min-width: 0;
	font-size: inherit;
	line-height: 1.45;
}

/* Schmale Standard-Seiten-Spalte gilt auf der Startseite / Atelierphase nicht für das Intro */
body.page .site-main.site-main--fixed-page-title.site-main--home .front-page__intro-text.entry-content,
body.page .site-main.site-main--fixed-page-title.site-main--atelierphase .front-page__intro-text.entry-content {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

.site-main--home .front-page__intro-text > *:first-child,
.site-main--atelierphase .front-page__intro-text > *:first-child {
	margin-top: 0;
}

.site-main--home .front-page__intro--text-only,
.site-main--atelierphase .front-page__intro--text-only {
	grid-template-columns: 1fr;
	max-width: 42rem;
}

.site-main--home .front-page__intro--media-only,
.site-main--atelierphase .front-page__intro--media-only {
	grid-template-columns: 1fr;
	max-width: min(36rem, 100%);
	margin-left: auto;
	margin-right: auto;
}

@media (max-width: 52rem) {
	.site-main--home .front-page__intro:not(.front-page__intro--text-only):not(.front-page__intro--media-only),
	.site-main--atelierphase .front-page__intro:not(.front-page__intro--text-only):not(.front-page__intro--media-only) {
		grid-template-columns: 1fr;
	}
}

.site-main--home .homepage-highlights {
	margin-top: 0;
}

.site-main--home .homepage-highlights__title,
.site-main--home .aktuelles__title,
.site-main--atelierphase .atelierphase-mixed__title {
	margin: 0 0 clamp(3rem, 6vw, 10rem);
	font-size: clamp(1rem, 2.5vw, 1.15rem);
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	color: var(--runge-nav-muted);
}

/* Startseite: „Aktuelles“ (Ankündigungen) — zwischen Intro und „Eindrücken“.
   Kachelsystem via .post-grid (Größe = ACF `kachelgroesse`), eigene zentrierte Beschriftung. */
.site-main--home .aktuelles {
	margin: 0 auto clamp(2.5rem, 6vw, 4.5rem);
}

.site-main--home .aktuelles__caption {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
}

.site-main--home .aktuelles__headline {
	font-size: 1.15rem;
	line-height: 1.3;
}

.site-main--home .aktuelles__art {
	color: var(--runge-nav-muted);
}

.site-main--home .aktuelles__name {
	color: var(--runge-fg);
}

.site-main--home .aktuelles__ort,
.site-main--home .aktuelles__datum {
	font-size: 0.95rem;
	line-height: 1.35;
	color: var(--runge-nav-muted);
}

.site-main--home .aktuelles__link:hover .aktuelles__art,
.site-main--home .aktuelles__link:focus .aktuelles__art,
.site-main--home .aktuelles__link:hover .aktuelles__name,
.site-main--home .aktuelles__link:focus .aktuelles__name,
.site-main--home .aktuelles__link:hover .aktuelles__ort,
.site-main--home .aktuelles__link:focus .aktuelles__ort,
.site-main--home .aktuelles__link:hover .aktuelles__datum,
.site-main--home .aktuelles__link:focus .aktuelles__datum {
	color: var(--runge-nav-strong);
}

.site-main--atelierphase .atelierphase-header-meta {
	margin: 0.25rem 0 0;
	font-size: 0.92rem;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0.02em;
	text-transform: none;
	color: var(--runge-nav-muted);
}

.site-main--atelierphase .atelierphase-mixed {
	margin-top: 0;
}

.site-main--portfolio-overview .post-grid__caption {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.2rem;
}

.site-main--portfolio-overview .post-grid__title--atelierphase-line2 {
	font-size: 0.9rem;
	color: var(--runge-nav-muted);
}

.post-grid__link:hover .post-grid__title--atelierphase-line2,
.post-grid__link:focus .post-grid__title--atelierphase-line2 {
	color: var(--runge-nav-strong);
}

.post-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem 1.5rem;
	max-width: 62rem;
	grid-auto-flow: dense;
}

.post-grid__empty {
	margin: 0;
}

.post-grid__item {
	margin: 0;
	/* Zeilenhöhe = höchste Kachel; Bild+Titel als Block vertikal mittig (Titel klebt am Bild). */
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 0;
	align-self: stretch;
}

@media (min-width: 42rem) {
	.post-grid {
		grid-template-columns: repeat(12, minmax(0, 1fr));
	}

	/*
	 * 12-Spalten-Raster: 2× klein + 1× mittel = 3+3+6 = 12 (eine Zeile).
	 * Vorher: 4+4+6 = 14 → Umbruch, wirkt wie „zu große“ Kacheln.
	 * groß: 9 Spalten (z. B. eine Zeile groß + klein = 9+3).
	 */
	.post-grid__item--klein {
		grid-column: span 3;
	}

	.post-grid__item--mittel {
		grid-column: span 6;
	}

	.post-grid__item--gross {
		grid-column: span 9;
	}
}

.post-grid__link {
	text-decoration: none;
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	width: 100%;
	color: inherit;
}

.post-grid__link:hover .post-grid__title,
.post-grid__link:focus .post-grid__title {
	text-decoration: none;
	color: var(--runge-nav-strong);
}

.post-grid__link:hover .post-grid__caption .post-grid__title,
.post-grid__link:focus .post-grid__caption .post-grid__title {
	color: var(--runge-nav-strong);
}

.post-grid__thumb {
	display: block;
	margin: 0 0 0.35rem;
	overflow: hidden;
	line-height: 0;
}

.post-grid__thumb img {
	width: 100%;
	max-width: 100%;
	height: auto;
	display: block;
	vertical-align: middle;
}

.post-grid__title {
	display: block;
	flex-shrink: 0;
	font-size: 0.95rem;
	line-height: 1.25;
	font-weight: 400;
	color: var(--runge-nav-muted);
}

/* --------------------------------------------------------------------------
   Single Arbeit / Ausstellung / Text (gemeinsame BEM-Klassen)
   -------------------------------------------------------------------------- */

/* Gruppe: Bild(er) + Katalogzeile (Titel, Jahr, Technik, Maße) in einer Spalte */
.single-arbeit__hero {
	width: min(46rem, 100%);
	max-width: 100%;
	margin: 0.25rem auto 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.single-arbeit__hero .single-arbeit__media {
	margin: 0 0 0;
}

.single-arbeit__media {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0.35rem 0 1rem;
	width: 100%;
	max-width: 100%;
}

/*
 * Mit Galerie: gleiche zentrierte Hauptbildbreite wie ohne Galerie — Thumbnails liegen
 * außerhalb (absolute), damit das Hauptbild beim Wechsel nicht springt.
 */
.single-arbeit__hero:has(.single-arbeit__gallery-grid--inline),
.single-arbeit__media:has(.single-arbeit__gallery-grid--inline) {
	overflow: visible;
}

.single-arbeit__media:has(.single-arbeit__gallery-grid--inline) {
	position: relative;
	width: min(46rem, 100%);
	margin-inline: auto;
	align-self: center;
}

body.single-arbeit .single-arbeit__hero + .single-arbeit__content,
body.single-ausstellung .single-arbeit__hero + .single-arbeit__content {
	margin-top: 0.25rem;
}

.single-arbeit__caption {
	align-self: flex-end;
	width: 100%;
	max-width: min(22rem, 94%);
	margin-top: 2rem;
	margin-bottom: 1.25rem;
	transform: translateX(5rem);
	text-align: left;
	box-sizing: border-box;
}

.single-arbeit__phase-header {
	text-align: left !important;
}

.single-arbeit__back-link {
	font-size: 1.2rem;
	font-weight: 400;
	letter-spacing: 0.02em;
	text-transform: none;
	color: inherit;
	text-decoration: none;
	opacity: 0.5;
	transition: opacity 0.15s ease;
}

.single-arbeit__back-link:hover,
.single-arbeit__back-link:focus {
	opacity: 1;
}

.single-arbeit__title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 400;
	line-height: 1.28;
	letter-spacing: 0.02em;
	text-transform: none;
	color: inherit;
}


.single-arbeit__line {
	margin: 0.1rem 0 0;
	padding: 0;
	font-size: 0.95rem;
	font-weight: 400;
	line-height: 1.28;
	letter-spacing: 0.02em;
}

.single-arbeit__media-btn {
	position: relative;
	display: block;
	/* Fixe Layout-Breite: verhindert „springende“ Bildgrößen beim Wechsel (Button shrink-to-fit) */
	width: min(46rem, 100%);
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
	text-align: center;
}

/*
 * Slot fest — Bild per absolute + object-fit den Rahmen füllen (nicht Flex+zentriert mit width:auto,
 * sonst wirkt gewechseltes Bild oft „klein“ mit viel Weißraum).
 */
.single-arbeit__media-img {
	position: relative;
	display: block;
	width: 100%;
	line-height: 0;
	height: var(--runge-single-main-img-slot-h);
	min-height: 0;
	overflow: hidden;
}

.single-arbeit__media-img img {
	position: absolute;
	left: 0;
	top: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
	object-position: center center;
}

.single-arbeit__meta {
	margin: 0 auto 1.25rem;
	width: 100%;
	max-width: 100%;
	text-align: center;
}

.single-arbeit__meta-list {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
}

.single-arbeit__meta-row {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.15rem;
	margin: 0;
}

.single-arbeit__meta-row dt {
	margin: 0;
	opacity: 0.65;
}

.single-arbeit__meta-row dd {
	margin: 0;
}

.single-arbeit__content {
	width: 100%;
	max-width: 42rem;
	margin: 0 auto 1.5rem;
}

.single-arbeit__gallery {
	width: 100%;
	max-width: 48rem;
	margin: 0 auto 1.5rem;
}

.single-arbeit__gallery-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
	gap: 0.6rem 0.8rem;
}

/* Inline-Thumbnails: vertikal, rechts außerhalb des festen Hauptbild-Kastens */
.single-arbeit__gallery-grid.single-arbeit__gallery-grid--inline {
	position: absolute;
	left: 100%;
	top: 6rem;
	margin: 0 0 0 1.25rem;
	padding: 0 0.15rem 0 0;
	width: auto;
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	justify-content: flex-start;
	gap: 0.45rem;
	max-height: calc(var(--runge-single-main-img-slot-h) - 2.75rem);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	grid-template-columns: none;
}

.single-arbeit__gallery-grid.single-arbeit__gallery-grid--inline .single-arbeit__gallery-item {
	margin: 0;
	flex: 0 0 auto;
}

.single-arbeit__gallery-grid.single-arbeit__gallery-grid--inline .single-arbeit__thumb-btn {
	width: 4.75rem;
	flex: 0 0 auto;
}

.single-arbeit__gallery-grid.single-arbeit__gallery-grid--inline .single-arbeit__thumb-img {
	width: 100%;
	height: auto;
}


/* Aktives Motiv ohne Rahmen: andere Miniatur leicht absenken */
.single-arbeit__gallery-grid.single-arbeit__gallery-grid--inline .single-arbeit__thumb-btn:not(.is-current) .single-arbeit__thumb-img {
	opacity: 0.62;
	transition: opacity 0.15s ease;
}

.single-arbeit__gallery-grid.single-arbeit__gallery-grid--inline .single-arbeit__thumb-btn.is-current .single-arbeit__thumb-img {
	opacity: 1;
}

.single-arbeit__thumb-btn {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
}

/* Mausklick: kein Focus-Ring; nur Tastatur */
.single-arbeit__thumb-btn:focus {
	outline: none;
}

.single-arbeit__thumb-btn:focus-visible {
	outline: 1px dotted currentColor;
	outline-offset: 3px;
}

/* Single Arbeit / Ausstellung: Thumbnails wechseln nur das Hauptbild bzw. Lightbox — kein Lupen-Cursor */
.single-arbeit .single-arbeit__thumb-btn,
.single-projekt .single-arbeit__thumb-btn {
	cursor: pointer;
}

.single-arbeit__thumb-img {
	display: block;
	width: 100%;
	height: auto;
}

.single-arbeit__nav {
	position: fixed;
	bottom: calc(10vh + env(safe-area-inset-bottom, 0px));
	left: 0;
	right: 0;
	top: auto;
	transform: none;
	z-index: 260;
	box-sizing: border-box;
	padding-left: max(var(--runge-header-pad-x), env(safe-area-inset-left, 0px));
	padding-right: max(var(--runge-header-pad-x), env(safe-area-inset-right, 0px));
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	opacity: 0.72;
	pointer-events: none;
}

.single-arbeit__nav-link {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3rem;
	min-height: 3rem;
	padding: 0.35rem;
	line-height: 0;
	text-decoration: none;
	color: var(--runge-nav-muted);
}

.single-arbeit__nav-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.single-arbeit__nav-icon svg {
	display: block;
	width: 2rem;
	height: auto;
}

.single-arbeit__nav-link--next:first-child:last-child {
	margin-left: auto;
}

.single-arbeit__nav-link:hover,
.single-arbeit__nav-link:focus {
	text-decoration: none;
	color: var(--runge-nav-strong);
}

.single-arbeit__nav-link:focus:not(:focus-visible) {
	outline: none;
}

.single-arbeit__nav-link:focus-visible {
	outline: 1px dotted currentColor;
	outline-offset: 4px;
}

/* Lightbox */
.runge-lightbox[hidden] {
	display: none;
}

.runge-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10000;
}

.runge-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
}

.runge-lightbox__panel {
	position: absolute;
	/* Fast Vollbild; Safe-Area für iPhone u. ä. */
	top: max(0.35rem, env(safe-area-inset-top, 0px));
	right: max(0.35rem, env(safe-area-inset-right, 0px));
	bottom: max(0.35rem, env(safe-area-inset-bottom, 0px));
	left: max(0.35rem, env(safe-area-inset-left, 0px));
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	overflow: hidden;
	/* Oben Platz fürs Schließen-Icon; seitlich minimal — maximale Bildfläche */
	padding: 3rem 0.35rem 0.35rem;
}

.runge-lightbox__stage {
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.runge-lightbox__panel--zoomed .runge-lightbox__stage {
	display: block;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	text-align: center;
	line-height: 0;
}

/* Nur relativ zur Stage begrenzen — vermeidet Beschneiden, wenn Stage kleiner als 90dvh ist */
.runge-lightbox__img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	object-position: center center;
	background: var(--runge-bg);
	cursor: zoom-in;
}

.runge-lightbox__panel--zoomed .runge-lightbox__img {
	max-width: none;
	max-height: none;
	width: auto;
	height: auto;
	display: inline-block;
	vertical-align: middle;
	cursor: zoom-out;
}

.runge-lightbox__close {
	position: absolute;
	top: max(0.45rem, calc(env(safe-area-inset-top, 0px) + 0.2rem));
	right: max(0.45rem, calc(env(safe-area-inset-right, 0px) + 0.2rem));
	z-index: 2;
	border: 0;
	background: rgba(255, 255, 255, 0.9);
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 999px;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.site-footer {
	flex-shrink: 0;
	margin-top: auto;
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
	padding-left: 1.75rem;
	padding-right: 1.75rem;
	font-size: 0.875rem;
	text-align: center;
}

.site-footer__legal {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	opacity: 0.48;
}

.site-footer__legal a {
	text-decoration: none;
	color: inherit;
}

.site-footer__legal a:hover,
.site-footer__legal a:focus {
	opacity: 1;
	text-decoration: none;
}

.site-footer__legal-sep {
	margin: 0 0.4rem;
	user-select: none;
	opacity: 0.75;
}

@media (max-width: 40rem) {
	:root {
		--runge-header-pad-x: 1.25rem;
		--runge-header-pad-top: 1.1rem;
		--runge-fixed-title-padding-main: 7.5rem;
		--runge-single-main-img-slot-h: min(54dvh, calc(100dvh - var(--runge-fixed-title-padding-main) - 10rem));
	}

	.site-header__cluster {
		left: auto;
		right: 1.25rem;
		top: 0.875rem;
		/* Schmal, aber nicht hart auf 12rem begrenzen — bis fast zum linken Rand */
		max-width: min(22rem, calc(100vw - 2.5rem));
	}

	.site-header {
		padding: 0.875rem 1.25rem 2rem;
	}

	.site-main--fixed-page-title .page-header {
		top: var(--runge-header-pad-top);
		left: var(--runge-header-pad-x);
		right: var(--runge-header-pad-x);
		width: auto;
		max-width: none;
	}

	.single-arbeit__media,
	.single-arbeit__meta,
	.single-arbeit__hero,
	.single-arbeit__caption,
	.single-arbeit__content,
	.single-arbeit__gallery {
		width: 100%;
		max-width: none;
	}

	.single-arbeit__caption {
		transform: none;
		/* Fixierte Prev/Next unten — seitlich Platz, damit Pfeile die Katalogzeile nicht überdecken */
		padding-left: 3.35rem;
		padding-right: 3.35rem;
		box-sizing: border-box;
		margin-bottom: 2rem;
	}

	.single-arbeit.site-main,
	.single-projekt.site-main {
		padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
	}

	.single-arbeit__media:has(.single-arbeit__gallery-grid--inline) {
		position: relative;
		width: 100%;
		max-width: none;
		margin-inline: 0;
		align-self: stretch;
	}

	.single-arbeit__media:has(.single-arbeit__gallery-grid--inline) .single-arbeit__media-btn {
		width: 100%;
		max-width: none;
	}

	.single-arbeit__gallery-grid.single-arbeit__gallery-grid--inline {
		position: static;
		left: auto;
		margin: 0.85rem 0 0;
		padding: 0 0.25rem;
		max-height: none;
		overflow-y: visible;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		align-self: center;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
		flex-direction: row;
		flex-wrap: nowrap;
		justify-content: flex-start;
		gap: 0.5rem;
	}
}

/* --------------------------------------------------------------------------
   Atelierphasen-Hub: Zeitstrahl (Phasen mittig, Achse + Jahre rechts)
   -------------------------------------------------------------------------- */

.site-main--atelierphasen-hub {
	/*
	 * Strahl so weit rechts wie möglich: nur noch Platz für die Jahres-Spalte
	 * (feste Breite, damit „1998 – 2009“ passt und nichts verrutscht).
	 */
	--atelierphasen-year-col: 7.25rem;
	--atelierphasen-rail-gap: 0.35rem;
	--atelierphasen-rail-from-right: calc(var(--atelierphasen-year-col) + var(--atelierphasen-rail-gap) + 3px);
	padding-left: clamp(1rem, 3vw, 2rem);
	padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
}

.site-main--atelierphasen-hub .page-intro {
	max-width: 28rem;
	margin: 0 auto 2.5rem;
	text-align: left;
}

.atelierphasen-timeline {
	--atelierphasen-timeline-gap: clamp(1.75rem, 3.5vw, 2.75rem);
	--atelierphasen-year-size: 0.92em;
	--atelierphasen-year-lh: 1.2;
	--atelierphasen-year-line: calc(var(--atelierphasen-year-size) * var(--atelierphasen-year-lh));
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	max-width: none;
}

.atelierphasen-timeline__empty {
	margin: 0;
	color: var(--runge-nav-muted);
	text-align: center;
}

.atelierphasen-timeline__item {
	position: relative;
	margin: 0;
	padding: 0;
}

/*
 * Durchgehende Achse am <li> (volle Eintrags-Höhe inkl. Abstand),
 * nicht an der kurzen Jahres-Zeile — sonst Lücken neben großen Bildern.
 */
.atelierphasen-timeline__item::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	right: var(--atelierphasen-rail-from-right);
	width: 1px;
	background: rgba(63, 63, 63, 0.38);
	pointer-events: none;
	z-index: 0;
}

/* Erster Punkt: Linie startet in der Mitte des Dots */
.atelierphasen-timeline__item:first-child::before {
	top: calc(0.05rem + (var(--atelierphasen-year-line) / 2));
}

/* Letzter Punkt: Linie endet in der Mitte des Dots */
.atelierphasen-timeline__item:last-child::before {
	bottom: auto;
	height: calc(0.05rem + (var(--atelierphasen-year-line) / 2));
}

.atelierphasen-timeline__item:only-child::before {
	display: none;
}

/*
 * Drei Spalten: flexible Ränder + zentrierter Inhalt + rechte Meta/Achse.
 */
.atelierphasen-timeline__link {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr minmax(0, 32rem) minmax(7.5rem, 1fr);
	column-gap: clamp(0.75rem, 2vw, 1.5rem);
	align-items: start;
	text-decoration: none;
	color: inherit;
	padding-bottom: var(--atelierphasen-timeline-gap);
}

.atelierphasen-timeline__item:last-child .atelierphasen-timeline__link {
	padding-bottom: 0;
}

.atelierphasen-timeline__body {
	grid-column: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
	min-width: 0;
	width: 100%;
	padding-top: 0.05rem;
	text-align: center;
}

.atelierphasen-timeline__atelier {
	font-size: 1.05em;
	line-height: 1.3;
	font-weight: 400;
	color: var(--runge-nav-muted);
	transition: color 0.15s ease;
}

.atelierphasen-timeline__ort {
	font-size: 0.95em;
	line-height: 1.3;
	color: var(--runge-nav-muted);
}

.atelierphasen-timeline__thumb {
	display: block;
	margin-top: 0.75rem;
	width: 100%;
	max-width: 32rem;
}

.atelierphasen-timeline__img {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: middle;
}

/*
 * Meta: Rail + Jahr. Flex + align-items:center → Dot mittig zur (ersten) Zahl,
 * in beiden Varianten (Jahre rechts/links).
 */
.atelierphasen-timeline__meta {
	grid-column: 3;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-end;
	gap: var(--atelierphasen-rail-gap);
	justify-self: end;
	width: calc(7px + var(--atelierphasen-rail-gap) + var(--atelierphasen-year-col));
	padding-top: 0.05rem;
	box-sizing: border-box;
}

.atelierphasen-timeline__rail {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 7px;
	width: 7px;
	padding: 0;
	box-sizing: border-box;
}

.atelierphasen-timeline__year {
	flex: 0 0 var(--atelierphasen-year-col);
	width: var(--atelierphasen-year-col);
	max-width: var(--atelierphasen-year-col);
	font-size: var(--atelierphasen-year-size);
	line-height: var(--atelierphasen-year-lh);
	letter-spacing: 0.02em;
	color: var(--runge-nav-muted);
	white-space: nowrap;
	text-align: left;
	padding: 0;
	margin: 0;
	box-sizing: border-box;
}

.atelierphasen-timeline__dot {
	display: block;
	width: 7px;
	height: 7px;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--runge-nav-muted);
	box-shadow: 0 0 0 2px var(--runge-bg);
	position: relative;
	z-index: 1;
}

.atelierphasen-timeline__link:hover .atelierphasen-timeline__atelier,
.atelierphasen-timeline__link:focus .atelierphasen-timeline__atelier {
	color: var(--runge-nav-strong);
	text-decoration: none;
}

.atelierphasen-timeline__link:hover .atelierphasen-timeline__dot,
.atelierphasen-timeline__link:focus .atelierphasen-timeline__dot {
	background: var(--runge-nav-strong);
}

/*
 * Jahre links vom Strahl: row-reverse packt den Punkt an den rechten Rand,
 * Jahr links daneben — gleiche vertikale Zentrierung wie rechts.
 */
.site-main--atelierphasen-hub[data-timeline-years="left"] {
	--atelierphasen-rail-from-right: 3px;
}

.site-main--atelierphasen-hub[data-timeline-years="left"] .atelierphasen-timeline__meta {
	flex-direction: row-reverse;
}

.site-main--atelierphasen-hub[data-timeline-years="left"] .atelierphasen-timeline__year {
	text-align: right;
}


@media (max-width: 40rem) {
	.site-main--atelierphasen-hub {
		/* Schmale Jahres-Spalte → Strahl weiter rechts; Von–Bis stapelt sich */
		--atelierphasen-year-col: 3.35rem;
		--atelierphasen-rail-gap: 0.3rem;
		padding-right: max(0.65rem, env(safe-area-inset-right, 0px));
	}

	.atelierphasen-timeline {
		--atelierphasen-year-size: 0.82em;
	}

	.site-main--atelierphasen-hub[data-timeline-years="left"] {
		--atelierphasen-rail-from-right: 3px;
	}

	.atelierphasen-timeline__link {
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: 0.65rem;
	}

	.atelierphasen-timeline__body {
		grid-column: 1;
	}

	.atelierphasen-timeline__meta {
		grid-column: 2;
		/* Gestapeltes Von–Bis: Dot an der ersten Jahreszeile, nicht in der Blockmitte */
		align-items: flex-start;
	}

	.atelierphasen-timeline__rail {
		height: var(--atelierphasen-year-line);
		align-self: flex-start;
	}

	.atelierphasen-timeline__year {
		white-space: normal;
	}

	.atelierphasen-timeline__year--range {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
	}

	.site-main--atelierphasen-hub[data-timeline-years="left"] .atelierphasen-timeline__year--range {
		align-items: flex-end;
	}

	.atelierphasen-timeline__year-sep {
		display: none;
	}

	/* „2011–“ / „2022“ untereinander */
	.atelierphasen-timeline__year-start::after {
		content: "–";
	}

	.atelierphasen-timeline__thumb {
		max-width: none;
	}
}

/*
 * Ab ~480px: Seitentitel nach links, Menü rechts —
 * damit „Susanne Runge" im Menü nicht umbricht.
 */
@media (max-width: 30rem) {
	:root {
		--runge-mobile-menu-max: 14rem;
		--runge-mobile-header-gap: 0.55rem;
	}

	.site-header__cluster {
		left: auto;
		right: max(var(--runge-header-pad-x), env(safe-area-inset-right, 0px));
		max-width: var(--runge-mobile-menu-max);
		font-size: 1em;
	}

	.site-header__cluster .site-title,
	.site-header__cluster .site-title a {
		white-space: nowrap;
	}

	.site-main--fixed-page-title .page-header {
		top: var(--runge-header-pad-top);
		left: max(var(--runge-header-pad-x), env(safe-area-inset-left, 0px));
		right: calc(
			var(--runge-mobile-menu-max) + var(--runge-mobile-header-gap) + max(var(--runge-header-pad-x), env(safe-area-inset-right, 0px))
		);
		width: auto;
		max-width: none;
		text-align: left;
		padding: 0;
		z-index: 160;
	}

	.site-main--fixed-page-title .page-title,
	.site-main--fixed-page-title .entry-title.page-title {
		text-align: left;
	}

	.site-main--atelierphase .atelierphase-header-meta {
		text-align: left;
	}
}
