/*
Theme Name: simonwiegand.de
Author: Patrick Kollitsch
Description: Block theme for simonwiegand.de.
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.2
Version: 0.5.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: simonwiegand
*/

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	/* biome-ignore lint/complexity/noImportantStyles: copied from Twenty Twenty-Five; see the Gutenberg issue linked above. */
	text-decoration-thickness: 1px !important;
	text-underline-offset: 0.1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation
	.wp-block-navigation-submenu
	.wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation
	.wp-block-navigation-item
	.wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation
	.wp-block-navigation-item
	ul.wp-block-navigation__submenu-container
	.wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
caption,
figcaption,
p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

/*
 * Prevents unnecessary scrollbars while handling long lines of preformatted text.
 * https://core.trac.wordpress.org/ticket/63875
 */
:where(pre) {
	overflow-x: auto;
}

/*
 * Long German compounds in headings.
 * Break words that do not fit on narrow screens. Hyphenate only long words,
 * and only when the content language is German, so that no other language's
 * hyphenation rules apply to German words.
 */
:where(h1, h2, h3, h4, h5, h6, .is-style-text-display) {
	overflow-wrap: break-word;
}

:where(h1, h2, h3, h4, h5, h6, .is-style-text-display):lang(de) {
	hyphens: auto;
	hyphenate-limit-chars: 12 5 5;
}

/*
 * Front page placeholder (templates/front-page.html, pattern hidden-under-construction).
 * Logo and message sit on either side of a fine line: the held space of the brand concept.
 * Remove together with templates/front-page.html when the site launches.
 */
.sw-placeholder {
	--sw-placeholder-gap: clamp(2.5rem, 7vw, 6.5rem);

	box-sizing: border-box;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	place-content: center;
	justify-items: center;
	gap: var(--wp--preset--spacing--50);
	min-height: 100svh;
	margin-block: 0;
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
	text-align: center;
}

.sw-placeholder > * {
	box-sizing: border-box;
	margin-block: 0;
}

.sw-placeholder__logo {
	width: min(80vw, 26rem);
	/*
   * Lets the white JPEG background take the page colour without cutting the pale spiral strokes.
   * Set on the figure, because the entrance animation isolates its children.
   */
	mix-blend-mode: multiply;
}

.sw-placeholder__logo img {
	display: block;
	width: 100%;
	height: auto;
}

.sw-placeholder__message {
	max-width: 22rem;
	padding-block-start: var(--wp--preset--spacing--40);
	border-block-start: 1px solid
		color-mix(in srgb, var(--wp--preset--color--accent-4) 55%, transparent);
}

.sw-placeholder__message > * {
	margin-block: 0;
}

.sw-placeholder__title {
	color: var(--wp--preset--color--accent-3);
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: var(--wp--custom--line-height--hero);
	/* Never break or hyphenate inside the domain name. */
	overflow-wrap: normal;
	hyphens: manual;
	text-wrap: balance;
}

.sw-placeholder__message .sw-placeholder__text {
	margin-block-start: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--large);
	line-height: var(--wp--custom--line-height--lead);
}

@media (min-width: 56rem) {
	.sw-placeholder {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: center;
		column-gap: 0;
		text-align: start;
	}

	.sw-placeholder__logo {
		justify-self: end;
		width: min(100%, calc(32rem + var(--sw-placeholder-gap)));
		padding-inline-end: var(--sw-placeholder-gap);
	}

	.sw-placeholder__message {
		justify-self: start;
		max-width: calc(30rem + var(--sw-placeholder-gap));
		padding-block: var(--wp--preset--spacing--40);
		padding-inline-start: var(--sw-placeholder-gap);
		border-block-start: 0;
		border-inline-start: 1px solid
			color-mix(in srgb, var(--wp--preset--color--accent-4) 55%, transparent);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.sw-placeholder__logo,
	.sw-placeholder__message {
		animation: sw-placeholder-arrive 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
	}

	.sw-placeholder__message {
		animation-delay: 180ms;
	}
}

@keyframes sw-placeholder-arrive {
	from {
		opacity: 0;
		translate: 0 0.75rem;
	}
}

/*
 * Site layout and reading design (version 0.2.0).
 *
 * The frame is one column grid that all bands share: header, page hero,
 * content sections, related pages, and footer. On wide screens a section
 * puts its heading in the aside track and its text in the reading track,
 * with a held gap between them.
 */
:root {
	--sw-aside: 20rem;
	--sw-gutter: clamp(2.5rem, 5vw, 5rem);
	--sw-text: 37rem;
	--sw-frame: calc(var(--sw-aside) + var(--sw-gutter) + var(--sw-text));
	--sw-header-height: 4.75rem;
	--sw-rule: color-mix(
		in srgb,
		var(--wp--preset--color--contrast) 16%,
		transparent
	);
	--sw-stone-soft: color-mix(
		in srgb,
		var(--wp--preset--color--accent-2) 50%,
		var(--wp--preset--color--base)
	);
	/* Drawn icons, used as masks so that they take the text colour. */
	--sw-icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 8h11M9.5 4l4 4-4 4'/%3E%3C/svg%3E");
	--sw-icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.25' stroke-linecap='round'%3E%3Cpath d='M8 2.5v11M2.5 8h11'/%3E%3C/svg%3E");
	--sw-icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.25' stroke-linecap='round'%3E%3Cpath d='M2.5 8h11'/%3E%3C/svg%3E");
	--sw-muted: color-mix(
		in srgb,
		var(--wp--preset--color--contrast) 78%,
		var(--wp--preset--color--base)
	);
}

html {
	scroll-padding-top: calc(var(--sw-header-height) + 1.5rem);
	scrollbar-color: var(--wp--preset--color--accent-4)
		var(--wp--preset--color--base);
	accent-color: var(--wp--preset--color--accent-3);
	caret-color: var(--wp--preset--color--accent-3);
}

::selection {
	background-color: color-mix(
		in srgb,
		var(--wp--preset--color--accent-1) 70%,
		transparent
	);
	color: var(--wp--preset--color--contrast);
}

.sw-cta ::selection {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--accent-3);
}

