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

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
}

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

:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	z-index: 100;
	inset-block-start: 0;
	inset-inline-start: 0;
	padding: 0.75rem 1rem;
	background: var(--wp--preset--color--accent-default);
	color: var(--wp--custom--color--text-inverse);
	font-family: var(--wp--preset--font-family--secondary);
}

.skip-link:not(:focus) {
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Shared styles */

.site-container {
	--tendra-rb-gutter: var(--wp--custom--spacing--gutter);

	max-width: calc(var(--wp--style--global--wide-size) + 2 * var(--tendra-rb-gutter));
	margin-inline: auto;
	padding-inline: var(--tendra-rb-gutter);
}

.site-footer .site-container {
	--tendra-rb-gutter: var(--wp--custom--spacing--gutter-footer);
}

.site-container--content {
	max-width: calc(var(--wp--style--global--content-size) + 2 * var(--tendra-rb-gutter));
}

.group-bar__link,
.site-footer__heading,
.site-footer__legal {
	font-family: var(--wp--preset--font-family--secondary);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--mono);
}

.group-bar__link,
.site-footer__legal {
	font-size: var(--wp--preset--font-size--mono-m);
	letter-spacing: var(--wp--custom--letter-spacing--mono-m);
}

/* Header */

.site-header {
	--tendra-rb-header-height: clamp(4.5rem, 8.33vw, 7.5rem);

	position: relative;
	z-index: 2;
}

.site-header__bar {
	background: var(--wp--preset--color--background-inverse);
	color: var(--wp--custom--color--text-inverse);
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0 var(--wp--preset--spacing--l);
	min-height: var(--tendra-rb-header-height);
}

.site-header__brand .custom-logo {
	width: auto;
	max-height: 3rem;
}

.site-header__title {
	color: inherit;
	font-size: var(--wp--preset--font-size--heading-5);
	font-weight: 800;
	line-height: var(--wp--custom--line-height--heading-5);
	text-decoration: none;
}

.site-header__brand-on-dark {
	display: none;
	color: inherit;
	text-decoration: none;
}

.site-header__logo-on-dark {
	width: auto;
	max-height: 2rem;
}

.site-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0 2.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__list a,
.site-nav__parent {
	display: block;
	padding-block: var(--wp--preset--spacing--xs);
	color: inherit;
	text-decoration: none;
}

.site-nav__parent,
.site-nav__submenu-toggle {
	margin: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	cursor: pointer;
}

.site-nav__parent {
	padding-inline: 0;
	text-align: inherit;
}

.site-nav__list a:hover,
.site-nav__parent:hover,
.site-nav__list a[aria-current="page"],
.site-nav__list .current-menu-parent > :is(a, .site-nav__parent),
.site-nav__list .current-menu-ancestor > :is(a, .site-nav__parent) {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.3em;
}

/* Without JavaScript the link opens its submenu by focus, so the toggle would do nothing. */
.site-nav__submenu-toggle {
	display: none;
	place-items: center;
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
}

.js .site-nav__submenu-toggle {
	display: grid;
}

.site-nav__submenu-toggle svg {
	width: 1rem;
	height: 1rem;
}

.site-nav__submenu-toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.site-nav__list > .menu-item {
	position: relative;
}

.site-nav__list > .menu-item-has-children {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 0.25rem;
}

.site-nav__list .sub-menu {
	display: none;
	margin: 0;
	padding: var(--wp--preset--spacing--xs) 0;
	list-style: none;
	background: var(--wp--preset--color--background-inverse);
	border: 1px solid var(--wp--custom--color--border-inverse);
}

/*
 * Until navigation.js runs, the pointer or the focus opens a submenu.
 * Then the button holds the state, so Escape and the button can close it under the pointer.
 */
.site-nav:not(.is-enhanced)
	.site-nav__list
	> .menu-item-has-children:is(:hover, :focus-within)
	> .sub-menu,
.site-nav.is-enhanced
	.site-nav__list
	> .menu-item-has-children
	> [aria-expanded="true"]
	~ .sub-menu {
	display: block;
}

