/*
 * Swiss Windsurfing — global theme styles (loaded on every page).
 * Only what every page needs: base + accessibility, header, footer, page hero, buttons (.sws-btn),
 * language switcher (.sws-lang), callout/card. Block-specific CSS lives in blocks/, pattern CSS in components/.
 * Tokens only (theme.json): no hex values, no !important. All classes are .sws-* (or core block classes).
 */

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

html {
	scroll-padding-top: calc(var(--wp--custom--header-height-mobile) + var(--wp-admin--admin-bar--height, 0px) + 1rem);
	-webkit-text-size-adjust: 100%;
}

@media (min-width: 768px) {
	html {
		scroll-padding-top: calc(var(--wp--custom--header-height) + var(--wp-admin--admin-bar--height, 0px) + 1rem);
	}
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

::selection {
	background-color: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
}

/* Long German compounds (Generalversammlung, Segelanweisungen) must not overflow on phones. */
:where(h1, h2, h3, h4) {
	overflow-wrap: break-word;
}

@media (max-width: 600px) {
	:where(h1, h2) {
		hyphens: auto;
	}
}

/* Links in running text: underline offset; nav, cards and buttons remove the underline themselves. */
:where(.wp-site-blocks) :where(p, li, dd, td, figcaption) a:where(:not(.wp-element-button)) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

:where(.wp-site-blocks) :where(p, li, dd, td, figcaption) a:where(:not(.wp-element-button)):hover {
	text-decoration-thickness: 2px;
}

/* Links on dark or red backgrounds (navy links would vanish there). */
:is(.has-navy-background-color, .has-navy-deep-background-color, .has-navy-gradient-background, .has-red-background-color) a:where(:not(.wp-element-button)),
:is(.has-navy-background-color, .has-navy-deep-background-color, .has-navy-gradient-background, .has-red-background-color) a:where(:not(.wp-element-button)):hover {
	color: inherit;
}

/* ---------- Accessibility ---------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--wp--custom--focus-ring);
	outline-offset: 2px;
}

/* On dark surfaces the ring is white. */
:where(.sws-page-hero:not(.sws-page-hero--paper), .sws-site-footer, .sws-cta-band, .sws-front-next, .sws-season-band, .has-navy-background-color, .has-navy-deep-background-color, .wp-block-navigation__responsive-container.is-menu-open) :focus-visible {
	outline: var(--wp--custom--focus-ring-inverse);
}

.sws-skip-link {
	position: absolute;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	z-index: 100001;
	padding: 0.75rem 1.25rem;
	background-color: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	font-weight: 700;
	text-decoration: none;
	transform: translateY(-200%);
}

.sws-skip-link:focus {
	transform: none;
	color: var(--wp--preset--color--white);
	outline: var(--wp--custom--focus-ring-inverse);
	outline-offset: -6px;
}

.sws-scroll-probe {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 8px;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	:where(*, *::before, *::after) {
		animation-duration: 0.01ms;
		animation-iteration-count: 1;
		transition-duration: 0.01ms;
	}
}

/* ---------- Layout glue ---------- */

.sws-site-header,
.sws-site-footer,
.sws-main {
	margin-block-start: 0;
}

.sws-section {
	padding-block: var(--wp--preset--spacing--70);
}

.sws-section--index {
	padding-block-end: var(--wp--preset--spacing--80);
}

.sws-page-content {
	padding-block: var(--wp--preset--spacing--70) var(--wp--preset--spacing--80);
}

.sws-page-content--flush {
	padding-block: 0;
}

.sws-page-content--flush > :last-child:not(.alignfull) {
	margin-block-end: var(--wp--preset--spacing--80);
}

/* "Volle Breite" page that does not start with a hero: keep distance to the header. */
.sws-page-content--flush > :first-child:not(.alignfull) {
	margin-block-start: var(--wp--preset--spacing--70);
}

.sws-page-content > .alignfull:last-child {
	margin-block-end: calc(-1 * var(--wp--preset--spacing--80));
}

.sws-page-content--flush > .alignfull:last-child {
	margin-block-end: 0;
}

.sws-front-next:empty {
	display: none;
}

/* Front page: the editable part (community tiles, home.html) gets a full section's room before the red band. */
.sws-main--front > .sws-front-content.wp-block-post-content {
	padding-block: var(--wp--preset--spacing--80);
}

.sws-empty {
	color: var(--wp--preset--color--ink-soft);
}

/* ---------- Header ---------- */

.sws-site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--header);
}

@media (max-width: 600px) {
	.admin-bar .sws-site-header {
		top: 0;
	}
}

/*
 * No colour transition between "over the hero" and "scrolled": a 200 ms fade from white to transparent passes through
 * a half-white bar with grey links (seen in screenshots right after scrolling back to the top, AUDIT "grey header").
 * The two states swap at once; only the logo tile eases its size.
 */

.sws-header.wp-block-group {
	gap: var(--wp--preset--spacing--40);
	min-height: var(--wp--custom--header-height-mobile);
	max-width: calc(var(--wp--style--global--wide-size) + 2 * var(--wp--custom--gutter));
	margin-inline: auto;
	padding-inline: var(--wp--custom--gutter);
}