/* Bands touch each other; space comes from their own padding. */
.wp-site-blocks > *,
.sw-page > *,
.sw-content > .alignfull {
	margin-block: 0;
}

/* Newsreader has no italic file. Do not let the browser slant it. */
:where(
	h1,
	h2,
	h3,
	h4,
	.sw-wordmark__name,
	.is-style-sw-lead,
	.sw-intro > p:first-child
) {
	font-synthesis-style: none;
}

/* Header */
.sw-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
}

@media (min-width: 601px) {
	body.admin-bar .sw-site-header {
		top: var(--wp-admin--admin-bar--height, 0px);
	}
}

.sw-header {
	border-block-end: 1px solid var(--sw-rule);
}

.sw-header > .alignwide,
.sw-footer > .alignwide,
.sw-page-hero > .alignwide,
.sw-related > .alignwide {
	max-width: var(--sw-frame);
}

.sw-header > .alignwide {
	min-height: calc(
		var(--sw-header-height) -
		2 *
		var(--wp--preset--spacing--20)
	);
	gap: var(--wp--preset--spacing--30);
}

.sw-wordmark {
	min-width: 0;
	margin: 0;
	line-height: 1.15;
}

.sw-header__actions {
	flex: none;
	gap: var(--wp--preset--spacing--30);
}

/* Below 60rem the menu is an overlay, so Kontakt stays visible here, also above the open overlay. */
.sw-header-contact {
	position: relative;
	z-index: 100001;
	display: none;
	margin: 0;
	background-color: var(--wp--preset--color--base);
}

.sw-header-contact a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding-inline: 0.9rem;
	border: 1px solid currentColor;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
}

.sw-header-contact a:hover {
	background-color: var(--wp--preset--color--accent-3);
	border-color: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--base);
}

@media (max-width: 60rem) {
	.sw-header-contact {
		display: block;
	}
}

/* Menu and close buttons: 24px icons in 44px touch targets. */
.sw-main-nav .wp-block-navigation__responsive-container-open,
.sw-main-nav .wp-block-navigation__responsive-container-close {
	padding: 10px;
	margin: -10px;
}

.sw-wordmark a {
	display: inline-flex;
	flex-direction: column;
	gap: 0.2rem;
	color: inherit;
	text-decoration: none;
}

.sw-wordmark__name {
	color: var(--wp--preset--color--accent-3);
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: clamp(1.35rem, 1.1rem + 0.7vw, 1.7rem);
	letter-spacing: 0.005em;
}

.sw-wordmark__role {
	color: var(--sw-muted);
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
}

.sw-wordmark a:hover .sw-wordmark__name {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

/* Main menu */
.sw-main-nav {
	font-size: var(--wp--custom--font-size--ui);
	line-height: var(--wp--custom--line-height--ui);
}

.sw-main-nav .wp-block-navigation__container {
	gap: clamp(1rem, 2.2vw, 2rem);
}

.sw-main-nav .wp-block-navigation-item__content {
	padding-block: 0.5rem;
	text-decoration: none;
}

.sw-main-nav .wp-block-navigation-item__content:hover,
.sw-main-nav .current-menu-item > .wp-block-navigation-item__content,
.sw-main-nav .current-menu-ancestor > .wp-block-navigation-item__content {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent-5);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.35em;
}

/* Kontakt is the one action in the menu: a quiet outlined button. */
.sw-main-nav .sw-nav-cta > .wp-block-navigation-item__content {
	padding: 0.55rem 1.1rem;
	border: 1px solid currentColor;
	font-weight: 600;
}

.sw-main-nav .sw-nav-cta > .wp-block-navigation-item__content:hover,
.sw-main-nav
	.sw-nav-cta.current-menu-item
	> .wp-block-navigation-item__content {
	background-color: var(--wp--preset--color--accent-3);
	border-color: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--base);
	text-decoration: none;
}

/* Dropdowns */
.sw-main-nav .has-child .wp-block-navigation__submenu-container {
	padding: 0.6rem;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--sw-rule);
	box-shadow: 0 1.25rem 2.5rem -2rem rgb(48 56 47 / 0.45);
}

