/*
Theme Name:        Velocity
Theme URI:         https://stormwerxwp.com
Description:       Token-driven block theme for Stormwerx client sites. All design values come from tokens/contract.json via theme.json.
Author:            Stormwerx Digital
Author URI:        https://stormwerxwp.com
Version:           2.45.0
Update URI:        https://github.com/stormwerxdigital/sd-block-theme
Requires at least: 7.1
Requires PHP:      7.4
Text Domain:       sd-block-theme
*/

/*
 * Structural CSS only. No colours, font sizes, font families or spacing
 * values here - those come from theme.json presets (npm run lint enforces it).
 */

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

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

/* ---- Accessibility: focus, skip link, forms, motion ---------------------
 * Colours come from preset variables only (npm run lint enforces it).
 */

/* Visible, consistent keyboard focus. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

:where(.wp-element-button, .wp-block-button__link):focus-visible {
	outline-offset: 3px;
}

/* On dark or brand-coloured sections the ring follows the text colour. */
:where([class*="is-style-section-dark"], .is-style-section-primary, .has-dark-background-color, .has-primary-background-color, footer.wp-block-template-part) :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline-color: currentColor;
}

/* Core's skip link, styled with tokens when it receives focus. */
.skip-link.screen-reader-text:focus {
	background-color: var(--wp--preset--color--dark);
	color: var(--wp--preset--color--on-dark);
	border-radius: var(--wp--custom--radius--small);
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
	z-index: 100000;
}

/* Form fields: token colours and radius, readable borders (3:1 or better). */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="color"]), select, textarea),
.wp-block-search__input {
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: var(--wp--custom--radius--small);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	padding: 0.6em 0.8em;
}

:where(input, textarea)::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 1;
}

:where(input[type="checkbox"], input[type="radio"]) {
	accent-color: var(--wp--preset--color--primary);
}

.wp-block-search__button {
	border-radius: var(--wp--custom--radius--small);
}

/* ---- Header: sticky, transparent, compact, button (inc/header.php) --------
 * Per screen size from Appearance → Design → Header: sd-st-{d|t|m}-{always|up}, sd-tr-{d|t|m}.
 * The header's screens follow its own breakpoint ("Full header from", default 1280px), so those
 * rules live in assets/header.css and are printed by inc/header.php sd_header_css().
 * --sd-header-h is set by assets/header.js so anchors clear the header.
 */
html {
	scroll-padding-top: var(--sd-header-h, 0px);
}

.sd-header {
	position: relative;
	z-index: 50;
	transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Dark mode switch (inc/dark-mode.php): shows the sun in dark, the moon in light. */
.sd-scheme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.sd-scheme-toggle svg {
	width: 1.25rem;
	height: 1.25rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
}

.sd-scheme-toggle__sun,
.sd-scheme-toggle[aria-pressed="true"] .sd-scheme-toggle__moon {
	display: none;
}

.sd-scheme-toggle[aria-pressed="true"] .sd-scheme-toggle__sun {
	display: block;
}

.sd-scheme-toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.sd-scheme-toggle--header {
	margin-inline-start: var(--wp--preset--spacing--20);
	flex: 0 0 auto;
}

/* Logo for dark backgrounds (inc/identity.php): where a page can turn dark after loading, both logos
 * are printed and the light one waits here until a dark context shows it (header.css, dark mode). */
.sd-logo-l {
	display: none;
}

/* Header per screen (sticky, transparent, header button, separate mobile header, menu button):
 * assets/header.css, printed with the header breakpoint (inc/header.php sd_header_css()). */

/* The open mobile menu keeps its own readable colours (Appearance → Menus → overlay): its links
 * follow the overlay's text colour, not the header link colour from Design → Colours, which would
 * leave dark links on a dark or brand overlay. (0,5,2)/(0,6,2) outrank the header link rules. */
.sd-header .wp-block-navigation__responsive-container.is-menu-open :where(a, .wp-block-navigation-item__content),
header.wp-block-template-part.sd-header .wp-block-navigation__responsive-container.is-menu-open a.wp-block-navigation-item__content,
header.wp-block-template-part.sd-header .wp-block-navigation__responsive-container.is-menu-open a.wp-block-navigation-item__content:hover {
	color: inherit;
}

/* Open mobile menu: items line up at the start edge (whatever the desktop menu's alignment), each a
 * comfortable tap target; the gap between them shrinks to match. */
.sd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.sd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.sd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	align-items: flex-start;
	text-align: start;
}