@media (width >= 75rem) {
	.site-nav__list .sub-menu {
		position: absolute;
		z-index: 3;
		inset-block-start: 100%;
		inset-inline-start: 0;
		min-inline-size: 14rem;
		max-inline-size: 18rem;
	}

	.site-nav__list > .menu-item-has-children:nth-last-child(-n + 2) > .sub-menu {
		inset-inline-start: auto;
		inset-inline-end: 0;
	}

	.site-nav__list .sub-menu a {
		padding-inline: var(--wp--preset--spacing--s);
	}
}

@media (width < 75rem) {
	.site-nav__list .sub-menu {
		position: static;
		flex-basis: 100%;
		padding: 0 0 0 var(--wp--preset--spacing--s);
		border: 0;
		background: none;
	}
}

.site-header__toggle,
.site-nav__backdrop {
	display: none;
}

/* Keep the breakpoint in sync with the media query in assets/js/navigation.js. */
@media (width < 75rem) {
	html.js:has(.site-header__toggle[aria-expanded="true"]) {
		overflow: hidden;
	}

	.js .site-header__toggle {
		display: grid;
		position: relative;
		z-index: 3;
		place-items: center;
		width: 2.75rem;
		height: 2.75rem;
		margin-inline-end: -0.625rem;
		padding: 0;
		border: 0;
		background: none;
		color: inherit;
		cursor: pointer;
	}

	.js .site-header__toggle[aria-expanded="true"] .site-header__toggle-icon--menu,
	.js .site-header__toggle[aria-expanded="false"] .site-header__toggle-icon--close {
		display: none;
	}

	.js .site-nav {
		position: fixed;
		z-index: 2;
		inset-block: 0;
		right: 0;
		width: min(22rem, 85vw);
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: calc(var(--tendra-rb-header-height) + var(--wp-admin--admin-bar--height, 0px))
			var(--tendra-rb-gutter) var(--wp--preset--spacing--l);
		background: var(--wp--preset--color--background-inverse);
		color: var(--wp--custom--color--text-inverse);
		transform: translateX(100%);
		visibility: hidden;
	}

	.js .site-nav__backdrop {
		display: block;
		position: fixed;
		z-index: 1;
		inset: 0;
		background: color-mix(
			in srgb,
			var(--wp--preset--color--background-default) 60%,
			transparent
		);
		opacity: 0;
		visibility: hidden;
	}

	.js .site-header__toggle[aria-expanded="true"] ~ .site-nav {
		transform: none;
		visibility: visible;
	}

	.js .site-header__toggle[aria-expanded="true"] ~ .site-nav__backdrop {
		opacity: 1;
		visibility: visible;
	}

	.js .site-nav__list {
		flex-direction: column;
	}

	.js .site-nav__list a,
	.js .site-nav__parent {
		padding-block: var(--wp--preset--spacing--s);
		font-size: var(--wp--preset--font-size--body-l);
		line-height: var(--wp--custom--line-height--body-l);
	}

	.js .site-nav__list > .menu-item-has-children > :is(a, .site-nav__parent) {
		flex: 1;
	}

	.js .site-nav__submenu-toggle {
		width: 2.75rem;
		height: 2.75rem;
	}
}

/* Hidden panels keep their visibility until the slide-out ends, so they leave the tab order only once off screen. */
@media (width < 75rem) and (prefers-reduced-motion: no-preference) {
	.js .site-nav,
	.js .site-nav__backdrop {
		transition:
			transform 250ms ease,
			opacity 250ms ease,
			visibility 0s 250ms;
	}

	.js .site-header__toggle[aria-expanded="true"] ~ .site-nav,
	.js .site-header__toggle[aria-expanded="true"] ~ .site-nav__backdrop {
		transition:
			transform 250ms ease,
			opacity 250ms ease;
	}
}

/*
 * James Mercer homepage on a phone, as in the mobile mock: no group banner, and a transparent header over the hero photograph.
 * The header only lies over the photograph with JavaScript, when the menu is a panel: an inline menu would not fit there.
 */