.sws-header__brand.wp-block-group {
	gap: var(--wp--preset--spacing--30);
	flex-shrink: 0;
	align-self: stretch;
	margin-inline-end: auto;
}

/*
 * The mark (SUI sailing windsurf) sits on a white tile that hangs below the header bar: it keeps its colours over
 * dark hero photos. No red edge (Eric 28.11.2026). The negative bottom margin keeps the bar's height; once scrolled,
 * the tile shrinks into the bar.
 */
.sws-header__logo {
	--sws-logo-h: 52px;
	--sws-logo-pad: 8px;
	--sws-logo-hang: 8px;
	align-self: flex-start;
	line-height: 0;
}

.sws-header__logo a {
	display: block;
	margin-block-end: calc(-1 * var(--sws-logo-hang));
	padding: var(--sws-logo-pad) calc(var(--sws-logo-pad) + 2px);
	background-color: var(--wp--preset--color--white);
	border-radius: 0 0 var(--wp--custom--radius--small) var(--wp--custom--radius--small);
	box-shadow: var(--wp--preset--shadow--card-hover);
}

.sws-header__logo img {
	display: block;
	width: auto;
	height: var(--sws-logo-h);
	max-width: none;
}

@media (prefers-reduced-motion: no-preference) {
	.sws-header__logo img {
		transition: height var(--wp--custom--transition);
	}

	.sws-header__logo a {
		transition: margin var(--wp--custom--transition), box-shadow var(--wp--custom--transition);
	}
}

.sws-header__title {
	margin: 0;
	white-space: nowrap;
}

.sws-header__title a {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	color: inherit;
	text-decoration: none;
}

/* Wordmark accent: the red "speed stripe" of the next-event banner. */
.sws-header__title a::before {
	content: "";
	flex: none;
	width: 0.35em;
	height: 1.15em;
	background-color: var(--wp--preset--color--red);
	transform: skewX(-14deg);
}

.sws-header__title a:hover {
	color: inherit;
}

@media (min-width: 768px) {
	.sws-header.wp-block-group {
		min-height: var(--wp--custom--header-height);
	}

	.sws-header__logo {
		--sws-logo-h: 72px;
		--sws-logo-pad: 10px;
		--sws-logo-hang: 16px;
	}

	.sws-site-header.is-scrolled .sws-header__logo {
		--sws-logo-h: 52px;
		--sws-logo-pad: 8px;
		--sws-logo-hang: 0px;
	}

	.sws-site-header.is-scrolled .sws-header__logo a {
		box-shadow: none;
	}
}

/* Below 768 the logo tile is the brand: the site title would wrap to three lines ("SWISS / WINDSURFING / (STAGING)"). */
@media (max-width: 767.98px) {
	.sws-header__title {
		display: none;
	}
}

/* 390px: logo + four 44px language targets + burger fit in one row (AUDIT P2-6). */
@media (max-width: 480px) {
	.sws-header.wp-block-group {
		gap: var(--wp--preset--spacing--20);
	}

	.sws-header__brand.wp-block-group {
		flex-shrink: 1;
		min-width: 0;
	}
}

/* Mobile/tablet: brand · language · burger. Desktop: brand · menu · language. */
.sws-header > .sws-nav {
	order: 1;
}

@media (min-width: 1100px) {
	.sws-header > .sws-nav {
		order: 0;
	}
}

/*
 * Transparent over the page hero at every width (only with JavaScript — header.js sets .is-scrolled).
 * A photo hero is our .sws-page-hero as first thing in <main> or in the post content (page-full), or the events
 * plugin's .sws-hero as first element of the post content (single regatta). There the header brings its own scrim:
 * navy at ≥ .66 behind the nav, so white 15–17 px text keeps ≥ 4.8:1 even over a white sail (AUDIT P1-1), fading
 * out 3.5rem below the bar. A paper hero (news, archives, search, text pages) keeps ink text on the paper.
 */
