/*
Theme Name: OmniPaletteFSE
Theme URI: https://www.livetech.co.uk/
Author: Livetech
Author URI: https://www.livetech.co.uk/
Description: Livetech Child Theme
Version: 0.1
License: GNU General Public License v3 or later
License URI: https://www.livetech.co.uk/
Tags: full-site-editing, block-patterns, block-styles, wide-blocks
Text Domain: omnipalettefse
Template: OmniCanvasFSE
*/

/* =Full-bleed sections — the actual right-edge gap fix
-------------------------------------------------------------- */
/* Confirmed via live devtools measurement: the parent theme's own
   .alignfull rule hard-codes `width: 100%`, correct for its own simpler
   theme.json but wrong for ours. Our theme.json turns on
   useRootPaddingAwareAlignments, which bleeds full-width blocks past the
   root padding by pairing a negative margin (-16px each side, applied
   correctly by a separate, more specific core rule) with `width: auto` —
   letting the browser solve for a wider-than-100% box. The parent's fixed
   width:100% locks the box to 100% of its already-padded container
   regardless, so the negative margin just shifts it without the width ever
   growing to fill the gap it opens up — flush on the left by coincidence,
   short by exactly 2x the root padding (32px) on the right. Same
   specificity as the parent's rule, loaded after it, so this wins. */
.alignfull {
	width: auto;
}

/* Same story for wide blocks. The parent's legacy classic-theme alignment
   rule gives .alignwide `width: 90%`, which is fine for one wide block at the
   top level (its max-width wins) but shrinks every wide block nested inside
   another wide one to 90% of its parent — a wide Query grid inside a wide
   group came out 1037px instead of 1152px. Fill the parent; max-width (the
   wide size) still caps it. */
.is-style-alignwide,
.alignwide {
	width: 100%;
}

/* The parent sets overflow-x:hidden on <html>. With <body> hidden too, body
   becomes its own scroll container, and position:sticky inside it sticks to a
   container that never scrolls — so the header never stuck. `clip` cuts off
   horizontal overflow the same way but creates no scroll container. */
html,
body {
	overflow-x: clip;
}

/* =Latest talks / rail column — explicit track widths
-------------------------------------------------------------- */
/* Core's Columns block sizes tracks with flex-basis + flex-grow/shrink,
   and its own responsive rules use !important (which beats even an inline
   flex-basis) at its own 782px breakpoint — not the 1024px the design wants
   the rail to move below content at. Grid sidesteps the whole fragile
   system. Targeted by the latest-rail block's own stable class rather than
   a class added to the page content, since editing that content through
   the API is broken on this specific page (a REST 500, unrelated to this
   theme) — this needs no page-content change at all. */
.wp-block-columns:has(.wp-block-omnipalettefse-latest-rail) {
	display: flex;
	flex-direction: column;
}

.wp-block-columns:has(.wp-block-omnipalettefse-latest-rail) > .wp-block-column {
	flex-basis: auto !important;
	width: 100% !important;
}

@media (min-width: 1024px) {
	.wp-block-columns:has(.wp-block-omnipalettefse-latest-rail) {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) var(--wp--custom--rail);
		/* Design: 80px between the main column and the Latest rail. */
		column-gap: 80px;
		row-gap: var(--wp--preset--spacing--8);
	}

	.wp-block-columns:has(.wp-block-omnipalettefse-latest-rail) > .wp-block-column {
		width: auto !important;
	}
}

/* =Column rhythm
-------------------------------------------------------------- */
/* The design spaces side-by-side columns by how many there are, not by the one
   site-wide block gap: two-up features sit 64px apart, three-up rows 40px, and
   four-up rows 32px. Column gap only, so stacked columns on small screens keep
   the normal vertical block gap. The Latest rail layout above sets its own
   80px and is left alone. */
@media (min-width: 782px) {
	.wp-block-columns:not(:has(.wp-block-omnipalettefse-latest-rail)):has(> .wp-block-column:nth-child(2):last-child) {
		column-gap: 64px;
	}

	.wp-block-columns:not(:has(.wp-block-omnipalettefse-latest-rail)):has(> .wp-block-column:nth-child(3):last-child) {
		column-gap: 40px;
	}

	.wp-block-columns:not(:has(.wp-block-omnipalettefse-latest-rail)):has(> .wp-block-column:nth-child(4):last-child) {
		column-gap: 32px;
	}
}

/* Book grids (Publications, theme archives): 32px between cards, 40px between rows. */
.wp-block-post-template.is-layout-grid:has(.dt-book-card) {
	column-gap: 32px;
	row-gap: 40px;
}

/* Phones: two covers a row. Core's grid drops to one column here, which made
   each cover screen-wide and a four-book shelf several screens tall. */
@media (max-width: 599px) {
	.wp-block-post-template.is-layout-grid:has(.dt-book-card) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 16px;
		row-gap: 32px;
	}

	.dt-book-card .dt-card__title {
		font-size: 18px;
		line-height: 24px;
	}
}

/* =Flush full-bleed section strips
-------------------------------------------------------------- */
/* Core gives every direct child of a constrained container a top margin
   for vertical rhythm between ordinary content blocks (also :where()-wrapped,
   also low-specificity). That's wrong for our own top-level section strips —
   alternating night/sage/linen bands are meant to butt up against each
   other with no gap, not float with a strip of linen peeking through.
   The homepage's sections are direct children of #swup; every other
   page's are one level deeper, inside wp:post-content's .entry-content
   wrapper — both need the same reset. */
#swup > .alignfull,
.entry-content > .alignfull {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* =Group style variations — restated for the same reason as buttons below
-------------------------------------------------------------- */
/* WordPress only prints a block-style-variation's theme.json CSS on pages
   where its block-usage scanner finds an actual core/group block using that
   className in the parsed post content. series-header.php (and any other
   PHP render-callback block) hardcodes "is-style-vespers" etc. straight
   into raw output HTML — never a real core/group instance — so the scanner
   never sees it and the variation's CSS is silently missing on any page
   whose ONLY use of it is from a block like that (confirmed: no matching
   rule in any stylesheet on taxonomy-dt_series.html for a Metanoia series,
   even though the exact same class visibly works on hand-authored page
   content elsewhere, where a real core/group block IS present). Restating
   them as plain, always-loaded CSS — matching theme.json's own values —
   fixes it regardless of how the class was applied. */
.wp-block-group.is-style-night {
	background-color: var(--wp--preset--color--night);
	color: var(--wp--preset--color--on-night);
}

.wp-block-group.is-style-sage {
	background-color: var(--wp--preset--color--sage);
	color: var(--wp--preset--color--ink);
}

.wp-block-group.is-style-vespers {
	background-color: var(--wp--preset--color--vespers);
	color: var(--wp--preset--color--on-vespers);
}

/* =Buttons — theme.json's variation colours can't win here, so restate them
-------------------------------------------------------------- */
/* The parent theme hard-codes square, --base-coloured buttons on the same
   .wp-element-button selector theme.json targets, at real (non-:where())
   specificity — and WordPress wraps every block-style-variation rule it
   generates (secondary/ghost/vespers included) in :where(...), which always
   carries ZERO specificity, however many classes are inside it. That means
   the variation CSS theme.json already declares can never outrank the
   parent's rule, on this element, regardless of source order — so instead
   of trying to win that fight, every variant's colour is just restated
   here directly, in real CSS, matching the values in theme.json exactly. */
body .wp-element-button {
	border-radius: 999px;
	min-height: 48px;
	/* 1px more above than below: the serif label's visual centre sits above its
	   line box's centre, so equal padding makes the text look slightly high. */
	padding: 13px 24px 11px;
	/* Keep an icon and its label on one line inside the button — without
	   this, a button narrower than icon+text wraps internally (the label
	   dropping below the icon) instead of the whole button just moving to
	   the next line in its (flex-wrap) parent, which is what should give. */
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	vertical-align: middle;
}

body .wp-element-button svg {
	flex: none;
	width: 18px;
	height: 18px;
	/* Icons sat slightly below the label's optical centre; lift them 1px. */
	position: relative;
	top: -1px;
}

body .wp-element-button:hover {
	transform: none;
	opacity: 1;
}

body .wp-block-button:not(.is-style-secondary):not(.is-style-ghost):not(.is-style-vespers) .wp-element-button {
	background-color: var(--wp--preset--color--claret);
}

body .wp-block-button:not(.is-style-secondary):not(.is-style-ghost):not(.is-style-vespers) .wp-element-button:hover {
	background-color: var(--wp--preset--color--claret-deep);
}

body .wp-block-button.is-style-secondary .wp-element-button {
	background-color: transparent;
	/* The full shorthand, not just border-color — something else on this
	   element resolves border-width/style to 0/none otherwise (border-color
	   alone was leaving these outline buttons with no visible border at all). */
	border: 1.5px solid var(--wp--preset--color--ink);
	color: var(--wp--preset--color--ink);
}

body .wp-block-button.is-style-secondary .wp-element-button:hover {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--linen);
}

body .wp-block-button.is-style-ghost .wp-element-button {
	background-color: transparent;
	border: 1.5px solid var(--wp--preset--color--on-night);
	color: var(--wp--preset--color--on-night);
}

body .wp-block-button.is-style-ghost .wp-element-button:hover {
	background-color: var(--wp--preset--color--on-night);
	color: var(--wp--preset--color--night);
}

body .wp-block-button.is-style-vespers .wp-element-button {
	background-color: var(--wp--preset--color--gilt);
	border: 1.5px solid var(--wp--preset--color--gilt);
	color: var(--wp--preset--color--vespers);
}

/* Kadence Blocks buttons left in migrated post content (e.g. the publisher
   links on "October, the Month of the Rosary"). Kadence isn't installed, so
   nothing sized their inline SVG icons and they rendered at full column
   width. Style them as the site's primary pill button with a 1em icon. */