@media (width < 48rem) {
	.site-header--overlay .group-bar--banner {
		display: none;
	}

	.js .site-header--overlay {
		margin-block-end: calc(-1 * var(--tendra-rb-header-height));
	}

	.js .site-header--overlay .site-header__bar {
		background: none;
		color: var(--wp--custom--color--text-default);
	}

	/* The mock sets the 64 px navigation 8 px below the top of the screen. */
	.js .site-header--overlay .site-header__inner {
		padding-block-start: var(--wp--preset--spacing--xs);
	}

	.js .site-header--overlay .custom-logo-link {
		display: none;
	}

	.js .site-header--overlay .site-header__brand-on-dark {
		display: block;
	}

	/* The open panel is light: the close icon goes back to the dark text colour. */
	.js .site-header--overlay .site-header__toggle[aria-expanded="true"] {
		color: var(--wp--custom--color--text-inverse);
	}
}

/* Group banner */

.group-bar {
	background: var(--wp--custom--color--background-muted);
	color: var(--wp--custom--color--text-default);
}

.group-bar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0 var(--wp--preset--spacing--l);
	padding-block: 0.625rem;
}

.group-bar__label {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--s);
	margin: 0;
	padding-block: var(--wp--preset--spacing--xs);
}

.group-bar__link {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--s);
	padding-block: var(--wp--preset--spacing--xs);
	color: inherit;
	text-decoration: none;
}

.group-bar__link:hover {
	text-decoration: underline;
}

/* display: none keeps every copy that is not shown out of the accessibility tree. */
.group-bar__link-tagline,
.group-bar__link-name,
.group-bar--menu {
	display: none;
}

/*
 * Phone with JavaScript, where the menu is a panel. The banner keeps one 40 px line: mark, group name and arrow.
 * The whole banner is the link, and the sentence stays in its accessible name.
 * The full mention closes the menu panel instead.
 */
@media (width < 48rem) {
	.js .group-bar--banner .group-bar__inner {
		position: relative;
		flex-wrap: nowrap;
		gap: var(--wp--preset--spacing--xs);
		min-height: 2.5rem;
		padding-block: 0;
	}

	.js .group-bar--banner .group-bar__label {
		flex: none;
		padding-block: 0;
	}

	.js .group-bar--banner .group-bar__inner:has(.group-bar__link) .group-bar__tagline {
		display: none;
	}

	.js .group-bar--banner .group-bar__link {
		flex: 1;
		justify-content: space-between;
		min-width: 0;
		padding-block: 0;
		font-family: var(--wp--preset--font-family--primary);
		font-size: var(--wp--preset--font-size--body-xs);
		letter-spacing: normal;
		line-height: var(--wp--custom--line-height--body-xs);
		white-space: nowrap;
	}

	.js .group-bar--banner .group-bar__link-name {
		display: inline;
	}

	.js .group-bar--banner .group-bar__link-tagline,
	.js .group-bar--banner .group-bar__cta {
		display: block;
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip-path: inset(50%);
		border: 0;
		white-space: nowrap;
	}

	.js .group-bar--banner .group-bar__link::after {
		content: "";
		position: absolute;
		inset: 0;
	}

	.js .group-bar--banner .group-bar__link:focus-visible {
		outline: none;
	}

	.js .group-bar--banner .group-bar__link:focus-visible::after {
		outline: 2px solid currentColor;
		outline-offset: -2px;
	}

	.js :is(.group-bar--banner, .group-bar--menu) .group-bar__label img {
		flex: none;
		width: 1.25rem;
		height: auto;
	}

	.js .site-nav {
		display: flex;
		flex-direction: column;
		gap: var(--wp--preset--spacing--l);
	}

	.js .group-bar--menu {
		display: block;
		margin: auto calc(-1 * var(--tendra-rb-gutter)) calc(-1 * var(--wp--preset--spacing--l));
	}

	.group-bar--menu .group-bar__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--wp--preset--spacing--s);
		padding: var(--wp--preset--spacing--m) var(--tendra-rb-gutter);
	}

	.group-bar--menu .group-bar__label {
		gap: var(--wp--preset--spacing--xs);
		padding-block: 0;
		font-size: var(--wp--preset--font-size--body-xs);
		font-weight: 500;
		line-height: var(--wp--custom--line-height--body-xs);
		text-wrap: balance;
	}
}

/* Main content */

/*
 * The content stacks on its own, below the header and its menu panel, whatever z-index it uses:
 * carousels from a plugin, or the links that cover a card.
 */
.site-main {
	isolation: isolate;
	padding-block-end: var(--wp--preset--spacing--2-xl);
}