.sd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: var(--wp--preset--spacing--10);
}

.sd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	padding-block: 0.5rem;
}

/* Sub-items: a small indent and the same rhythm as the items above them. */
.sd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container {
	gap: var(--wp--preset--spacing--10);
	padding-top: var(--wp--preset--spacing--10);
	padding-left: 1.25rem;
}

/* Menu and close buttons: 44px tap targets around the 24px icon, without moving the icon. */
.sd-header .wp-block-navigation__responsive-container-open,
.sd-header .wp-block-navigation__responsive-container-close {
	padding: 10px;
	margin: -10px;
	flex-shrink: 0;
}

/* ---- Page frame ---------------------------------------------------------- */

/* Header, page content and footer meet with no space between them. WordPress puts the root block
 * gap (theme.json styles.spacing.blockGap, printed as ":where(.wp-site-blocks) > *") above each of
 * them; here it's 0, top and bottom. One element of specificity on purpose: a margin set on the
 * header, main or footer block itself, or in Styles for that block, still wins. Want space? Add
 * margin or padding to the block. */
:where(.wp-site-blocks) > header,
:where(.wp-site-blocks) > main,
:where(.wp-site-blocks) > footer,
:where(.wp-site-blocks) > div:has(> main) {
	margin-block: 0;
}

/* ---- Footer (inc/footer.php) ------------------------------------------- */


/* Keep the footer at the bottom of short pages. */
body.sd-footer-bottom .wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}

body.sd-footer-bottom .wp-site-blocks > main,
body.sd-footer-bottom .wp-site-blocks > .wp-block-group:has(> main) {
	flex: 1 0 auto;
}

.sd-back-to-top {
	margin: 0;
	text-align: center;
}

.sd-back-to-top a {
	display: inline-block;
	padding: var(--wp--preset--spacing--20);
	color: inherit;
}

/* ---- Layout engine (inc/layout.php) --------------------------------------- */

.sd-meta {
	gap: 0.35em 1em;
	margin-block-start: var(--wp--preset--spacing--20);
}

.sd-meta > * {
	margin: 0;
}

.sd-featured {
	margin-block: var(--wp--preset--spacing--40);
}

.sd-featured img {
	border-radius: var(--wp--custom--radius--medium);
}

/* Boxed content: a card on the page background. */
.sd-boxed {
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--large);
	padding: var(--wp--preset--spacing--50) !important;
}

.sd-banner .sd-meta {
	justify-content: center;
}

.sd-post-nav {
	margin-block-start: var(--wp--preset--spacing--60);
	padding-block-start: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--surface);
	gap: var(--wp--preset--spacing--30);
}

/* Sidebar: main content first in the page; placed per screen size.
 * Classes sd-sb-{d|t|m}-{left|right|below|none} come from Design → Layout / Archives. */
.sd-has-sidebar {
	--sd-sb-w: var(--sd-sb-w-d, 30%);
	--sd-sb-gap: var(--sd-sb-gap-d, var(--wp--preset--spacing--70));
	--sd-sb-space: var(--sd-sb-space-d, var(--wp--preset--spacing--50));
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--sd-sb-gap);
}

.sd-has-sidebar > * {
	margin-block: 0;
	min-width: 0;
}

.sd-sidebar {
	align-self: start;
}

/* A sticky sidebar clears a sticky header. */
body.sd-header-sticky {
	--sd-sb-top: var(--sd-header-h, 0px);
}

/* Space between widgets (Design → Layout → Sidebar). */
.sd-sidebar > aside > * {
	margin-block: 0;
}

.sd-sidebar > aside > * + * {
	margin-block-start: var(--sd-sb-space);
}

/* Boxed: the whole sidebar on a card. */
.sd-sb-style-boxed > .sd-sidebar {
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--large);
	padding: var(--wp--preset--spacing--40);
}