.wp-block-post-content a.kb-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 22px;
	border-radius: 999px;
	background-color: var(--wp--preset--color--claret);
	color: var(--wp--preset--color--on-claret);
	font-size: 17px;
	line-height: 1.4;
	text-decoration: none;
}

.wp-block-post-content a.kb-button:hover,
.wp-block-post-content a.kb-button:focus-visible {
	background-color: var(--wp--preset--color--claret-deep);
	color: var(--wp--preset--color--on-claret);
}

.kb-svg-icon-wrap {
	display: inline-flex;
	flex: none;
}

.kb-svg-icon-wrap svg {
	width: 1em;
	height: 1em;
}

/* =Pagination — Query Loop and Comments pagination everywhere
   (Reading Room, News, Books, search, comment pages).
   Three-column grid so the numbers stay centred whether or not the
   Previous / Next pills are present on that page.
-------------------------------------------------------------- */
body .wp-block-query-pagination,
body .wp-block-comments-pagination {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: var(--wp--preset--spacing--3);
	margin-top: var(--wp--preset--spacing--6);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 15px;
	line-height: 1;
}

.wp-block-query-pagination-previous,
.wp-block-comments-pagination-previous {
	grid-column: 1;
	justify-self: start;
}

.wp-block-query-pagination-numbers,
.wp-block-comments-pagination-numbers {
	grid-column: 2;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
}

.wp-block-query-pagination-next,
.wp-block-comments-pagination-next {
	grid-column: 3;
	justify-self: end;
}

.wp-block-query-pagination .page-numbers,
.wp-block-comments-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 6px;
	box-sizing: border-box;
	border: 1.5px solid transparent;
	border-radius: 999px;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.wp-block-query-pagination a.page-numbers:hover,
.wp-block-comments-pagination a.page-numbers:hover {
	border-color: var(--wp--preset--color--ink);
}

.wp-block-query-pagination .page-numbers.current,
.wp-block-comments-pagination .page-numbers.current {
	background-color: var(--wp--preset--color--claret);
	color: var(--wp--preset--color--on-claret);
}

.wp-block-query-pagination .page-numbers.dots,
.wp-block-comments-pagination .page-numbers.dots {
	min-width: 0;
	color: var(--wp--preset--color--ink-muted);
}

body .wp-block-query-pagination-previous,
body .wp-block-query-pagination-next,
body .wp-block-comments-pagination-previous,
body .wp-block-comments-pagination-next {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 18px;
	box-sizing: border-box;
	margin: 0;
	border: 1.5px solid var(--wp--preset--color--ink);
	border-radius: 999px;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	white-space: nowrap;
}

body .wp-block-query-pagination-previous:hover,
body .wp-block-query-pagination-next:hover,
body .wp-block-comments-pagination-previous:hover,
body .wp-block-comments-pagination-next:hover {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--linen);
}

.wp-block-query-pagination-previous::before,
.wp-block-comments-pagination-previous::before {
	content: "\2190";
}

.wp-block-query-pagination-next::after,
.wp-block-comments-pagination-next::after {
	content: "\2192";
}

/* On phones the pills drop to arrows only, so the numbers have room. */
@media (max-width: 599px) {
	body .wp-block-query-pagination-previous,
	body .wp-block-query-pagination-next,
	body .wp-block-comments-pagination-previous,
	body .wp-block-comments-pagination-next {
		width: 40px;
		padding: 0;
		justify-content: center;
		font-size: 0;
	}

	.wp-block-query-pagination-previous::before,
	.wp-block-query-pagination-next::after,
	.wp-block-comments-pagination-previous::before,
	.wp-block-comments-pagination-next::after {
		font-size: 16px;
	}
}

/* =Eyebrow on dark/branded strips
-------------------------------------------------------------- */
/* The eyebrow style variation defaults to claret text, which fails WCAG AA
   on both the night strip (1.83:1) and the vespers band (1.82:1) in the
   light theme. Swap it for a colour that passes on those two backgrounds,
   matching design/components-reference.css's .dt-night/.dt-vespers overrides. */
.wp-block-group.is-style-night .is-style-eyebrow {
	color: var(--wp--preset--color--on-night);
}

.wp-block-group.is-style-vespers .is-style-eyebrow {
	color: var(--wp--preset--color--gilt);
}

/* =Page-change progress bar (added by swup-init.js while a swap is loading)
-------------------------------------------------------------- */
html.dt-navigating::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100000;
	width: 100%;
	height: 3px;
	background: var(--wp--preset--color--claret);
	transform-origin: left;
	animation: dt-navigating 1.2s ease-out forwards;
	pointer-events: none;
}

html.dt-navigating,
html.dt-navigating a {
	cursor: progress;
}

@keyframes dt-navigating {
	from { transform: scaleX(0); }
	to { transform: scaleX(0.85); }
}

@media (prefers-reduced-motion: reduce) {
	html.dt-navigating::before {
		animation: none;
		transform: scaleX(0.5);
	}
}

/* =Swup page transition
-------------------------------------------------------------- */
/* Swup detects the transition duration on elements matching [class*="transition-"]
   inside its container and waits for it before swapping. Reduced motion collapses
   that duration to (near) zero rather than removing it, so Swup still resolves
   instantly instead of hanging on a duration it can no longer detect. */
.transition-fade {
	transition: opacity 0.25s ease;
}

html.is-animating .transition-fade {
	opacity: 0;
}

/* Leaving: no fade-out. The old page stays fully visible until the new one is
   ready (Swup drops is-leaving in the same task it swaps the content, so nothing
   can paint in between), then the new page fades in. Fading the old page out
   first left a blank screen for as long as the server took to respond — about
   half a second — with the header changing state in the middle of it. The
   near-zero duration also stops Swup holding the swap back to wait for a
   fade-out that no longer exists. */
html.is-leaving .transition-fade {
	opacity: 1;
	transition-duration: 0.01s;
}

@media (prefers-reduced-motion: reduce) {
	.transition-fade {
		transition-duration: 0.01s;
	}
}

/* =Persistent audio player, YouTube facade, Shopify placeholder
-------------------------------------------------------------- */
/* Persistent audio player bar */
.dt-player[hidden] {
	/* Author-origin styles always beat the browser's own [hidden]{display:
	   none}, even at equal specificity — so the unconditional display:flex
	   below was winning over it regardless of the hidden attribute, and the
	   bar showed on every page load and never actually hid on stop(). */
	display: none;
}

.dt-player {
	position: fixed;
	inset: auto 0 0 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	gap: 16px;
	height: 72px;
	padding: 0 16px;
	background: #fff;
	box-shadow: 0 -8px 24px rgba(20, 20, 20, 0.08);
}

.dt-play {
	flex: none;
	width: 44px;
	height: 44px;
	display: inline-grid;
	place-items: center;
	border: 0;
	border-radius: 999px;
	background: #8c2233;
	color: #fff;
	cursor: pointer;
}

.dt-play__icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

.dt-player__info {
	flex: 1;
	min-width: 0;
}

.dt-player__title {
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dt-progress {
	height: 3px;
	margin-top: 8px;
	background: #dcd9d0;
	cursor: pointer;
}

.dt-progress > i {
	display: block;
	height: 100%;
	width: 0;
	background: #8c2233;
}

.dt-player__time {
	flex: none;
	margin: 0;
	font-variant-numeric: tabular-nums;
}

.dt-player__stop {
	flex: none;
	width: 36px;
	height: 36px;
	color: var(--wp--preset--color--ink-muted);
}

.dt-player__stop svg {
	width: 18px;
	height: 18px;
}

.dt-player__stop:hover {
	color: var(--wp--preset--color--ink);
}

/* YouTube facade */
.dt-youtube-facade {
	position: relative;
	display: block;
	width: 100%;
	max-width: 480px;
	aspect-ratio: 4 / 3;
	padding: 0;
	border: 0;
	background: #000;
	cursor: pointer;
}

.dt-youtube-facade img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dt-youtube-facade__play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: #fff;
}

.dt-youtube-facade__play svg {
	box-sizing: content-box;
	width: 28px;
	height: 28px;
	padding: 18px;
	border-radius: 999px;
	background: var(--wp--preset--color--claret);
	color: var(--wp--preset--color--on-claret);
}

.dt-youtube-facade:hover .dt-youtube-facade__play svg,
.dt-youtube-facade:focus-visible .dt-youtube-facade__play svg {
	background: var(--wp--preset--color--claret-deep);
}

/* The playing video: a 16:9 box that the iframe fills. */
.dt-youtube-embed {
	position: relative;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}

.dt-youtube-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* In a list row the video is a compact thumbnail beside the title, not a
   480px block that squeezes the text. */
.dt-row .dt-youtube-facade {
	flex: none;
	width: 160px;
	max-width: 160px;
	aspect-ratio: 16 / 9;
}

.dt-row .dt-youtube-facade__play svg {
	width: 18px;
	height: 18px;
	padding: 13px;
}

/* Shopify buy button placeholder */
.dt-shopify-placeholder {
	padding: 16px;
	border: 1px dashed #8a877f;
}

/* =Page gutter
-------------------------------------------------------------- */
/* Design: 16px page gutter on mobile, 24px from 600px. theme.json's root
   padding is a single 16px; step it up here so alignwide blocks, full-width
   sections' inner content and .dt-wrap all share the same edges. */
@media (min-width: 600px) {
	html:root {
		--wp--style--root--padding-left: var(--wp--preset--spacing--5);
		--wp--style--root--padding-right: var(--wp--preset--spacing--5);
	}
}

/* =Layout utility
-------------------------------------------------------------- */
/* Design tokens: content-max is 1200px INCLUDING the page gutters (16px on
   mobile, 24px from 600px). theme.json's wideSize is the content width without
   gutters (1152px), so this wrapper adds the gutters back — its content lines
   up with alignwide blocks. */
