/*
Theme Name: malandereideen Logbuch
Description: Logbuch-Theme fuer malandereideen.de. Umsetzung des Claude-Design-Entwurfs "Maker Landing". Hell/Dunkel umschaltbar, ohne Framework, Schrift lokal.
Author: Mario Wichmann
Version: 2.0
Requires at least: 6.0
Tested up to: 6.9
Text Domain: mai
*/

/* = Schrift (lokal, nichts geht an Google)
-------------------------------------------------------------- */

@font-face {
	font-family: 'Space Grotesk';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('fonts/space-grotesk-latin.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: 'Space Grotesk';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('fonts/space-grotesk-latin-ext.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;
}

/* = Farbtoken
--------------------------------------------------------------
Werte direkt aus dem Entwurf. Umschaltung ueber data-theme
am <html>-Element.
-------------------------------------------------------------- */

:root,
[data-theme="dark"] {
	--page: #080808;
	--bg: #0f0f0f;
	--surface: #161616;
	--surface2: #131313;
	--text: #e4e4e4;
	--title: #ffffff;
	--muted: #9a9a9a;
	--muted2: #7a7a7a;
	--faint: #6a6a6a;
	--line: rgba(255, 255, 255, .08);
	--line2: rgba(255, 255, 255, .1);
	--body: #bcbcbc;
	--body2: #a8a8a8;
	--code-bg: rgba(0, 0, 0, .35);
	--schatten: 0 1px 3px rgba(0, 0, 0, .4);
}

[data-theme="light"] {
	--page: #e9e7e2;
	--bg: #ffffff;
	--surface: #f3f1ec;
	--surface2: #f7f5f1;
	--text: #2a2822;
	--title: #141210;
	--muted: #6b6b6b;
	--muted2: #8a8a8a;
	--faint: #a0a0a0;
	--line: rgba(0, 0, 0, .10);
	--line2: rgba(0, 0, 0, .13);
	--body: #3c3a35;
	--body2: #565049;
	--code-bg: rgba(0, 0, 0, .05);
	--schatten: 0 1px 3px rgba(0, 0, 0, .08);
}

:root {
	--akzent: #ff7a18;
	--titel-schrift: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
	--text-schrift: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--breite: 1200px;
	--radius: 14px;
}

/* = Grundlagen
-------------------------------------------------------------- */

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

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

body {
	margin: 0;
	background: var(--page);
	color: var(--text);
	font-family: var(--text-schrift);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

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

a:hover {
	text-decoration: none;
}

:focus-visible {
	outline: 2px solid var(--akzent);
	outline-offset: 2px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--akzent);
	color: #0f0f0f;
	padding: .6rem 1rem;
	z-index: 100;
	font-weight: 600;
}

.skip-link:focus {
	left: 0;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* = Blatt: der gerahmte Container aus dem Entwurf
-------------------------------------------------------------- */

.blatt {
	max-width: var(--breite);
	margin: 40px auto;
	border: 1px solid var(--line2);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--bg);
}

@media (max-width: 1260px) {
	.blatt {
		margin: 0;
		border: 0;
		border-radius: 0;
	}
}

/* = Kopf
--------------------------------------------------------------
Bleibt in beiden Modi dunkel -- das Logo-Banner hat eine dunkle
Textur und wuerde auf Hell wie ein Fremdkoerper wirken.
-------------------------------------------------------------- */

.kopf {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 6px 32px 6px 24px;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
	background: #000;
	flex-wrap: wrap;
}

.marke {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.marke img {
	height: 76px;
	width: auto;
	display: block;
	-webkit-mask-image: linear-gradient(180deg, transparent 0, #000 7%, #000 93%, transparent 100%);
	mask-image: linear-gradient(180deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

.kopf-rechts {
	display: flex;
	align-items: center;
	gap: 28px;
	flex-wrap: wrap;
}

.nav ul {
	display: flex;
	gap: 26px;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.nav a {
	color: #9a9a9a;
	font-size: 14px;
	padding-bottom: 3px;
	border-bottom: 1px solid transparent;
	display: inline-block;
	transition: color .2s ease, border-color .2s ease;
}

.nav a:hover {
	color: #e4e4e4;
	border-bottom-color: rgba(255, 122, 24, .4);
}

.nav .current-menu-item > a,
.nav .current-menu-parent > a,
.nav .current_page_item > a {
	color: var(--akzent);
	border-bottom-color: var(--akzent);
}

/* Umschalter hell/dunkel */
.themebtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .22);
	color: #e4e4e4;
	font: 500 13px/1 var(--text-schrift);
	padding: 8px 14px;
	border-radius: 999px;
	cursor: pointer;
	transition: border-color .2s ease;
	white-space: nowrap;
}

.themebtn:hover {
	border-color: var(--akzent);
}

.themebtn-punkt {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--akzent);
	box-shadow: 0 0 8px var(--akzent);
	flex-shrink: 0;
}

@media (max-width: 900px) {
	.kopf {
		justify-content: center;
		padding: 10px 20px;
	}

	.kopf-rechts {
		justify-content: center;
		gap: 18px;
	}

	.nav ul {
		justify-content: center;
		gap: 18px;
	}

	.marke img {
		height: 58px;
	}
}

/* = Hero (Startseite)
-------------------------------------------------------------- */

.hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-bottom: 1px solid var(--line);
}

.hero-text {
	padding: 56px 48px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.hero-label {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 22px;
}

.hero-punkt {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--akzent);
	box-shadow: 0 0 12px var(--akzent);
	animation: floatglow 2.6s ease-in-out infinite;
	flex-shrink: 0;
}

@keyframes floatglow {
	0%, 100% { opacity: .5; }
	50% { opacity: .85; }
}

@media (prefers-reduced-motion: reduce) {
	.hero-punkt {
		animation: none;
	}
}

.hero-label span:last-child {
	font: 600 12px/1 var(--mono);
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--akzent);
}

.hero-titel {
	font: 700 40px/1.12 var(--titel-schrift);
	color: var(--title);
	letter-spacing: -.02em;
	margin: 0 0 18px;
}

.hero-titel a {
	color: inherit;
}

.hero-titel a:hover {
	color: var(--akzent);
}

.hero-auszug {
	font-size: 16.5px;
	line-height: 1.7;
	color: var(--body);
	margin: 0 0 28px;
	max-width: 46ch;
}

.hero-fuss {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
}

.hero-meta {
	font-size: 13px;
	color: var(--muted2);
}

.hero-bild {
	position: relative;
	min-height: 420px;
	border-left: 1px solid var(--line);
	overflow: hidden;
	background: var(--surface);
}

.hero-bild img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 860px) {
	.hero {
		grid-template-columns: 1fr;
	}

	.hero-text {
		padding: 36px 24px;
		order: 2;
	}

	.hero-titel {
		font-size: 29px;
	}

	.hero-bild {
		min-height: 240px;
		border-left: 0;
		border-bottom: 1px solid var(--line);
		order: 1;
	}
}