/* Cards: each widget on its own card. */
.sd-sb-widgets-cards > .sd-sidebar > aside > * {
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--medium);
	padding: var(--wp--preset--spacing--40);
}

/* Cards inside a boxed sidebar sit on the page colour, so they still read as cards. */
.sd-sb-style-boxed.sd-sb-widgets-cards > .sd-sidebar > aside > * {
	background-color: var(--wp--preset--color--base);
}

/* Line: a divider between content and sidebar (top border when stacked). */
.sd-sb-style-line > .sd-sidebar {
	border-top: 1px solid var(--wp--preset--color--surface);
	padding-top: var(--sd-sb-gap);
}

/* Single posts and other items: title block, then the featured image wider than the text. */
.sd-main-single .sd-post-head {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
}

.sd-main-single .sd-post-head > * {
	margin: 0;
}

.sd-main-single .sd-post-title {
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.01em;
	text-wrap: balance;
}

.sd-main-single .sd-featured {
	margin-block: var(--wp--preset--spacing--50);
}

/* A little wider than the text, never past the wide width; a 16:9 crop keeps tall photos in check. */
.sd-main-single .sd-featured.alignwide {
	max-width: min(var(--wp--style--global--wide-size), calc(var(--wp--style--global--content-size) + 16rem));
}

.sd-main-single .sd-featured img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--medium);
}

/* Archive cards: columns per screen size (sd-cols-{d|t|m}-{1|2|3}). */
.sd-query .wp-block-post-template {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--50);
}

.sd-query .wp-block-post-template > li {
	margin: 0;
}

.sd-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.sd-card > * {
	margin-block: 0;
}

.sd-card > .sd-card-body {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
	flex: 1;
}

.sd-card > .sd-card-body > * {
	margin: 0;
}

.sd-card .wp-block-post-title {
	margin: 0;
}

/* Card title: the text colour, the accent on hover (not the underlined body-link look). */
.sd-card .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}

.sd-card .wp-block-post-title a:hover,
.sd-card .wp-block-post-title a:focus-visible {
	color: var(--wp--preset--color--primary);
}

/* "Read more": its own line at the bottom of the card, small capitals with an arrow. */
.sd-card .wp-block-read-more {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--20);
	align-self: flex-start;
	color: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
}

.sd-card .wp-block-read-more::after {
	content: "\2192";
	display: inline-block;
	margin-inline-start: .4em;
	transition: transform .2s ease;
}

.sd-card .wp-block-read-more:hover,
.sd-card .wp-block-read-more:focus-visible {
	color: var(--wp--preset--color--primary);
}

.sd-card .wp-block-read-more:hover::after,
.sd-card .wp-block-read-more:focus-visible::after {
	transform: translateX(.25em);
}

.sd-card .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.sd-card > .sd-card-image {
	margin-block-end: var(--wp--preset--spacing--30);
}

.sd-card-image img {
	border-radius: var(--wp--custom--radius--medium);
}

/* Image shape (Design → Archives → Image): the box keeps its ratio even when the photo is taller
 * or shorter; the photo is cropped to fit. Without min-height the photo's own height wins. */
.sd-card-image {
	min-height: 0;
	overflow: hidden;
}

.sd-card-image > a {
	display: block;
	height: 100%;
}

.sd-card.is-boxed {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent);
	border-radius: var(--wp--custom--radius--medium);
	box-shadow: 0 2px 6px color-mix(in srgb, var(--wp--preset--color--contrast) 6%, transparent), 0 12px 32px -12px color-mix(in srgb, var(--wp--preset--color--contrast) 14%, transparent);
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
}

.sd-card.is-boxed:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 10px color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent), 0 20px 40px -14px color-mix(in srgb, var(--wp--preset--color--contrast) 22%, transparent);
}

@media (prefers-reduced-motion: reduce) {
	.sd-card.is-boxed,
	.sd-card .wp-block-read-more::after {
		transition: none;
	}

	.sd-card.is-boxed:hover {
		transform: none;
	}
}

.sd-card.is-boxed > .sd-card-image {
	margin-block-end: 0;
}

.sd-card.is-boxed > .sd-card-image img {
	border-radius: 0;
}