.page-header {
	margin-block-end: var(--wp--preset--spacing--xl);
	padding-block-start: var(--wp--preset--spacing--2-xl);
}

.page-header__eyebrow,
.page-header__meta,
.post-card__category,
.post-card__footer {
	font-family: var(--wp--preset--font-family--secondary);
	font-size: var(--wp--preset--font-size--mono-s);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--mono);
	letter-spacing: var(--wp--custom--letter-spacing--mono-s);
}

.page-header__eyebrow {
	margin: 0 0 var(--wp--preset--spacing--m);
	color: var(--wp--custom--color--text-accent);
	text-transform: uppercase;
}

/* The padding gives the one-line label a touch target of at least 24 px, the negative margin keeps its line height. */
.page-header__eyebrow a {
	display: inline-block;
	margin-block: calc(-1 * var(--wp--preset--spacing--xs));
	padding-block: var(--wp--preset--spacing--xs);
	color: inherit;
	text-decoration: none;
}

.page-header__eyebrow a:hover {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

.page-header__title {
	margin: 0;
	overflow-wrap: break-word;
}

.page-header--display .page-header__title {
	font-size: var(--wp--preset--font-size--display-m);
	font-weight: 900;
	line-height: var(--wp--custom--line-height--display-m);
	letter-spacing: var(--wp--custom--letter-spacing--display-m);
}

.page-header__meta {
	margin: var(--wp--preset--spacing--m) 0 0;
	color: var(--wp--custom--color--text-muted);
}

.page-header__intro {
	max-width: 65ch;
	margin-block-start: var(--wp--preset--spacing--m);
	color: var(--wp--custom--color--text-subtle);
	font-size: var(--wp--preset--font-size--body-l);
	line-height: var(--wp--custom--line-height--body-l);
}

.page-header__intro p {
	margin: 0;
}

.entry-thumbnail {
	margin-block: 0 var(--wp--preset--spacing--xl);
}

/*
 * Banner of fixed height, as on the former site: 450 px at 1440 px. Keep its size in sync with tendra_rb_banner_sizes().
 * The crop keeps the top of the photo, like the former site the photos were chosen for: heads stay in the frame.
 * Across, it stays centred: the narrow mobile banner crops panoramic photos on both sides.
 * The image of an article (entry-thumbnail--whole) keeps the base rule of img: whole, at most the width of its file.
 */
.entry-thumbnail:not(.entry-thumbnail--whole) img {
	width: 100%;
	height: clamp(13.75rem, 31.25vw, 28.125rem);
	object-fit: cover;
	object-position: 50% 0;
}

/*
 * The text keeps the left edge of the title and the reading width.
 * Nested .entry-content blocks are the text of each section.
 */
.entry-body {
	--tendra-rb-wide-width: min(
		var(--wp--style--global--wide-size),
		100cqi - 2 * var(--wp--custom--spacing--gutter)
	);

	container-type: inline-size;
}

.entry-body .entry-content {
	max-width: var(--wp--style--global--content-size);
}

/* The constrained layout centres every block with "margin-inline: auto !important": a wider block overflows to the right. */
.entry-body .entry-content > .alignwide {
	width: var(--tendra-rb-wide-width);
}

.entry-body .entry-content > .alignfull {
	width: 100cqi;
	margin-inline-start: calc((var(--tendra-rb-wide-width) - 100cqi) / 2);
}

/*
 * A separator against a wide or full-width block, such as the testimonial carousel, spans the wide width with it.
 * The constrained layout caps it at the content size, as any block that is not wide.
 */
.entry-body .entry-content > :is(.alignwide, .alignfull) + .wp-block-separator:not(.alignfull),
.entry-body .entry-content > .wp-block-separator:not(.alignfull):has(+ :is(.alignwide, .alignfull)) {
	width: var(--tendra-rb-wide-width);
	max-width: none;
}

.entry-section {
	display: flow-root;
}

.entry-content > .entry-section:not(:first-child) {
	margin-block-start: var(--wp--preset--spacing--xl);
}

/* Keep the width in sync with the sizes of tendra_rb_page_image(). */
.entry-section__media {
	max-width: 27rem;
	margin: var(--wp--preset--spacing--l) 0 0;
}

.entry-section__media img {
	width: 100%;
}

.entry-section--media .entry-content > :is(.alignwide, .alignfull),
.entry-body .entry-section--media .entry-content > .wp-block-separator {
	width: auto;
	margin-inline-start: 0;
}

/* The featured image comes first in the page, above the text. singular.php prints it before the text. */
.entry-section--lead-media > .entry-section__media {
	margin: 0 0 var(--wp--preset--spacing--l);
}

@media (width >= 64rem) {
	.entry-content > .entry-section--media {
		display: grid;
		grid-template-columns: minmax(0, var(--wp--style--global--content-size)) minmax(15rem, 1fr);
		gap: var(--wp--preset--spacing--xl);
		align-items: start;
		width: var(--tendra-rb-wide-width);
		max-width: none;
	}

	.entry-section__media,
	.entry-section--lead-media > .entry-section__media {
		margin: 0;
	}

	.entry-section--lead-media > .entry-section__media {
		grid-area: 1 / 2;
	}
}

.page-facts {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--l);
	margin: var(--wp--preset--spacing--l) 0 0;
	padding: 0;
}