.sw-main-nav
	.has-child
	.wp-block-navigation__submenu-container
	.wp-block-navigation-item__content {
	padding: 0.5rem 0.75rem;
	white-space: nowrap;
}

.sw-main-nav
	.has-child
	.wp-block-navigation__submenu-container
	.wp-block-navigation-item__content:hover {
	background-color: var(--sw-stone-soft);
}

/* The topic list of Psychotherapie opens in two columns, to the right, away from the wordmark. */
.sw-main-nav .sw-nav-topics > .wp-block-navigation__submenu-container {
	display: grid;
	grid-template-columns: repeat(2, minmax(12rem, 1fr));
	column-gap: 0.5rem;
}

.sw-main-nav.items-justified-right
	.wp-block-navigation__container
	.sw-nav-topics.has-child
	> .wp-block-navigation__submenu-container {
	right: auto;
	left: 0;
}

/* Use the overlay menu up to 60rem; the inline menu needs more room. */
@media (min-width: 600px) and (max-width: 60rem) {
	.sw-main-nav
		.wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

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

/* Overlay menu: left-aligned, so that the indented topic lists read as a tree. */
.sw-main-nav .wp-block-navigation__responsive-container.is-menu-open {
	--navigation-layout-justification-setting: flex-start;
	--navigation-layout-justify: flex-start;
	--navigation-layout-align: flex-start;
}

.sw-main-nav
	.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__container,
.sw-main-nav
	.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item {
	align-items: flex-start;
}

.sw-main-nav
	.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__container {
	gap: 1.4rem;
	width: 100%;
	max-width: 32rem;
}

.sw-main-nav
	.is-menu-open
	.wp-block-navigation__container
	> .wp-block-navigation-item
	> .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: 1.75rem;
	line-height: 1.2;
}

.sw-main-nav .is-menu-open .has-child .wp-block-navigation__submenu-container {
	display: flex;
	gap: 0.15rem;
	margin-block-start: 0.5rem;
	padding: 0 0 0 1rem;
	border-inline-start: 1px solid var(--sw-rule);
	box-shadow: none;
}

.sw-main-nav
	.is-menu-open
	.has-child
	.wp-block-navigation__submenu-container
	.wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0;
	white-space: normal;
}

.sw-main-nav
	.is-menu-open
	.wp-block-navigation__container
	> .sw-nav-cta
	> .wp-block-navigation-item__content {
	padding: 0.6rem 1.2rem;
	font-family: inherit;
	font-size: 1.1rem;
}

/* Page hero */
.sw-page-hero__grid {
	display: grid;
	gap: var(--wp--preset--spacing--50);
}

.sw-page-hero__grid > * {
	margin-block: 0;
}

.sw-breadcrumbs {
	color: var(--sw-muted);
}

.sw-breadcrumbs a {
	text-decoration: none;
}

.sw-breadcrumbs a:hover {
	text-decoration: underline;
}

.sw-page-title {
	margin-block: 0.75rem 0;
	font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.5rem);
	line-height: 1.1;
	text-wrap: balance;
}

.sw-page-hero__image {
	margin: 0;
}

.sw-page-hero__image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

@media (min-width: 50rem) {
	.sw-page-hero__grid:has(.sw-page-hero__image) {
		grid-template-columns: minmax(0, 1fr) minmax(0, var(--sw-aside));
		column-gap: var(--sw-gutter);
		align-items: end;
	}

	.sw-page-hero__image img {
		aspect-ratio: 4 / 5;
	}
}

/* Content sections */
.sw-section {
	display: grid;
	/* Narrow screens: the same side padding as header and footer; text keeps the reading measure. */
	grid-template-columns:
		[full-start] var(--wp--style--root--padding-left, 1rem)
		[aside-start text-start] minmax(0, 1fr)
		[aside-end text-end] var(--wp--style--root--padding-right, 1rem)
		[full-end];
	align-content: start;
	padding-block: var(--wp--preset--spacing--70);
}

.sw-section > * {
	grid-column: text;
	max-width: var(--sw-text);
}

.sw-section > .sw-section__banner {
	max-width: none;
}

.sw-section > .alignright {
	justify-self: end;
}

.sw-section > .alignleft {
	justify-self: start;
}

.sw-section > h2:first-child,
.sw-section > .sw-section__banner:first-child + h2 {
	position: relative;
	margin-block-start: 0;
	font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem);
	line-height: 1.18;
	text-wrap: balance;
}

.sw-section > h2:first-child::before,
.sw-section > .sw-section__banner:first-child + h2::before {
	content: "";
	position: absolute;
	inset-block-start: -1.25rem;
	inset-inline-start: 0;
	width: 2.5rem;
	height: 1px;
	background-color: var(--wp--preset--color--accent-5);
}

.sw-section > h2:first-child + *,
.sw-section > .sw-section__banner:first-child + h2 + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

.sw-section h3 {
	margin-block-start: var(--wp--preset--spacing--50);
}