.sd-card.is-boxed > .sd-card-body {
	padding: var(--wp--preset--spacing--50);
}

/* Per screen size: desktop ≥1024px, tablet 640–1023px, mobile <640px (inc/responsive.php). */
@media (min-width: 1024px) {
	.sd-cols-d-2 .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sd-cols-d-3 .wp-block-post-template {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.sd-img-d-none .sd-card-image {
		display: none;
	}

	.sd-img-d-left .sd-card {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		align-items: start;
		gap: var(--wp--preset--spacing--40);
	}

	.sd-img-d-left .sd-card > .sd-card-image {
		margin: 0;
	}

	.sd-img-d-left .sd-card.is-boxed {
		gap: 0;
		align-items: stretch;
	}

	.sd-img-d-left .sd-card.is-boxed > .sd-card-image,
	.sd-img-d-left .sd-card.is-boxed > .sd-card-image img {
		height: 100%;
	}

	.sd-has-sidebar {
		--sd-sb-w: var(--sd-sb-w-d, 30%);
		--sd-sb-gap: var(--sd-sb-gap-d, var(--wp--preset--spacing--60));
		--sd-sb-space: var(--sd-sb-space-d, var(--wp--preset--spacing--50));
	}

	.sd-sb-d-right {
		grid-template-columns: minmax(0, 1fr) var(--sd-sb-w);
	}

	.sd-sb-d-left {
		grid-template-columns: var(--sd-sb-w) minmax(0, 1fr);
	}

	/* Beside the content: the line runs down the side, the sidebar can stick. */
	:is(.sd-sb-d-left, .sd-sb-d-right).sd-sb-style-line {
		column-gap: calc(var(--sd-sb-gap) / 2);
	}

	:is(.sd-sb-d-left, .sd-sb-d-right).sd-sb-style-line > .sd-sidebar {
		border-top: 0;
		padding-top: 0;
	}

	.sd-sb-d-right.sd-sb-style-line > .sd-sidebar {
		border-left: 1px solid var(--wp--preset--color--surface);
		padding-left: calc(var(--sd-sb-gap) / 2);
	}

	.sd-sb-d-left.sd-sb-style-line > .sd-sidebar {
		border-right: 1px solid var(--wp--preset--color--surface);
		padding-right: calc(var(--sd-sb-gap) / 2);
	}

	.sd-sb-sticky:is(.sd-sb-d-left, .sd-sb-d-right) > .sd-sidebar {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--sd-sb-top, 0px) + var(--wp--preset--spacing--40));
	}

	.sd-sb-d-left > .sd-sidebar {
		order: -1;
	}

	.sd-sb-d-none > .sd-sidebar {
		display: none;
	}
}

@media (min-width: 640px) and (max-width: 1023.98px) {
	.sd-cols-t-2 .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sd-cols-t-3 .wp-block-post-template {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.sd-img-t-none .sd-card-image {
		display: none;
	}

	.sd-img-t-left .sd-card {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		align-items: start;
		gap: var(--wp--preset--spacing--40);
	}

	.sd-img-t-left .sd-card > .sd-card-image {
		margin: 0;
	}

	.sd-img-t-left .sd-card.is-boxed {
		gap: 0;
		align-items: stretch;
	}

	.sd-img-t-left .sd-card.is-boxed > .sd-card-image,
	.sd-img-t-left .sd-card.is-boxed > .sd-card-image img {
		height: 100%;
	}

	.sd-has-sidebar {
		--sd-sb-w: var(--sd-sb-w-t, 30%);
		--sd-sb-gap: var(--sd-sb-gap-t, var(--wp--preset--spacing--60));
		--sd-sb-space: var(--sd-sb-space-t, var(--wp--preset--spacing--50));
	}

	.sd-sb-t-right {
		grid-template-columns: minmax(0, 1fr) var(--sd-sb-w);
	}

	.sd-sb-t-left {
		grid-template-columns: var(--sd-sb-w) minmax(0, 1fr);
	}

	/* Beside the content: the line runs down the side, the sidebar can stick. */
	:is(.sd-sb-t-left, .sd-sb-t-right).sd-sb-style-line {
		column-gap: calc(var(--sd-sb-gap) / 2);
	}

	:is(.sd-sb-t-left, .sd-sb-t-right).sd-sb-style-line > .sd-sidebar {
		border-top: 0;
		padding-top: 0;
	}

	.sd-sb-t-right.sd-sb-style-line > .sd-sidebar {
		border-left: 1px solid var(--wp--preset--color--surface);
		padding-left: calc(var(--sd-sb-gap) / 2);
	}

	.sd-sb-t-left.sd-sb-style-line > .sd-sidebar {
		border-right: 1px solid var(--wp--preset--color--surface);
		padding-right: calc(var(--sd-sb-gap) / 2);
	}

	.sd-sb-sticky:is(.sd-sb-t-left, .sd-sb-t-right) > .sd-sidebar {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--sd-sb-top, 0px) + var(--wp--preset--spacing--40));
	}

	.sd-sb-t-left > .sd-sidebar {
		order: -1;
	}

	.sd-sb-t-none > .sd-sidebar {
		display: none;
	}
}