.dt-wrap {
	max-width: calc(var(--wp--style--global--wide-size) + 2 * var(--wp--preset--spacing--5));
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--wp--preset--spacing--5);
	padding-right: var(--wp--preset--spacing--5);
	box-sizing: border-box;
}

@media (max-width: 599px) {
	.dt-wrap {
		padding-left: var(--wp--preset--spacing--4);
		padding-right: var(--wp--preset--spacing--4);
	}
}

/* =Header
-------------------------------------------------------------- */
/* The sticky element is the template-part wrapper (<header class=
   "wp-block-template-part">), not .dt-header inside it: a sticky element can
   only travel within its parent, and .dt-header's parent is exactly as tall as
   it is, so it had nowhere to stick. The wrapper's parent is the whole page. */
header.wp-block-template-part:has(> .dt-header) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 20;
}

.dt-header {
	position: relative;
	background: var(--wp--preset--color--linen);
	/* Ease between solid and transparent, matching the page fade-in (0.25s), so
	   arriving on the homepage doesn't snap the header while the hero fades up. */
	transition: background-color 0.25s ease, color 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
	.dt-header {
		transition: none;
	}
}

/* Front page: the header overlays the hero and takes no space in the flow, so
   flipping it between transparent and solid can never move the hero (an
   in-flow header used to push the hero back across the switch point and flip
   the header again, every frame — the flashing). Colour is the only thing
   that changes. */
header.wp-block-template-part:has(> .dt-header--hero-page) {
	height: 0;
}

.dt-header--hero-page {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
}

.dt-header--over {
	background: transparent;
	color: var(--wp--preset--color--on-night);
}

.dt-header__scrim {
	display: none;
	position: absolute;
	inset: 0;
	height: 160px;
	z-index: -1;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(27, 35, 32, 0.62) 0%, rgba(27, 35, 32, 0.28) 60%, rgba(27, 35, 32, 0) 100%);
}

.dt-header--over .dt-header__scrim {
	display: block;
}

.dt-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--5);
	padding-top: var(--wp--preset--spacing--4);
	padding-bottom: var(--wp--preset--spacing--4);
}

.dt-header__logo {
	display: block;
	line-height: 0;
}

.dt-header__logo img {
	display: block;
	height: 26px;
	width: auto;
}

.dt-logo--dark {
	display: none;
}

.dt-header--over .dt-logo--light {
	display: none;
}

.dt-header--over .dt-logo--dark {
	display: block;
}

.dt-nav.wp-block-navigation {
	font-family: var(--wp--preset--font-family--sans);
	/* Pushes the menu (and the search button after it) to the right edge,
	   rather than floating in the middle of the header. */
	margin-left: auto;
}

.dt-nav .wp-block-navigation__container {
	gap: var(--wp--preset--spacing--5);
}

.dt-nav .wp-block-navigation-item__content {
	padding: var(--wp--preset--spacing--1) 0 !important;
	color: inherit;
	border-bottom: 1.5px solid transparent;
}

.dt-nav .wp-block-navigation-item__content:hover,
.dt-nav .wp-block-navigation-item__content[aria-current] {
	border-bottom-color: currentColor;
}

.dt-header:not(.dt-header--over) .dt-nav .wp-block-navigation-item__content[aria-current] {
	border-bottom-color: var(--wp--preset--color--claret);
}

.dt-iconbtn {
	width: 44px;
	height: 44px;
	flex: none;
	display: inline-grid;
	place-items: center;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
}

.dt-iconbtn svg {
	width: 26px;
	height: 26px;
}

.dt-menu-toggle {
	display: none;
}

/* Search button (core Search block, "button only" + icon) sits in
   .dt-header__actions: far right of the nav on desktop, left of the menu
   button on mobile. Clicking it makes the core block reveal its field; here
   that field covers the header row (logo and nav) rather than shoving them
   aside, so the header never changes height or shifts. */
.dt-header__actions {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--1);
}

.dt-header__inner {
	position: relative;
	/* Same side gutter as .dt-wrap, for aligning the search bar to it. */
	--dt-search-gutter: var(--wp--preset--spacing--5);
}

@media (max-width: 599px) {
	.dt-header__inner {
		--dt-search-gutter: var(--wp--preset--spacing--4);
	}
}

.dt-header .dt-search {
	margin: 0;
}

.dt-header .dt-search .wp-block-search__inside-wrapper {
	display: flex;
	align-items: center;
	border: 0;
	padding: 0;
	background: none;
}

.dt-header .dt-search .wp-block-search__button {
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	display: inline-grid;
	place-items: center;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	flex: none;
}

.dt-header .dt-search .wp-block-search__button svg {
	width: 26px;
	height: 26px;
	fill: currentColor;
}

.dt-header .dt-search .wp-block-search__input {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 18px;
	color: inherit;
	background: transparent;
	border: 0;
	border-bottom: 1.5px solid currentColor;
	border-radius: 0;
	padding: var(--wp--preset--spacing--2) 0;
	min-height: 44px;
	box-sizing: border-box;
	outline-offset: 4px;
}

/* The underline is the focus indicator here (it thickens), rather than the
   browser's box outline stacked on top of it. */
.dt-header .dt-search .wp-block-search__input:focus,
.dt-header .dt-search .wp-block-search__input:focus-visible {
	outline: none;
	border-bottom-width: 3px;
}

.dt-header .dt-search .wp-block-search__input::placeholder {
	color: inherit;
	opacity: 0.7;
}

/* Expanded: the field drops into a bar just under the header (full-bleed
   background, field and close button aligned to the page gutter), so it never
   covers the logo or the nav. Closes with the X, Escape, or by clicking away. */
.dt-search-close {
	display: none;
}

.dt-header:has(.dt-search:not(.wp-block-search__searchfield-hidden))::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: 72px;
	z-index: 1;
	background: var(--wp--preset--color--linen);
	border-bottom: 1px solid var(--wp--preset--color--hairline);
}

.dt-header--over:has(.dt-search:not(.wp-block-search__searchfield-hidden))::after {
	background: var(--wp--preset--color--night);
	border-bottom-color: transparent;
}

.dt-header:has(.dt-search:not(.wp-block-search__searchfield-hidden)) .dt-search-close {
	display: inline-grid;
	position: absolute;
	top: 100%;
	right: var(--dt-search-gutter);
	margin-top: 14px;
	z-index: 2;
}

.dt-header .dt-search:not(.wp-block-search__searchfield-hidden) .wp-block-search__input {
	position: absolute;
	top: 100%;
	left: var(--dt-search-gutter);
	right: calc(var(--dt-search-gutter) + 44px + var(--wp--preset--spacing--3));
	width: auto;
	margin-top: 14px;
	z-index: 2;
}

/* Search results page: the on-page search field matches the site's inputs. */
.dt-search-page {
	margin-top: var(--wp--preset--spacing--5);
	max-width: 640px;
}

/* In-content search fields (search page, Reading Room, News archive): the
   input fills the row so its placeholder isn't cut off, and stretches to
   the same height as the pill button beside it. Kept compact (44px). */
#swup .wp-block-search:not(.dt-search):not(.dt-search-page) {
	width: min(100%, 24rem);
}

.dt-search-page .wp-block-search__inside-wrapper,
#swup .wp-block-search:not(.dt-search) .wp-block-search__inside-wrapper {
	gap: var(--wp--preset--spacing--3);
	align-items: stretch;
}

.dt-search-page .wp-block-search__input,
#swup .wp-block-search:not(.dt-search) .wp-block-search__input {
	flex: 1 1 auto;
	min-width: 0;
	height: auto;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 15px;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--paper);
	border: 1.5px solid var(--wp--preset--color--border-strong);
	border-radius: 0;
	padding: 0 var(--wp--preset--spacing--3);
	min-height: 44px;
	box-sizing: border-box;
}

/* The Search block's button isn't inside a .wp-block-button, so the site's
   primary (claret) button background above doesn't reach it. */
.dt-search-page .wp-block-search__button,
#swup .wp-block-search:not(.dt-search) .wp-block-search__button {
	margin: 0;
	min-height: 44px;
	padding: 0 var(--wp--preset--spacing--4);
	font-size: 16px;
	line-height: 1;
	background-color: var(--wp--preset--color--claret);
	color: var(--wp--preset--color--on-claret);
}

.dt-search-page .wp-block-search__button:hover,
#swup .wp-block-search:not(.dt-search) .wp-block-search__button:hover {
	background-color: var(--wp--preset--color--claret-deep);
}

@media (max-width: 1023px) {
	.dt-nav.wp-block-navigation {
		display: none;
	}

	.dt-menu-toggle {
		display: inline-grid;
	}
}

/* =Mobile menu (full-screen, on night)
-------------------------------------------------------------- */
.dt-mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 30;
	background: var(--wp--preset--color--night);
	color: var(--wp--preset--color--on-night);
	overflow-y: auto;
}

.dt-mobile-menu[hidden] {
	display: none;
}

.dt-mobile-menu__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: var(--wp--preset--spacing--4);
	padding-bottom: var(--wp--preset--spacing--4);
}

.dt-mobile-menu__head img {
	display: block;
	height: 26px;
	width: auto;
}

.dt-mobile-nav.wp-block-navigation {
	padding: 0 var(--wp--preset--spacing--4) var(--wp--preset--spacing--8);
}

.dt-mobile-nav .wp-block-navigation__container {
	gap: var(--wp--preset--spacing--2);
	align-items: flex-start;
}

.dt-mobile-nav .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 22px;
	color: inherit;
	padding: var(--wp--preset--spacing--2) 0 !important;
}

body.dt-mobile-menu-open {
	overflow: hidden;
}