/* Knopf */
.btn-akzent {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	background: var(--akzent);
	color: #0f0f0f;
	font-weight: 600;
	font-size: 15px;
	padding: 13px 22px;
	border-radius: 8px;
	transition: filter .2s ease, transform .2s ease;
}

.btn-akzent:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

/* = Abschnitte
-------------------------------------------------------------- */

.abschnitt {
	padding: 44px 48px 40px;
}

.abschnitt-kopf {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.abschnitt-titel {
	font: 600 13px/1 var(--mono);
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0;
}

.abschnitt-notiz {
	font-size: 13px;
	color: var(--faint);
}

.abschnitt-notiz a,
.abschnitt-kopf > a {
	font-size: 13px;
	color: var(--muted);
}

.abschnitt-kopf > a:hover {
	color: var(--akzent);
}

.abschnitt-linie {
	margin-bottom: 22px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--line);
}

@media (max-width: 860px) {
	.abschnitt {
		padding: 32px 24px;
	}
}

/* = Bereichs-Kacheln
-------------------------------------------------------------- */

.kacheln {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 14px;
}

@media (max-width: 1000px) {
	.kacheln {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 620px) {
	.kacheln {
		grid-template-columns: repeat(2, 1fr);
	}
}

.tile {
	display: block;
	border-radius: 12px;
	overflow: hidden;
	background: var(--surface);
	border: 1px solid var(--line);
}

.tile-img {
	position: relative;
	height: 150px;
	overflow: hidden;
	background: var(--surface2);
}

.tile-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}

.tile-img:has(img)::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(15, 15, 15, 0) 40%, rgba(15, 15, 15, .85) 100%);
	pointer-events: none;
}