@media (scripting: enabled) {
	:root:has(.sws-main > .sws-page-hero:not(.sws-page-hero--paper):first-child, .sws-main > .wp-block-post-content:first-child > .sws-page-hero:first-child, .sws-main > .wp-block-post-content:first-child > .sws-hero:first-child, .sws-main > .wp-block-post-content:first-child > :first-child > .sws-hero:first-child) .sws-site-header:not(.is-scrolled) {
		background-color: transparent;
		color: var(--wp--preset--color--white);
		box-shadow: none;
	}

	:root:has(.sws-main > .sws-page-hero:not(.sws-page-hero--paper):first-child, .sws-main > .wp-block-post-content:first-child > .sws-page-hero:first-child, .sws-main > .wp-block-post-content:first-child > .sws-hero:first-child, .sws-main > .wp-block-post-content:first-child > :first-child > .sws-hero:first-child) .sws-site-header:not(.is-scrolled)::before {
		content: "";
		position: absolute;
		inset: 0 0 auto;
		z-index: -1;
		height: calc(100% + 3.5rem);
		background-image: var(--wp--preset--gradient--header-scrim);
		pointer-events: none;
	}

	:root:has(.sws-main > .sws-page-hero:not(.sws-page-hero--paper):first-child, .sws-main > .wp-block-post-content:first-child > .sws-page-hero:first-child, .sws-main > .wp-block-post-content:first-child > .sws-hero:first-child, .sws-main > .wp-block-post-content:first-child > :first-child > .sws-hero:first-child) .sws-site-header:not(.is-scrolled) :focus-visible {
		outline: var(--wp--custom--focus-ring-inverse);
	}

	:root:has(.sws-main > .sws-page-hero--paper:first-child) .sws-site-header:not(.is-scrolled) {
		background-color: transparent;
		box-shadow: none;
	}

	.sws-main > .sws-page-hero:first-child,
	.sws-main > .wp-block-post-content:first-child > .sws-page-hero:first-child,
	.sws-main > .wp-block-post-content:first-child > .sws-hero:first-child,
	.sws-main > .wp-block-post-content:first-child > :first-child:has(> .sws-hero:first-child) {
		margin-block-start: calc(-1 * var(--wp--custom--header-height-mobile));
	}
}

@media (scripting: enabled) and (min-width: 768px) {
	.sws-main > .sws-page-hero:first-child,
	.sws-main > .wp-block-post-content:first-child > .sws-page-hero:first-child,
	.sws-main > .wp-block-post-content:first-child > .sws-hero:first-child,
	.sws-main > .wp-block-post-content:first-child > :first-child:has(> .sws-hero:first-child) {
		margin-block-start: calc(-1 * var(--wp--custom--header-height));
	}
}

/* ---------- Language switcher (markup from sws-i18n: nav.sws-lang > a.sws-lang__item) ---------- */

.sws-lang {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 0.125rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: uppercase;
}

.sws-lang__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	min-height: 2rem;
	padding: 0 0.3rem;
	border-radius: var(--wp--custom--radius--button);
	color: inherit;
	text-decoration: none;
}

.sws-lang__item:hover {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.3em;
}

.sws-lang__item--current,
.sws-lang__item--current:hover {
	background-color: var(--sws-pill);
	color: var(--sws-pill-text);
	text-decoration: none;
}

/* The current language is a pill: navy on white, white over a photo (--sws-pill). Below 768 each link is a 44px
   target with the 2rem pill drawn inside it (AUDIT P2-6). */
.sws-lang__item--current {
	--sws-pill: var(--wp--preset--color--navy);
	--sws-pill-text: var(--wp--preset--color--white);
}

@media (scripting: enabled) {
	:root:has(.sws-main > .sws-page-hero:not(.sws-page-hero--paper):first-child, .sws-main > .wp-block-post-content:first-child > .sws-page-hero:first-child, .sws-main > .wp-block-post-content:first-child > .sws-hero:first-child, .sws-main > .wp-block-post-content:first-child > :first-child > .sws-hero:first-child) .sws-site-header:not(.is-scrolled) .sws-lang__item--current {
		--sws-pill: var(--wp--preset--color--white);
		--sws-pill-text: var(--wp--preset--color--navy);
	}
}

@media (max-width: 767.98px) {
	.sws-lang {
		gap: 0;
	}

	.sws-lang__item {
		min-width: var(--wp--custom--tap);
		min-height: var(--wp--custom--tap);
		padding: 0;
	}

	.sws-lang .sws-lang__item--current,
	.sws-lang .sws-lang__item--current:hover {
		background-color: transparent;
		background-image: linear-gradient(var(--sws-pill), var(--sws-pill));
		background-position: center;
		background-repeat: no-repeat;
		background-size: 2rem 2rem;
		color: var(--sws-pill-text);
	}
}

/* ---------- Page hero (core/cover.sws-page-hero; paper variant = group .sws-page-hero--paper) ---------- */

/*
 * The hero text starts at the left edge of the page's content column (Eric 29.10.): the 1100 px column on pages and
 * posts; the 1320 px one where the content runs that wide (front page, news, archives, search, a season overview).
 * % = width of the containing block (viewport minus gutters).
 */
.sws-page-hero {
	--sws-hero-col: var(--wp--style--global--content-size);
	--sws-hero-inline: max(var(--wp--custom--gutter), calc((100% - var(--sws-hero-col)) / 2 + var(--wp--custom--gutter)));
}

:is(.home, .blog, .archive, .search) .sws-page-hero,
.sws-main:has(.sws-overview) .sws-page-hero {
	--sws-hero-col: var(--wp--style--global--wide-size);
}

.wp-block-cover.sws-page-hero {
	min-height: var(--wp--custom--hero--min-height);
	padding-block: calc(var(--wp--custom--header-height-mobile) + var(--wp--preset--spacing--50)) var(--wp--preset--spacing--60);
	padding-inline: var(--sws-hero-inline);
	background-color: var(--wp--preset--color--navy-deep);
	color: var(--wp--preset--color--white);
}