@media (max-width: 639.98px) {
	.sd-has-sidebar {
		--sd-sb-gap: var(--sd-sb-gap-m, var(--wp--preset--spacing--60));
		--sd-sb-space: var(--sd-sb-space-m, var(--wp--preset--spacing--40));
	}

	.sd-cols-m-2 .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sd-cols-m-3 .wp-block-post-template {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.sd-img-m-none .sd-card-image {
		display: none;
	}

	.sd-img-m-left .sd-card {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		align-items: start;
		gap: var(--wp--preset--spacing--40);
	}

	.sd-img-m-left .sd-card > .sd-card-image {
		margin: 0;
	}

	.sd-img-m-left .sd-card.is-boxed {
		gap: 0;
		align-items: stretch;
	}

	.sd-img-m-left .sd-card.is-boxed > .sd-card-image,
	.sd-img-m-left .sd-card.is-boxed > .sd-card-image img {
		height: 100%;
	}

	.sd-sb-m-right {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	}

	.sd-sb-m-left {
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	}

	.sd-sb-m-left > .sd-sidebar {
		order: -1;
	}

	.sd-sb-m-none > .sd-sidebar {
		display: none;
	}
}

.sd-archive-head {
	margin-block-end: var(--wp--preset--spacing--50);
}

.sd-archive-head > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}

.sd-search-form {
	max-width: 36rem;
}

.sd-query .wp-block-query-pagination {
	margin-block-start: var(--wp--preset--spacing--60);
}

.sd-help-links {
	margin-block-start: var(--wp--preset--spacing--50);
	padding-inline-start: 1.2em;
}

.sd-404-body .wp-block-search {
	margin-block: var(--wp--preset--spacing--40);
}

/* ---- Breadcrumbs (inc/breadcrumbs.php) ------------------------------------- */
.sd-breadcrumbs {
	margin-block: 0 var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--muted);
	font-size:var(--wp--preset--font-size--small);
	line-height: 1.4;
}

.sd-breadcrumbs.is-medium {
	font-size:var(--wp--preset--font-size--medium);
}

* + .sd-breadcrumbs {
	margin-block-start: var(--wp--preset--spacing--20);
}

.sd-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sd-breadcrumbs.is-center ol {
	justify-content: center;
}

.sd-breadcrumbs li {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	margin: 0;
	min-width: 0;
}

.sd-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.sd-breadcrumbs a:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

.sd-breadcrumbs [aria-current] {
	color: var(--wp--preset--color--contrast);
}

.sd-bc-sep {
	opacity: 0.6;
}

.sd-bc-home {
	width: 1.1em;
	height: 1.1em;
	vertical-align: -0.15em;
}

.sd-breadcrumbs.is-on-dark,
.sd-breadcrumbs.is-on-dark [aria-current],
.sd-breadcrumbs.is-on-dark a:hover {
	color: var(--wp--preset--color--on-dark);
}

.sd-banner .sd-breadcrumbs:not(.is-left) ol {
	justify-content: center;
}

@media (min-width: 1024px) {
	.sd-bc-hide-d {
		display: none;
	}
}

@media (min-width: 640px) and (max-width: 1023.98px) {
	.sd-bc-hide-t {
		display: none;
	}
}

