/* ==========================================================================
   STABAmix – basis.css
   Gemeinsame Gestaltung (Bauplan §4/§5/§9/§11): Grundstile, Klassen-Vokabular,
   Knöpfe, Kopf mit Navigation und Handy-Menü, Fusszeile, Preisrechner.
   Seiten-CSS (assets/css/seiten/*.css) definiert diese Klassen NICHT neu.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Farben und Schriften (aus theme.json, mit Rückfallwerten)
   -------------------------------------------------------------------------- */

:root {
	--stx-ink: var(--wp--preset--color--ink, #12161C);
	--stx-text: var(--wp--preset--color--text, #2A3038);
	--stx-muted: var(--wp--preset--color--muted, #555C66);
	--stx-line: var(--wp--preset--color--line, #E3E6EA);
	--stx-surface: var(--wp--preset--color--surface, #F5F6F8);
	--stx-raster: var(--wp--preset--color--raster, #F3F6FA);
	--stx-rasterlinie: var(--wp--preset--color--rasterlinie, #E4E9F0);
	--stx-blau: var(--wp--preset--color--blau, #1B71DA);
	--stx-blau-dunkel: var(--wp--preset--color--blau-dunkel, #155DB4);
	--stx-blau-tief: var(--wp--preset--color--blau-tief, #0F4A91);
	--stx-weiss: var(--wp--preset--color--weiss, #FFFFFF);
	--stx-rahmen: var(--wp--preset--color--rahmen, #C3C9D1);
	/* Rand von Eingabefeldern wie im Entwurf (Kontrast ≥ 3:1) */
	--stx-feldrand: #7A8491;
	/* Hintergrund für Code/Beispiel-Chips wie im Entwurf */
	--stx-chip: #EEF1F5;

	--stx-schrift-titel: var(--wp--preset--font-family--manrope, Manrope, 'Segoe UI', sans-serif);
	--stx-schrift-text: var(--wp--preset--font-family--plex-sans, 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif);
	--stx-schrift-mono: var(--wp--preset--font-family--plex-mono, 'IBM Plex Mono', Consolas, monospace);

	--stx-schatten: 0 12px 32px -12px rgba(18, 22, 28, 0.25);
	--stx-farbband: linear-gradient(90deg, #EC7572 0 27.2%, #1B71DA 27.2% 50.8%, #FA923C 50.8% 69.7%, #44D592 69.7% 78.3%, #328034 78.3% 82.1%, #E3E6EA 82.1% 100%);
	--stx-kickerband: linear-gradient(90deg, #EC7572 0 33%, #1B71DA 33% 60%, #FA923C 60% 85%, #44D592 85% 100%);

	/* Symbole als CSS-Maske (Farbe kommt aus background-color) */
	--stx-icon-haken: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
	--stx-icon-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E");
	--stx-icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
	--stx-icon-menue: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E");
	--stx-icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   2. Grundstile
   -------------------------------------------------------------------------- */

/* Sprungmarken (#produkt, #daten …) nicht unter dem klebenden Kopf verstecken. */
html {
	scroll-padding-top: 88px;
}

body {
	margin: 0;
	background-color: var(--stx-weiss);
	color: var(--stx-text);
	font-family: var(--stx-schrift-text);
	font-size: 16px;
	line-height: 1.6;
}

:where(img, video) {
	max-width: 100%;
	height: auto;
}

:where(p, li, td, th, dd, figcaption, summary) :where(strong, b) {
	font-weight: 600;
}

:where(code, kbd, samp) {
	font-family: var(--stx-schrift-mono);
	font-size: 14px;
}

/* Fokus-Rahmen (Tastatur) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--stx-blau);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. Abschnitte und Container
   -------------------------------------------------------------------------- */

.stx-abschnitt {
	box-sizing: border-box;
	padding: clamp(56px, 12vw, 96px) 20px;
}

.stx-abschnitt--mittel {
	padding: clamp(48px, 10vw, 72px) 20px;
}

.stx-abschnitt--flaeche {
	background-color: var(--stx-surface);
	border-top: 1px solid var(--stx-line);
	border-bottom: 1px solid var(--stx-line);
}

/* Zwei Flächen-Abschnitte hintereinander: nur eine Linie dazwischen */
.stx-abschnitt--flaeche + .stx-abschnitt--flaeche {
	border-top: 0;
}

.stx-abschnitt--panel {
	padding: clamp(12px, 3vw, 24px) clamp(10px, 2.5vw, 16px) 0;
}

.stx-abschnitt.stx-abschnitt--ohne-oben {
	padding-top: 0;
}

.stx-abschnitt.stx-abschnitt--ohne-unten {
	padding-bottom: 0;
}

.stx-inhalt {
	box-sizing: border-box;
	width: 100%;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

.stx-inhalt.stx-inhalt--schmal {
	max-width: 800px;
}

.stx-inhalt.stx-inhalt--breit {
	max-width: 1232px;
}

/* Karierte Fläche */
.stx-raster {
	box-sizing: border-box;
	background-color: var(--stx-raster);
	background-image:
		linear-gradient(var(--stx-rasterlinie) 1px, transparent 1px),
		linear-gradient(90deg, var(--stx-rasterlinie) 1px, transparent 1px);
	background-size: 5mm 5mm;
	border: 1px solid var(--stx-line);
	border-radius: 16px;
	padding: clamp(32px, 7vw, 72px) clamp(20px, 5vw, 48px);
}

@media (max-width: 600px) {
	.stx-raster {
		background-size: 30px 30px;
	}
}

@media (min-width: 601px) and (pointer: coarse) {
	.stx-raster {
		background-size: 26px 26px;
	}
}

/* --------------------------------------------------------------------------
   4. Fliesstext-Hülle (Rechtstexte, einfache Seiten) und Standard-Kernblöcke
   -------------------------------------------------------------------------- */

.stx-text {
	max-width: 800px;
}

/* Abstände zwischen Absätzen, Titeln, Listen … (blockGap ist 0) */
body .stx-text > * + *,
body .stx-standardinhalt > .wp-block-post-content > * + * {
	margin-block-start: 16px;
}

body .stx-text > * + :is(h1, h2, h3),
body .stx-standardinhalt > .wp-block-post-content > * + :is(h1, h2, h3) {
	margin-block-start: 40px;
}

body .stx-text > * + :is(h4, h5, h6),
body .stx-standardinhalt > .wp-block-post-content > * + :is(h4, h5, h6) {
	margin-block-start: 28px;
}

body .stx-text > :is(h1, h2, h3, h4, h5, h6) + *,
body .stx-standardinhalt > .wp-block-post-content > :is(h1, h2, h3, h4, h5, h6) + * {
	margin-block-start: 12px;
}

/* Titel im Fliesstext (Rechtstexte): H2 als Untertitel (28), H3 als Kartentitel (20/600) –
   lesbarer als die grossen Abschnittstitel der Design-Seiten. Titel mit eigener
   stx-Klasse behalten ihre Grösse. */
:is(.stx-text, .stx-standardinhalt) h2.wp-block-heading:not([class*="stx-"]) {
	font-family: var(--stx-schrift-titel);
	font-size: clamp(18px, 4.5vw, 28px);
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: 0;
	color: var(--stx-ink);
	overflow-wrap: break-word;
	hyphens: auto;
}

:is(.stx-text, .stx-standardinhalt) h3.wp-block-heading:not([class*="stx-"]) {
	font-family: var(--stx-schrift-text);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
	color: var(--stx-ink);
	overflow-wrap: break-word;
}

body .stx-text > * + h3,
body .stx-standardinhalt > .wp-block-post-content > * + h3 {
	margin-block-start: 28px;
}

body .stx-text > h2 + h3,
body .stx-standardinhalt > .wp-block-post-content > h2 + h3 {
	margin-block-start: 16px;
}

/* Listen */
:is(.stx-text, .stx-standardinhalt) :is(ul.wp-block-list:not(.stx-haken), ol.wp-block-list:not(.stx-schritte)) {
	margin-top: 0;
	margin-bottom: 0;
	padding-left: 1.5em;
}

/* Liste direkt nach einem Absatz (z. B. «… gemäss Art. 6 DSGVO:») mit kleinem Abstand */
body .stx-text > p + :is(ul.wp-block-list:not(.stx-haken), ol.wp-block-list:not(.stx-schritte)),
body .stx-standardinhalt > .wp-block-post-content > p + :is(ul.wp-block-list:not(.stx-haken), ol.wp-block-list:not(.stx-schritte)) {
	margin-top: 8px;
}

:is(.stx-text, .stx-standardinhalt) :is(ul.wp-block-list:not(.stx-haken), ol.wp-block-list:not(.stx-schritte)) > li + li,
:is(.stx-text, .stx-standardinhalt) .wp-block-list > li > .wp-block-list {
	margin-top: 6px;
}

/* Zitate */
:is(.stx-text, .stx-standardinhalt) .wp-block-quote {
	margin: 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--stx-blau);
	color: var(--stx-ink);
}

:is(.stx-text, .stx-standardinhalt) .wp-block-quote > * + * {
	margin-block-start: 12px;
}

:is(.stx-text, .stx-standardinhalt) .wp-block-quote cite {
	display: block;
	margin-top: 8px;
	font-size: 14px;
	font-style: normal;
	color: var(--stx-muted);
}

/* Tabellen (ohne eigene Klasse) */
:is(.stx-text, .stx-standardinhalt) .wp-block-table:not(.stx-tabelle) {
	margin: 0;
	overflow-x: auto;
}

:is(.stx-text, .stx-standardinhalt) .wp-block-table:not(.stx-tabelle) table {
	width: 100%;
	border-collapse: collapse;
	font-size: 16px;
}

:is(.stx-text, .stx-standardinhalt) .wp-block-table:not(.stx-tabelle) :is(th, td) {
	border: 0;
	border-bottom: 1px solid var(--stx-line);
	padding: 10px 16px 10px 0;
	text-align: left;
	vertical-align: top;
}

:is(.stx-text, .stx-standardinhalt) .wp-block-table:not(.stx-tabelle) th {
	font-weight: 600;
	color: var(--stx-ink);
}

:is(.stx-text, .stx-standardinhalt) .wp-block-table:not(.stx-tabelle) :is(thead, tfoot) {
	border: 0;
}

:is(.stx-text, .stx-standardinhalt) .wp-block-table:not(.stx-tabelle) .has-text-align-right {
	text-align: right;
}

:is(.stx-text, .stx-standardinhalt) .wp-block-table:not(.stx-tabelle) .has-text-align-center {
	text-align: center;
}

/* Trennlinie, Code */
:is(.stx-text, .stx-standardinhalt) .wp-block-separator {
	border: 0;
	border-top: 1px solid var(--stx-line);
	opacity: 1;
}

:is(.stx-text, .stx-standardinhalt) :not(pre) > code {
	background-color: var(--stx-chip);
	padding: 1px 6px;
	border-radius: 6px;
}

/* --------------------------------------------------------------------------
   5. Schrift-Klassen (Skala §4)
   -------------------------------------------------------------------------- */

.stx-kicker {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--stx-schrift-mono);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.6;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--stx-muted);
}

/* Streifen darf schrumpfen, wenn der Kicker umbricht (wie im Entwurf) */
.stx-kicker::before {
	content: "";
	flex: 0 1 auto;
	display: inline-block;
	width: 32px;
	height: 3px;
	background: var(--stx-kickerband);
}

.stx-h1 {
	font-family: var(--stx-schrift-titel);
	font-weight: 800;
	font-size: clamp(36px, 9vw, 56px);
	line-height: 1.06;
	letter-spacing: -0.02em;
	color: var(--stx-ink);
	text-wrap: balance;
}

.stx-titel {
	font-family: var(--stx-schrift-titel);
	font-weight: 800;
	font-size: clamp(26px, 6.5vw, 40px);
	line-height: 1.22;
	letter-spacing: -0.01em;
	color: var(--stx-ink);
}

.stx-untertitel {
	font-family: var(--stx-schrift-titel);
	font-weight: 800;
	font-size: clamp(18px, 4.5vw, 28px);
	line-height: 1.25;
	letter-spacing: 0;
	color: var(--stx-ink);
}

.stx-zahl {
	font-family: var(--stx-schrift-titel);
	font-weight: 800;
	font-size: clamp(38px, 9.7vw, 60px);
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--stx-ink);
	font-variant-numeric: tabular-nums;
}

.stx-kartentitel {
	font-family: var(--stx-schrift-text);
	font-weight: 600;
	font-size: 20px;
	line-height: 1.4;
	letter-spacing: 0;
	color: var(--stx-ink);
}

.stx-lead {
	font-size: 19px;
	line-height: 1.55;
	color: var(--stx-text);
	max-width: 640px;
	text-wrap: pretty;
}

.stx-hinweis {
	font-size: 14px;
	line-height: 1.6;
	color: var(--stx-muted);
}

.stx-klein {
	font-family: var(--stx-schrift-text);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--stx-muted);
}

.stx-mono {
	font-family: var(--stx-schrift-mono);
	font-size: 14px;
}

/* --------------------------------------------------------------------------
   6. Karten, Raster-Gitter, Zeilen
   -------------------------------------------------------------------------- */

.stx-karte {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	background-color: var(--stx-weiss);
	border: 1px solid var(--stx-line);
	border-radius: 12px;
	padding: clamp(20px, 4vw, 28px);
}

.stx-karte.stx-karte--flaeche {
	background-color: var(--stx-surface);
}

.stx-raster-gitter {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
	gap: 24px;
}

.stx-raster-gitter.stx-raster-gitter--2 {
	grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
}

.stx-raster-gitter.stx-raster-gitter--4 {
	grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.stx-zeile {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 48px 64px;
}

.stx-zeile__haupt {
	flex: 7 1 480px;
	min-width: 0;
}

.stx-zeile__neben {
	flex: 5 1 360px;
	min-width: 0;
}

/* --------------------------------------------------------------------------
   7. Listen: Haken und Schritte
   -------------------------------------------------------------------------- */

ul.stx-haken {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

ul.stx-haken > li {
	position: relative;
	padding-left: 32px;
}

ul.stx-haken > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 3px;
	width: 20px;
	height: 20px;
	background-color: var(--stx-blau);
	-webkit-mask: var(--stx-icon-haken) center / contain no-repeat;
	mask: var(--stx-icon-haken) center / contain no-repeat;
}

ol.stx-schritte {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: stx-schritt;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

ol.stx-schritte > li {
	counter-increment: stx-schritt;
	position: relative;
	min-height: 28px;
	padding-left: 42px;
}

ol.stx-schritte > li::before {
	content: counter(stx-schritt);
	position: absolute;
	left: 0;
	top: 0;
	box-sizing: border-box;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background-color: var(--stx-blau);
	color: var(--stx-weiss);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
}

/* --------------------------------------------------------------------------
   8. Fragen (Details-Block)
   -------------------------------------------------------------------------- */

.wp-block-details.stx-faq,
details.stx-faq {
	border-bottom: 1px solid var(--stx-line);
	padding: 16px 0;
}

.stx-faq > summary {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	list-style: none;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.6;
	color: var(--stx-ink);
}

.stx-faq > summary::-webkit-details-marker {
	display: none;
}

.stx-faq > summary::after {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	margin-top: 3px;
	background-color: var(--stx-muted);
	-webkit-mask: var(--stx-icon-plus) center / contain no-repeat;
	mask: var(--stx-icon-plus) center / contain no-repeat;
}

.stx-faq[open] > summary::after {
	-webkit-mask-image: var(--stx-icon-minus);
	mask-image: var(--stx-icon-minus);
}

.stx-faq > :not(summary) {
	margin-block-start: 10px;
}

/* --------------------------------------------------------------------------
   9. Tabelle
   -------------------------------------------------------------------------- */

.wp-block-table.stx-tabelle {
	box-sizing: border-box;
	margin: 0;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	background-color: var(--stx-weiss);
	border: 1px solid var(--stx-line);
	border-radius: 12px;
}

.wp-block-table.stx-tabelle table {
	width: 100%;
	border: 0;
	border-collapse: collapse;
	font-size: 16px;
	line-height: 1.6;
	font-variant-numeric: tabular-nums;
}

.wp-block-table.stx-tabelle :is(thead, tbody, tfoot) {
	border: 0;
}

/* Zeilenlinien heller als die Kopflinie, wie im Entwurf (#EEF0F3) */
.wp-block-table.stx-tabelle :is(th, td) {
	border: 0;
	border-bottom: 1px solid #EEF0F3;
	padding: 12px 20px;
	vertical-align: top;
}

.wp-block-table.stx-tabelle th {
	text-align: left;
	font-weight: 600;
	color: var(--stx-ink);
}

/* Tabellenkopf wie im Entwurf: 13/600 gedämpft, ohne Grossbuchstaben */
.wp-block-table.stx-tabelle thead th {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	color: var(--stx-muted);
	vertical-align: bottom;
	border-bottom-color: var(--stx-line);
}

.wp-block-table.stx-tabelle tbody tr:last-child > :is(th, td),
.wp-block-table.stx-tabelle tfoot tr:last-child > :is(th, td) {
	border-bottom: 0;
}

/* Fussfeld: nur die helle Zeilenlinie darüber (wie im Entwurf), nicht fett;
   Hervorhebung einzelner Werte über «fett» im Editor */
.wp-block-table.stx-tabelle tfoot tr:first-child > :is(th, td) {
	border-top: 1px solid #EEF0F3;
}

.wp-block-table.stx-tabelle tfoot :is(th, td) {
	color: var(--stx-ink);
}

.wp-block-table.stx-tabelle .has-text-align-right {
	text-align: right;
}

.wp-block-table.stx-tabelle .has-text-align-center {
	text-align: center;
}

.wp-block-table.stx-tabelle .has-text-align-left {
	text-align: left;
}

/* Bildtext über der Tabelle, ohne Linie (wie im Entwurf) */
.wp-block-table.stx-tabelle:has(> .wp-element-caption) {
	display: flex;
	flex-direction: column;
}

.wp-block-table.stx-tabelle .wp-element-caption {
	order: -1;
	margin: 0;
	padding: 12px 20px 4px;
	border: 0;
	text-align: left;
}

/* --------------------------------------------------------------------------
   10. Bilder und Bildtexte
   -------------------------------------------------------------------------- */

.wp-block-image.stx-bild,
figure.stx-bild {
	margin: 0;
	max-width: 100%;
}

.wp-block-image.stx-bild img,
.stx-bild > img,
img.stx-bild {
	display: block;
	box-sizing: border-box;
	max-width: 100%;
	height: auto;
	border: 1px solid var(--stx-line);
	border-radius: 12px;
	box-shadow: var(--stx-schatten);
}

.wp-block-image.stx-bild--ohne-rahmen img,
.stx-bild--ohne-rahmen > img,
img.stx-bild--ohne-rahmen {
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.wp-block-image .wp-element-caption,
.wp-block-table .wp-element-caption {
	font-size: 14px;
	line-height: 1.5;
	color: var(--stx-muted);
}

.wp-block-image .wp-element-caption {
	margin: 12px 0 0;
}

/* --------------------------------------------------------------------------
   11. Knöpfe (Kern-Block «Button»)
   -------------------------------------------------------------------------- */

.wp-block-buttons {
	gap: 12px;
}

.wp-block-buttons > .wp-block-button {
	margin: 0;
}

.wp-block-button .wp-block-button__link {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 8px 24px;
	border: 0;
	border-radius: 8px;
	background-color: var(--stx-blau);
	color: var(--stx-weiss);
	font-family: var(--stx-schrift-text);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
}

.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus-visible {
	background-color: var(--stx-blau-dunkel);
	color: var(--stx-weiss);
}

/* Nebenknopf */
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button .wp-block-button__link.is-style-outline {
	padding: 8px 24px;
	border: 1.5px solid var(--stx-ink);
	background-color: var(--stx-weiss);
	color: var(--stx-ink);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus-visible,
.wp-block-button .wp-block-button__link.is-style-outline:hover {
	background-color: var(--stx-surface);
	border-color: var(--stx-ink);
	color: var(--stx-ink);
}

/* Download-Symbol vor dem Text */
.wp-block-button.stx-knopf-download > .wp-block-button__link::before {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask: var(--stx-icon-download) center / contain no-repeat;
	mask: var(--stx-icon-download) center / contain no-repeat;
}

/* Formular-Hülle (Gestaltung des Formulars in plugins.css) */
.stx-formular {
	box-sizing: border-box;
	min-width: 0;
}

/* --------------------------------------------------------------------------
   12. Kopf: Farbband, klebender Kopf, Logo, Navigation
   -------------------------------------------------------------------------- */

/* Der Kopf klebt oben; das Farbband (4 px) scrollt weg, wie im Entwurf. */
.wp-site-blocks > header.wp-block-template-part,
.wp-block-template-part:has(> .stx-kopf) {
	position: sticky;
	top: -4px;
	z-index: 10;
}

.admin-bar .wp-site-blocks > header.wp-block-template-part,
.admin-bar .wp-block-template-part:has(> .stx-kopf) {
	top: calc(var(--wp-admin--admin-bar--height, 32px) - 4px);
}

@media (max-width: 600px) {
	/* Unter 600 px ist die Admin-Leiste nicht fixiert. */
	.admin-bar .wp-site-blocks > header.wp-block-template-part,
	.admin-bar .wp-block-template-part:has(> .stx-kopf) {
		top: -4px;
	}
}

.stx-kopf {
	background-color: var(--stx-weiss);
	border-bottom: 1px solid var(--stx-line);
}

.stx-kopf::before {
	content: "";
	display: block;
	height: 4px;
	background: var(--stx-farbband);
}

.stx-kopf__innen {
	box-sizing: content-box;
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px 40px;
}

.stx-kopf .wp-block-site-logo {
	flex: none;
	line-height: 0;
}

.stx-kopf .wp-block-site-logo a {
	display: flex;
	align-items: center;
}

/* Original-Logo ohne Rand (STABAmix_Logo_2639x566.png): 29 px entsprechen der sichtbaren Grösse im Entwurf (40 px mit Rand) */
.stx-kopf .wp-block-site-logo.wp-block-site-logo img {
	display: block;
	width: auto;
	height: 29px;
	max-width: none;
}

/* Navigation (Desktop) */
.stx-kopf nav.wp-block-navigation {
	color: var(--stx-ink);
	font-family: var(--stx-schrift-text);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.6;
}

.stx-kopf .wp-block-navigation__container {
	gap: 4px 30px;
}

.stx-kopf .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	min-height: 44px;
}

.stx-kopf .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
	color: var(--stx-blau);
}

/* Aktiver Menüpunkt */
.stx-kopf .wp-block-navigation .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content.wp-block-navigation-item__content,
.stx-kopf .wp-block-navigation .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: var(--stx-blau-dunkel);
}

/* Pfeil beim Untermenü «Shop» */
.stx-kopf .wp-block-navigation .wp-block-navigation__submenu-icon {
	width: 14px;
	height: 14px;
	margin-left: 6px;
	color: inherit;
}

.stx-kopf .wp-block-navigation .wp-block-navigation__submenu-icon svg {
	width: 14px;
	height: 14px;
	margin-top: 0;
}

.stx-kopf .wp-block-navigation .has-child > .wp-block-navigation-item__content:hover + .wp-block-navigation__submenu-icon,
.stx-kopf .wp-block-navigation .wp-block-navigation__submenu-icon:hover {
	color: var(--stx-blau);
}

.stx-kopf .wp-block-navigation .wp-block-navigation__container > .current-menu-item > .wp-block-navigation__submenu-icon,
.stx-kopf .wp-block-navigation .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation__submenu-icon {
	color: var(--stx-blau-dunkel);
}

/* Untermenü (Desktop) */
.stx-kopf .wp-block-navigation .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container {
	top: 100%;
	left: -16px;
	right: auto;
	/* Wie im Entwurf: mindestens 180 px Inhalt + Innenabstand und Rand */
	min-width: 180px;
	box-sizing: content-box;
	padding: 8px;
	background-color: var(--stx-weiss);
	color: var(--stx-ink);
	border: 1px solid var(--stx-line);
	border-radius: 12px;
	box-shadow: var(--stx-schatten);
	z-index: 20;
}

.stx-kopf .wp-block-navigation .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	padding: 10px 12px;
	border-radius: 8px;
	font-weight: 500;
	min-height: 0;
}

/* Handy-Menü: Knopf ab ≤ 820 px (Kern-Navigation schaltet sonst erst bei 600 px um).
   Höhe wie im Entwurf: 44 px Inhalt + 2 × 1 px Rand = 46 px (Kopf gesamt 70 px). */
.stx-kopf .wp-block-navigation__responsive-container-open,
.stx-kopf .wp-block-navigation__responsive-container-close {
	box-sizing: border-box;
	align-items: center;
	gap: 8px;
	height: 46px;
	padding: 0 14px;
	border: 1px solid var(--stx-rahmen);
	border-radius: 8px;
	background-color: var(--stx-weiss);
	color: var(--stx-ink);
	line-height: 1.6;
	cursor: pointer;
}

.stx-kopf .wp-block-navigation__responsive-container-open::after,
.stx-kopf .wp-block-navigation__responsive-container-close::after {
	content: "Menü";
}

.stx-kopf .wp-block-navigation__responsive-container-open svg,
.stx-kopf .wp-block-navigation__responsive-container-close svg {
	width: 20px;
	height: 20px;
}

/* Menü-Symbol wie im Entwurf (drei Linien, Strichstärke 2) statt des feinen Kern-Symbols */
.stx-kopf .wp-block-navigation__responsive-container-open svg {
	display: none;
}

.stx-kopf .wp-block-navigation__responsive-container-open::before {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask: var(--stx-icon-menue) center / contain no-repeat;
	mask: var(--stx-icon-menue) center / contain no-repeat;
}

@media (max-width: 820px) {
	.stx-kopf .wp-block-site-logo.wp-block-site-logo img {
		height: 23px;
	}

	.stx-kopf .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.stx-kopf .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* Geöffnetes Handy-Menü: Klappfeld unter dem Knopf statt Vollbild */
.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
	--navigation-layout-justification-setting: stretch;
	--navigation-layout-justify: flex-start;
	--navigation-layout-align: stretch;
	position: absolute;
	top: 52px;
	right: 0;
	bottom: auto;
	left: auto;
	/* Wie im Entwurf: 280 px Inhalt + Innenabstand und Rand (gesamt 298 px) */
	box-sizing: content-box;
	width: min(280px, calc(100vw - 40px));
	height: auto;
	padding: 8px;
	overflow: visible;
	background-color: var(--stx-weiss);
	color: var(--stx-ink);
	border: 1px solid var(--stx-line);
	border-radius: 12px;
	box-shadow: 0 16px 40px -16px rgba(18, 22, 28, 0.3);
	/* Hauptpunkte 17px wie im Entwurf (Handy-Menü), Unterpunkte 16px */
	font-size: 17px;
	font-weight: 600;
	z-index: 30;
}

.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-close,
.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-dialog {
	position: static;
	width: 100%;
	max-width: none;
	margin: 0;
}

/* Schliessen-Knopf liegt genau über dem Menü-Knopf */
.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-close {
	display: flex;
	position: absolute;
	top: -53px;
	right: -1px;
	z-index: 2;
	font-size: 16px;
}

.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content {
	box-sizing: border-box;
	padding: 0;
	max-height: calc(100vh - 110px);
	max-height: calc(100dvh - 110px);
	overflow-y: auto;
	align-items: stretch;
}

.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__container {
	gap: 0;
	align-items: stretch;
}

.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation-item {
	align-items: stretch;
}

.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation-item__content.wp-block-navigation-item__content {
	display: block;
	min-height: 0;
	padding: 12px 14px;
	font-size: 17px;
	border-radius: 8px;
	color: var(--stx-ink);
}

/* Unterpunkte im Handy-Menü eingerückt und gedämpft */
.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__submenu-container .wp-block-navigation-item__content.wp-block-navigation-item__content {
	padding: 8px 14px 8px 30px;
	font-size: 16px;
	font-weight: 500;
	color: var(--stx-muted);
}

.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__submenu-container .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
	color: var(--stx-blau);
}

.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content.wp-block-navigation-item__content,
.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: var(--stx-blau-dunkel);
}

.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container {
	position: static;
	top: auto;
	left: auto;
	right: auto;
	width: auto;
	min-width: 0;
	padding: 0;
	gap: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

/* Unterpunkt mit derselben Adresse wie der Hauptpunkt («Artikel» = «Shop») ausblenden */
.stx-kopf .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .stx-nav-doppelt {
	display: none;
}

/* --------------------------------------------------------------------------
   13. Fusszeile
   -------------------------------------------------------------------------- */

.stx-fuss {
	background-color: var(--stx-surface);
	border-top: 1px solid var(--stx-line);
	color: var(--stx-muted);
	font-size: 15px;
	line-height: 1.6;
}

.stx-fuss::after {
	content: "";
	display: block;
	height: 4px;
	background: var(--stx-farbband);
}

.stx-fuss__innen {
	box-sizing: content-box;
	max-width: 1200px;
	margin: 0 auto;
	padding: 56px 24px 28px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.stx-fuss__oben {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 40px;
}

.stx-fuss__marke {
	flex: 1 1 260px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.stx-fuss .wp-block-site-logo {
	align-self: flex-start;
	line-height: 0;
}

/* Logo ohne Rand: bündig links mit dem Text darunter */
.stx-fuss .wp-block-site-logo.wp-block-site-logo img {
	display: block;
	width: auto;
	height: 23px;
	max-width: none;
}

.stx-fuss__spalten {
	flex: 3 1 640px;
	min-width: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
	gap: 24px;
}

.stx-fuss__spalte {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.stx-fuss__titel {
	font-size: 14px;
	font-weight: 600;
	color: var(--stx-ink);
}

ul.stx-fuss__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.stx-fuss .stx-fuss__links a {
	color: var(--stx-text);
	text-decoration: none;
}

/* «LinkedIn · YouTube»: im Entwurf gedämpft wie «Nutzungsbedingungen» */
.stx-fuss .stx-fuss__links a:is([href*="linkedin.com"], [href*="youtube.com"]) {
	color: var(--stx-muted);
}

.stx-fuss .stx-fuss__links a:hover,
.stx-fuss .stx-fuss__links a:is([href*="linkedin.com"], [href*="youtube.com"]):hover {
	color: var(--stx-blau-dunkel);
	text-decoration: underline;
}

.stx-fuss__unten {
	border-top: 1px solid var(--stx-line);
	padding-top: 20px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	font-size: 14px;
}

/* «Cookie-Einstellungen» öffnet den Hinweis des Plugins Cookie Notice wieder.
   Sichtbar nur, wenn Cookie Notice aktiv ist (es setzt diese Klassen am body). */
.stx-fuss__cookie {
	display: none;
	align-items: center;
	height: 36px;
	padding: 0 12px;
	background-color: var(--stx-weiss);
	border: 1px solid var(--stx-rahmen);
	border-radius: 8px;
	color: var(--stx-ink);
	font: inherit;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
}

body.cookies-set .stx-fuss__cookie,
body.cookies-not-set .stx-fuss__cookie {
	display: inline-flex;
}

.stx-fuss__cookie:hover {
	border-color: var(--stx-ink);
}

/* --------------------------------------------------------------------------
   14. Seitenvorlagen (Titelbereich, Beitragslisten, Suche, 404)
   -------------------------------------------------------------------------- */

/* Hauptbereich <main> aller Vorlagen; der Entwurf gestaltet ihn nicht eigens. */
.stx-seite {
	display: block;
	min-width: 0;
}

/* Titelbereich der Standard-Vorlagen (Rechtstexte, Warenkorb, Kasse, Konto, Beiträge):
   karierter Kasten wie die Kopf-Panels der Entwurfsseiten (z. B. Kontakt). */
.stx-abschnitt--flaeche.stx-seitenkopf {
	border-top: 0;
}

.stx-seitenkopf > .stx-inhalt,
.stx-seitenkopf__raster {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.stx-raster.stx-seitenkopf__raster {
	box-sizing: border-box;
	max-width: 1232px;
	margin-left: auto;
	margin-right: auto;
	padding: clamp(28px, 6vw, 56px) clamp(20px, 5vw, 48px);
}

.stx-seitenkopf__raster > * {
	margin: 0;
}

.stx-seitenkopf .wp-block-post-title,
.stx-seitenkopf .wp-block-query-title,
.stx-seitenkopf .stx-h1 {
	margin: 0;
	font-family: var(--stx-schrift-titel);
	font-weight: 800;
	font-size: clamp(36px, 9vw, 56px);
	line-height: 1.12;
	letter-spacing: -0.015em;
	color: var(--stx-ink);
	text-wrap: balance;
	overflow-wrap: break-word;
	hyphens: auto;
}

/* Beiträge: Lesebreite 800 px, linksbündig unter dem Titel */
.stx-standardinhalt--lesen > .wp-block-post-content {
	max-width: 800px;
}

.stx-seitenkopf .wp-block-post-date {
	font-size: 14px;
	color: var(--stx-muted);
}

.stx-beitragsliste .wp-block-post-template {
	list-style: none;
	margin: 0;
	padding: 0;
}

.stx-beitragsliste .wp-block-post-template > li {
	padding: 28px 0;
	border-bottom: 1px solid var(--stx-line);
}

.stx-beitragsliste .wp-block-post-template > li:first-child {
	padding-top: 0;
}

.stx-beitrag {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 800px;
}

.stx-beitrag .wp-block-post-title {
	margin: 0;
	font-size: clamp(18px, 4.5vw, 28px);
	line-height: 1.25;
	letter-spacing: 0;
}

.stx-beitrag .wp-block-post-title a {
	color: var(--stx-ink);
	text-decoration: none;
}

.stx-beitrag .wp-block-post-title a:hover {
	color: var(--stx-blau-dunkel);
}

.stx-beitrag .wp-block-post-date {
	font-size: 14px;
	color: var(--stx-muted);
}

.stx-beitrag .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.stx-beitrag .wp-block-post-excerpt__more-text {
	margin: 8px 0 0;
}

.stx-beitragsliste .wp-block-query-pagination {
	margin-top: 32px;
	gap: 8px 16px;
	font-weight: 600;
}

.stx-fehlerseite {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
}

/* Suchfeld */
.stx-seitenkopf .wp-block-search,
.stx-fehlerseite .wp-block-search {
	width: 100%;
	max-width: 560px;
}

.wp-block-search .wp-block-search__inside-wrapper {
	gap: 8px;
}

.wp-block-search .wp-block-search__input {
	box-sizing: border-box;
	min-height: 52px;
	padding: 0 14px;
	border: 1px solid var(--stx-feldrand);
	border-radius: 8px;
	background-color: var(--stx-weiss);
	color: var(--stx-ink);
	font: inherit;
	font-size: 16px;
}

.wp-block-search .wp-block-search__button {
	margin-left: 0;
	min-height: 52px;
}

/* --------------------------------------------------------------------------
   15. Preisrechner (§9) – Grundstil; Box und Beschriftungen baut die Seite
   -------------------------------------------------------------------------- */

.stx-rechner {
	font-variant-numeric: tabular-nums;
}

.stx-rechner__label {
	display: block;
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.6;
	color: var(--stx-ink);
}

.stx-rechner__anzahl {
	box-sizing: border-box;
	height: 44px;
	min-width: 160px;
	max-width: 100%;
	margin: 0;
	padding: 0 40px 0 12px;
	border: 1px solid var(--stx-feldrand);
	border-radius: 8px;
	background-color: var(--stx-weiss);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312161C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 16px 16px;
	color: var(--stx-ink);
	font: inherit;
	font-size: 16px;
	line-height: 1.2;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.stx-rechner__anzahl:hover {
	border-color: var(--stx-ink);
}

.stx-rechner__preis {
	display: inline-block;
	font-family: var(--stx-schrift-titel);
	font-weight: 800;
	font-size: clamp(26px, 6.5vw, 40px);
	line-height: 1.1;
	color: var(--stx-ink);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