.wp-block-cover.sws-page-hero--post {
	min-height: var(--wp--custom--hero--min-height-post);
}

.wp-block-cover.sws-page-hero--front {
	min-height: var(--wp--custom--hero--min-height-front);
}

.wp-block-cover.sws-page-hero--compact {
	min-height: var(--wp--custom--hero--min-height-compact);
}

/* A page without a photo: a shorter navy hero with the chart contours instead of an empty 64svh band. */
.wp-block-cover.sws-page-hero:not(:has(.wp-block-cover__image-background, .wp-block-cover__video-background)) {
	min-height: var(--wp--custom--hero--min-height-compact);
}

.wp-block-cover.sws-page-hero:not(:has(.wp-block-cover__image-background, .wp-block-cover__video-background)) .wp-block-cover__inner-container::after {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -40rem -100vw;
	background-color: var(--wp--preset--color--white);
	opacity: 0.08;
	-webkit-mask: url(../images/contours.svg) 0 0 / 480px 480px repeat;
	mask: url(../images/contours.svg) 0 0 / 480px 480px repeat;
	pointer-events: none;
}

/* True colour: the photo is only lifted a little; the scrims do the shading (no duotone, no wash). */
.sws-page-hero .wp-block-cover__image-background {
	filter: saturate(1.08) contrast(1.04);
}

@media (min-width: 768px) {
	.wp-block-cover.sws-page-hero {
		padding-block: calc(var(--wp--custom--header-height) + var(--wp--preset--spacing--50)) var(--wp--preset--spacing--70);
	}

	.wp-block-cover.sws-page-hero--front {
		padding-block-end: var(--wp--preset--spacing--80);
	}

	/* With the flag of the day at its foot, the card is the bottom margin's job. */
	.wp-block-cover.sws-page-hero--front:has(.sws-page-hero__fotd) {
		padding-block-end: var(--wp--preset--spacing--60);
	}

	.wp-block-cover.sws-page-hero--compact {
		padding-block-end: var(--wp--preset--spacing--60);
	}
}

/*
 * Local text scrim (AUDIT P1-1): a band behind the text block, navy ≥ .62 under every line and fading out 7rem above
 * it, so the eyebrow and the sub-line stay ≥ 4.5:1 whatever the photo does there. The middle of a tall hero stays clean.
 */
.wp-block-cover.sws-page-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 1;
	isolation: isolate;
}

.wp-block-cover.sws-page-hero .wp-block-cover__inner-container::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -7rem -100vw -12rem; /* the cover clips it (overflow: hidden) */
	background-image: var(--wp--preset--gradient--hero-text);
	pointer-events: none;
}

@media (min-width: 1100px) {
	/* On wide screens the text sits on the left: the band fades out towards the right half of the photo. */
	.wp-block-cover.sws-page-hero .wp-block-cover__inner-container::before {
		-webkit-mask: linear-gradient(90deg, var(--wp--preset--color--ink) calc(100vw + 44rem), transparent calc(100vw + 76rem));
		mask: linear-gradient(90deg, var(--wp--preset--color--ink) calc(100vw + 44rem), transparent calc(100vw + 76rem));
	}
}

.sws-page-hero .wp-block-cover__inner-container > *,
.sws-page-hero--paper.wp-block-group > * {
	margin-block: 0;
}

.sws-page-hero .wp-block-cover__inner-container > * + *,
.sws-page-hero--paper.wp-block-group > * + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

/* Title: Barlow Condensed 800, uppercase, tight (DESIGN-POLISH §1). */
.sws-page-hero__title {
	max-width: 14ch;
	color: inherit;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--hero);
	font-weight: 800;
	line-height: 0.95;
	letter-spacing: -0.005em;
	text-transform: uppercase;
	text-wrap: balance;
}

.wp-block-cover.sws-page-hero :is(.sws-page-hero__title, .sws-page-hero__lead, .is-style-sws-eyebrow, .sws-page-hero__meta) {
	text-shadow: var(--wp--custom--hero--text-shadow);
}

.sws-page-hero--front .sws-page-hero__title {
	max-width: 16ch;
	line-height: 0.95;
}

/*
 * Front hero (Eric 28.10.: the old site's photo, not an illustration): the Silvaplana fleet fills the lower half, so
 * the text sits top left on the dark forest with its own scrim (gradient "hero-front", on phones a top-down one)
 * instead of the bottom band of the other heroes. The Swiss Tour logo replaces the eyebrow, as on the old slider.
 */
.wp-block-cover.sws-page-hero--front .wp-block-cover__inner-container::before {
	content: none;
}

.sws-page-hero__tour {
	display: block;
	width: clamp(8.5rem, 16vw, 14rem);
	height: auto;
	filter: drop-shadow(0 0.25rem 1.25rem color-mix(in srgb, var(--wp--preset--color--navy-deep) 45%, transparent));
}

.sws-page-hero--front .sws-page-hero__tour + .sws-page-hero__title {
	margin-block-start: var(--wp--preset--spacing--50);
}