/* A later h2 in a section is a subheading in the text track. */
.sw-section > h2:not(:first-child) {
	margin-block-start: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--x-large);
	line-height: var(--wp--custom--line-height--subheading);
}

/* Marks content that is still missing. */
.sw-note {
	padding: var(--wp--preset--spacing--30);
	border: 1px dashed var(--wp--preset--color--accent-4);
	color: var(--sw-muted);
	font-size: var(--wp--preset--font-size--small);
}

@media (min-width: 60rem) {
	.sw-section {
		grid-template-columns:
			[full-start] minmax(var(--wp--style--root--padding-left, 1rem), 1fr)
			[aside-start] minmax(0, var(--sw-aside))
			[aside-end] var(--sw-gutter)
			[text-start] minmax(0, var(--sw-text))
			[text-end] minmax(var(--wp--style--root--padding-right, 1rem), 1fr)
			[full-end];
	}

	/* The heading stays beside its text while the text scrolls. */
	.sw-section > h2:first-child,
	.sw-section > .sw-section__banner:first-child + h2 {
		position: sticky;
		top: calc(var(--sw-header-height) + 2rem);
		grid-column: aside;
		grid-row: 1 / span 80;
		align-self: start;
	}

	.sw-section > h2:first-child + *,
	.sw-section > .sw-section__banner:first-child + h2 + * {
		margin-block-start: 0;
	}

	.sw-section > .sw-section__banner:first-child + h2 {
		grid-row: 2 / span 80;
	}

	/* A portrait or image in the aside track, beside the heading and text. */
	.sw-section--media > .sw-section__media:first-child {
		position: sticky;
		top: calc(var(--sw-header-height) + 2rem);
		grid-column: aside;
		grid-row: 1 / span 80;
		align-self: start;
		margin: 0;
	}

	.sw-section--media > .sw-section__media:first-child + h2 {
		margin-block-start: 0;
	}
}

/* Section variant: a wide image above heading and text. */
.sw-section--banner > .sw-section__banner:first-child {
	grid-column: aside-start / text-end;
	margin: 0 0 var(--wp--preset--spacing--60);
}

.sw-section__banner img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	object-position: 50% 50%;
}

@media (min-width: 50rem) {
	.sw-section__banner img {
		aspect-ratio: 21 / 9;
	}
}

/* Image block styles "Crop: top" and "Crop: bottom". */
.is-style-sw-focus-top img {
	object-position: 50% 15%;
}

.is-style-sw-focus-bottom img {
	object-position: 50% 85%;
}

/* Section variant: a portrait beside the text. */
.sw-section--media > .sw-section__media:first-child {
	max-width: 20rem;
	margin: 0 0 var(--wp--preset--spacing--50);
}

.sw-section__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.sw-section--media > .sw-section__media + h2 {
	font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem);
	line-height: 1.18;
}

.sw-subline {
	color: var(--sw-muted);
}

.sw-section--media > .sw-subline {
	margin-block-start: 0.35rem;
}

.sw-topic-list {
	margin-block-start: var(--wp--preset--spacing--40);
}

.is-style-sw-stone {
	--sw-rule: color-mix(
		in srgb,
		var(--wp--preset--color--contrast) 26%,
		transparent
	);
	background-color: var(--sw-stone-soft);
}

/* Introduction: the text before the first section heading. */
.sw-intro {
	padding-block: var(--wp--preset--spacing--30) var(--wp--preset--spacing--70);
}

.sw-intro > p {
	font-size: var(--wp--preset--font-size--large);
	line-height: var(--wp--custom--line-height--lead);
}

.is-style-sw-lead,
.sw-intro > p:first-child {
	color: var(--wp--preset--color--accent-3);
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: clamp(1.4rem, 1.05rem + 1.3vw, 2rem);
	line-height: 1.35;
	text-wrap: pretty;
}

@media (min-width: 60rem) {
	.sw-intro > * {
		grid-column: aside-start / text-end;
		max-width: 46rem;
	}
}

/* A lead inside a section is smaller than the section heading. */
.sw-section:not(.sw-intro) > .is-style-sw-lead {
	font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem);
	line-height: 1.4;
}

/* Reading text */
.sw-content :where(p, li) a,
.sw-content .wp-block-details a {
	color: var(--wp--preset--color--accent-3);
}

.sw-content strong {
	font-weight: 600;
}

.sw-content
	ul.wp-block-list:not(.is-style-sw-ruled):not(.is-style-checkmark-list):not(
		.sw-link-grid
	) {
	padding-inline-start: 1.25em;
	list-style-type: "–\00a0\00a0";
}

.sw-content ul.wp-block-list li::marker {
	color: var(--wp--preset--color--accent-5);
}

.sw-content .wp-block-list li + li {
	margin-block-start: 0.4em;
}

.is-style-sw-ruled {
	padding: 0;
	list-style: none;
}

.sw-content .is-style-sw-ruled li,
.is-style-sw-ruled li {
	margin: 0;
	padding-block: 0.7rem;
	border-block-start: 1px solid var(--sw-rule);
}

/* Expandable sections (core/details) */
.sw-content .wp-block-details {
	border-block: 1px solid var(--sw-rule);
}

