/**
 * Basis: Reset, Typografie, Layout-Container, Fliesstext (Text-Bausteine), Fokus.
 */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
	margin: 0;
	background: var(--white);
	color: var(--color-text);
	font-family: var(--font-sans);
	font-size: var(--fs-body-s);
	line-height: var(--lh-body);
	letter-spacing: 0;
	-webkit-font-smoothing: antialiased;
}

body.has-overlay {
	overflow: hidden;
}

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

svg {
	flex-shrink: 0;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
	letter-spacing: inherit;
}

button {
	cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	font-weight: 700;
	line-height: var(--lh-heading);
}

p,
ul,
ol,
dl,
figure,
blockquote {
	margin: 0;
}

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

a:hover {
	color: var(--color-link-hover);
}

/* Fokus: 2 px Outline; auf dunklen Flächen weiss (siehe .is-inverted). */
:focus-visible {
	outline: 2px solid var(--black);
	outline-offset: 2px;
}

.is-inverted :focus-visible,
.is-inverted:focus-visible {
	outline-color: var(--white);
}

.screen-reader-text,
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	margin: 0;
	padding: 12px 16px;
	background: var(--black);
	color: var(--white);
	font-weight: 700;
}

/* ---------- Typo-Hilfsklassen ---------- */
.heading-xxl { font-size: var(--fs-heading-xxl); line-height: var(--lh-heading); font-weight: 700; }
.heading-xl  { font-size: var(--fs-heading-xl);  line-height: var(--lh-heading); font-weight: 700; }
.heading-l   { font-size: var(--fs-heading-l);   line-height: var(--lh-heading); font-weight: 700; }
.heading-m   { font-size: var(--fs-heading-m);   line-height: var(--lh-heading); font-weight: 700; }
.heading-s   { font-size: var(--fs-heading-s);   line-height: var(--lh-heading-s); font-weight: 700; }
.heading-xs  { font-size: var(--fs-heading-xs);  line-height: var(--lh-heading-xs); font-weight: 700; }
.heading-xxs { font-size: var(--fs-heading-xxs); line-height: var(--lh-heading-xxs); font-weight: 700; }
.body-l      { font-size: var(--fs-body-l); line-height: var(--lh-body); }
.body-m      { font-size: var(--fs-body-m); line-height: var(--lh-body); }
.body-s      { font-size: var(--fs-body-s); line-height: var(--lh-body); }
.detail      { font-size: var(--fs-detail); line-height: var(--lh-body); }
.is-bold     { font-weight: 700; }
.is-muted    { color: var(--color-text-muted); }

/* ---------- Layout ---------- */
.container {
	width: 100%;
	max-width: calc(var(--content-max) + 2 * var(--page-gutter));
	margin-inline: auto;
	padding-inline: var(--page-gutter);
}

.container--small {
	max-width: calc(var(--content-small) + 2 * var(--page-gutter));
}

.site-main {
	display: block;
	min-height: 40vh;
}

.section {
	padding-block: var(--space-2xl);
}

.section + .section {
	padding-top: 0;
}

.section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-2xs) var(--space-s);
	margin-bottom: var(--space-m);
}

.section__title {
	font-size: var(--fs-heading-m);
	line-height: var(--lh-heading);
}

/* ---------- Fliesstext / Text-Bausteine (Body M 18/27, max. 720) ---------- */
.prose {
	max-width: var(--content-small);
	font-size: var(--fs-body-m);
	line-height: 1.5;
}

.prose > * + * {
	margin-top: var(--space-2xs);
}

.prose h2 {
	margin-top: 64px;
	margin-bottom: 16px;
	font-size: var(--fs-heading-m);
}

.prose h3 {
	margin-top: 16px;
	font-size: var(--fs-heading-s);
	line-height: var(--lh-heading-s);
}

.prose h4 {
	font-size: var(--fs-heading-xs);
	line-height: var(--lh-heading-xs);
}

.prose h2 + *,
.prose h3 + *,
.prose h4 + * {
	margin-top: 8px;
}

.prose > :first-child {
	margin-top: 0;
}

.prose ul,
.prose ol {
	padding-left: 1.25em;
}

.prose li + li {
	margin-top: 8px;
}

.prose strong {
	font-weight: 700;
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--fs-body-s);
}

.prose th,
.prose td {
	padding: 16px 16px 16px 16px;
	border: 2px solid var(--color-border);
	text-align: left;
	vertical-align: top;
}

.prose th {
	font-size: var(--fs-heading-xxs);
	font-weight: 700;
}

.prose figure.wp-block-table {
	overflow-x: auto;
}

@media (max-width: 699px) {
	.prose h2 {
		margin-top: 40px;
		margin-bottom: 8px;
	}

	.prose h3 {
		margin-top: 8px;
	}
}

/* ---------- Seiten mit Seitenleiste (Inhaltsseite) ---------- */
.layout-aside {
	display: grid;
	grid-template-columns: minmax(0, var(--content-small)) minmax(0, 390px);
	justify-content: space-between;
	gap: var(--space-2xl);
}

@media (max-width: 1199px) {
	.layout-aside {
		grid-template-columns: minmax(0, 1fr);
	}
}