.page-facts__item {
	margin: 0;
}

.page-facts dt {
	margin: 0;
	color: var(--wp--custom--color--text-muted);
	font-family: var(--wp--preset--font-family--secondary);
	font-size: var(--wp--preset--font-size--mono-s);
	font-weight: 500;
	letter-spacing: var(--wp--custom--letter-spacing--mono-s);
	line-height: var(--wp--custom--line-height--mono);
}

.page-facts dd {
	margin: var(--wp--preset--spacing--xs) 0 0;
	font-size: var(--wp--preset--font-size--heading-4);
	font-weight: 800;
	line-height: var(--wp--custom--line-height--heading-4);
}

.section-pages {
	margin-block-start: var(--wp--preset--spacing--2-xl);
	padding-block-start: var(--wp--preset--spacing--xl);
	border-top: 1px solid var(--wp--custom--color--surface-card-subtle);
}

.section-pages__title {
	margin: 0 0 var(--wp--preset--spacing--l);
}

.section-pages__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
	gap: var(--wp--preset--spacing--l) var(--wp--preset--spacing--m);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sitemap,
.sitemap ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sitemap ul {
	padding-inline-start: var(--wp--preset--spacing--m);
}

.sitemap li {
	margin-block: var(--wp--preset--spacing--xs);
}

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

.sitemap a:hover {
	text-decoration: underline;
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
	gap: var(--wp--preset--spacing--m);
}

.post-card {
	display: flex;
	position: relative;
	flex-direction: column;
	min-height: 28.75rem;
	background: var(--wp--preset--color--surface-card);
}

.post-card__image {
	width: 100%;
	height: 13.75rem;
	object-fit: cover;
}

/* On a phone, the image keeps its format of 1440 px, 421 × 220: at a fixed height, a narrow card would crop the text of a banner on both sides. */
@media (width < 48rem) {
	.post-card__image {
		height: auto;
		aspect-ratio: 421 / 220;
	}
}

.post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: var(--wp--preset--spacing--m);
}

.post-card__category {
	margin: 0 0 0.75rem;
	color: var(--wp--custom--color--text-accent);
}

.post-card__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--heading-5);
	line-height: var(--wp--custom--line-height--heading-5);
	letter-spacing: var(--wp--custom--letter-spacing--heading-5);
}

.post-card__link {
	color: var(--wp--custom--color--text-default);
	text-decoration: none;
}

.post-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.post-card__link:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.15em;
}

.post-card__link:focus-visible {
	outline: none;
}

.post-card__link:focus-visible::after {
	outline: 2px solid var(--wp--preset--color--accent-default);
	outline-offset: 2px;
}

.post-card__footer {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--s);
	margin-block-start: auto;
	padding-block-start: var(--wp--preset--spacing--m);
	color: var(--wp--custom--color--text-muted);
}

.post-card__arrow {
	margin-inline-start: auto;
	color: var(--wp--custom--color--text-default);
}

.post-card__arrow svg {
	width: 1.5rem;
	height: 1.5rem;
}

.post-list-empty {
	margin: 0;
	color: var(--wp--custom--color--text-subtle);
	font-size: var(--wp--preset--font-size--body-l);
	line-height: var(--wp--custom--line-height--body-l);
}

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