.sw-content .wp-block-details + .wp-block-details {
	margin-block-start: 0;
	border-block-start: 0;
}

.sw-content .wp-block-details > summary {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1.1rem;
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: var(--wp--preset--font-size--x-large);
	line-height: var(--wp--custom--line-height--subheading);
	list-style: none;
	cursor: pointer;
}

.sw-content .wp-block-details > summary::-webkit-details-marker {
	display: none;
}

.sw-content .wp-block-details > summary::after {
	content: "";
	flex: none;
	align-self: center;
	width: 1.25rem;
	height: 1.25rem;
	background-color: var(--wp--preset--color--accent-3);
	mask: var(--sw-icon-plus) center / contain no-repeat;
}

.sw-content .wp-block-details[open] > summary::after {
	mask-image: var(--sw-icon-minus);
}

.sw-content .wp-block-details > summary:hover {
	color: var(--wp--preset--color--accent-3);
}

.sw-content .wp-block-details > :not(summary) {
	margin-block-start: 0;
	margin-block-end: 1.2rem;
}

.sw-content .wp-block-details[open] {
	padding-block-end: 0.8rem;
}

/* Related pages below the content */
.sw-related {
	padding-block: var(--wp--preset--spacing--70);
	border-block-start: 1px solid var(--sw-rule);
}

.sw-related + .sw-related {
	padding-block-start: 0;
	border-block-start: 0;
}

.sw-related__heading {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: var(--wp--custom--line-height--subheading);
}

.sw-cards,
.sw-link-grid {
	display: grid;
	margin: var(--wp--preset--spacing--40) 0 0;
	padding: 0;
	list-style: none;
}

.sw-cards {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

.sw-cards > li {
	position: relative;
	margin: 0;
	padding-block-start: 1.1rem;
	border-block-start: 1px solid var(--wp--preset--color--contrast);
}

.sw-card__title {
	margin: 0;
	font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.55rem);
	line-height: 1.25;
}

.sw-card__title a {
	text-decoration: none;
}

/* The whole card is the link target; the title stays the accessible name. */
.sw-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.sw-cards > li:hover .sw-card__title a {
	color: var(--wp--preset--color--accent-3);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

.sw-card__text {
	margin-block-start: 0.6rem;
	color: var(--sw-muted);
	font-size: 0.975rem;
	line-height: 1.6;
}

.sw-card__text p {
	margin: 0;
}

.sw-link-grid {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
	column-gap: var(--wp--preset--spacing--40);
}

.sw-link-grid > li,
.sw-content ul.sw-link-grid li + li {
	margin: 0;
	border-block-start: 1px solid var(--sw-rule);
}

.sw-link-grid .wp-block-post-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--medium);
	line-height: var(--wp--custom--line-height--ui);
}

.sw-link-grid .wp-block-post-title a,
.sw-link-grid li > a {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 0.8rem;
	text-decoration: none;
}

.sw-link-grid li > a {
	color: inherit;
}

.sw-link-grid .wp-block-post-title a::after,
.sw-link-grid li > a::after {
	content: "";
	flex: none;
	align-self: center;
	width: 1rem;
	height: 1rem;
	background-color: var(--wp--preset--color--accent-5);
	mask: var(--sw-icon-arrow) center / contain no-repeat;
}

.sw-link-grid .wp-block-post-title a:hover,
.sw-link-grid li > a:hover {
	color: var(--wp--preset--color--accent-3);
}

/* Small uppercase label (inline labels only, never above a heading) */
.sw-eyebrow {
	margin: 0;
	font-family: var(--wp--preset--font-family--source-sans-3);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: var(--wp--custom--line-height--ui);
	text-transform: uppercase;
}

/* Contact band: on the same frame as the sections */
.sw-cta > .sw-cta__inner {
	max-width: var(--sw-frame);
}

.sw-cta__inner > * {
	margin-block: 0;
}

.sw-cta__heading {
	max-width: 46rem;
	font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem);
	line-height: 1.22;
	text-wrap: balance;
}

.sw-cta__text {
	max-width: var(--sw-text);
	margin-block-start: var(--wp--preset--spacing--40);
	color: color-mix(
		in srgb,
		var(--wp--preset--color--base) 88%,
		var(--wp--preset--color--accent-3)
	);
	font-size: var(--wp--preset--font-size--large);
	line-height: var(--wp--custom--line-height--lead);
}

.sw-cta .sw-cta__actions {
	margin-block-start: var(--wp--preset--spacing--50);
}

.sw-cta a:where(:not(.wp-element-button)) {
	color: inherit;
}

.sw-button-light .wp-block-button__link:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.sw-cta .is-style-outline .wp-block-button__link:hover {
	background-color: color-mix(
		in srgb,
		var(--wp--preset--color--base) 12%,
		transparent
	);
}

.sw-cta :focus-visible {
	outline-color: var(--wp--preset--color--base);
}

/* Footer */
.sw-footer__grid {
	display: grid;
	gap: var(--wp--preset--spacing--50);
}