@media (min-width: 1024px) {
	.dt-mobile-menu {
		display: none !important;
	}
}

/* =Footer
-------------------------------------------------------------- */
.dt-footer {
	background: var(--wp--preset--color--night);
	color: var(--wp--preset--color--on-night);
	padding-top: var(--wp--preset--spacing--8);
	padding-bottom: var(--wp--preset--spacing--5);
}

/* While the audio player bar (72px, fixed to the bottom) is showing, leave
   room for it so it doesn't cover the copyright line. */
body:has(.dt-player:not([hidden])) .dt-footer {
	padding-bottom: calc(var(--wp--preset--spacing--5) + 72px);
}

.dt-footer {
	/* Muted text that still passes AA on night (about 10:1). The global
	   ink-muted token is the dark-grey for light backgrounds, ~2.3:1 here. */
	--dt-footer-muted: #c9cfc9;
}

.dt-footer a {
	color: inherit;
}

.dt-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--6);
}

.dt-footer__about {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--4);
	align-items: flex-start;
}

.dt-footer__about img {
	display: block;
	height: 28px;
	width: auto;
}

.dt-footer__about p {
	margin: 0;
	max-width: 26em;
	color: var(--dt-footer-muted);
}

.dt-footer__nav .is-style-eyebrow,
.dt-footer__contact .is-style-eyebrow {
	color: var(--dt-footer-muted);
}

.dt-footer-nav.wp-block-navigation .wp-block-navigation__container {
	gap: var(--wp--preset--spacing--2);
}

.dt-footer-nav .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 15px;
	color: inherit;
}

.dt-footer__contact {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--2);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 15px;
	line-height: 22px;
}

.dt-footer__legal {
	margin-top: var(--wp--preset--spacing--6);
	padding-top: var(--wp--preset--spacing--5);
	border-top: 1px solid var(--wp--preset--color--hairline);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 13px;
	color: var(--dt-footer-muted);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--2) var(--wp--preset--spacing--6);
}

/* The publisher's details (The Edit Partnership). */
.dt-footer__publisher {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--2);
}

.dt-footer__publisher p {
	margin: 0;
}

/* Small print, so "E: enquiries@theeditpartnership.com" fits on one line
   in this narrow column. The address can still break if the column gets
   narrower still, instead of running out of it. */
.dt-footer__publisher p:not(.is-style-eyebrow) {
	font-size: 13px;
	line-height: 20px;
}

.dt-footer__publisher a[href^="mailto:"] {
	overflow-wrap: anywhere;
}

.dt-footer__publisher-intro {
	color: var(--dt-footer-muted);
}

.dt-footer__publisher a {
	color: inherit;
}

@media (max-width: 1023px) {
	.dt-footer__grid {
		grid-template-columns: 1fr;
		gap: var(--wp--preset--spacing--6);
	}
}

/* =Text links (icon + underline, not a pill button)
-------------------------------------------------------------- */
.dt-link {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--2);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--claret);
	text-decoration: none;
	/* Underline drawn as a background (not a border) so it can re-draw on hover. */
	background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1.5px;
	padding-bottom: 3px;
}

.dt-link svg {
	width: 16px;
	height: 16px;
}

.dt-link:hover {
	color: var(--wp--preset--color--claret-deep);
}

/* =List rows (Latest talks)
-------------------------------------------------------------- */
.dt-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1.5px solid var(--wp--preset--color--ink);
}

/* Post Template's flow layout puts a block-gap margin above every <li> after
   the first, but the row's divider sits inside the <li>, so that gap landed
   above the divider's padding only — rows had more space above than below.
   The row owns its own padding, so the <li>s shouldn't add any. */
.dt-list > li {
	margin-block: 0;
}

.dt-row__main .is-style-eyebrow {
	margin-top: 0;
}

/* =Reading Room article cards
-------------------------------------------------------------- */
.dt-article-grid {
	border-top: 1.5px solid var(--wp--preset--color--ink);
}

.dt-article-grid > li {
	padding: var(--wp--preset--spacing--6) 0;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
}

/* =Theme chips (Reading Room) — core Terms Query over dt_theme
-------------------------------------------------------------- */
/* Markup: nav.wp-block-terms-query.dt-chip-row > ul.wp-block-term-template >
   li > div.wp-block-term-name.dt-chip > a. */
.wp-block-terms-query.dt-chip-row {
	/* The block itself isn't marked alignwide in the page content, so
	   is-layout-constrained's own (zero-specificity :where()) rule caps it
	   at the 720px contentSize — narrower than the article grid above it,
	   which is alignwide at the 1152px wideSize. Matching that here is what
	   lines the chip row's left edge up with the grid's. */
	max-width: var(--wp--style--global--wide-size);
	width: 100%;
	margin-top: var(--wp--preset--spacing--6);
}

.dt-chip-row .wp-block-term-template {
	display: flex;
	/* There are more theme terms than the mockup had room to show wrapped
	   across two lines, so keep everything on one line. overflow-x/nowrap
	   stay on as a fallback for whenever more themes get added than even the
	   tightened chip sizing below can fit — but at today's term count they
	   should never actually need to engage. */
	flex-wrap: nowrap;
	overflow-x: auto;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dt-chip-row .wp-block-term-template > li {
	/* Keep every pill at its natural width in the scrolling row rather than
	   letting flex shrink them to fit. */
	flex: none;
	margin: 0;
}

.dt-chip {
	margin: 0;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	box-sizing: border-box;
	/* Smaller than the mockup's 18px/14px — with 7 live theme terms (vs. the
	   mockup's 4), the mockup's own sizing doesn't fit one line at the
	   1152px wideSize even with the row above widened to match; this is the
	   largest size that does. */
	padding: 10px 14px;
	border-radius: 999px;
	border: 1.5px solid var(--wp--preset--color--border-strong);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 13px;
	/* Without this, a long label (e.g. "Early Christian Spirituality") wraps
	   to two lines inside its own pill, making it taller than the other
	   chips in the same row instead of the row just wrapping around it. */
	white-space: nowrap;
}

.dt-chip a {
	color: inherit;
	text-decoration: none;
}

.dt-chip:hover {
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--claret);
}

/* =Quote citations
-------------------------------------------------------------- */
/* No browser-default blockquote indent: quotes sit flush with the text column. */
.wp-block-quote {
	margin-left: 0;
	margin-right: 0;
	padding-left: 0;
	padding-right: 0;
}

.wp-block-quote cite {
	display: block;
	margin-top: var(--wp--preset--spacing--2);
	font-style: normal;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.25em;
	text-transform: uppercase;
}

/* =Metanoia arched picture: gold frame
-------------------------------------------------------------- */
/* The arch image on the Metanoia (vespers) bands, on the Metanoia Retreats
   page and the homepage. The border follows the arch's rounded top. */
.is-style-vespers .wp-block-image.is-style-arch img {
	box-sizing: border-box;
	border: 4px solid var(--wp--preset--color--gilt);
}

/* =Course video still (Image block; the client swaps in the real still)
-------------------------------------------------------------- */
/* The columns block stretches both columns to equal height by default, but
   that only matches the two boxes — it doesn't centre the text column's
   own (shorter) content within that taller box, leaving it stuck to the
   top with a lot of empty space beneath it next to the video. Selecting by
   structure (the column just before the one holding the still) rather
   than needing a class in the page content, same reasoning as the rail fix. */
.wp-block-column:has(+ .wp-block-column .dt-course-still) {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* The Metanoia photo is a plain Image block using the Arch block style
   (theme.json styles.blocks.core/image.variations.arch), and the Metanoia
   logo a plain Image block. Images given an aspect ratio in the editor need an
   explicit width, or until they load (they're lazy) the figure collapses to
   ~30px and then jumps open — layout shift. */
.wp-block-image img[style*="aspect-ratio"] {
	width: 100%;
}

/* =Metanoia retreat list (row cards, not plain bullets)
-------------------------------------------------------------- */
.dt-retreat-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1.5px solid var(--wp--preset--color--ink);
}

.dt-retreat-list li {
	display: grid;
	gap: var(--wp--preset--spacing--1);
	padding: var(--wp--preset--spacing--5) 0;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
}

.dt-retreat-list__format {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--claret);
}

.dt-retreat-list__title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 20px;
	font-weight: 600;
}

.dt-retreat-list__desc {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 15px;
	color: var(--wp--preset--color--ink-muted);
}

.dt-retreat-list a.dt-link {
	justify-self: start;
	margin-top: var(--wp--preset--spacing--1);
}

/* =Metanoia features list
-------------------------------------------------------------- */
.dt-features {
	list-style: none;
	margin: 0 0 var(--wp--preset--spacing--6);
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--4);
}

.dt-features li {
	border-top: 1.5px solid var(--wp--preset--color--gilt);
	padding-top: var(--wp--preset--spacing--3);
	font-size: 20px;
	line-height: 26px;
	font-weight: 600;
}