.pagination .nav-links,
.entry-content .post-nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--xs);
	font-family: var(--wp--preset--font-family--secondary);
	font-size: var(--wp--preset--font-size--mono-m);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--mono);
	letter-spacing: var(--wp--custom--letter-spacing--mono-m);
}

.page-numbers,
.post-page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding-inline: var(--wp--preset--spacing--xs);
	color: var(--wp--custom--color--text-default);
	text-decoration: none;
}

a.page-numbers:hover,
a.post-page-numbers:hover,
.page-numbers.current,
.post-page-numbers.current {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.3em;
}

.page-numbers.current,
.post-page-numbers.current {
	color: var(--wp--custom--color--text-accent);
}

/* Previous and next article, below a single post. The newer article stays on the right, even alone. */

.post-navigation {
	margin-block-start: var(--wp--preset--spacing--2-xl);
	padding-block-start: var(--wp--preset--spacing--xl);
	border-top: 1px solid var(--wp--custom--color--surface-card-subtle);
}

.post-navigation .nav-links {
	display: grid;
	gap: var(--wp--preset--spacing--m);
}

@media (width >= 48rem) {
	.post-navigation .nav-links {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.post-navigation .nav-next {
		grid-column: 2;
		text-align: end;
	}
}

.post-navigation a {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--s);
	height: 100%;
	padding: var(--wp--preset--spacing--m);
	background: var(--wp--preset--color--surface-card);
	color: var(--wp--custom--color--text-default);
	text-decoration: none;
}

.post-navigation .nav-next a {
	align-items: flex-end;
}

.post-navigation a:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-default);
	outline-offset: 2px;
}

.post-navigation__label {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--xs);
	color: var(--wp--custom--color--text-accent);
	font-family: var(--wp--preset--font-family--secondary);
	font-size: var(--wp--preset--font-size--mono-s);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--mono);
	letter-spacing: var(--wp--custom--letter-spacing--mono-s);
	text-transform: uppercase;
}

.nav-previous .post-navigation__label::before,
.nav-next .post-navigation__label::after {
	content: "";
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	background-color: currentColor;
	mask: url("../icons/arrow-right.svg") center / contain no-repeat;
}

.nav-previous .post-navigation__label::before {
	transform: scaleX(-1);
}

.post-navigation__title {
	font-size: var(--wp--preset--font-size--heading-5);
	font-weight: 800;
	line-height: var(--wp--custom--line-height--heading-5);
	letter-spacing: var(--wp--custom--letter-spacing--heading-5);
}

.post-navigation a:hover .post-navigation__title {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.15em;
}

/* Footer */

.site-footer {
	background: var(--wp--preset--color--background-default);
	color: var(--wp--custom--color--text-default);
}

.site-footer a {
	color: inherit;
	text-decoration: none;
}

.site-footer a:hover {
	text-decoration: underline;
}

.footer-marquee__link {
	display: block;
	overflow: hidden;
	padding-block: 0.21em 0.32em;
	font-size: var(--wp--preset--font-size--display-l);
	font-weight: 900;
	line-height: var(--wp--custom--line-height--display-l);
	text-transform: uppercase;
	white-space: nowrap;
}

.site-footer a.footer-marquee__link:hover {
	text-decoration: none;
}

.footer-marquee__link:focus-visible {
	outline-offset: -4px;
}

.footer-marquee__track {
	display: flex;
	width: max-content;
}

.footer-marquee__group {
	display: flex;
	flex-shrink: 0;
}

.footer-marquee__item {
	padding-inline-end: 0.3em;
}

/* No pause control, as in the mockup: see "Écarts d'accessibilité" in AGENTS.md. */
@media (prefers-reduced-motion: no-preference) {
	.footer-marquee__track {
		animation: tendra-rb-marquee 30s linear infinite;
	}
}

@keyframes tendra-rb-marquee {
	to {
		transform: translateX(-50%);
	}
}

.site-footer__main {
	border-top: 4px solid var(--wp--preset--color--accent-default);
}

.site-footer__top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--l) 5rem;
	padding-block: var(--wp--preset--spacing--l);
}

.site-footer__business {
	display: flex;
	flex: 0 1 18.4375rem;
	flex-direction: column;
	gap: 2rem;
}

.site-footer__brand {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--s);
	align-self: flex-start;
}