.sw-footer__grid > * {
	margin-block: 0;
}

@media (min-width: 50rem) {
	.sw-footer__grid {
		grid-template-columns: minmax(0, var(--sw-aside)) minmax(0, 1fr);
		column-gap: var(--sw-gutter);
	}
}

.sw-footer__brand {
	color: var(--sw-muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
}

.sw-footer__logo {
	margin: 0 0 var(--wp--preset--spacing--30);
	mix-blend-mode: multiply;
}

.sw-footer__meta {
	border-block-start: 1px solid var(--sw-rule);
	color: var(--sw-muted);
}

.sw-footer__meta p {
	margin: 0;
}

.sw-footer__meta a {
	color: inherit;
}

/* Footer sitemap: the main menu with all subpages open */
.sw-sitemap {
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--line-height--ui);
}

.sw-sitemap.wp-block-navigation .wp-block-navigation__container {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
	gap: var(--wp--preset--spacing--40);
	align-items: start;
}

.sw-sitemap.wp-block-navigation .sw-nav-topics {
	grid-column: span 2;
}

@media (min-width: 64rem) {
	.sw-sitemap.wp-block-navigation .wp-block-navigation__container {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		grid-template-rows: auto auto auto 1fr;
		row-gap: 0.75rem;
	}

	.sw-sitemap.wp-block-navigation .wp-block-navigation__container > .has-child {
		grid-row: span 4;
	}

	.sw-sitemap.wp-block-navigation
		.wp-block-navigation__container
		> .wp-block-navigation-item:not(.has-child) {
		grid-column: 4;
	}
}

.sw-sitemap.wp-block-navigation .wp-block-navigation-item {
	flex-direction: column;
	align-items: flex-start;
}

.sw-sitemap.wp-block-navigation
	.wp-block-navigation__container
	> .wp-block-navigation-item
	> .wp-block-navigation-item__content {
	font-weight: 600;
}

.sw-sitemap.wp-block-navigation .has-child.open-always {
	gap: 0.5rem;
}

.sw-sitemap.wp-block-navigation
	.has-child.open-always
	> .wp-block-navigation__submenu-container {
	gap: 0.35rem;
	padding: 0;
	background: none;
	border: 0;
}

.sw-sitemap.wp-block-navigation
	.sw-nav-topics.open-always
	> .wp-block-navigation__submenu-container {
	display: grid;
	flex-basis: auto;
	align-content: start;
	align-self: stretch;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.35rem var(--wp--preset--spacing--40);
}

.sw-sitemap.wp-block-navigation a {
	color: inherit;
	text-decoration: none;
}

.sw-sitemap.wp-block-navigation a:hover {
	color: var(--wp--preset--color--accent-3);
	text-decoration: underline;
}

/*
 * Start page hero: the threshold. Text on the frame, a held gap with a fine
 * line, and an image that runs to the right edge of the window.
 */
.sw-home-hero {
	display: grid;
	grid-template-columns:
		[full-start] minmax(var(--wp--style--root--padding-left, 1rem), 1fr)
		[text-start] minmax(0, var(--sw-text))
		[text-end] var(--sw-gutter)
		[media-start] minmax(0, var(--sw-aside))
		minmax(var(--wp--style--root--padding-right, 1rem), 1fr)
		[media-end full-end];
	min-height: min(54rem, calc(100svh - var(--sw-header-height) - 5rem));
}

.sw-home-hero > * {
	margin-block: 0;
}

.sw-home-hero::before {
	content: "";
	grid-row: 1;
	grid-column: text-end / media-start;
	justify-self: center;
	width: 1px;
	margin-block: var(--wp--preset--spacing--70);
	background-color: color-mix(
		in srgb,
		var(--wp--preset--color--accent-4) 55%,
		transparent
	);
}

.sw-home-hero__text {
	grid-row: 1;
	grid-column: text;
	align-self: center;
	padding-block: var(--wp--preset--spacing--70);
}

.sw-home-hero__text > * {
	margin-block: 0;
}

.sw-home-hero h1 {
	font-size: clamp(2.3rem, 1.5rem + 2.6vw, 4rem);
	line-height: var(--wp--custom--line-height--hero);
	text-wrap: balance;
}

.sw-home-hero .sw-home-hero__intro {
	margin-block-start: var(--wp--preset--spacing--40);
	color: var(--sw-muted);
	font-size: var(--wp--preset--font-size--large);
	line-height: var(--wp--custom--line-height--lead);
}

.sw-home-hero .sw-home-hero__actions {
	margin-block-start: var(--wp--preset--spacing--50);
}