[data-theme="light"] .tile-img:has(img)::after {
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .45) 100%);
}

.tile:hover .tile-img img {
	transform: scale(1.05);
}

.tile-fuss {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 15px;
}

.tile-name {
	font: 600 16px/1.2 var(--titel-schrift);
	color: var(--title);
}

.tile-anzahl {
	font-size: 12px;
	color: var(--muted2);
	margin-top: 3px;
}

.tile-arrow {
	color: var(--muted2);
	font-size: 17px;
	transition: transform .2s ease, color .2s ease;
}

.tile:hover .tile-arrow {
	transform: translate(3px, -3px);
	color: var(--akzent);
}

/* = Beitragszeilen (Listen, Archive, Suche)
-------------------------------------------------------------- */

.listrow {
	display: grid;
	grid-template-columns: 190px 1fr;
	gap: 24px;
	padding: 20px 0;
	border-bottom: 1px solid var(--line);
	align-items: center;
}

.listrow:last-of-type {
	border-bottom: 0;
}

.listrow-thumb {
	height: 118px;
	border-radius: 9px;
	overflow: hidden;
	background: var(--surface);
}

.listrow-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}

.listrow:hover .listrow-thumb img {
	transform: scale(1.05);
}

.listrow-meta {
	font-size: 12px;
	color: var(--muted2);
	margin-bottom: 7px;
}

.listrow-meta a {
	color: var(--muted2);
}

.listrow-meta a:hover {
	color: var(--akzent);
}

.listrow-title {
	font: 600 21px/1.3 var(--titel-schrift);
	color: var(--title);
	margin: 0 0 8px;
	transition: color .2s ease;
}

.listrow-title a {
	color: inherit;
}

.listrow:hover .listrow-title,
.listrow-title a:hover {
	color: var(--akzent);
}

.listrow-auszug {
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--body2);
	margin: 0;
}

.listrow-auszug p {
	margin: 0;
}

@media (max-width: 620px) {
	.listrow {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.listrow-thumb {
		height: 180px;
	}

	.listrow-title {
		font-size: 18px;
	}
}

/* = Archivkopf
-------------------------------------------------------------- */

.archiv-kopf {
	margin-bottom: 22px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--line);
}

.archiv-titel {
	font: 700 30px/1.2 var(--titel-schrift);
	color: var(--title);
	letter-spacing: -.015em;
	margin: 0;
}

.archiv-beschreibung {
	margin: .5rem 0 0;
	color: var(--muted);
	font-size: 14.5px;
}

/* = Einzelansicht
-------------------------------------------------------------- */

.einzel {
	padding: 44px 48px 48px;
	max-width: 780px;
}

@media (max-width: 860px) {
	.einzel {
		padding: 32px 24px;
	}
}

.einzel-titel {
	font: 700 34px/1.18 var(--titel-schrift);
	color: var(--title);
	letter-spacing: -.02em;
	margin: 0 0 14px;
}

@media (max-width: 620px) {
	.einzel-titel {
		font-size: 26px;
	}
}

.meta {
	font-size: 13px;
	color: var(--muted2);
	margin: 0 0 26px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	align-items: center;
}

.meta a {
	color: var(--muted2);
}

.meta a:hover {
	color: var(--akzent);
}

.meta-punkt {
	opacity: .5;
}

.beitrag-bild {
	margin: 0 0 30px;
	border-radius: 10px;
	overflow: hidden;
}

.beitrag-text {
	font-size: 16.5px;
	line-height: 1.75;
	color: var(--body);
}

.beitrag-text > *:first-child {
	margin-top: 0;
}

.beitrag-text h2 {
	font: 600 24px/1.25 var(--titel-schrift);
	color: var(--title);
	margin: 40px 0 12px;
	letter-spacing: -.01em;
}

.beitrag-text h3 {
	font: 600 19px/1.3 var(--titel-schrift);
	color: var(--title);
	margin: 32px 0 10px;
}

.beitrag-text p {
	margin: 0 0 20px;
}

.beitrag-text ul,
.beitrag-text ol {
	margin: 0 0 20px;
	padding-left: 22px;
}

.beitrag-text li {
	margin-bottom: 7px;
}

.beitrag-text a {
	color: var(--akzent);
	border-bottom: 1px solid rgba(255, 122, 24, .35);
}

.beitrag-text a:hover {
	border-bottom-color: var(--akzent);
}