@media (max-width: 1023px) {
	.dt-features {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* =Newsletter signup form
-------------------------------------------------------------- */
/* The newsletter block's children are direct children of a "constrained"
   layout group with no alignwide wrapper, so is-layout-constrained's own
   rule caps each one independently at the 720px contentSize (unlike other
   home sections, which nest their content in an alignwide inner block at
   the 1152px wideSize) — this widens the section to match. */
.wp-block-group.is-layout-constrained:has(> .dt-signup) > * {
	max-width: var(--wp--style--global--wide-size);
}

/* The intro paragraph keeps its own narrower (34em) max-width for
   readability, but is-layout-constrained also centers it (margin-inline:
   auto) independently of that max-width, which — now that the heading and
   form above/below it are 1152px wide instead of 720px — visibly offsets
   its left edge from theirs. Pin its left edge to the same 1152px column
   instead of centering it on its own. The !important is necessary here:
   WordPress marks that :where()-wrapped margin-inline:auto declaration
   itself !important, so it beats any normal-weight override regardless of
   selector specificity. */
.wp-block-group.is-layout-constrained:has(> .dt-signup) > p {
	/* max() stops it going negative (off-screen) when the viewport is narrower
	   than the wide size, i.e. on tablet and mobile. */
	margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
	margin-right: 0 !important;
}

.dt-signup {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
	gap: 12px;
	align-items: end;
}

/* The button inherits this section's body copy font-size (19px) since
   nothing else on .wp-element-button sets one, which pushes its line-height
   — and so its height — past the .dt-input fields' fixed 48px, making it
   look taller and top-misaligned next to them in the row. Pin both so its
   height resolves to exactly 48px like the inputs. */
.dt-signup .wp-element-button {
	font-size: 15px;
	line-height: 22px;
}

.dt-field {
	display: grid;
	gap: var(--wp--preset--spacing--2);
}

.dt-label {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	font-weight: 500;
}

.dt-input {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 16px;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--paper);
	border: 1.5px solid var(--wp--preset--color--border-strong);
	border-radius: 0;
	padding: var(--wp--preset--spacing--3) var(--wp--preset--spacing--4);
	min-height: 48px;
	box-sizing: border-box;
	width: 100%;
}

.dt-signup__small-print {
	margin: var(--wp--preset--spacing--4) 0 0;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 13px;
	line-height: 20px;
	color: #c9cfc9;
}

@media (max-width: 1023px) {
	.dt-signup {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
}

@media (max-width: 599px) {
	.dt-signup {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* =Talk meta (single-dt_talk.html), Block Bindings output
-------------------------------------------------------------- */
.dt-talk-meta {
	margin-top: var(--wp--preset--spacing--3);
	margin-bottom: var(--wp--preset--spacing--5);
	gap: var(--wp--preset--spacing--2);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	color: var(--wp--preset--color--ink-muted);
}

.dt-talk-meta p {
	margin: 0;
}

/* A binding with nothing to show (e.g. no dt_recorded_place set) renders
   its bound paragraph empty — drop it from the row entirely rather than
   leaving a gap. */
.dt-talk-meta p:empty {
	display: none;
}

/* Only separate an item from one that's actually visible before it, not
   from an :empty (and so hidden) one. */
.dt-talk-meta p:not(:empty) ~ p:not(:empty)::before {
	content: "· ";
}

/* Talk description and transcript: left-aligned with the title above and
   running the full width of the separator rules, not a narrow centred column. */
.dt-talk-content > * {
	max-width: 100%;
}

/* A talk's video fills the column at 16:9 from the start (not a thin strip
   until it loads), on the Metanoia navy behind the poster. */
.dt-talk-content .wp-block-video video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--vespers);
}

/* Play button over the poster, dead centre (over the Metanoia logo on the
   poster). Hidden by the script once playing. */
.dt-talk-content .wp-block-video {
	position: relative;
}

.dt-video-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: grid;
	place-items: center;
	width: 84px;
	height: 84px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--claret);
	color: var(--wp--preset--color--on-claret);
	cursor: pointer;
}

.dt-video-play[hidden] {
	display: none;
}

/* Embedded (Vimeo/YouTube) talk video: poster fills the responsive 16:9 box
   the embed block already makes, with the play button centred on it. */
.dt-embed-facade {
	position: absolute;
	inset: 0;
	background: var(--wp--preset--color--vespers);
}

.dt-embed-facade__poster {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dt-video-play svg {
	width: 34px;
	height: 34px;
	/* Optical centring: a play triangle sits left of its box centre. */
	margin-left: 3px;
}

.dt-video-play:hover,
.dt-video-play:focus-visible {
	background: var(--wp--preset--color--claret-deep);
}

.dt-video-play--metanoia {
	background: var(--wp--preset--color--gilt);
	color: var(--wp--preset--color--vespers);
}

.dt-video-play--metanoia:hover,
.dt-video-play--metanoia:focus-visible {
	background: color-mix(in srgb, var(--wp--preset--color--gilt) 85%, #fff);
}

/* =Play button (blocks/play-button) standalone use
-------------------------------------------------------------- */
/* On a talk page the audio play control is a labelled pill, so it isn't a
   lone circle that is easy to miss. */
.dt-play-button.dt-play {
	width: auto;
	height: auto;
	min-height: 48px;
	padding: 12px 24px 12px 18px;
	gap: 10px;
	grid-auto-flow: column;
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
	font-size: 16px;
	margin-bottom: var(--wp--preset--spacing--5);
}

/* The play control and "Play all from part 1" together under the title. */
.dt-play-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--3);
	margin-bottom: var(--wp--preset--spacing--5);
}

.dt-play-actions > .dt-play-button {
	margin-bottom: 0;
}

/* Same size and type as the play pill beside it. */
.dt-play-actions > .dt-series-nav__playall {
	min-height: 48px;
	padding: 12px 24px 12px 18px;
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
	font-size: 16px;
	line-height: 1;
}

.dt-play-actions > .dt-youtube-facade,
.dt-play-actions > .dt-youtube-embed {
	flex: 0 0 100%;
}

.dt-play-button.dt-play .dt-play-button__label {
	line-height: 1;
}

.dt-play-button.dt-youtube-facade {
	aspect-ratio: 16 / 9;
	max-width: 100%;
	margin-bottom: var(--wp--preset--spacing--5);
}

.dt-youtube-embed {
	margin-bottom: var(--wp--preset--spacing--5);
}


/* =Wide-text bands (About, Courses, Metanoia Retreats, Contact)
-------------------------------------------------------------- */
/* A "constrained"-layout group re-applies its OWN max-width (contentSize,
   720px) to each of its direct children individually — including plain,
   unclassed headings/paragraphs — regardless of how wide the group itself
   is (align:wide/full). Switching the group to "flow" layout instead
   avoids that, but also drops "has-global-padding"/the root-padding inset
   that "constrained" provides, letting text run flush to the viewport edge
   on a full-bleed band. Keeping "constrained" (so root padding still
   applies) and just raising these particular children's own max-width to
   wideSize is the fix that gets both right. Real specificity is needed:
   the same margin-inline:auto rule this overrides carries !important. */
.dt-band-wide > :not(.alignleft):not(.alignright):not(.alignfull) {
	max-width: var(--wp--style--global--wide-size) !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Page headers: the design keeps the title to 860px and the intro paragraph to
   720px (a comfortable line length), both left-aligned to the wide column (the max() offset is 0 in a wide band and centres the column in a full-width one),
   rather than letting them run the full 1152px. The selectors repeat the same
   :not() chain as the rule above purely to outrank its specificity. */
.dt-band-wide > h1:not(.alignleft):not(.alignright):not(.alignfull) {
	max-width: 860px !important;
	margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
}

.dt-band-wide > h1:not(.alignleft):not(.alignright):not(.alignfull) + p {
	max-width: 720px !important;
	margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
}

/* Section intros (a band's heading and the paragraph under it, e.g. "The
   spirituality Christ first practised himself" on Metanoia): 760px, left-aligned. */
.dt-band-wide > h2:not(.alignleft):not(.alignright):not(.alignfull),
.dt-band-wide > h2:not(.alignleft):not(.alignright):not(.alignfull) + p {
	max-width: 760px !important;
	margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
}

/* A wide pull-quote (Metanoia's testimonial) is centred at 852px, not full width. */
.wp-block-quote.alignwide {
	max-width: 852px;
	margin-left: auto;
	margin-right: auto;
}

/* =Breadcrumb (parent's omnicanvasfse/breadcrumbs block, Yoast trail)
-------------------------------------------------------------- */
/* The block's own spacing/alignment/colour are set per instance in the
   editor (its Margin and Text colour controls); only the type treatment lives
   here. Colour defaults to muted ink but yields to a colour set on the block
   (e.g. on-vespers over the dark Metanoia band). */
.wp-block-omnicanvasfse-breadcrumbs {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	color: var(--wp--preset--color--ink-muted);
}

.wp-block-omnicanvasfse-breadcrumbs #breadcrumbs {
	margin: 0;
}

.wp-block-omnicanvasfse-breadcrumbs a {
	color: inherit;
}

/* =Course episode list (Courses page)
-------------------------------------------------------------- */
.dt-episode-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1.5px solid var(--wp--preset--color--ink);
}

.dt-episode-list li {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--4);
	padding: var(--wp--preset--spacing--4) 0;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
}

.dt-episode-list li[aria-current="true"] {
	background: var(--wp--preset--color--claret-soft);
	padding-left: var(--wp--preset--spacing--4);
	padding-right: var(--wp--preset--spacing--4);
}

.dt-episode-list__number {
	flex: none;
	width: 1.5em;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 20px;
	font-weight: 600;
	color: var(--wp--preset--color--claret);
}

.dt-episode-list__main {
	flex: 1;
	min-width: 0;
}

.dt-episode-list__title {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
}

.dt-episode-list__meta {
	margin: 0;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	color: var(--wp--preset--color--ink-muted);
}

.dt-episode-list__icon {
	flex: none;
	width: 40px;
	height: 40px;
	display: inline-grid;
	place-items: center;
	border-radius: 999px;
	background: #8c2233;
	color: #fff;
}

.dt-episode-list__title a {
	color: inherit;
	text-decoration: none;
}

.dt-episode-list__title a:hover {
	text-decoration: underline;
}

/* The icon is a real control now (button or link): reset the button chrome. */
button.dt-episode-list__icon,
a.dt-episode-list__icon {
	padding: 0;
	border: 0;
	cursor: pointer;
	text-decoration: none;
}

.dt-episode-list__more {
	margin-top: var(--wp--preset--spacing--3);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	color: var(--wp--preset--color--ink-muted);
}