.site-footer__brand::after {
	content: "";
	width: 2.5rem;
	height: 4px;
	background: var(--wp--preset--color--accent-default);
}

.site-footer__logo {
	width: auto;
	max-height: 3rem;
}

.site-footer__badge {
	align-self: flex-start;
}

.site-footer__badge a {
	display: block;
}

/* Labels come in their own colours, made for a light background: the theme does not recolour them, it gives them a light plate. */
.site-footer__badge-image {
	width: auto;
	max-width: min(100%, 16rem);
	height: auto;
	max-height: 4rem;
	padding: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--s);
	background-color: var(--wp--custom--color--surface-card-light);
	object-fit: contain;
}

.site-footer__title {
	font-size: var(--wp--preset--font-size--heading-5);
	font-weight: 800;
	line-height: var(--wp--custom--line-height--heading-5);
}

.site-footer__description,
.site-footer__partner-label {
	margin: 0;
	color: var(--wp--custom--color--text-subtle);
	font-size: var(--wp--preset--font-size--body-xs);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--body-xs);
}

/* The columns share the width left by the business block, as in the mock. */
.site-footer__columns {
	display: flex;
	flex: 1 1 30rem;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--l) var(--wp--preset--spacing--xl);
}

/* From 48rem, the columns keep one row and wrap their text: a wrapped column fell under the shortest one, leaving a hole. */
@media (width >= 48rem) {
	.site-footer__columns {
		display: grid;
		grid-auto-flow: column;
		column-gap: var(--wp--preset--spacing--l);
	}
}

.site-footer__heading {
	margin: 0;
	padding-block: var(--wp--preset--spacing--xs);
	color: var(--wp--custom--color--text-muted);
	font-size: var(--wp--preset--font-size--mono-s);
	letter-spacing: var(--wp--custom--letter-spacing--mono-s);
	text-transform: uppercase;
}

.site-footer__links,
.site-footer__social,
.group-companies {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__links a,
.site-footer__contact p {
	display: block;
	margin: 0;
	padding-block: var(--wp--preset--spacing--xs);
}

.site-footer__contact {
	font-style: normal;
}

.site-footer .site-footer__contact a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.site-footer__social {
	display: flex;
	margin-block-start: var(--wp--preset--spacing--xs);
	margin-inline-start: calc(-1 * var(--wp--preset--spacing--xs));
}

.site-footer__social a {
	display: inline-flex;
	padding: var(--wp--preset--spacing--xs);
}

.site-footer__group {
	border-top: 1px solid var(--wp--custom--color--surface-card-subtle);
}

.site-footer__group-inner {
	display: flex;
	flex-direction: column;
	gap: 3rem;
	padding-block: var(--wp--preset--spacing--l);
}

.site-footer__group-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--l);
}

.site-footer__partner {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--s);
}

.site-footer__group-link {
	display: inline-block;
	align-self: flex-start;
}

.group-companies {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--wp--preset--spacing--l);
}

.group-companies a,
.group-companies span {
	display: block;
	padding-block: var(--wp--preset--spacing--xs);
	border-bottom: 2px solid transparent;
}

.site-footer .group-companies a:hover {
	border-bottom-color: currentColor;
	text-decoration: none;
}

.site-footer .group-companies [aria-current="true"] {
	border-bottom-color: var(--wp--preset--color--accent-default);
}

.site-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--s) var(--wp--preset--spacing--l);
	color: var(--wp--custom--color--text-inverse-muted);
}

.site-footer__legal p {
	margin: 0;
}