.sw-home-hero .sw-home-hero__note {
	margin-block-start: var(--wp--preset--spacing--30);
	color: var(--sw-muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

.sw-home-hero__image {
	grid-row: 1;
	grid-column: media;
	align-self: stretch;
	margin: 0;
}

.sw-home-hero__image img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 24rem;
	object-fit: cover;
}

@media (max-width: 50rem) {
	.sw-home-hero {
		grid-template-columns:
			[full-start] var(--wp--style--root--padding-left, 1rem)
			[text-start] minmax(0, 1fr)
			[text-end] var(--wp--style--root--padding-right, 1rem)
			[full-end];
		min-height: 0;
	}

	.sw-home-hero__text {
		max-width: var(--sw-text);
	}

	.sw-home-hero::before {
		display: none;
	}

	.sw-home-hero__image {
		grid-row: 2;
		grid-column: full;
	}

	.sw-home-hero__image img {
		height: auto;
		min-height: 0;
		max-height: 60svh;
		aspect-ratio: 3 / 2;
	}
}

/* Stacked buttons share one width on narrow screens. */
@media (max-width: 30rem) {
	.sw-home-hero__actions > .wp-block-button,
	.sw-cta__actions > .wp-block-button {
		flex: 1 1 100%;
	}

	.sw-home-hero__actions .wp-block-button__link,
	.sw-cta__actions .wp-block-button__link {
		width: 100%;
	}
}

.sw-link-more a {
	color: var(--wp--preset--color--accent-3);
	font-weight: 600;
	text-decoration: none;
}

.sw-link-more a::after {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-inline-start: 0.4em;
	vertical-align: -0.15em;
	background-color: currentColor;
	mask: var(--sw-icon-arrow) center / contain no-repeat;
}

.sw-link-more a:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Footer: legal links */
.sw-footer__legal {
	gap: 0.5rem 1.5rem;
}

.sw-legal-nav {
	font-size: inherit;
}

.sw-legal-nav .wp-block-navigation__container {
	gap: 1.25rem;
}

.sw-legal-nav a:hover {
	text-decoration: underline;
}

/*
 * Blog (version 0.3.0): list page, topic archives, and single posts.
 */
.sw-blog-topics {
	padding-block: var(--wp--preset--spacing--30);
	border-block: 1px solid var(--sw-rule);
}

.sw-blog-topics > .alignwide {
	max-width: var(--sw-frame);
	gap: 0.5rem 1.5rem;
}

.sw-topic-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sw-topic-links a {
	text-decoration: none;
}

.sw-topic-links a:hover,
.sw-topic-links .current-cat > a {
	color: var(--wp--preset--color--accent-3);
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent-5);
	text-underline-offset: 0.35em;
}

.sw-archive-description {
	max-width: var(--sw-text);
	margin-block-start: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--large);
	line-height: var(--wp--custom--line-height--lead);
}

.sw-post-list {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}

.sw-post-list > .alignwide {
	max-width: var(--sw-frame);
}

.sw-more-posts {
	border-block-start: 1px solid var(--sw-rule);
}

.sw-post-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
	gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
	margin: var(--wp--preset--spacing--40) 0 0;
	padding: 0;
	list-style: none;
}

.sw-post-cards > li {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin: 0;
}

.sw-post-cards > li > * {
	margin: 0;
}

.sw-post-card__image {
	margin-block-end: 0.5rem;
}

.sw-post-card__image img {
	display: block;
	width: 100%;
}

.sw-post-card__topic,
.sw-post-card__date {
	color: var(--sw-muted);
	font-size: 0.8125rem;
	line-height: var(--wp--custom--line-height--ui);
}

.sw-post-card__topic {
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.sw-post-card__topic a {
	color: inherit;
	text-decoration: none;
}

.sw-post-card__topic a:hover {
	color: var(--wp--preset--color--accent-3);
	text-decoration: underline;
}

.sw-post-card__title {
	font-size: clamp(1.35rem, 1.15rem + 0.6vw, 1.65rem);
	line-height: 1.22;
}

.sw-post-card__title a {
	text-decoration: none;
}

.sw-post-card__title a:hover {
	color: var(--wp--preset--color--accent-3);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

.sw-post-card__text {
	color: var(--sw-muted);
	font-size: 0.975rem;
	line-height: 1.6;
}

.sw-post-card__text p {
	margin: 0;
}

.sw-pagination {
	margin-block-start: var(--wp--preset--spacing--60);
	padding-block-start: var(--wp--preset--spacing--30);
	border-block-start: 1px solid var(--sw-rule);
}

/* Single post */
.sw-post-meta {
	gap: 0.25rem 1.5rem;
	margin-block-start: var(--wp--preset--spacing--30);
	color: var(--sw-muted);
	font-size: var(--wp--preset--font-size--small);
}

.sw-post-meta > * {
	margin: 0;
}

.sw-post-meta a {
	color: inherit;
}

.sw-article-media > .alignwide {
	max-width: var(--sw-frame);
}

.sw-article-image {
	margin: 0;
}

.sw-article-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.sw-article-body {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
}

.sw-article-body > h2 {
	margin-block-start: var(--wp--preset--spacing--60);
	font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem);
	line-height: 1.2;
}

.sw-article-body > h3 {
	margin-block-start: var(--wp--preset--spacing--50);
}

.sw-article-body .wp-block-quote {
	margin-block: var(--wp--preset--spacing--50);
	border-color: var(--wp--preset--color--accent-5);
	color: var(--wp--preset--color--accent-3);
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: clamp(1.3rem, 1.05rem + 0.8vw, 1.7rem);
	line-height: 1.35;
}

.sw-article-footer {
	padding-block-end: var(--wp--preset--spacing--60);
	color: var(--sw-muted);
	font-size: var(--wp--preset--font-size--small);
}

.sw-article-footer a {
	color: inherit;
}

.sw-post-nav {
	padding-block: var(--wp--preset--spacing--40);
	border-block-start: 1px solid var(--sw-rule);
}

.sw-post-nav > .alignwide {
	max-width: var(--sw-frame);
	gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
}

.sw-post-nav .post-navigation-link-next {
	margin-inline-start: auto;
	text-align: end;
}

.sw-post-nav a {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: var(--wp--preset--font-size--large);
	text-decoration: none;
}

.sw-post-nav a:hover {
	color: var(--wp--preset--color--accent-3);
	text-decoration: underline;
	text-decoration-thickness: 1px;
}

/* Focus on buttons: a green ring with a clear gap, light on the green band. */
.wp-element-button:focus-visible,
.sw-header-contact a:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-3);
	outline-offset: 3px;
}