/* =single-dt_book.html: bound imprint/subtitle
-------------------------------------------------------------- */
/* Empty when the book has no dt_imprint / dt_subtitle set — drop the row
   rather than leave an empty eyebrow or blank line of body-size text. */
.dt-book-subtitle:empty,
.is-style-eyebrow:empty {
	display: none;
}

/* =Talk stats (archive-dt_talk.html)
-------------------------------------------------------------- */
.dt-talk-stats {
	margin-top: var(--wp--preset--spacing--3);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	font-weight: 600;
	color: var(--wp--preset--color--ink-muted);
}

/* =Hide a "related items" heading/query pairing entirely when the query
   turns up nothing (e.g. a talk/book with no theme in common with anything
   else yet) — otherwise it's a heading sitting over a blank gap.
-------------------------------------------------------------- */
/* The Query Loop renders no post-template wrapper at all (not even an
   empty one — just a whitespace text node) when there are zero results, so
   :empty can't detect it (a whitespace-only text node still counts as a
   child, which :empty treats as non-empty). Checking for the total absence
   of any <li> is what actually works regardless of that whitespace. */
.dt-hide-if-empty-query:not(:has(li)) {
	display: none;
}
/* Centred quote (home quote strip). A class, not the block's textAlign
   attribute, so the saved markup validates in the editor. */
.dt-quote-centered {
	text-align: center;
}

/* News page: the short quote under the "News" heading, set as a smaller
   serif line with the attribution under its right-hand end. */
.dt-news-quote {
	display: table;
	margin-top: var(--wp--preset--spacing--3);
	margin-bottom: var(--wp--preset--spacing--5);
}

/* Left-aligned under the heading like the page intros below, not centred by
   .dt-band-wide's rule for its other children. */
.dt-band-wide > .wp-block-quote.dt-news-quote:not(.alignleft):not(.alignright):not(.alignfull) {
	max-width: 720px !important;
	margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
}

.dt-news-quote p {
	margin: 0;
	font-size: 17px;
	line-height: 26px;
}

.dt-news-quote cite {
	margin-top: var(--wp--preset--spacing--1);
	text-align: right;
}


/* =Cards and covers — core Featured Image / Post Title / bound Paragraph
-------------------------------------------------------------- */
/* Book cards are a Group (article.dt-card.dt-book-card) holding a Featured
   Image, a body Group (imprint Paragraph bound to dt_imprint + Post Title) and
   the book-buttons block. Empty covers get their placeholder from
   inc/featured-image-placeholder.php. */
.dt-card {
	background: transparent;
}

.dt-card__body {
	padding: var(--wp--preset--spacing--4) 0 0;
}

.dt-card__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 22px;
	line-height: 28px;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

.dt-card__title a {
	/* Core's Post Title makes its link inline-block; the old card's was plain
	   inline. Same text position either way — this keeps the link's box as it was. */
	display: inline;
	color: inherit;
	text-decoration: none;
}

.dt-card__title a:hover {
	color: var(--wp--preset--color--claret);
}

/* Series cards (Talks archive): a bordered panel whose whole surface is the
   heading's link (stretched ::after), so the card reads and behaves as one target. */
.dt-series-card {
	position: relative;
	height: 100%;
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: 8px;
}

.dt-series-card > :first-child {
	margin-top: 0;
}

.dt-series-card > :last-child {
	margin-bottom: 0;
}

.dt-series-card h3 a {
	color: inherit;
	text-decoration: none;
}

.dt-series-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.dt-series-card h3 a:hover {
	color: var(--wp--preset--color--claret);
}

.dt-book-card {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--4);
}

.dt-book-card__cover {
	background: #fff;
	position: relative;
	overflow: hidden;
	box-shadow: var(--wp--preset--shadow--cover);
}

/* Covers keep the image's own proportions (portrait mockups, landscape
   banners) rather than being squared off. Only the no-cover placeholder
   needs a fixed shape to hold the layout. */
.dt-book-card__cover:has(.dt-book-card__cover-placeholder) {
	aspect-ratio: 1 / 1;
}

/* A transparent cover mockup (tagged in inc/featured-image-placeholder.php)
   carries its own shadow and should sit directly on the page, not on a white
   square. */
.dt-book-card__cover.dt-cover--transparent {
	background: transparent;
	box-shadow: none;
}

/* Cover mockups come in slightly different proportions (2:3 and about
   0.71:1), which pushed some titles in a grid row lower than the rest. In
   the grid cards, every transparent mockup sits in the same 2:3 box, bottom
   aligned, so the books share a baseline and the titles line up. */
.dt-book-card .dt-book-card__cover.dt-cover--transparent {
	aspect-ratio: 2 / 3;
}

.dt-book-card .dt-book-card__cover.dt-cover--transparent > a,
.dt-book-card .dt-book-card__cover.dt-cover--transparent picture {
	display: block;
	height: 100%;
}

.dt-book-card .dt-book-card__cover.dt-cover--transparent img {
	height: 100%;
	object-fit: contain !important;
	object-position: center bottom;
}

/* The cover links to the book; the link has to fill the figure so the whole
   image is the click target. */
.dt-book-card__cover > a {
	display: block;
}

.dt-book-card__cover img,
.dt-book-card__cover.wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: fill !important;
}

.dt-book-card__cover-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: flex-end;
	padding: var(--wp--preset--spacing--5);
	box-sizing: border-box;
	background: var(--wp--preset--color--sage);
	color: var(--wp--preset--color--ink);
}

.dt-book-card__cover-placeholder--vespers {
	background: var(--wp--preset--color--vespers);
	color: var(--wp--preset--color--gilt);
}

.dt-book-card__cover-placeholder--night {
	background: var(--wp--preset--color--night);
	color: var(--wp--preset--color--on-night);
}

.dt-book-card__cover-placeholder--claret {
	background: var(--wp--preset--color--claret);
	color: var(--wp--preset--color--on-claret);
}

.dt-book-card__cover-placeholder span {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 22px;
	line-height: 26px;
	font-weight: 600;
}

.dt-book-card .dt-card__title {
	margin: 0;
}

/* Free e-book / Buy print buttons: compact inside a book card, normal size
   everywhere else (the Publications "Start here" feature, a single book page) —
   as in the design. Scoped to the card rather than to "any page that has a
   card", which is what the old card stylesheet's load condition amounted to. */
/* Outside a card (feature, single book page): a normal-sized row, 12px apart. */
.dt-book-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.dt-book-card .dt-book-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--2);
}

.dt-book-card .dt-book-card__button .wp-element-button {
	min-height: 44px;
	padding: 10px 18px;
	font-size: 14px;
}

/* "Coming soon" isn't a link, so it doesn't react to hover. The Site
   Editor's custom CSS hides every book button except "Buy the book"
   (.dt-book-card__button:not(.dt-buy)), so this needs to out-rank that. */
.dt-book-card__actions .dt-book-card__button.dt-book-card__button--soon {
	display: block;
}

.dt-book-card__button--soon .wp-element-button {
	cursor: default;
	pointer-events: none;
}

/* The Group's flow layout would add block-gap margins between the card's
   children; the flex gap above does that job. */
.dt-book-card > * {
	margin-block: 0;
}

/* Core wraps the image in a <figure>. */
.dt-book-card__cover,
.dt-post-cover {
	margin: 0;
}

/* Post cover: Featured Image + placeholder (no-image fallback). */
/* Wide article hero: a 4:3 box at 1152px would be ~860px tall. */
.alignwide .dt-post-cover-placeholder {
	aspect-ratio: 21 / 9;
}

.dt-post-cover-placeholder {
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--wp--preset--color--border-strong);
	border-radius: 2px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-muted);
	text-align: center;
	padding: var(--wp--preset--spacing--4);
}

.dt-post-cover img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 2px;
}

/* Book card imprint line. Before the card was rebuilt from core blocks this
   was a bare <p> on which the eyebrow class never actually applied, so it
   rendered as plain body text (serif, body size, ink colour, a paragraph's
   1em gap below) — the rule below reproduces that exactly so nothing on the
   page changed. DELETE this rule to switch it to the site's normal eyebrow
   style (small spaced capitals in claret), which is how eyebrows look
   everywhere else and what the design shows. */
.dt-book-card .dt-card__body .is-style-eyebrow {
	font: inherit;
	color: inherit;
	letter-spacing: normal;
	text-transform: none;
	margin: 0 0 1em;
}

/* =Buy the book menu (book-buttons): a disclosure menu, grouped by region,
   for books sold in several places. One shop shows as a plain button. */
.dt-buy {
	position: relative;
}

.dt-buy__details summary {
	list-style: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
}

.dt-buy__details summary::-webkit-details-marker {
	display: none;
}

.dt-buy__details summary::after {
	content: "";
	/* A small chevron: a rotated square's visible "V" sits about 0.35 of its side
	   below the box centre, so the translate lifts it back onto the text's centre. */
	flex: none;
	width: 0.32em;
	height: 0.32em;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-0.09em) rotate(45deg);
	transition: transform 0.15s ease;
}

.dt-buy__details[open] summary::after {
	transform: translateY(0.09em) rotate(-135deg);
}

.dt-buy__panel {
	position: absolute;
	z-index: 20;
	top: calc(100% + 8px);
	left: 0;
	min-width: 240px;
	max-height: 320px;
	overflow-y: auto;
	padding: var(--wp--preset--spacing--3) var(--wp--preset--spacing--4);
	background: #fff;
	color: var(--wp--preset--color--ink);
	border-radius: 20px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
	text-align: left;
}

.dt-buy__region {
	margin: var(--wp--preset--spacing--3) 0 4px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-muted);
}

.dt-buy__region:first-child {
	margin-top: 0;
}

.dt-buy__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dt-buy__list a {
	display: block;
	padding: 6px 0;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 16px;
	color: inherit;
	text-decoration: none;
}