/* Front hero drift (Eric 2.12.2026: «some movement in it»): a slow zoom on the photo. Transform only (no layout,
   CLS 0); it starts at scale 1, so the LCP is the still first frame. Nothing moves with reduced motion.
   .wp-site-blocks keeps it out of the editor canvas (theme.css is also the editor style). */
@media (prefers-reduced-motion: no-preference) {
	.wp-site-blocks .sws-page-hero--front .wp-block-cover__image-background {
		transform-origin: var(--wp--custom--hero--focal);
		animation: sws-hero-drift 28s ease-in-out infinite alternate;
		will-change: transform;
	}
}

@keyframes sws-hero-drift {

	from {
		transform: translate3d(0, 0, 0) scale(1);
	}

	to {
		transform: translate3d(-1.5%, -1%, 0) scale(1.06);
	}
}


/*
 * Flag of the day ("Signalmast", sws-core signals): the content column fills the hero's height, the card sits at
 * its foot — bottom right over the lake from 768 px, full width along the bottom edge on phones. In the flow (not
 * absolute), so it can never cover the title or the buttons: on a short screen the hero grows instead.
 */
.wp-block-cover.sws-page-hero.sws-page-hero--front.has-custom-content-position .wp-block-cover__inner-container {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	align-self: stretch;
	width: 100%;
}

/* The hero's foot (28.11.2026): «Nächste Regatta» left, the Signalmast right — two glass cards on one line from
   768 px, stacked on phones. In the flow, so they never cover the title or the buttons. */
.sws-page-hero--front .sws-page-hero__foot {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40);
	align-self: stretch;
	margin-block-start: auto;
	padding-block-start: var(--wp--preset--spacing--60);
}

.sws-page-hero--front .sws-page-hero__next .sws-hero-next,
.sws-page-hero--front .sws-page-hero__fotd .sws-fotd {
	width: 100%;
}

@media (min-width: 768px) {
	.sws-page-hero--front .sws-page-hero__foot {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
	}

	.sws-page-hero--front .sws-page-hero__next .sws-hero-next {
		width: min(34rem, 100%);
	}

	.sws-page-hero--front .sws-page-hero__fotd {
		margin-inline-start: auto;
	}

	.sws-page-hero--front .sws-page-hero__fotd .sws-fotd {
		width: 25rem;
	}
}

@media (max-width: 767.98px) {
	/* More air under the hanging logo tile (it ends 4 px below the bar): the Swiss Tour logo starts 2XL lower. */
	.wp-block-cover.sws-page-hero--front {
		min-height: max(36rem, 94svh);
		padding-block-start: calc(var(--wp--custom--header-height-mobile) + var(--wp--preset--spacing--70));
	}

	/* Phones (Eric 28.11.2026 «banner overload»): only «Nächste Regatta», compact, at the foot. The flag of the day
	   stays on wider screens and on the Signalflaggen page. */
	.sws-page-hero--front .sws-page-hero__fotd {
		display: none;
	}

	.sws-page-hero--front .sws-page-hero__foot {
		padding-block-start: var(--wp--preset--spacing--50);
	}

	.wp-block-cover.sws-page-hero--front .has-hero-front-gradient-background {
		background-image: var(--wp--custom--hero--scrim-front-tall);
	}
}

@media (max-width: 600px) {
	.sws-page-hero__title {
		hyphens: auto;
	}
}

/*
 * A word longer than 14ch ("Generalversammlung") widens the title instead of breaking in the middle of the word.
 * Core's post-title sets word-break: break-word, which shrinks min-content to one letter: reset it.
 */
.sws-page-hero .sws-page-hero__title {
	word-break: normal;
}

@media (min-width: 601px) {
	.sws-page-hero__title {
		min-width: min-content;
	}
}

/* Hero sub-line: plain Barlow under the heavy condensed title. */
.sws-page-hero__lead {
	max-width: 40ch;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 400;
	letter-spacing: 0.01em;
	line-height: 1.4;
	text-wrap: balance;
}

.sws-page-hero__lead:empty {
	display: none;
}

.sws-page-hero__lead p {
	margin: 0;
}

.sws-page-hero__meta.wp-block-group {
	gap: 0.25rem 1rem;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--label);
	text-transform: uppercase;
}

.sws-page-hero__meta .wp-block-post-date,
.sws-page-hero__meta .wp-block-post-terms {
	color: inherit;
}

.sws-page-hero__meta a {
	color: inherit;
	text-decoration: none;
}

.sws-page-hero__meta a:hover {
	color: inherit;
	text-decoration: underline;
}

.sws-page-hero__meta > * + *::before {
	content: "";
	display: inline-block;
	width: 1.25rem;
	height: 2px;
	margin-inline-end: 1rem;
	vertical-align: middle;
	background-color: var(--wp--preset--color--red);
}

.sws-page-hero .wp-block-buttons {
	margin-block-start: var(--wp--preset--spacing--50);
}