.beitrag-text img,
.beitrag-text figure {
	border-radius: 10px;
	margin: 28px 0;
}

.beitrag-text figcaption {
	font-size: 13px;
	color: var(--muted2);
	margin-top: 8px;
	text-align: center;
}

.beitrag-text blockquote {
	margin: 28px 0;
	padding: 2px 0 2px 18px;
	border-left: 3px solid var(--akzent);
	color: var(--muted);
	font-size: 17px;
}

.beitrag-text blockquote p:last-child {
	margin-bottom: 0;
}

.beitrag-text code {
	background: var(--code-bg);
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: .1em .4em;
	font-family: var(--mono);
	font-size: .88em;
}

.beitrag-text pre {
	background: var(--code-bg);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 18px;
	overflow-x: auto;
	font-family: var(--mono);
	font-size: 13.5px;
	line-height: 1.6;
}

.beitrag-text pre code {
	background: none;
	border: 0;
	padding: 0;
	font-size: inherit;
}

.beitrag-text table {
	width: 100%;
	border-collapse: collapse;
	margin: 28px 0;
	font-size: 14.5px;
	display: block;
	overflow-x: auto;
}

.beitrag-text th,
.beitrag-text td {
	border: 1px solid var(--line2);
	padding: 9px 12px;
	text-align: left;
}

.beitrag-text th {
	background: var(--surface);
	color: var(--title);
	font-weight: 600;
}

.beitrag-text hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 36px 0;
}

/* Werkstatt: Maschinen als Kacheln statt Listenzeilen */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.maschinen-raster {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 28px;
	margin-top: 8px;
}

.maschine {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line);
	border-radius: 10px;
	overflow: hidden;
	transition: border-color .2s ease;
}

.maschine:hover {
	border-color: var(--line2);
}

.maschine-bild {
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--surface);
	overflow: hidden;
}

.maschine-bild img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Ohne Foto: Initialen statt Leere, damit das Raster nicht ausfranst */
.maschine-kein-bild {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-size: 40px;
	font-weight: 700;
	color: var(--line2);
	letter-spacing: .04em;
	text-transform: uppercase;
}

.maschine-text {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 8px;
	padding: 18px 20px 20px;
}

.maschine-titel {
	font-size: 18px;
	line-height: 1.3;
	margin: 0;
}

.maschine-titel a {
	color: var(--text);
}

.maschine-titel a:hover {
	color: var(--akzent);
}

.maschine-meta {
	font-size: 12.5px;
	color: var(--muted);
	margin: 0;
}

.maschine-auszug {
	font-size: 14px;
	line-height: 1.6;
	color: var(--muted);
	margin: 0;
}

.maschine-mehr {
	margin-top: auto;
	padding-top: 6px;
	font-size: 13.5px;
	color: var(--akzent);
}