.dt-buy__list a:hover,
.dt-buy__list a:focus-visible {
	color: var(--wp--preset--color--claret);
	text-decoration: underline;
}

/* Theme pages: hide a section (articles / talks / books) that has nothing in it,
   and say so if the whole page is empty. */
.dt-theme-section:not(:has(.wp-block-post-template)) {
	display: none;
}

.dt-theme-empty {
	display: none;
	padding-top: var(--wp--preset--spacing--6);
	padding-bottom: var(--wp--preset--spacing--8);
	color: var(--wp--preset--color--ink-muted);
}

main:not(:has(.dt-theme-section .wp-block-post-template)) .dt-theme-empty {
	display: block;
}

/* Header dropdowns (Courses, Metanoia Retreats) */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation__submenu-container {
	min-width: 260px;
	width: max-content;
	max-width: min(360px, 90vw);
	padding: 10px;
	background: #fff;
	border: 0;
	border-radius: 16px;
	box-shadow: 0 12px 32px rgba(20, 20, 30, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: block;
	padding: 12px 20px !important; /* beats the .dt-nav item padding reset */
	border-bottom: 0 !important; /* no underline: the pill is the hover state */
	border-radius: 10px;
	font-size: 16px;
	line-height: 1.35;
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible {
	background: var(--wp--preset--color--claret-soft);
	color: var(--wp--preset--color--claret);
}

.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--claret);
}

/* Full-screen mobile menu: the dropdown pill styling above doesn't apply;
   keep the sub-items compact. */
.dt-mobile-nav.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation__submenu-container {
	position: static;
	display: none;
	min-width: 0;
	width: auto;
	max-width: none;
	padding: 0 0 0 var(--wp--preset--spacing--4);
	background: none;
	box-shadow: none;
	opacity: 1;
	visibility: visible;
	overflow: visible;
	height: auto;
}

/* The chevron follows our tap state only; core also flips it on hover. */
.dt-mobile-nav.wp-block-navigation .wp-block-navigation__submenu-icon svg {
	transform: none !important;
	transition: transform 0.15s ease;
}

.dt-mobile-nav.wp-block-navigation .is-dt-open > .wp-block-navigation__submenu-icon svg,
.dt-mobile-nav.wp-block-navigation .is-dt-open > .wp-block-navigation-item__content .wp-block-navigation__submenu-icon svg {
	transform: rotate(180deg) !important;
}

/* Sub-items sit inline under their parent and open on tap, not hover. */
.dt-mobile-nav.wp-block-navigation .wp-block-navigation-submenu.is-dt-open > .wp-block-navigation__submenu-container {
	display: block;
}

.dt-mobile-nav.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 6px 0 !important;
	color: var(--wp--preset--color--on-night) !important; /* core sets dark text on submenus */
	font-size: 18px;
	white-space: normal;
	border-radius: 0;
}

.dt-mobile-nav.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.dt-mobile-nav.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible {
	background: none;
	color: var(--wp--preset--color--on-night) !important;
	opacity: 0.75;
}

/* Parent label and its open list stack vertically, left-aligned. */
.dt-mobile-nav.wp-block-navigation .wp-block-navigation-submenu {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
}

.dt-mobile-nav.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation__submenu-container {
	flex-basis: 100%;
}

/* A plain intro block sitting directly above a coloured band needs breathing
   room; the page-header groups only carry top padding. */
:is(main, .entry-content) > :not([class*="is-style-"]):has(+ :is(.is-style-sage, .is-style-night, .is-style-vespers)) {
	padding-bottom: var(--wp--preset--spacing--7);
}

/* =Carousel (Group block style): reviews / testimonials that scroll sideways. */
.wp-block-group.is-style-carousel {
	display: flex;
	flex-wrap: nowrap;
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 0;
	padding-bottom: var(--wp--preset--spacing--3);
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.wp-block-group.is-style-carousel > * {
	flex: 0 0 min(calc((100% - 48px) / 3), 85%);
	min-width: min(280px, 85%);
	margin: 0;
	scroll-snap-align: start;
}

.wp-block-group.is-style-carousel > .wp-block-quote {
	box-sizing: border-box;
	padding: 20px 24px;
	background: #fff;
	border: 0;
	border-radius: 16px;
	font-size: 16px;
	line-height: 1.55;
}

.wp-block-group.is-style-carousel > .wp-block-quote p {
	margin: 0 0 0.6em;
}

.wp-block-group.is-style-carousel > .wp-block-quote p:first-child {
	font-weight: 600;
}

.dt-carousel-controls {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	margin-top: var(--wp--preset--spacing--3);
}

.dt-carousel-controls__btn {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 1.5px solid var(--wp--preset--color--ink);
	background: transparent;
	color: var(--wp--preset--color--ink);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.dt-carousel-controls__btn:hover:not(:disabled),
.dt-carousel-controls__btn:focus-visible {
	background: var(--wp--preset--color--ink);
	color: #fff;
}

.dt-carousel-controls__btn:disabled {
	opacity: 0.3;
	cursor: default;
}

/* =Motion: subtle, one speed and one easing throughout.
   Everything here is switched off for "reduce motion".
-------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	/* Scroll reveal (classes added by assets/js/reveal.js to off-screen items only). */
	.dt-reveal {
		opacity: 0;
		transform: translateY(14px);
		transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) var(--dt-reveal-delay, 0ms),
			transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) var(--dt-reveal-delay, 0ms);
	}

	.dt-reveal.dt-reveal--in {
		opacity: 1;
		transform: none;
	}

	/* Link underline re-draws left to right on hover. */
	.dt-link:hover {
		animation: dt-underline-draw 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
	}

	@keyframes dt-underline-draw {
		from { background-size: 0 1.5px; }
		to { background-size: 100% 1.5px; }
	}
}

/* Card hover: a small lift. Pointer devices only, so it never sticks on touch. */
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
	.dt-series-card,
	.dt-book-card,
	.dt-card {
		transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.25s ease;
	}

	.dt-series-card:hover,
	.dt-book-card:hover,
	.dt-card:hover {
		transform: translateY(-3px);
	}

	.dt-series-card:hover {
		box-shadow: 0 10px 24px rgba(20, 20, 30, 0.08);
	}
}

/* An open "Buy the book" menu must paint above the section below it. A card's
   hover lift (transform) otherwise makes it its own stacking layer, which the
   next section then covers. Raise the card while the menu is open, and drop
   the lift so the menu doesn't move under the pointer. */
.dt-book-card:has(.dt-buy__details[open]),
.wp-block-post-template > li:has(.dt-buy__details[open]),
.wp-block-column:has(.dt-buy__details[open]) {
	position: relative;
	z-index: 30;
	transform: none !important;
}

/* Play icon inside labelled buttons ("Play all", including the link version
   used when there's nothing to queue yet; the talk play pill): the
   triangle is small at 18px and sat below the label's optical centre, so size
   it up a little and lift it 1px to line up with the text. */
body .wp-element-button[data-dt-playall] svg,
body .dt-series-header__playall .wp-element-button svg,
body .dt-play-button.dt-play .dt-play__icon svg {
	width: 20px;
	height: 20px;
	position: relative;
	top: -1px;
}

/* =Custom scrollbar
-------------------------------------------------------------- */
/* Slim rounded thumb on a linen track, claret on hover — the same treatment
   sproule-erce.com gives its scrollable areas (8px, pill thumb), recoloured
   from the theme palette. Chromium/Safari use the ::-webkit-scrollbar pseudo
   elements; Chrome 121+ ignores those whenever scrollbar-color is set, so the
   standard properties are fenced off for browsers without the pseudos
   (Firefox). */
html {
	--dt-scrollbar-size: 10px;
}

::-webkit-scrollbar {
	width: var(--dt-scrollbar-size);
	height: var(--dt-scrollbar-size);
}

::-webkit-scrollbar-track {
	background: var(--wp--preset--color--linen);
}

::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, var(--wp--preset--color--claret), var(--wp--preset--color--claret-deep));
	border: 2px solid var(--wp--preset--color--linen);
	border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--wp--preset--color--claret-deep);
}

@supports not selector(::-webkit-scrollbar) {
	html {
		scrollbar-width: thin;
		scrollbar-color: var(--wp--preset--color--claret) var(--wp--preset--color--linen);
	}
}

/* ==========================================================================
   Contact Form 7 — layout for the contact page form (replaces the old
   blocks/contact-form styles, which only loaded with that block).
   ========================================================================== */
.wpcf7-form {
	display: grid;
	gap: var(--wp--preset--spacing--5);
	max-width: 46em;
}

.wpcf7-form .dt-field {
	display: grid;
	gap: var(--wp--preset--spacing--2);
}

.wpcf7-form .wpcf7-form-control-wrap {
	display: block;
}

.wpcf7-form .dt-textarea {
	resize: vertical;
}

.wpcf7-form .dt-contact-form__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--4);
}

@media (max-width: 599px) {
	.wpcf7-form .dt-contact-form__row {
		grid-template-columns: minmax(0, 1fr);
	}
}

.wpcf7-form .dt-contact-form__checkbox {
	margin: 0;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
}

.wpcf7-form .wpcf7-list-item {
	margin: 0;
}

.wpcf7-form .wpcf7-list-item label {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--2);
}

.wpcf7-form .wpcf7-not-valid-tip {
	margin-top: var(--wp--preset--spacing--1);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 13px;
	color: var(--wp--preset--color--danger);
}

.wpcf7 form .wpcf7-response-output {
	margin: 0;
	padding: var(--wp--preset--spacing--4);
	border-radius: 2px;
	border-width: 0;
	font-family: var(--wp--preset--font-family--sans);
}