.sw-cta .wp-element-button:focus-visible {
	outline-color: var(--wp--preset--color--base);
}

/*
 * Forms (Contact Form 7, version 0.5.0). These rules apply to every form of
 * the site. Errors use one extra colour; they are never shown by colour alone.
 */
:root {
	--sw-error: #8a3a1e;
	--sw-field-border: color-mix(
		in srgb,
		var(--wp--preset--color--contrast) 45%,
		transparent
	);
}

.sw-form {
	display: grid;
	gap: var(--wp--preset--spacing--30);
}

.sw-form > * {
	margin: 0;
}

.sw-form__hint {
	color: var(--sw-muted);
	font-size: var(--wp--preset--font-size--small);
}

.sw-form__field {
	display: grid;
	gap: 0.4rem;
}

.sw-form__field > label,
.sw-form .wpcf7-quiz-label {
	font-size: var(--wp--custom--font-size--ui);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--ui);
}

.sw-form .wpcf7-form-control-wrap {
	display: block;
}

.sw-form .wpcf7-quiz-label {
	display: block;
	margin-block-end: 0.4rem;
}

.sw-form
	:is(
		input[type="text"],
		input[type="email"],
		input[type="tel"],
		input[type="number"],
		input[type="date"],
		textarea,
		select
	) {
	box-sizing: border-box;
	width: 100%;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--sw-field-border);
	border-radius: 2px;
	background-color: color-mix(
		in srgb,
		#fff 55%,
		var(--wp--preset--color--base)
	);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	line-height: 1.5;
}

.sw-form textarea {
	min-height: 10rem;
	resize: vertical;
}

.sw-form :is(input, textarea, select):focus-visible {
	border-color: var(--wp--preset--color--accent-3);
	outline: 2px solid var(--wp--preset--color--accent-3);
	outline-offset: 1px;
}

.sw-form .wpcf7-not-valid {
	border-color: var(--sw-error);
	border-width: 2px;
}

.wp-site-blocks .wpcf7-not-valid-tip {
	margin-block-start: 0.4rem;
	color: var(--sw-error);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

/* Consent checkbox */
.sw-form__consent .wpcf7-list-item {
	margin: 0;
}

.sw-form__consent label {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.75rem;
	align-items: start;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
	cursor: pointer;
}

.sw-form__consent input[type="checkbox"] {
	width: 1.15rem;
	height: 1.15rem;
	margin: 0.15rem 0 0;
}

.sw-form__consent a {
	color: var(--wp--preset--color--accent-3);
}

/* Submit button: the same look as the theme buttons */
.sw-form__submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

.sw-form .wpcf7-submit {
	padding: 1rem 2.25rem;
	border: 0;
	border-radius: 2px;
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--source-sans-3);
	font-size: var(--wp--custom--font-size--ui);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--ui);
	cursor: pointer;
}

.sw-form .wpcf7-submit:hover {
	background-color: color-mix(
		in srgb,
		var(--wp--preset--color--contrast) 85%,
		transparent
	);
}

.sw-form .wpcf7-submit:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-3);
	outline-offset: 3px;
}

.sw-form .wpcf7-submit:disabled {
	cursor: wait;
	opacity: 0.6;
}

@media (max-width: 30rem) {
	.sw-form .wpcf7-submit {
		width: 100%;
	}
}

/* Result message below the form */
.wp-site-blocks .wpcf7 form .wpcf7-response-output {
	margin: var(--wp--preset--spacing--30) 0 0;
	padding: 0.9rem 1rem;
	border: 1px solid var(--sw-field-border);
	border-inline-start-width: 1px;
	font-size: var(--wp--custom--font-size--ui);
	line-height: 1.5;
}

.wp-site-blocks .wpcf7 form.sent .wpcf7-response-output {
	border-color: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--accent-3);
}

.wp-site-blocks
	.wpcf7
	form:is(.failed, .aborted, .spam, .invalid, .unaccepted, .payment-required)
	.wpcf7-response-output {
	border-color: var(--sw-error);
	color: var(--sw-error);
}