/*
 * Paper hero (news, archives, search, text pages): Papier with chart contours, navy title — breaks the run of navy
 * bands. The header lies over it with ink text.
 */
.sws-page-hero--paper.wp-block-group {
	position: relative;
	isolation: isolate;
	padding-block: calc(var(--wp--custom--header-height-mobile) + var(--wp--preset--spacing--60)) var(--wp--preset--spacing--70);
	padding-inline: var(--sws-hero-inline);
	overflow: hidden;
	border-block-end: 1px solid var(--wp--preset--color--line);
	background-color: var(--wp--preset--color--bg-alt);
	color: var(--wp--preset--color--ink);
}

@media (min-width: 768px) {
	.sws-page-hero--paper.wp-block-group {
		padding-block: calc(var(--wp--custom--header-height) + var(--wp--preset--spacing--70)) var(--wp--preset--spacing--70);
	}
}

.sws-page-hero--paper .sws-page-hero__title {
	color: var(--wp--preset--color--navy-deep);
	font-size: var(--wp--preset--font-size--hero);
}

.sws-page-hero--paper .sws-page-hero__title.is-style-sws-duo {
	max-width: none;
	color: var(--wp--preset--color--navy);
	font-size: var(--wp--preset--font-size--h-1);
}

.sws-page-hero--paper .sws-page-hero__title.is-style-sws-duo strong {
	color: var(--wp--preset--color--navy-deep);
	font-size: calc(var(--wp--preset--font-size--hero) * 1.15);
}

.sws-page-hero--paper .is-style-sws-eyebrow {
	color: var(--wp--preset--color--navy);
}

.sws-page-hero--paper .sws-page-hero__lead {
	color: var(--wp--preset--color--ink-soft);
}

.sws-page-hero--paper .wp-block-search {
	max-width: 36rem;
	margin-block-start: var(--wp--preset--spacing--50);
}

/*
 * ---------- Chart contours (Seekarte, DESIGN-POLISH §0): the texture of paper and navy surfaces ----------
 * A tileable contour drawing as a mask on ::before, coloured by a token: 6 % on paper, 8 % on navy.
 */
.sws-page-hero--paper.wp-block-group::before,
.sws-season-band.wp-block-group::before,
.sws-footer.wp-block-group::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: var(--wp--preset--color--navy);
	opacity: 0.06;
	-webkit-mask: url(../images/contours.svg) 0 0 / 480px 480px repeat;
	mask: url(../images/contours.svg) 0 0 / 480px 480px repeat;
	pointer-events: none;
}

:is(.sws-season-band, .sws-footer).wp-block-group::before {
	background-color: var(--wp--preset--color--white);
	opacity: 0.08;
}

/* ---------- Reading measure and rhythm (DESIGN-POLISH §2) ---------- */

/*
 * page.html: text runs at 760 px (about 70 characters); objects that need room — columns, tables, galleries, card
 * grids, facts, forms, the season chart — take the 1100 px wide measure on their own, so editors never set it.
 */
.sws-page-content--measure > :is(.wp-block-columns, .wp-block-table, .wp-block-gallery, .wp-block-embed, .sws-people, .sws-facts, .sws-albums, .sws-event-cards, .sws-post-cards, .sws-smap, .sws-form, .wp-block-sws-rankings, .sws-rankings, .is-style-sws-card):not(.alignfull) {
	max-width: var(--wp--custom--width--content);
}

/*
 * Text keeps its 760 px measure but starts at the left edge of the 1100 px objects (facts, cards, forms, a post's
 * gallery) instead of sitting centred and indented beside them (Eric 28.10.: "way too slim"; posts 29.10., in line
 * with the hero). The layout centres every block with !important margins, so the text is moved by a relative
 * offset: half the difference between the two widths.
 */
:is(.sws-page-content--measure, .sws-post-body) > :is(p, h2, h3, h4, ul, ol, blockquote, .wp-block-buttons, .wp-block-details, .wp-block-separator, .wp-block-image, .sws-eyebrow-heading, .is-style-sws-callout, .is-style-sws-callout-deadline):not(.alignwide):not(.alignfull) {
	position: relative;
	left: min(0px, (var(--wp--custom--width--narrow) - min(100%, var(--wp--custom--width--content))) / 2);
}

/* Full-width bands keep a full section's distance from flowing content. */
.sws-page-content > .alignfull:not(:first-child) {
	margin-block-start: var(--wp--preset--spacing--80);
}

.sws-page-content > .alignfull + :not(.alignfull) {
	margin-block-start: var(--wp--preset--spacing--80);
}

/* ---------- Buttons usable on plain <a>/<button> (plugins): same look as core buttons ---------- */

.sws-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.75em 1.4em;
	border: 2px solid transparent;
	border-radius: var(--wp--custom--radius--button);
	background: none;
	color: inherit;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
}

.sws-btn--primary {
	background-color: var(--wp--preset--color--red);
	color: var(--wp--preset--color--white);
}

.sws-btn--primary:hover,
.sws-btn--primary:focus-visible {
	background-color: var(--wp--preset--color--red-hover);
	color: var(--wp--preset--color--white);
}