/* Mobile mock: every block stacked, separated by full-width rules. */
@media (width < 48rem) {
	.footer-marquee__link {
		padding-block: 0.47em 0.72em;
		font-size: var(--wp--preset--font-size--display-m);
		font-weight: 800;
	}

	.site-footer__main {
		border-top-width: 6px;
	}

	.site-footer__top {
		flex-direction: column;
		gap: 2rem;
		padding-block: 3.5rem 2rem;
	}

	.site-footer__business,
	.site-footer__columns {
		flex: none;
	}

	.site-footer__columns {
		flex-direction: column;
		gap: var(--wp--preset--spacing--s);
	}

	/* A site without any footer menu, social link or contact gets neither an empty rule nor an empty gap. */
	.site-footer__columns:has(.site-footer__column) {
		margin-inline: calc(-1 * var(--tendra-rb-gutter));
		padding: 2rem var(--tendra-rb-gutter) 0;
		border-top: 1px solid var(--wp--custom--color--surface-card-subtle);
	}

	.site-footer__columns:not(:has(.site-footer__column)) {
		display: none;
	}

	/* These labels wrap on a phone: a line height of 1 would glue the lines together. */
	.site-footer__heading,
	.site-footer__legal {
		line-height: normal;
	}

	.site-footer__heading {
		color: var(--wp--preset--color--accent-default);
	}

	.site-footer__group-inner {
		padding-block: 2rem;
	}

	.site-footer__group-top {
		flex-direction: column;
		align-items: flex-start;
		gap: 3rem;
	}

	.group-companies {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--wp--preset--spacing--xs);
	}

	.site-footer__legal {
		flex-direction: column;
		align-items: center;
		gap: var(--wp--preset--spacing--xs);
		text-align: center;
	}
}

/* Cards: the homepages and the section lists. The homepage variants stay in home.css and home-james-mercer.css. */

.home-card {
	display: flex;
	flex-direction: column;
	min-height: 21rem;
	background: var(--wp--custom--color--background-muted);
}

.home-card__link {
	position: relative;
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: flex-end;
	padding: 2rem;
	color: var(--wp--custom--color--text-default);
	text-decoration: none;
}

.home-card__link::after {
	content: "";
	position: absolute;
	z-index: 2;
	inset: 0;
}

.home-card__link:hover .home-card__title {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.15em;
}

.home-card__link:focus-visible {
	outline: none;
}

.home-card__link:focus-visible::after {
	outline: 2px solid var(--wp--preset--color--accent-default);
	outline-offset: 2px;
}

.home-card__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.5;
}

/* Black is not a charter colour: it only shades the photograph. */
.home-card__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgb(0 0 0 / 64%), rgb(0 0 0 / 0));
}

.home-card__body {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--xs);
}

.home-card__title {
	font-size: var(--wp--preset--font-size--heading-5);
	font-weight: 800;
	letter-spacing: var(--wp--custom--letter-spacing--heading-5);
	line-height: var(--wp--custom--line-height--heading-5);
}

.home-card__text:empty {
	display: none;
}

.home-card__text {
	color: var(--wp--custom--color--text-muted);
	font-size: var(--wp--preset--font-size--body-m);
	line-height: var(--wp--custom--line-height--body-m);
}

/* Section lists */

.section-pages--children {
	margin-block-start: var(--wp--preset--spacing--xl);
	padding-block-start: 0;
	border-top: 0;
}

.section-pages__label {
	margin: 0 0 var(--wp--preset--spacing--s);
	color: var(--wp--preset--color--accent-default);
	font-family: var(--wp--preset--font-family--secondary);
	font-size: var(--wp--preset--font-size--mono-s);
	font-weight: 500;
	letter-spacing: var(--wp--custom--letter-spacing--mono-s);
	line-height: var(--wp--custom--line-height--mono);
	text-transform: uppercase;
}

/* Provisional breakpoints: there is no tablet or mobile mock. */
.section-pages__list {
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--s);
}

@media (width >= 48rem) {
	.section-pages__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (width >= 64rem) {
	.section-pages__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.section-pages__action {
	margin-block-start: var(--wp--preset--spacing--l);
}

.home-card--page {
	min-height: 17.5rem;
}

.home-card--page .home-card__link {
	justify-content: flex-start;
	padding: var(--wp--preset--spacing--m);
}

.home-card--page .home-card__media {
	opacity: 1;
}

/* Dark enough behind the title and the summary to keep 4.5:1 on a light photograph. */
.home-card--page .home-card__shade {
	background: linear-gradient(
		to bottom,
		color-mix(in srgb, var(--wp--preset--color--background-default) 88%, transparent),
		color-mix(in srgb, var(--wp--preset--color--background-default) 75%, transparent) 70%,
		color-mix(in srgb, var(--wp--preset--color--background-default) 30%, transparent)
	);
}

.home-card--page .home-card__body {
	gap: var(--wp--preset--spacing--s);
}

.home-card--page .home-card__text {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	line-clamp: 4;
}