@media (max-width: 639.98px) {
	.sd-bc-hide-m {
		display: none;
	}
}

/* ---- Scroll to top (inc/scroll-top.php) ----------------------------------------
 * Colours are preset variables set on the element; sizes and offsets per
 * screen size come in as --sdtt-*-{d|t|m}.
 */
.sd-to-top {
	--sdtt-size: var(--sdtt-size-d);
	--sdtt-icon: var(--sdtt-icon-d);
	--sdtt-side: var(--sdtt-side-d);
	--sdtt-bottom: var(--sdtt-bottom-d);
	position: fixed;
	bottom: calc(var(--sdtt-bottom) + env(safe-area-inset-bottom, 0px));
	z-index: 40;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	min-width: var(--sdtt-size);
	height: var(--sdtt-size);
	box-sizing: border-box;
	border: 2px solid transparent;
	background-color: var(--sdtt-bg);
	color: var(--sdtt-fg);
	text-decoration: none;
	font-size:var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1;
	opacity: 0;
	visibility: hidden;
	transform: translateY(0.75rem);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, background-color 0.15s ease, color 0.15s ease;
}

.sd-to-top.is-right {
	right: var(--sdtt-side);
}

.sd-to-top.is-left {
	left: var(--sdtt-side);
}

.sd-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.sd-to-top__icon {
	width: var(--sdtt-icon);
	height: var(--sdtt-icon);
	flex: 0 0 auto;
}

.sd-to-top.has-text {
	padding-inline: calc(var(--sdtt-size) * 0.4);
}

.sd-to-top.is-circle {
	border-radius: 999px;
}

.sd-to-top.is-rounded {
	border-radius: var(--wp--custom--radius--medium);
}

.sd-to-top.is-square {
	border-radius: 0;
}

.sd-to-top.is-outline {
	background-color: var(--wp--preset--color--base);
	color: var(--sdtt-bg);
	border-color: currentColor;
}

.sd-to-top.is-soft {
	background-color: var(--wp--preset--color--surface);
	color: var(--sdtt-bg);
}

.sd-to-top:hover,
.sd-to-top:focus-visible {
	background-color: var(--sdtt-bg);
	color: var(--sdtt-fg);
	border-color: var(--sdtt-bg);
}

.sd-to-top.is-solid:hover {
	background-color: var(--wp--preset--color--dark);
	color: var(--wp--preset--color--on-dark);
	border-color: var(--wp--preset--color--dark);
}

.sd-to-top.has-shadow {
	box-shadow: 0 4px 14px color-mix(in srgb, var(--wp--preset--color--dark) 22%, transparent);
}

/* The page itself takes focus after "back to top"; no ring around the whole page. */
.wp-site-blocks[tabindex="-1"]:focus {
	outline: none;
}

/* Progress ring around the button. */
.sd-to-top__ring {
	position: absolute;
	inset: -5px;
	width: calc(100% + 10px);
	height: calc(100% + 10px);
	transform: rotate(-90deg);
	pointer-events: none;
}

.sd-to-top__ring circle {
	fill: none;
	stroke: var(--sdtt-bg);
	stroke-width: 4;
	stroke-dasharray: 100;
	stroke-dashoffset: 100;
	stroke-linecap: round;
}

@media (min-width: 640px) and (max-width: 1023.98px) {
	.sd-to-top {
		--sdtt-size: var(--sdtt-size-t);
		--sdtt-icon: var(--sdtt-icon-t);
		--sdtt-side: var(--sdtt-side-t);
		--sdtt-bottom: var(--sdtt-bottom-t);
	}

	.sd-to-top.sd-tt-hide-t {
		display: none;
	}
}

@media (max-width: 639.98px) {
	.sd-to-top {
		--sdtt-size: var(--sdtt-size-m);
		--sdtt-icon: var(--sdtt-icon-m);
		--sdtt-side: var(--sdtt-side-m);
		--sdtt-bottom: var(--sdtt-bottom-m);
	}

	.sd-to-top.sd-tt-hide-m {
		display: none;
	}
}

@media (min-width: 1024px) {
	.sd-to-top.sd-tt-hide-d {
		display: none;
	}
}

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