.wpcf7 form.sent .wpcf7-response-output {
	background: color-mix(in srgb, var(--wp--preset--color--success) 12%, transparent);
	color: var(--wp--preset--color--success);
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
	background: color-mix(in srgb, var(--wp--preset--color--danger) 12%, transparent);
	color: var(--wp--preset--color--danger);
}

/* Checkbox */
.wpcf7-form .wpcf7-list-item label {
	cursor: pointer;
}

.wpcf7-form input[type="checkbox"] {
	appearance: none;
	flex: none;
	width: 22px;
	height: 22px;
	margin: 0;
	background: var(--wp--preset--color--paper);
	border: 1.5px solid var(--wp--preset--color--border-strong);
	border-radius: 0;
	cursor: pointer;
	display: inline-grid;
	place-content: center;
}

.wpcf7-form input[type="checkbox"]::before {
	content: "";
	width: 12px;
	height: 7px;
	border-left: 2px solid var(--wp--preset--color--paper);
	border-bottom: 2px solid var(--wp--preset--color--paper);
	transform: translateY(-1px) rotate(-45deg) scale(0);
	transition: transform 120ms ease-out;
}

.wpcf7-form input[type="checkbox"]:checked {
	background: var(--wp--preset--color--claret);
	border-color: var(--wp--preset--color--claret);
}

.wpcf7-form input[type="checkbox"]:checked::before {
	transform: translateY(-1px) rotate(-45deg) scale(1);
}

.wpcf7-form input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--wp--preset--color--claret);
	outline-offset: 2px;
}

/* Sending indicator: spinner beside the button while the form submits */
.wpcf7-form .wp-block-button {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--3);
}

.wpcf7-form .wpcf7-spinner {
	flex: none;
	width: 22px;
	height: 22px;
	margin: 0;
	background: none;
	border: 2.5px solid var(--wp--preset--color--border-strong);
	border-top-color: var(--wp--preset--color--claret);
	border-radius: 50%;
	visibility: hidden;
}

.wpcf7-form .wpcf7-spinner::before {
	display: none;
}

.wpcf7-form.submitting .wpcf7-spinner {
	visibility: visible;
	animation: dt-spin 0.8s linear infinite;
}

.wpcf7-form.submitting .wpcf7-submit {
	opacity: 0.6;
	cursor: progress;
}

@keyframes dt-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.wpcf7-form.submitting .wpcf7-spinner {
		animation-duration: 2s;
	}
}

/* Book covers are square everywhere. The mockups are centred on white, so
   "contain" keeps the whole book visible rather than cropping top and bottom. */
.single-dt_book .dt-post-cover {
	aspect-ratio: 1 / 1;
	background: #fff;
}

.single-dt_book .dt-post-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.dt-signup-lead {
	max-width: 34em;
}

/* =Section heading spacing
-------------------------------------------------------------- */
/* Headings in the page content were saved with an inline bottom margin of
   spacing--large (48px), which left a wide gap between a heading and the intro
   or list under it (Latest talks, the written course, David's books...).
   Inline styles can't be outranked without !important; tighten it to 16px. */
.entry-content .wp-block-heading[style*="spacing--large"] {
	margin-bottom: var(--wp--preset--spacing--4) !important;
}


/* =Comments ("Leave a Reply") — core Comments block in single.html and
   single-dt_talk.html, switched on/off in Settings > Discussion (inc/comments.php)
-------------------------------------------------------------- */
.dt-comments {
	margin-top: var(--wp--preset--spacing--7);
	padding-top: var(--wp--preset--spacing--6);
	border-top: 1.5px solid var(--wp--preset--color--ink);
}

/* The block still prints its wrapper when comments are closed and there are
   none, which would leave a lone rule under the article. */
.dt-comments:not(:has(.wp-block-comment-template, .comment-respond)) {
	display: none;
}

.dt-comment-list,
.dt-comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dt-comment-list > li,
.dt-comment-list .children > li {
	padding: var(--wp--preset--spacing--5) 0;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
}

/* Replies sit indented under their parent; the last reply's rule would
   double up with the parent's, so it goes. */
.dt-comment-list .children {
	margin-top: var(--wp--preset--spacing--5);
	padding-left: var(--wp--preset--spacing--6);
	border-top: 1px solid var(--wp--preset--color--hairline);
}

.dt-comment-list .children > li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

@media (max-width: 599px) {
	.dt-comment-list .children {
		padding-left: var(--wp--preset--spacing--4);
	}
}

.dt-comment {
	gap: var(--wp--preset--spacing--4);
}

.dt-comment .wp-block-avatar {
	flex: none;
	margin: 0;
}

.dt-comment__body {
	flex: 1;
	min-width: 0;
}

.dt-comment__meta {
	gap: 4px var(--wp--preset--spacing--3);
	align-items: baseline;
	font-family: var(--wp--preset--font-family--sans);
}

.dt-comment__meta .wp-block-comment-author-name {
	font-size: 15px;
	font-weight: 600;
}

.dt-comment__meta .wp-block-comment-date,
.dt-comment__meta .wp-block-comment-edit-link {
	font-size: 13px;
	color: var(--wp--preset--color--ink-muted);
}

.dt-comment__meta a {
	color: inherit;
	text-decoration: none;
}

.dt-comment .wp-block-comment-content {
	margin-top: var(--wp--preset--spacing--2);
}

.dt-comment .wp-block-comment-content > :first-child {
	margin-top: 0;
}

.dt-comment .wp-block-comment-reply-link {
	margin-top: var(--wp--preset--spacing--2);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	font-weight: 500;
}

.dt-comment .wp-block-comment-reply-link a {
	color: var(--wp--preset--color--claret);
}

/* Reply form (core comment_form() markup) */
.dt-comments .comment-respond {
	margin-top: var(--wp--preset--spacing--6);
}

.dt-comments .wp-block-comment-template + .comment-respond,
.dt-comments .wp-block-comments-pagination + .comment-respond {
	margin-top: var(--wp--preset--spacing--7);
}

.dt-comments .comment-reply-title {
	margin: 0 0 var(--wp--preset--spacing--3);
}

.dt-comments .comment-reply-title small {
	margin-left: var(--wp--preset--spacing--3);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	font-weight: 500;
}

.dt-comments .comment-form {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--4);
	max-width: 46em;
}

.dt-comments .comment-form > * {
	grid-column: 1 / -1;
	margin: 0;
}

/* Name, email and website share a row on wider screens, as on the old site. */
.dt-comments .comment-form > .comment-form-author,
.dt-comments .comment-form > .comment-form-email,
.dt-comments .comment-form > .comment-form-url {
	grid-column: auto;
}

@media (max-width: 781px) {
	.dt-comments .comment-form > .comment-form-author,
	.dt-comments .comment-form > .comment-form-email,
	.dt-comments .comment-form > .comment-form-url {
		grid-column: 1 / -1;
	}
}

.dt-comments .comment-notes,
.dt-comments .logged-in-as {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	color: var(--wp--preset--color--ink-muted);
}

.dt-comments .comment-form label {
	display: block;
	margin-bottom: var(--wp--preset--spacing--2);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	font-weight: 500;
}

.dt-comments .comment-form .required {
	color: var(--wp--preset--color--claret);
}

.dt-comments .comment-form input[type="text"],
.dt-comments .comment-form input[type="email"],
.dt-comments .comment-form input[type="url"],
.dt-comments .comment-form textarea:not([aria-hidden="true"]) {
	display: block;
	width: 100%;
	box-sizing: border-box;
	min-height: 48px;
	padding: var(--wp--preset--spacing--3) var(--wp--preset--spacing--4);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 16px;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--paper);
	border: 1.5px solid var(--wp--preset--color--border-strong);
	border-radius: 0;
}

.dt-comments .comment-form textarea:not([aria-hidden="true"]) {
	min-height: 160px;
	resize: vertical;
}

.dt-comments .comment-form input:focus-visible,
.dt-comments .comment-form textarea:focus-visible {
	outline: 2px solid var(--wp--preset--color--claret);
	outline-offset: 2px;
}

/* "Save my name, email..." — same square checkbox as the contact form */
.dt-comments .comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--2);
}

.dt-comments .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 400;
	cursor: pointer;
}

.dt-comments .comment-form-cookies-consent input[type="checkbox"] {
	appearance: none;
	flex: none;
	width: 22px;
	height: 22px;
	margin: 0;
	background: var(--wp--preset--color--paper);
	border: 1.5px solid var(--wp--preset--color--border-strong);
	border-radius: 0;
	cursor: pointer;
	display: inline-grid;
	place-content: center;
}

.dt-comments .comment-form-cookies-consent input[type="checkbox"]::before {
	content: "";
	width: 12px;
	height: 7px;
	border-left: 2px solid var(--wp--preset--color--paper);
	border-bottom: 2px solid var(--wp--preset--color--paper);
	transform: translateY(-1px) rotate(-45deg) scale(0);
	transition: transform 120ms ease-out;
}

.dt-comments .comment-form-cookies-consent input[type="checkbox"]:checked {
	background: var(--wp--preset--color--claret);
	border-color: var(--wp--preset--color--claret);
}

.dt-comments .comment-form-cookies-consent input[type="checkbox"]:checked::before {
	transform: translateY(-1px) rotate(-45deg) scale(1);
}

.dt-comments .comment-form-cookies-consent input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--wp--preset--color--claret);
	outline-offset: 2px;
}

/* The submit is an <input class="wp-element-button"> with no .wp-block-button
   wrapper, so the claret fill from the Buttons section above doesn't reach it. */
.dt-comments .form-submit .wp-element-button {
	background-color: var(--wp--preset--color--claret);
	color: var(--wp--preset--color--on-claret);
	border: 0;
	font-size: 15px;
	line-height: 22px;
	cursor: pointer;
}

.dt-comments .form-submit .wp-element-button:hover {
	background-color: var(--wp--preset--color--claret-deep);
}