.sws-btn--secondary {
	border-color: var(--wp--preset--color--navy);
	background-color: transparent;
	color: var(--wp--preset--color--navy);
}

.sws-btn--secondary:hover,
.sws-btn--secondary:focus-visible {
	background-color: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
}

.sws-btn:disabled,
.sws-btn[aria-disabled="true"] {
	cursor: not-allowed;
	opacity: 0.55;
}

@media (prefers-reduced-motion: no-preference) {
	.sws-btn {
		transition: background-color var(--wp--custom--transition), color var(--wp--custom--transition), border-color var(--wp--custom--transition), transform var(--wp--custom--transition);
	}

	.sws-btn:hover {
		transform: translateY(-1px);
	}
}

/* ---------- Callout (also block styles "Hinweis" / "Hinweis: Frist") and card surface ---------- */

.sws-callout,
.is-style-sws-callout,
.is-style-sws-callout-deadline {
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	border-inline-start: 3px solid var(--wp--preset--color--navy);
	border-radius: 0 var(--wp--custom--radius--button) var(--wp--custom--radius--button) 0;
	background-color: var(--wp--preset--color--bg-alt);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.55;
}

.sws-callout--deadline,
.is-style-sws-callout-deadline {
	border-inline-start-color: var(--wp--preset--color--red);
}

/* (0,2,0) so the rules beat the global layout margins (:root :where(.is-layout-flow) > *). */
.sws-callout.sws-callout > *,
.wp-block-group.is-style-sws-callout > *,
.wp-block-group.is-style-sws-callout-deadline > * {
	margin-block: 0;
}

.sws-callout.sws-callout > * + *,
.wp-block-group.is-style-sws-callout > * + *,
.wp-block-group.is-style-sws-callout-deadline > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}

.is-style-sws-card {
	padding: var(--wp--preset--spacing--50);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card);
	background-color: var(--wp--preset--color--white);
	box-shadow: var(--wp--preset--shadow--card);
}

/*
 * ---------- Footer (DESIGN-POLISH §4) ----------
 * Navy-deep with chart contours and a 4 px red "start line" on top; brand column with the logo tile (mirrors the
 * header), three link columns, then © · Datenschutz · Impressum and the back-to-top tack.
 */

.sws-footer.wp-block-group {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: var(--wp--preset--spacing--80) var(--wp--preset--spacing--50);
	border-block-start: var(--wp--custom--edge-start) solid var(--wp--preset--color--red);
}

.sws-footer a {
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

.sws-footer a:hover {
	color: var(--wp--preset--color--white);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.25em;
}

.sws-footer__grid.wp-block-group {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
}

@media (max-width: 599.98px) {
	.sws-footer__brand.wp-block-group,
	.sws-footer__col.wp-block-group:last-child {
		grid-column: 1 / -1;
	}
}

@media (min-width: 600px) {
	.sws-footer__grid.wp-block-group {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.sws-footer__brand.wp-block-group {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1100px) {
	.sws-footer__grid.wp-block-group {
		grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
	}

	.sws-footer__brand.wp-block-group {
		grid-column: auto;
	}
}

.sws-footer__grid > .wp-block-group > * {
	margin-block: 0;
}

.sws-footer__grid > .wp-block-group > * + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

.sws-footer__logo {
	display: inline-block;
	padding: 10px 12px;
	border-block-end: var(--wp--custom--edge) solid var(--wp--preset--color--red);
	border-radius: var(--wp--custom--radius--small);
	background-color: var(--wp--preset--color--white);
	line-height: 0;
	box-shadow: var(--wp--preset--shadow--card-hover);
}

.sws-footer__logo-img {
	display: block;
	width: auto;
	height: 64px;
}

.sws-footer__title {
	font-size: var(--wp--preset--font-size--h-3);
}

.sws-footer__title a::before {
	content: "";
	display: inline-block;
	width: 0.35em;
	height: 1.1em;
	margin-inline-end: 0.5em;
	vertical-align: -0.15em;
	background-color: var(--wp--preset--color--red);
	transform: skewX(var(--wp--custom--rake));
}

.sws-footer__tagline {
	max-width: 30ch;
	color: var(--wp--preset--color--navy-tint);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	line-height: 1.6;
}

.sws-footer__heading.wp-block-heading {
	color: var(--wp--preset--color--navy-tint);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--label);
	text-transform: uppercase;
}

.sws-footer .sws-footer__links {
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* Every footer link is a 44px-high target on phones (AUDIT P2-6), and still compact on desktop. */
.sws-footer .sws-footer__links a,
.sws-footer__mail a,
.sws-footer__legal a {
	display: inline-block;
	padding-block: 0.55rem;
}

@media (min-width: 768px) {
	.sws-footer .sws-footer__links a {
		padding-block: 0.3rem;
	}
}

.sws-footer__social {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sws-footer__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--tap);
	height: var(--wp--custom--tap);
	border: 1px solid var(--wp--preset--color--navy-tint);
	border-radius: 50%;
}

.sws-footer .sws-footer__social-link:hover,
.sws-footer .sws-footer__social-link:focus-visible {
	border-color: var(--wp--preset--color--white);
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy-deep);
}

@media (prefers-reduced-motion: no-preference) {
	.sws-footer__social-link {
		transition: background-color var(--wp--custom--transition), color var(--wp--custom--transition), border-color var(--wp--custom--transition);
	}
}

.sws-footer__bottom.wp-block-group {
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--50);
	align-items: center;
	margin-block-start: var(--wp--preset--spacing--40);
	padding-block-start: var(--wp--preset--spacing--40);
	border-block-start: 1px solid color-mix(in srgb, var(--wp--preset--color--white) 16%, transparent);
	color: var(--wp--preset--color--navy-tint);
	font-size: var(--wp--preset--font-size--small);
}