@media (max-width: 600px) {
	.maschinen-raster {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

/* Hinweis auf die Arbeitsweise, unter jedem Beitrag */
.ki-hinweis {
	margin-top: 36px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
	font-size: 13px;
	line-height: 1.6;
	color: var(--muted);
}

.ki-hinweis a {
	color: var(--muted);
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color .2s ease;
}

.ki-hinweis a:hover {
	color: var(--akzent);
}

/* Steht der Hinweis davor, braucht der Schlagwortblock keine zweite Trennlinie */
.ki-hinweis + .schlagworte {
	margin-top: 20px;
	padding-top: 0;
	border-top: 0;
}

/* Schlagwoerter */
.schlagworte {
	margin-top: 36px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.schlagworte a {
	font-size: 12.5px;
	color: var(--muted);
	border: 1px solid var(--line2);
	border-radius: 999px;
	padding: 4px 12px;
	transition: color .2s ease, border-color .2s ease;
}

.schlagworte a:hover {
	color: var(--akzent);
	border-color: var(--akzent);
}

/* Blaettern zwischen Beitraegen */
.beitrag-nav {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
	font-size: 14.5px;
}

.beitrag-nav a {
	color: var(--title);
	font-family: var(--titel-schrift);
	font-weight: 600;
	max-width: 20rem;
}

.beitrag-nav a:hover {
	color: var(--akzent);
}

.beitrag-nav span {
	display: block;
	font: 600 11px/1 var(--mono);
	color: var(--muted2);
	text-transform: uppercase;
	letter-spacing: .12em;
	margin-bottom: 6px;
}

.beitrag-nav .naechster {
	text-align: right;
	margin-left: auto;
}

/* = Blaetternavigation
-------------------------------------------------------------- */

.blaettern {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
}

.blaettern .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.blaettern .page-numbers {
	display: inline-block;
	min-width: 38px;
	text-align: center;
	padding: 8px 12px;
	border: 1px solid var(--line2);
	border-radius: 8px;
	color: var(--text);
	font-size: 14px;
	transition: all .2s ease;
}

.blaettern .page-numbers:hover,
.blaettern .page-numbers.current {
	background: var(--akzent);
	border-color: var(--akzent);
	color: #0f0f0f;
	font-weight: 600;
}

.blaettern .page-numbers.dots:hover {
	background: none;
	border-color: var(--line2);
	color: var(--text);
	font-weight: 400;
}

/* = Suche
-------------------------------------------------------------- */

.suchform {
	display: flex;
	gap: 10px;
	margin: 24px 0;
	max-width: 30rem;
}

.suchform input[type="search"] {
	flex: 1;
	background: var(--surface);
	border: 1px solid var(--line2);
	border-radius: 8px;
	color: var(--text);
	padding: 10px 14px;
	font-size: 15px;
	font-family: inherit;
}

.suchform button {
	background: var(--akzent);
	border: 0;
	border-radius: 8px;
	color: #0f0f0f;
	padding: 10px 20px;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: filter .2s ease;
}

.suchform button:hover {
	filter: brightness(1.08);
}

/* = Kommentare
-------------------------------------------------------------- */

.kommentare {
	margin-top: 48px;
	padding-top: 28px;
	border-top: 1px solid var(--line);
}

.kommentare-titel {
	font: 600 19px/1.3 var(--titel-schrift);
	color: var(--title);
	margin: 0 0 24px;
}

.kommentarliste {
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
}

.kommentarliste li {
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 18px;
	margin-bottom: 14px;
	background: var(--surface2);
}

.kommentarliste .children {
	list-style: none;
	margin: 14px 0 0;
	padding-left: 20px;
}

.kommentar-kopf {
	font-size: 13px;
	color: var(--muted2);
	margin: 0 0 10px;
}

.kommentar-autor {
	color: var(--title);
	font-weight: 600;
	font-family: var(--titel-schrift);
}

.kommentar-text {
	font-size: 15.5px;
	line-height: 1.7;
	color: var(--body);
}

.kommentar-text p:last-child {
	margin-bottom: 0;
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
	width: 100%;
	background: var(--surface);
	border: 1px solid var(--line2);
	border-radius: 8px;
	color: var(--text);
	padding: 10px 14px;
	font-family: inherit;
	font-size: 15px;
	margin-top: 6px;
}

.comment-respond label {
	font-size: 13.5px;
	color: var(--muted);
}

.comment-respond .submit {
	background: var(--akzent);
	border: 0;
	border-radius: 8px;
	color: #0f0f0f;
	padding: 11px 24px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.comment-respond .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.comment-respond .comment-form-cookies-consent input {
	margin-top: 5px;
}

/* = Fuss
-------------------------------------------------------------- */

.fuss {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding: 20px 48px;
	border-top: 1px solid var(--line);
	background: var(--surface2);
}

.fuss span,
.fuss p {
	font-size: 13px;
	color: var(--muted2);
	margin: 0;
}

.fuss ul {
	display: flex;
	gap: 22px;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.fuss a {
	font-size: 13px;
	color: var(--muted);
}

.fuss a:hover {
	color: var(--akzent);
}

@media (max-width: 860px) {
	.fuss {
		padding: 18px 24px;
		justify-content: center;
		text-align: center;
	}
}

/* = Leere Zustaende
-------------------------------------------------------------- */

.leer {
	padding: 44px 48px 60px;
}

.leer h1 {
	font: 700 28px/1.2 var(--titel-schrift);
	color: var(--title);
	margin: 0 0 10px;
}

.leer p {
	color: var(--muted);
	margin: 0 0 18px;
}

@media (max-width: 860px) {
	.leer {
		padding: 32px 24px 48px;
	}
}

/* = Druck
-------------------------------------------------------------- */

@media print {
	.kopf,
	.fuss,
	.blaettern,
	.beitrag-nav,
	.kommentare,
	.themebtn {
		display: none;
	}

	.blatt {
		border: 0;
		margin: 0;
	}

	body {
		background: #fff;
		color: #000;
	}
}

/* Hero ohne Beitragsbild: eine Spalte statt halb leerer Flaeche */
.hero-ohne-bild {
	grid-template-columns: 1fr;
}

.hero-ohne-bild .hero-text {
	max-width: 46rem;
}

/* Kachel ohne Bild: dezenter Verlauf statt Loch */
.tile-img:empty,
.tile-img:not(:has(img)) {
	background:
		radial-gradient(circle at 30% 20%, rgba(255, 122, 24, .16), transparent 60%),
		var(--surface2);
}

/* = Einwilligungs-Banner
--------------------------------------------------------------
Unten angedockt statt bildschirmfuellend: Impressum und
Datenschutz bleiben erreichbar, solange er steht.
-------------------------------------------------------------- */

.consent {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 90;
	background: var(--surface);
	border-top: 1px solid var(--line2);
	box-shadow: 0 -8px 30px rgba(0, 0, 0, .25);
}

.consent[hidden] {
	display: none;
}

.consent-innen {
	max-width: var(--breite);
	margin: 0 auto;
	padding: 20px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	flex-wrap: wrap;
}

.consent-inhalt {
	flex: 1 1 24rem;
	min-width: 0;
}

.consent-titel {
	font: 600 15px/1.3 var(--titel-schrift);
	color: var(--title);
	margin: 0 0 6px;
}

.consent-text {
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--body2);
	margin: 0 0 8px;
	max-width: 62ch;
}

.consent-links {
	margin: 0;
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.consent-links a {
	font-size: 12.5px;
	color: var(--muted);
	text-decoration: underline;
}

.consent-links a:hover {
	color: var(--akzent);
}

.consent-knoepfe {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	flex-shrink: 0;
}

/* Beide Schaltflaechen gleich gross und gleich auffaellig --
   ein hervorgehobenes "Akzeptieren" waere ein Dark Pattern. */
.consent-btn {
	font: 600 14px/1 var(--text-schrift);
	padding: 12px 20px;
	min-width: 11rem;
	border-radius: 8px;
	border: 1px solid var(--akzent);
	background: transparent;
	color: var(--text);
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}

.consent-btn:hover {
	background: var(--akzent);
	color: #0f0f0f;
}

@media (max-width: 720px) {
	.consent-innen {
		padding: 16px 20px;
		gap: 16px;
	}

	.consent-knoepfe {
		width: 100%;
	}

	.consent-btn {
		flex: 1 1 auto;
		min-width: 0;
	}
}

/* Widerrufs-Link im Fuss */
.fuss button.fuss-link {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 13px;
	color: var(--muted);
	cursor: pointer;
}

.fuss button.fuss-link:hover {
	color: var(--akzent);
}

/* = makr.tools-Kachel auf der Startseite
   Zwei gestapelte Ebenen, die sich ueberblenden. Die Bilder liegen auf
   tools.malandereideen.de; Strichgrafiken kommen als Maske herein, damit
   sie in beiden Designs sichtbar bleiben.
---------------------------------------------------------------------------- */

.tile-img-tools {
	display: grid;
	background: var(--surface2);
}

/* Der Verlauf der anderen Kacheln liegt ueber Fotos und laesst den Titel
   darauf lesbar werden. Hier steht nichts im Bild -- er wuerde die untere
   Haelfte der Zeichnung nur abdunkeln. */
.tile-img-tools::after {
	content: none;
}

.tools-bild {
	grid-area: 1 / 1;
	opacity: 0;
	transition: opacity .6s ease;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	/* Anders als bei den Fotokacheln nicht beschneiden: eine angeschnittene
	   Zeichnung sieht nach Fehler aus. Luft ringsum, damit sie nicht am
	   Rand klebt. */
	margin: 14px;
}

.tools-bild.ist-sichtbar {
	opacity: 1;
}

/* Strichgrafik: das SVG gibt nur die Form vor, die Farbe kommt von hier. */
.tools-strich {
	background-color: var(--title);
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	opacity: 0;
}

.tools-strich.ist-sichtbar {
	/* Volles Weiss auf dunklem Grund waere harter als die Fotokacheln
	   daneben -- leicht zurueckgenommen faellt sie sich ein. */
	opacity: .82;
}

.tile:hover .tools-bild {
	transform: scale(1.03);
	transition: opacity .6s ease, transform .35s ease;
}

/* = Freigestellte Produktbilder (Werkstatt)
   Quadratische Freisteller in einem Rahmen, der aufs Querformat rechnet:
   zuschneiden wuerde der Maschine Kopf und Fuss nehmen. Also ganz zeigen
   und die Luft drumherum in Kauf nehmen.
---------------------------------------------------------------------------- */

.beitrag-bild-frei {
	display: flex;
	justify-content: center;
	background: var(--surface);
	padding: 18px;
}

.beitrag-bild-frei img {
	width: 100%;
	/* Feste Hoehe statt max-height: die Vorlagen sind zwischen 400 und 1200
	   Pixel gross, ohne das stuende eine Maschine gross und die naechste
	   verloren klein daneben. object-fit passt ein, ohne zu beschneiden. */
	height: 420px;
	object-fit: contain;
}

@media (max-width: 600px) {
	.beitrag-bild-frei img {
		height: 260px;
	}
}

/* Dieselbe Ueberlegung in der Uebersicht. Der Rahmen bleibt 4:3, damit das
   Raster gleichmaessig ist -- nur das Bild wird eingepasst statt beschnitten. */
.maschine-bild img {
	object-fit: contain;
	padding: 12px;
	box-sizing: border-box;
}

/* = Bilder im Beitrag
---------------------------------------------------------------------------- */

/* Zwei Aufnahmen, die zusammengehoeren, nebeneinander statt untereinander.
   Auf schmalen Schirmen rutschen sie von selbst uebereinander. */
.bild-paar {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin: 28px 0;
}

.bild-paar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

@media (max-width: 600px) {
	.bild-paar {
		grid-template-columns: 1fr;
	}

	.bild-paar img {
		height: auto;
	}
}

/* Vergroessern: der Zeiger sagt an, dass da etwas geht. */
.beitrag-text img.ist-vergroesserbar {
	cursor: zoom-in;
}

.beitrag-text img.ist-vergroesserbar:focus-visible {
	outline: 2px solid var(--akzent, #f5821f);
	outline-offset: 3px;
}

dialog.bildgross {
	max-width: 100vw;
	max-height: 100vh;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: hidden;
}

dialog.bildgross::backdrop {
	background: rgba(0, 0, 0, .88);
}

dialog.bildgross img {
	position: absolute;
	inset: 0;
	margin: auto;
	max-width: 94vw;
	/* Platz fuer den Schliessen-Knopf oben lassen. */
	max-height: 88vh;
	width: auto;
	height: auto;
	border-radius: 8px;
	cursor: zoom-out;
}

.bildgross-zu {
	position: absolute;
	top: 14px;
	right: 18px;
	z-index: 1;
	width: 42px;
	height: 42px;
	font-size: 30px;
	line-height: 1;
	color: #fff;
	background: rgba(0, 0, 0, .45);
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 50%;
	cursor: pointer;
}

.bildgross-zu:hover {
	background: rgba(0, 0, 0, .75);
}

/* = Kurzbeitraege ("Zeugs")
   Ein Foto, ein paar Worte. Auf der Startseite als Dreierreihe unter den
   Bereichen, im eigenen Archiv als Raster.
---------------------------------------------------------------------------- */

.zeugs-reihe {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

/* Solange erst ein oder zwei Kurzbeitraege da sind, wuerden in einer
   Dreierreihe daneben leere Plaetze stehen. Dann lieber weniger Spalten
   und eine Kachel in vernuenftiger Groesse. */
.zeugs-reihe:has(.zeugs:nth-child(1):last-child) {
	grid-template-columns: minmax(0, 340px);
}

.zeugs-reihe:has(.zeugs:nth-child(2):last-child) {
	grid-template-columns: repeat(2, minmax(0, 340px));
}

.zeugs-raster {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	margin-top: 8px;
}

@media (max-width: 760px) {
	.zeugs-reihe {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 480px) {
	.zeugs-reihe {
		grid-template-columns: 1fr;
	}
}

.zeugs,
.zeugs-stueck {
	display: block;
	border: 1px solid var(--line);
	border-radius: 10px;
	overflow: hidden;
	background: var(--surface);
	text-decoration: none;
	transition: border-color .2s ease;
}

.zeugs:hover,
.zeugs-stueck:hover {
	border-color: var(--line2);
}

/* Hochkant im Verhaeltnis 3:4. Die Fotos kommen vom Handy und sind damit
   fast immer hoch -- quadratisch hat beim ersten echten Beitrag oben und
   unten je ein Viertel abgeschnitten. Ein festes Format bleibt trotzdem
   noetig, sonst steht die Reihe schief, sobald ein Screenshot dazwischen
   liegt. */
.zeugs-bild {
	display: block;
	aspect-ratio: 3 / 4;
	background: var(--surface2);
	overflow: hidden;
}

.zeugs-bild img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}

.zeugs:hover .zeugs-bild img,
.zeugs-stueck:hover .zeugs-bild img {
	transform: scale(1.04);
}

.zeugs-text {
	padding: 11px 13px 13px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--body);
}

.zeugs-stueck-text {
	padding: 12px 14px 15px;
}

.zeugs-titel {
	font: 600 15px/1.3 var(--titel-schrift);
	margin: 0;
}

.zeugs-titel a {
	color: var(--title);
	text-decoration: none;
}

.zeugs-auszug {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--muted2);
}

/* Mehrere Fotos in einem Kurzbeitrag: Raster statt Kolonne. Angeklickt
   gehen sie gross auf, deshalb darf die Vorschau klein bleiben. */
/* Auch der Galerie-Block der App bekommt dieselbe Darstellung: In der
   Handy-App laesst sich damit mehrfach auswaehlen, statt jedes Foto einzeln
   einzufuegen. Fuer den Besucher soll das keinen Unterschied machen. */
.zeugs-galerie,
.zeugs-beitrag .beitrag-text .wp-block-gallery {
	display: grid;
	/* Feste Spaltenzahl statt auto-fit: bei sechs Fotos wurden daraus vier
	   plus zwei, und die zweite Reihe hing halb leer. */
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin: 28px 0;
}

/* Zwei oder vier Fotos gehen glatt in zwei Spalten auf. Bei drei Spalten
   bliebe sonst eine Luecke stehen. */
.zeugs-galerie:has(figure:nth-child(2):last-child),
.zeugs-galerie:has(figure:nth-child(4):last-child) {
	grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 560px) {
	.zeugs-galerie,
	.zeugs-beitrag .beitrag-text .wp-block-gallery {
		grid-template-columns: repeat(2, 1fr);
	}
}

.zeugs-galerie figure,
.zeugs-beitrag .beitrag-text .wp-block-gallery figure {
	margin: 0;
	width: auto;
}

.zeugs-galerie img,
.zeugs-beitrag .beitrag-text .wp-block-gallery img {
	width: 100%;
	/* Dasselbe Verhaeltnis wie die Kacheln auf der Startseite: die Fotos
	   kommen vom Handy und sind hochkant. */
	aspect-ratio: 3 / 4;
	object-fit: cover;
	margin: 0;
	display: block;
	border-radius: 8px;
}

/* = YouTube-Zwei-Klick-Einbettung
   Vor dem Klick nur eine schwarze Flaeche mit Abspielknopf -- kein Kontakt
   zu Google, bis der Besucher es selbst will (js/yt-embed.js).
---------------------------------------------------------------------------- */

.yt-embed {
	position: relative;
	aspect-ratio: 16 / 9;
	margin: 28px 0;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}

.yt-embed__play {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	cursor: pointer;
}

/* Der rote YouTube-Abspielknopf, komplett in CSS -- kein fremdes Bild. */
.yt-embed__logo {
	width: 68px;
	height: 48px;
	background: #212121;
	border-radius: 14px;
	opacity: 0.85;
	transition: opacity 0.2s, background 0.2s;
	position: relative;
}

.yt-embed__play:hover .yt-embed__logo,
.yt-embed__play:focus-visible .yt-embed__logo {
	background: #f00;
	opacity: 1;
}

.yt-embed__logo::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-40%, -50%);
	border-style: solid;
	border-width: 10px 0 10px 17px;
	border-color: transparent transparent transparent #fff;
}

.yt-embed__hinweis {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 8px 12px;
	font-size: 0.8rem;
	line-height: 1.35;
	color: #eee;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
	/* Nur der Link ist klickbar, der Rest gibt den Klick an den Abspielknopf
	   darunter weiter. */
	pointer-events: none;
}

.yt-embed__hinweis a {
	color: #fff;
	text-decoration: underline;
	pointer-events: auto;
}

.yt-embed--geladen {
	cursor: auto;
}

.yt-embed--geladen iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