.sws-footer__bottom p {
	margin: 0;
}

.sws-footer__legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: var(--wp--preset--spacing--50);
}

.sws-footer .sws-footer__legal a {
	color: var(--wp--preset--color--navy-tint);
}

.sws-footer .sws-footer__legal a:hover {
	color: var(--wp--preset--color--white);
}

/* Sponsors (template part above the footer) sit on paper, so the red CTA band never touches the navy footer. */
.sws-site-sponsors:empty {
	display: none;
}

/* ---------- Icons (DESIGN-POLISH P0): assets/icons/*.svg as masks, so they take the text colour ---------- */

.sws-icon {
	--sws-icon: none;
	display: inline-block;
	flex: none;
	width: 1.25em;
	height: 1.25em;
	vertical-align: -0.25em;
	background-color: currentColor;
	-webkit-mask: var(--sws-icon) center / contain no-repeat;
	mask: var(--sws-icon) center / contain no-repeat;
}

.sws-icon--arrow { --sws-icon: url(../icons/arrow.svg); }
.sws-icon--external { --sws-icon: url(../icons/external.svg); }
.sws-icon--download { --sws-icon: url(../icons/download.svg); }
.sws-icon--calendar { --sws-icon: url(../icons/calendar.svg); }
.sws-icon--pin { --sws-icon: url(../icons/pin.svg); }
.sws-icon--clock { --sws-icon: url(../icons/clock.svg); }
.sws-icon--mail { --sws-icon: url(../icons/mail.svg); }
.sws-icon--phone { --sws-icon: url(../icons/phone.svg); }
.sws-icon--whatsapp { --sws-icon: url(../icons/whatsapp.svg); }
.sws-icon--instagram { --sws-icon: url(../icons/instagram.svg); }
.sws-icon--facebook { --sws-icon: url(../icons/facebook.svg); }
.sws-icon--play { --sws-icon: url(../icons/play.svg); }
.sws-icon--file { --sws-icon: url(../icons/file.svg); }
.sws-icon--menu { --sws-icon: url(../icons/menu.svg); }
.sws-icon--close { --sws-icon: url(../icons/close.svg); }
.sws-icon--buoy { --sws-icon: url(../icons/buoy.svg); }

/*
 * ---------- Rail (DESIGN-POLISH P0): years, seasons, in-page sections ----------
 * <nav class="sws-rail" aria-label="…"><a class="sws-rail__item" href="…" aria-current="page">2026</a> …</nav>
 * Tabs use the same classes on buttons with aria-selected="true". An underlined tab bar (Eric 28.10.: no pills):
 * condensed numbers on a hairline, the current one navy with the red bar. Scrolls sideways with snap; only the
 * trailing edge fades, so the current (first) tab is never cut.
 */

.sws-rail {
	display: flex;
	gap: var(--wp--preset--spacing--20);
	margin-block: var(--wp--preset--spacing--40);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	box-shadow: inset 0 -1px 0 var(--wp--preset--color--line);
	-webkit-mask: linear-gradient(90deg, var(--wp--preset--color--ink) calc(100% - 1.5rem), transparent 100%);
	mask: linear-gradient(90deg, var(--wp--preset--color--ink) calc(100% - 1.5rem), transparent 100%);
}

.sws-rail::-webkit-scrollbar {
	display: none;
}

.sws-rail__item {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	margin: 0;
	padding: 0 0.6rem;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: inset 0 -3px 0 transparent;
	color: var(--wp--preset--color--ink-soft);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	scroll-snap-align: start;
}

.sws-rail__item:hover {
	color: var(--wp--preset--color--navy);
	box-shadow: inset 0 -3px 0 var(--wp--preset--color--line-strong);
}

.sws-rail__item:focus-visible {
	outline: var(--wp--custom--focus-ring);
	outline-offset: -2px;
}

.sws-rail__item[aria-current],
.sws-rail__item[aria-selected="true"] {
	color: var(--wp--preset--color--navy-deep);
	box-shadow: inset 0 -3px 0 var(--wp--preset--color--red);
}

@media (prefers-reduced-motion: no-preference) {
	.sws-rail__item {
		transition: box-shadow var(--wp--custom--transition), color var(--wp--custom--transition);
	}
}
