/*
 * Site styles for the Digital Octopii child theme: motion and hover (CSS only, no JavaScript, the way Hawker does
 * it), calls to action in the logo's orange, and fixes to Blocksy, Ninja Forms and imported content.
 *
 * - Hover: cards that link somewhere lift slightly and are clickable as a whole; buttons and links ease their colours.
 * - Scroll-driven: cards rise in as they enter the screen, and the certification process draws its line and fills
 *   each step's dot as the reader scrolls past it. Tied to scroll position, not time, so it moves at the reader's pace.
 *
 * Content is never hidden waiting for a script. Browsers without scroll timelines skip the @supports block and get
 * the still page; readers who ask for reduced motion get it too. Classes (do-card, do-step...) come from wp/blocks.php.
 */

/* Hanken Grotesk, served from the site rather than Google's servers, which would see every visitor's IP address. One
   variable file per character set covers every weight from 400 to 700 (fonts/, SIL Open Font Licence). */
@font-face {
	font-family: "Hanken Grotesk";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(fonts/hanken-grotesk-latin-ext.woff2) format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Hanken Grotesk";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(fonts/hanken-grotesk-latin.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	/* The logo's orange, for calls to action. The exact logo colour (#DA6F33) can't carry white text (3.3:1), so
	   buttons use a slightly deeper shade that passes WCAG AA (4.85:1); the logo colour itself is for focus rings. */
	--do-accent: #b85421;
	--do-accent-hover: #9e4519;
	--do-logo-orange: #da6f33;
	--do-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--do-lift: 0 16px 32px -20px rgb(23 40 42 / 0.35);
}

/* Safari colours its toolbar and the pull-down area with the body's background (laid over html's, so html alone
   doesn't change it). The body is white to match the header, and the grey Blocksy gives the body moves to the content
   under it. Not in the editor, whose canvas keeps Blocksy's grey. */
body:not(.editor-styles-wrapper) {
	background-color: var(--theme-palette-color-8);
}

body:not(.editor-styles-wrapper) #main {
	background-color: var(--theme-palette-color-7);
}

/* ---------------------------------------------------------------------------------------------------------------
 * Calls to action: everything that leads to getting in touch or buying is orange; every other button stays slate. The
 * shop grid's "Add to cart" buttons are the exception, outlined further down (#40), so orange still marks one action.
 * ------------------------------------------------------------------------------------------------------------- */
.do-cta .wp-block-button__link,
[data-id="button"] .ct-button,
.nf-form-cont input[type="submit"],
.nf-form-cont input[type="button"].submit,
.single_add_to_cart_button,
.checkout-button,
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button {
	background-color: var(--do-accent) !important;
	border-color: var(--do-accent) !important;
	color: #fff !important;
}
/* Hover styles only on devices that hover (#51): a phone applies :hover on tap and keeps it, so a tapped button or card
   stayed darker or lifted until the next tap elsewhere. Presses (:active) and keyboard focus stay for everyone. */
@media (hover: hover) and (pointer: fine) {
	.do-cta .wp-block-button__link:hover,
	[data-id="button"] .ct-button:hover,
	.nf-form-cont input[type="submit"]:hover,
	.single_add_to_cart_button:hover,
	.checkout-button:hover,
	.wc-block-components-checkout-place-order-button:hover,
	.wc-block-cart__submit-button:hover {
		background-color: var(--do-accent-hover) !important;
		border-color: var(--do-accent-hover) !important;
	}
}
/* One focus ring everywhere: orange, 2px (#50). Blocksy's own slate ring won on links and buttons, and was barely
   visible (about 1.3:1) on the dark contact band; Ninja Forms' submit and the FAQ questions had none. The logo's orange
   measures 4.6:1 on the dark band and 3.3:1 on white, above the 3:1 a focus ring needs. !important because Blocksy and
   Ninja Forms each set the outline with their own, more specific rules. */
:is(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--do-logo-orange) !important;
	outline-offset: 2px;
}
/* Blocksy scrolls smoothly on every page; not for anyone who has asked for less motion. */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* Every button that goes somewhere ends in an arrow, drawn in the text colour, which nudges forward on hover. Form
   buttons are inputs and can't hold one. */
a.wp-block-button__link::after,
[data-id="button"] a.ct-button::after {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-left: 0.45em;
	vertical-align: -0.15em;
	background-color: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: translate 0.2s var(--do-ease);
}
/* Blocksy lays the header button out as a flex row with its own gap, which already spaces the arrow. */
[data-id="button"] a.ct-button {
	justify-content: center;
	gap: 0.3em;
}
[data-id="button"] a.ct-button::after {
	margin-left: 0;
}
@media (hover: hover) and (pointer: fine) {
	a.wp-block-button__link:hover::after,
	[data-id="button"] a.ct-button:hover::after {
		translate: 3px 0;
	}
}
@media (prefers-reduced-motion: reduce) {
	a.wp-block-button__link::after,
	[data-id="button"] a.ct-button::after {
		transition: none;
		translate: none;
	}
}

/* Ninja Forms' "fields marked * are required" note and asterisk are too pale to read (WCAG AA). */
.nf-form-fields-required {
	color: var(--theme-palette-color-3);
}
.ninja-forms-req-symbol {
	color: var(--do-accent);
}

/* ---------------------------------------------------------------------------------------------------------------
 * Hover and focus
 * ------------------------------------------------------------------------------------------------------------- */
.do-card,
.do-step-card {
	transition: translate 0.25s var(--do-ease), box-shadow 0.25s var(--do-ease);
}

/* A card whose heading is a link is clickable anywhere: the link's ::before covers the card. Its ::after is an arrow,
   as on the buttons, so the card reads as a link at rest too: on a phone there is no hover to show it (Harry). */
.do-card:has(h3 a),
.do-step-card:has(h3 a) {
	position: relative;
}
.do-card h3 a,
.do-step-card h3 a {
	text-decoration: none;
	transition: color 0.2s var(--do-ease);
}
.do-card h3 a::before,
.do-step-card h3 a::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.do-card h3 a::after,
.do-step-card h3 a::after {
	content: "";
	display: inline-block;
	width: 0.8em;
	height: 0.8em;
	margin-left: 0.35em;
	vertical-align: -0.05em;
	background-color: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: translate 0.2s var(--do-ease);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.do-card:has(h3 a):hover h3 a::after,
	.do-step-card:has(h3 a):hover h3 a::after {
		translate: 3px 0;
	}
}
@media (hover: hover) and (pointer: fine) {
	.do-card:has(h3 a):hover,
	.do-step-card:has(h3 a):hover {
		translate: 0 -3px;
		box-shadow: var(--do-lift);
	}
	.do-card:has(h3 a):hover h3 a,
	.do-step-card:has(h3 a):hover h3 a {
		text-decoration: underline;
		text-underline-offset: 0.2em;
	}
}
/* The whole card is the link, so the ring goes round the card rather than the heading's words. */
.do-card:has(h3 a:focus-visible),
.do-step-card:has(h3 a:focus-visible) {
	outline: 2px solid var(--do-logo-orange);
	outline-offset: 3px;
}
.do-card h3 a:focus-visible,
.do-step-card h3 a:focus-visible {
	outline: none !important;
}

.wp-element-button,
.ct-button,
.nf-form-cont input[type="submit"] {
	transition: background-color 0.2s var(--do-ease), color 0.2s var(--do-ease), translate 0.2s var(--do-ease), scale 0.16s var(--do-ease);
}
@media (hover: hover) and (pointer: fine) {
	.wp-element-button:hover,
	.ct-button:hover {
		translate: 0 -1px;
	}
}
/* A press gives way slightly, so the click is felt; phones, which have no hover, get it too. */
.wp-element-button:active,
.ct-button:active,
.nf-form-cont input[type="submit"]:active {
	scale: 0.97;
}

.entry-content a:not(.wp-element-button) {
	text-underline-offset: 0.18em;
	transition: text-decoration-color 0.2s var(--do-ease), color 0.2s var(--do-ease);
}

/* The process: each step's dot is drawn and numbered here, so an editor can add, move or delete steps and the
   numbers follow. Exact circles with the number dead centre on both axes. */
.do-ladder {
	counter-reset: do-step;
}
.do-step {
	counter-increment: do-step;
}
.do-step-rail::before {
	content: counter(do-step);
	background-color: var(--theme-palette-color-1);
	color: #fff;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	flex: 0 0 auto;
	border-radius: 999px;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.do-step-line {
	position: relative;
}
/* The line joins one dot to the next, so the last step has none. */
.do-step:last-child .do-step-line {
	display: none;
}

/* Numbered cards (the "Numbered cards" style on a numbered list): each item a white card with its number in a slate
   circle sitting on the card's top edge, half above it, like the process's dots. The list's own counter numbers them,
   so the numbers follow any edit. Each item is a bold title, a line break, then a line of text. */
ol.is-style-numbered {
	list-style: none;
	counter-reset: do-numbered;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 40px 16px;
	/* Room for the first row's circles, clear of the heading above. */
	margin: 0;
	margin-block-start: 56px !important;
	padding: 0;
}
ol.is-style-numbered > li {
	counter-increment: do-numbered;
	position: relative;
	margin: 0;
	padding: 40px 24px 24px;
	border-radius: 16px;
	background-color: var(--theme-palette-color-8);
}
ol.is-style-numbered > li::before {
	content: counter(do-numbered);
	position: absolute;
	top: -22px;
	left: 24px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background-color: var(--theme-palette-color-1);
	color: #fff;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	/* A ring in the section's background colour, so the circle reads as cut out of the card's edge. */
	box-shadow: 0 0 0 4px var(--theme-palette-color-7);
}
/* The title: the item's opening bold text, set as a card heading. */
ol.is-style-numbered > li > strong:first-child {
	display: block;
	margin-bottom: 8px;
	color: var(--theme-headings-color);
	font-size: 21px;
	line-height: 1.3;
}
/* The title is already on its own line, so the break editors type after it would leave a blank line. */
ol.is-style-numbered > li > strong:first-child + br {
	display: none;
}
/* On a mist panel the card stays white and the ring matches the panel. */
.has-palette-color-5-background-color ol.is-style-numbered > li::before {
	box-shadow: 0 0 0 4px var(--theme-palette-color-5);
}

/* ---------------------------------------------------------------------------------------------------------------
 * Scroll-driven motion
 * ------------------------------------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		/* Cards rise in as they enter, a beat apart within a row. Only on the pages people browse (home, services,
		   standards, about): on articles and archives, which people come to read, the cards are simply there. */
		body:not(.single-post, .archive, .blog) :is(.do-card, ol.is-style-numbered > li) {
			animation: do-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 70%;
		}
		body:not(.single-post, .archive, .blog) :is(.do-card, ol.is-style-numbered > li):nth-child(3n + 2) {
			animation-range: entry 8% entry 78%;
		}
		body:not(.single-post, .archive, .blog) :is(.do-card, ol.is-style-numbered > li):nth-child(3n + 3) {
			animation-range: entry 16% entry 86%;
		}
		@keyframes do-rise {
			from {
				opacity: 0;
				translate: 0 28px;
			}
		}

		/* Each section's label and heading rise in as the section arrives, the label a beat first, just ahead of its
		   cards: in the section itself or in one of its columns. Not the hero (the first section, already on screen),
		   and browse pages only. */
		body:not(.single-post, .archive, .blog) .entry-content > .wp-block-group:not(:first-child) > :is(h2.wp-block-heading, p[style*="text-transform:uppercase"]),
		body:not(.single-post, .archive, .blog) .entry-content > .wp-block-group:not(:first-child) > .wp-block-columns > .wp-block-column > :is(h2.wp-block-heading, p[style*="text-transform:uppercase"]) {
			animation: do-lift linear both;
			animation-timeline: view();
			animation-range: entry 10% entry 60%;
		}
		body:not(.single-post, .archive, .blog) .entry-content > .wp-block-group:not(:first-child) p[style*="text-transform:uppercase"] {
			animation-range: entry 0% entry 50%;
		}

		/* Light parallax: a photo drifts a little within its frame as the page scrolls past it, slightly enlarged so
		   its edges never show. Browse pages only; photos people read, in articles, stay still. */
		/* Photos sit beside text, in a column; logos and icons elsewhere stay still. Until the real photos arrive,
		   the striped placeholders drift the same way, so the effect can be judged now. */
		body:not(.single-post, .archive, .blog) .entry-content .wp-block-column > .wp-block-image {
			overflow: clip;
		}
		body:not(.single-post, .archive, .blog) .entry-content .wp-block-column > .wp-block-image img {
			animation: do-parallax linear both;
			animation-timeline: view();
			animation-range: cover 0% cover 100%;
		}
		body:not(.single-post, .archive, .blog) .entry-content .wp-block-column > .wp-block-group[style*="repeating-linear-gradient"] {
			animation: do-parallax-stripes linear both;
			animation-timeline: view();
			animation-range: cover 0% cover 100%;
		}
		@keyframes do-parallax-stripes {
			from {
				background-position: 0 -40px;
			}
			to {
				background-position: 0 40px;
			}
		}
		@keyframes do-parallax {
			from {
				scale: 1.08;
				translate: 0 -3%;
			}
			to {
				scale: 1.08;
				translate: 0 3%;
			}
		}
		@keyframes do-lift {
			from {
				opacity: 0;
				translate: 0 16px;
			}
		}

		/* The process: the line is a light track that fills in slate as the reader scrolls past it, each dot fills
		   as its step reaches the middle of the screen, and each card eases in from the right. */
		/* A visible track (the panel is mist, so the mist colour would vanish), filled as the reader scrolls. */
		.do-step-line {
			border-left-color: rgb(41 62 64 / 0.2) !important;
		}
		/* Every segment and dot measures against the same line across the middle of the screen (view() inset by 50%
		   top and bottom): a segment fills as it passes that line, so the line draws continuously from dot to dot. */
		.do-step-line::after {
			content: "";
			position: absolute;
			top: 0;
			bottom: 0;
			left: -2px;
			width: 2px;
			background: var(--theme-palette-color-1);
			transform-origin: top;
			animation: do-draw linear both;
			animation-timeline: view(block 50% 50%);
			animation-range: cover 0% cover 100%;
		}
		@keyframes do-draw {
			from {
				scale: 1 0;
			}
		}
		.do-step-rail::before {
			animation: do-dot linear both;
			animation-timeline: view(block 50% 50%);
			animation-range: cover 0% cover 100%;
		}
		@keyframes do-dot {
			from {
				background-color: #fff;
				color: var(--theme-palette-color-1);
				box-shadow: inset 0 0 0 2px var(--theme-palette-color-1);
			}
		}
		/* The cards move but never dim. They used to start at 35% opacity, which left every step below the screen, and
		   the one just arriving, at a contrast of 2:1: the line and the dots already show which step the reader is at. */
		.do-step-card {
			animation: do-slide linear both;
			animation-timeline: view();
			animation-range: entry 10% cover 35%;
		}
		@keyframes do-slide {
			from {
				translate: 16px 0;
			}
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.do-card,
	.do-step-card,
	.wp-element-button,
	.ct-button {
		transition: none;
	}
	.do-card:hover,
	.do-step-card:hover,
	.wp-element-button:hover,
	.ct-button:hover {
		translate: none;
	}
	.wp-element-button:active,
	.ct-button:active,
	.nf-form-cont input[type="submit"]:active {
		scale: none;
	}
}

/* ---------------------------------------------------------------------------------------------------------------
 * The process ladder: cards alternate either side of a centre line. On a phone the empty side goes and every card
 * sits to the right of the line.
 * ------------------------------------------------------------------------------------------------------------- */
/* Equal sides, so the line sits in the centre whatever each card holds. The empty side gets the card's padding,
   because flex shares out space after padding. */
.do-step > .do-step-card,
.do-step > .do-step-empty {
	flex: 1 1 0;
	min-width: 0;
}
.do-step > .do-step-empty {
	padding-inline: 24px;
}
/* Rows touch (Blocksy gives every block a bottom margin), so the line runs unbroken from dot to dot; the card's own
   bottom margin spaces the steps. */
.do-step {
	margin-block: 0 !important;
}
/* Odd steps sit left of the line, even steps right of it. */
.do-step:nth-child(odd of .do-step) > .do-step-card {
	text-align: right;
}
.do-step:nth-child(even of .do-step) {
	flex-direction: row-reverse;
}
/* On a phone the ladder is a drain pipe: each card has its number on its top corner, odd steps on the left and even
   steps on the right. From the number the pipe runs behind the card, juts out of the far side in line with the
   number, and drops down the side into the next card's number. The cards sit 24px in from each side to leave room
   for the pipe, and the step's ::after draws it: along the top, then down the side, into the next step. */
@media (max-width: 700px) {
	.do-step {
		position: relative;
		gap: 0 !important;
		--do-pipe: var(--theme-palette-color-1);
	}
	.do-step-empty,
	.do-step-line {
		display: none !important;
	}
	.do-step > .do-step-card {
		position: relative;
		z-index: 1;
		margin-inline: 24px !important;
		padding-inline: 30px !important;
		text-align: left !important;
	}
	.do-step > .do-step-rail {
		position: absolute;
		z-index: 2;
		top: 8px;
		left: 0;
		width: 36px;
		padding: 0;
	}
	.do-step:nth-child(even of .do-step) > .do-step-rail {
		left: auto;
		right: 0;
	}
	.do-step-rail::before {
		width: 36px;
		height: 36px;
		font-size: 15px;
	}
	.do-step:not(:last-child)::after {
		content: "";
		position: absolute;
		z-index: 0;
		top: 25px;
		bottom: -26px;
		left: 17px;
		right: 17px;
		border: 0 solid var(--do-pipe);
		border-top-width: 2px;
	}
	.do-step:nth-child(odd of .do-step)::after {
		border-right-width: 2px;
		border-top-right-radius: 10px;
	}
	.do-step:nth-child(even of .do-step)::after {
		border-left-width: 2px;
		border-top-left-radius: 10px;
	}
}
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		/* Left-hand cards ease in from the left, towards the line. */
		.do-step:nth-child(odd of .do-step) > .do-step-card {
			animation-name: do-slide-left;
		}
		@keyframes do-slide-left {
			from {
				translate: -16px 0;
			}
		}
		@media (max-width: 700px) {
			/* Cards ease in from the side their number is on, and each run of pipe fills as it crosses the middle
			   of the screen, like the line on a wider screen. */
			.do-step:nth-child(odd of .do-step) > .do-step-card {
				animation-name: do-slide;
			}
			.do-step:nth-child(even of .do-step) > .do-step-card {
				animation-name: do-slide-left;
			}
			.do-step::after {
				animation: do-pipe linear both;
				animation-timeline: view(block 50% 50%);
				animation-range: cover 0% cover 100%;
			}
			@keyframes do-pipe {
				from {
					border-color: rgb(41 62 64 / 0.2);
				}
			}
		}
	}
}

/* ---------------------------------------------------------------------------------------------------------------
 * Ladder on a phone: more room for the text.
 * ------------------------------------------------------------------------------------------------------------- */
@media (max-width: 700px) {
	.do-step > .do-step-card {
		padding-block: 16px !important;
	}
}

/* ---------------------------------------------------------------------------------------------------------------
 * Phone menu (Blocksy's off-canvas panel): a solid light panel so the page doesn't show through, readable links in
 * ink, and sub-items smaller than their parents.
 * ------------------------------------------------------------------------------------------------------------- */
/* Blocksy runs the menu as a full-screen modal, so the whole layer is the panel. */
#offcanvas,
#offcanvas .ct-panel-inner {
	background-color: var(--theme-palette-color-8) !important;
}
#offcanvas .mobile-menu a,
#offcanvas .mobile-menu .ct-toggle-dropdown-mobile {
	color: var(--theme-palette-color-4) !important;
}
#offcanvas .mobile-menu .current-menu-item > .ct-menu-link,
#offcanvas .mobile-menu .current-menu-ancestor > .ct-menu-link,
#offcanvas .mobile-menu .dropdown-active > .ct-menu-link {
	color: var(--theme-palette-color-1) !important;
}
#offcanvas .mobile-menu .sub-menu a {
	font-size: 16px !important;
	font-weight: 400 !important;
}

/* ---------------------------------------------------------------------------------------------------------------
 * Desktop dropdowns: light, rounded and wide enough for the longest item, right under the menu.
 * ------------------------------------------------------------------------------------------------------------- */
[data-id="menu"] {
	--dropdown-background-color: var(--theme-palette-color-8);
	--dropdown-width: 280px;
	--dropdown-top-offset: -28px;
	--dropdown-divider: none;
}
/* An invisible strip above the panel keeps it open while the pointer travels down from the item. */
[data-id="menu"] .sub-menu::before {
	content: "";
	position: absolute;
	inset: -24px 0 auto 0;
	height: 24px;
}
[data-id="menu"] .sub-menu {
	border-radius: 16px;
	padding-block: 8px;
	box-shadow: 0 18px 40px -24px rgb(23 40 42 / 0.45), 0 0 0 1px rgb(23 40 42 / 0.06);
	overflow: hidden;
}
[data-id="menu"] .sub-menu .ct-menu-link {
	color: var(--theme-palette-color-4) !important;
	font-size: 15px;
	font-weight: 500;
}
[data-id="menu"] .sub-menu .ct-menu-link:hover {
	background-color: var(--theme-palette-color-6);
}

/* ---------------------------------------------------------------------------------------------------------------
 * Forms (Ninja Forms): fields at least 44px tall, so they're comfortable to tap.
 * ------------------------------------------------------------------------------------------------------------- */
.nf-form-cont input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
.nf-form-cont select {
	min-height: 44px;
	padding: 10px 12px;
	border-radius: 8px;
}

/* ---------------------------------------------------------------------------------------------------------------
 * Accordions (questions and "in depth"): a rule between items and a chevron that turns, not the browser's triangle.
 * ------------------------------------------------------------------------------------------------------------- */
/* The row's height is the question's own padding, not the row's, so the whole row opens it: with the padding on the
   row, a tap in its top or bottom 14px did nothing (#51). The answer keeps the same space below. */
.wp-block-details {
	border-bottom: 1px solid rgb(41 62 64 / 0.15);
	padding-block: 0;
	margin-block: 0 !important;
}
.wp-block-details[open] {
	padding-bottom: 14px;
}
.wp-block-details:first-of-type {
	border-top: 1px solid rgb(41 62 64 / 0.15);
}
.wp-block-details > summary {
	list-style: none;
	cursor: pointer;
	padding-block: 14px;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	font-weight: 600;
	color: var(--theme-palette-color-4);
}
.wp-block-details > summary::-webkit-details-marker {
	display: none;
}
.wp-block-details > summary::after {
	content: "";
	flex: 0 0 10px;
	height: 10px;
	margin-top: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	rotate: 45deg;
	transition: rotate 0.2s var(--do-ease);
}
.wp-block-details[open] > summary::after {
	rotate: -135deg;
	margin-top: 10px;
}
@media (hover: hover) and (pointer: fine) {
	.wp-block-details > summary:hover {
		color: var(--theme-palette-color-1);
	}
}
/* The answer opens and closes rather than jumping. Browsers that can't animate to auto height (Safari, Firefox today)
   open it instantly as before; readers who ask for reduced motion get a short fade instead. */
:root {
	interpolate-size: allow-keywords;
}
@media (prefers-reduced-motion: no-preference) {
	.wp-block-details::details-content {
		block-size: 0;
		overflow: clip;
		transition: block-size 0.25s var(--do-ease), content-visibility 0.25s allow-discrete;
	}
	.wp-block-details[open]::details-content {
		block-size: auto;
	}
}
@media (prefers-reduced-motion: reduce) {
	.wp-block-details::details-content {
		opacity: 0;
		transition: opacity 0.15s linear, content-visibility 0.15s allow-discrete;
	}
	.wp-block-details[open]::details-content {
		opacity: 1;
	}
}

/* A form's thank-you message settles in where the form was, instead of replacing it in one frame. */
.nf-response-msg {
	transition: opacity 0.3s var(--do-ease), translate 0.3s var(--do-ease);
	@starting-style {
		opacity: 0;
		translate: 0 8px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.nf-response-msg {
		translate: none;
		transition: opacity 0.3s linear;
	}
}

/* ---------------------------------------------------------------------------------------------------------------
 * Archive cards match the site's cards.
 * ------------------------------------------------------------------------------------------------------------- */
/* Archive cards stay text only: articles have featured images for search results and sharing, and cropped into a
   card they read as noise. */
.entries[data-cards] .entry-card > .ct-media-container {
	display: none;
}
.entries[data-cards] .entry-card {
	--theme-border-radius: 16px;
	border-radius: 16px;
	overflow: hidden;
}

/* ---------------------------------------------------------------------------------------------------------------
 * Certification logos: each on a white tile, so the logos' own white boxes and frames stop clashing with the panel.
 * ------------------------------------------------------------------------------------------------------------- */
.do-cert-logos img {
	background: #fff;
	padding: 8px 14px;
	border-radius: 10px;
	box-sizing: content-box;
}

/* ---------------------------------------------------------------------------------------------------------------
 * Footer on a phone: everything left-aligned (the starter centred some columns and not others).
 * ------------------------------------------------------------------------------------------------------------- */
@media (max-width: 999px) {
	.ct-footer [data-column] {
		justify-content: flex-start !important;
		align-items: flex-start !important;
		text-align: left !important;
	}
}

/* ---------------------------------------------------------------------------------------------------------------
 * Imported images: capped in height, so logos and diagrams from the old site keep their proportions instead of
 * filling the column.
 * ------------------------------------------------------------------------------------------------------------- */
.entry-content .wp-block-image img {
	max-height: 360px;
	width: auto;
	object-fit: contain;
}

/* A two-column section that should put its form first on a phone (download pages). */
@media (max-width: 781px) {
	.do-form-first {
		flex-direction: column-reverse;
	}
}

/* The phone menu's close button is white by default, which vanishes on the light panel. */
#offcanvas .ct-toggle-close {
	--theme-icon-color: var(--theme-palette-color-4) !important;
	--theme-icon-hover-color: var(--theme-palette-color-1) !important;
	color: var(--theme-palette-color-4) !important;
}

/* Menus feel quicker: Blocksy fades a dropdown in over 0.2s and then each item over another 0.5s. One short fade,
   with the items there from the start, reads as instant. */
[class*="animated-submenu"] > .sub-menu {
	transition-duration: 0.12s !important;
}
[data-dropdown*="type-3"] [class*="animated-submenu"] > .sub-menu > li {
	transition: none !important;
	opacity: 1 !important;
	transform: none !important;
}

/* Phone menu chevrons in ink, like their links. */
#offcanvas .ct-toggle-dropdown-mobile {
	--theme-icon-color: var(--theme-palette-color-4) !important;
	color: var(--theme-palette-color-4) !important;
}

/* The form's submit button, the main call to action, at least 48px tall. */
.nf-form-cont input[type="submit"] {
	min-height: 48px;
	padding-inline: 28px !important;
	border-radius: 8px;
	cursor: pointer;
}

/* Certification logos: tiles of one size, the logo fitted inside. */
.do-cert-logos img {
	width: 140px !important;
	height: 48px !important;
	object-fit: contain;
}

/* Case-study client strip: people sit tight to their headshots. */
.do-client {
	margin-block: 8px 24px;
}
.do-person p {
	margin: 0;
	line-height: 1.4;
}
.do-person figure {
	margin: 0;
	flex: 0 0 auto;
}

/* ---------------------------------------------------------------------------------------------------------------
 * Infographics in articles (wp/blocks.php: do_formula, do_compare, do_stats).
 * ------------------------------------------------------------------------------------------------------------- */
.do-infographic {
	margin-block: 32px !important;
}
.do-infographic p {
	margin-block: 0;
}
.do-formula > .do-term {
	flex: 1 1 0;
	min-width: 0;
}
.do-term p + p {
	font-size: 15px;
	opacity: 0.85;
}
.do-op {
	align-self: center;
	font-size: 28px;
	font-weight: 700;
	color: var(--theme-palette-color-1);
}
.do-stat-number {
	font-size: clamp(36px, 6vw, 52px);
	font-weight: 700;
	line-height: 1;
	color: var(--theme-palette-color-1);
}
/* On a phone the formula reads top to bottom. */
@media (max-width: 600px) {
	.do-formula {
		flex-direction: column;
		flex-wrap: wrap !important;
	}
	.do-op {
		align-self: center;
		line-height: 1;
	}
}
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		/* The terms arrive in reading order as the strip enters the screen. */
		.do-formula > * {
			animation: do-rise linear both;
			animation-timeline: view();
			animation-range: entry 10% entry 80%;
		}
		.do-formula > :nth-child(3) { animation-range: entry 20% entry 90%; }
		.do-formula > :nth-child(5) { animation-range: entry 30% entry 100%; }
	}
}

/* Overviews: a numbered list of steps that jump to their sections, numbered here so items can be added or moved. */
.do-infographic {
	counter-reset: do-overview;
}
.do-overview-item {
	counter-increment: do-overview;
}
.do-overview-item::before {
	content: counter(do-overview);
	flex: 0 0 28px;
	height: 28px;
	border-radius: 999px;
	background: var(--theme-palette-color-1);
	color: #fff;
	display: grid;
	place-items: center;
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	margin: 0 !important;
}
.do-overview-item a {
	text-decoration: none;
	font-weight: 600;
	color: var(--theme-palette-color-4);
}
.do-overview-item a:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
/* Breathing room under an infographic's label. */
.do-infographic > p:first-child {
	margin-bottom: 14px;
}

/* Post meta without dividers: a gap between author, date and category instead. */
.hero-section .entry-meta {
	column-gap: 14px !important;
	row-gap: 6px;
}

/* Tables (the Lite vs Pro comparisons): ruled rows and a slate header. */
.entry-content .wp-block-table table {
	border-collapse: collapse;
	width: 100%;
	font-size: 15px;
}
.entry-content .wp-block-table th {
	background: var(--theme-palette-color-1);
	color: #fff;
	text-align: left;
	font-weight: 600;
}
.entry-content .wp-block-table th,
.entry-content .wp-block-table td {
	padding: 10px 14px;
	border: 0;
	border-bottom: 1px solid rgb(41 62 64 / 0.15);
}
.entry-content .wp-block-table thead th:first-child {
	border-top-left-radius: 10px;
}
.entry-content .wp-block-table thead th:last-child {
	border-top-right-radius: 10px;
}
/* On a phone a three-column comparison would squeeze its first column to a word a line; the table keeps a readable
   width and scrolls sideways inside its own box instead (#39). */
@media (max-width: 600px) {
	.entry-content .wp-block-table {
		overflow-x: auto;
	}
	.entry-content .wp-block-table table {
		min-width: 520px;
	}
}

/* "Cookie settings" in the footer (footer.php) reopens the consent banner; a button, since it acts on the page, set to
   look like the footer links beside it. */
.do-link-button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	cursor: pointer;
}

/* ---------------------------------------------------------------------------------------------------------------
 * Logo carousel (organisations strip): each row scrolls sideways for ever, the second the other way, and stops on
 * hover, while a logo has focus, or when the "Pause moving logos" switch is on. functions.php repeats each row's
 * logos so the loop is seamless. With reduced motion the logos stand still, wrapped onto as many lines as they need.
 * ------------------------------------------------------------------------------------------------------------- */
.do-marquee {
	position: relative;
	display: grid;
	/* The rows hold every logo several times over; without this they would widen the strip to fit them all. */
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}
/* WordPress's own spacing between blocks would double the gap. */
.do-marquee > * {
	margin-block: 0 !important;
}
.do-marquee-row {
	display: flex;
	flex-wrap: nowrap !important;
	gap: 0 !important;
	overflow: clip;
	/* The ends fade out rather than cut off. */
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.do-marquee-set {
	display: flex;
	flex: none;
	align-items: center;
	gap: 56px;
	padding-right: 56px;
	animation: do-marquee var(--do-marquee-duration, 32s) linear infinite;
}
.do-marquee-row:nth-of-type(even) .do-marquee-set {
	animation-direction: reverse;
}
@keyframes do-marquee {
	to {
		translate: -100% 0;
	}
}
.do-marquee-row:hover .do-marquee-set,
.do-marquee-row:focus-within .do-marquee-set,
.do-marquee:has(.do-marquee-pause:checked) .do-marquee-set {
	animation-play-state: paused;
}

/* Logos: one height, greyed until hovered, and each one a link when the image is given one. */
.do-marquee-set :is(.wp-block-image, p) {
	flex: none;
	margin: 0 !important;
}
.do-marquee-set .wp-block-image img {
	height: 44px;
	width: auto;
	filter: grayscale(1);
	opacity: 0.7;
	transition: filter 0.2s var(--do-ease), opacity 0.2s var(--do-ease);
}
.do-marquee-set .wp-block-image :is(a:hover, a:focus-visible) img {
	filter: none;
	opacity: 1;
}
.do-logo-placeholder {
	padding: 12px 24px;
	border-radius: 12px;
	background-color: var(--theme-palette-color-6);
	white-space: nowrap;
}

/* The pause switch: a small round icon button under the rows, its name kept for screen readers and as a tooltip. The
   checkbox itself is visually hidden but focusable. A text label read as clutter beside the logos; the switch has to
   stay while the logos move, since anything moving on its own for over 5 seconds needs a way to stop it (WCAG 2.2.2).
   32px, above the 24px minimum target. */
.do-marquee-pause {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.do-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
.do-marquee-pause-label {
	order: 1;
	justify-self: end;
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border: 1px solid var(--theme-palette-color-5);
	border-radius: 50%;
	color: var(--theme-palette-color-3);
	cursor: pointer;
	transition: border-color 150ms ease-out, color 150ms ease-out;
}
@media (hover: hover) {
	.do-marquee-pause-label:hover {
		border-color: var(--theme-palette-color-1);
		color: var(--theme-palette-color-1);
	}
}
.do-marquee-pause-label::before {
	content: "";
	width: 10px;
	height: 10px;
	/* Pause bars, or a play triangle once paused. */
	background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65%);
}
.do-marquee-pause:checked + .do-marquee-pause-label::before {
	background: currentColor;
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.do-marquee-pause:focus-visible + .do-marquee-pause-label {
	outline: 2px solid var(--do-logo-orange);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.do-marquee-set {
		animation: none;
	}
	.do-marquee-set[aria-hidden] {
		display: none;
	}
	/* Standing still, the two rows become one even set (#41): each row wrapping on its own gave uneven rows, and on a
	   phone a column of one logo a line about 980px tall. The rows and sets step aside (display: contents) so every
	   logo is an item of the strip itself. */
	.do-marquee {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		gap: 16px 24px;
	}
	/* Equal widths, and a short last row centred under the others, whatever the number of logos. */
	.do-marquee-set :is(.wp-block-image, p) {
		flex: 0 0 190px;
		display: flex;
		justify-content: center;
	}
	/* Two classes: WordPress's own layout CSS makes the rows flex with a selector as strong as one. */
	.do-marquee .do-marquee-row,
	.do-marquee .do-marquee-set {
		display: contents;
	}
	/* The repeats that make the loop seamless stay hidden. */
	.do-marquee .do-marquee-set[aria-hidden] {
		display: none;
	}
	.do-marquee-pause,
	.do-marquee-pause-label {
		display: none;
	}
}
/* On a phone, standing still: three to a row, the logos and placeholders smaller to fit. */
@media (prefers-reduced-motion: reduce) and (max-width: 689px) {
	.do-marquee {
		gap: 12px;
	}
	.do-marquee-set :is(.wp-block-image, p) {
		flex-basis: calc((100% - 24px) / 3);
	}
	.do-marquee-set .wp-block-image img {
		height: 32px;
		max-width: 100%;
		object-fit: contain;
	}
	.do-logo-placeholder {
		padding: 8px 6px;
		font-size: 12px;
		white-space: normal;
		text-align: center;
		width: 100%;
	}
}

/* In the editor there's one set of logos per row: they wrap, so every logo can be seen and edited. */
.editor-styles-wrapper .do-marquee-row {
	flex-wrap: wrap !important;
	gap: 16px !important;
	overflow: visible;
	mask-image: none;
}

/* A product's category and tags. Blocksy fades them to 70%, which leaves 13px text below the 4.5:1 contrast small text
   needs; the uppercase label already sets them apart, so they keep the text colour at full strength. Blocksy's shop
   styles load after these with a three-class selector, hence the four classes here. */
.single-product .product .entry-summary-items .product_meta > span > * {
	opacity: 1;
}

/* The series side menu (#37, functions.php): the series an article or download belongs to, this page marked. On a
   phone and narrow screens it is a closed Details panel under the intro; from 1360px, beside the 750px text column on
   articles, sticking as the reader scrolls. On download pages it sits under the form, in that column. */
.do-series {
	border: 1px solid var(--theme-palette-color-6, #dfe8e6);
	border-radius: 12px;
	background: #fff;
	/* The heading carries the box's padding, so the whole closed box is the button (#51). */
	padding: 0 20px;
	font-size: 15px;
	line-height: 1.45;
}
.do-series[open] {
	padding-bottom: 16px;
}
.do-series > summary {
	padding-block: 16px;
	margin-inline: -20px;
	padding-inline: 20px;
	cursor: pointer;
	font-weight: 600;
	color: #293e40;
	list-style-position: inside;
	border-radius: 4px;
}
.do-series > summary:focus-visible {
	outline-offset: 4px;
}
.do-series .do-series-list,
.do-series .sub-menu {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	counter-reset: do-series;
}
.do-series .sub-menu {
	margin: 4px 0 4px 26px;
}
.do-series .do-series-list > li {
	counter-increment: do-series;
	margin: 0;
}
/* The number in its own column, so a title that wraps lines up with itself rather than under the number. */
.do-series .do-series-list > li > a {
	display: grid;
	grid-template-columns: 1.6em 1fr;
}
.do-series .do-series-list > li > a::before {
	content: counter(do-series);
	color: #5a6f71;
	font-variant-numeric: tabular-nums;
}
.do-series a {
	display: block;
	padding: 6px 0 6px 10px;
	border-left: 3px solid transparent;
	color: #293e40;
	text-decoration: none;
}
.do-series a:hover {
	text-decoration: underline;
}
/* This page: a slate bar and bold, and "You're here" for sighted readers (screen readers hear aria-current). */
.do-series .current-menu-item > a {
	border-left-color: #293e40;
	font-weight: 700;
}
.do-series .current-menu-item > a::after {
	/* The text after the slash is what screen readers get: nothing, since aria-current already says it. */
	content: "You're here" / "";
	grid-column: 2;
	display: block;
	font-size: 13px;
	font-weight: 400;
	color: #5a6f71;
}
.do-series-aside {
	max-width: 750px;
	margin: 0 auto 32px;
}
@media (min-width: 1360px) {
	.single-post .entry-content {
		position: relative;
	}
	.do-series-aside {
		position: absolute;
		top: 0;
		bottom: 0;
		left: calc(50% + 375px + 40px);
		width: min(280px, calc(50% - 375px - 72px));
		margin: 0;
	}
	/* Never taller than the window, so its last link can always be reached, on a 768px-high laptop too. */
	.do-series-aside .do-series {
		position: sticky;
		top: 120px;
		max-height: calc(100vh - 150px);
		overflow-y: auto;
	}
}

/* The shop grid's "Add to cart" buttons in a slate outline (#40). Sixteen solid orange buttons in a row stopped orange
   meaning "this is the action"; the solid orange stays on the product page's own Add to cart, where buying happens.
   They fill slate on hover and focus, like the site's other outline buttons. */
.woocommerce ul.products li.product .button {
	background: transparent;
	color: var(--theme-palette-color-1, #293e40);
	border: 1px solid var(--theme-palette-color-1, #293e40);
}
/* The shop's Add to cart adds without leaving the page, so on a phone a tapped button would stay filled. */
.woocommerce ul.products li.product .button:focus-visible {
	background: var(--theme-palette-color-1, #293e40);
	color: #fff;
}
@media (hover: hover) and (pointer: fine) {
	.woocommerce ul.products li.product .button:hover {
		background: var(--theme-palette-color-1, #293e40);
		color: #fff;
	}
}
@media (max-width: 689px) {
	/* Two to a row on a phone: a smaller title and a button that fits the narrower card. */
	.woocommerce ul.products li.product .woocommerce-loop-product__title {
		font-size: 15px;
	}
	.woocommerce ul.products li.product .button {
		padding-inline: 12px;
		font-size: 14px;
	}
}

/* An eyebrow (the small capitals above a heading) sits just above its heading, 12px, so the two read as one label and
   title; with WordPress's block gaps they were 66px apart (#42). */
.do-eyebrow {
	margin-bottom: 0 !important;
}
.do-eyebrow + .wp-block-heading {
	margin-top: 12px !important;
}

/* ---------------------------------------------------------------------------------------------------------------
 * On a phone (#51)
 * ------------------------------------------------------------------------------------------------------------- */
/* The header's icon buttons answer over 44px, the comfortable size for a thumb, without moving the icons: the menu
   button was 18px, the cart 15 to 28px, search 15px. An invisible ::before sets the area. The menu button moves 8px
   away from the cart so their areas don't overlap. */
.ct-header-trigger,
.ct-header-search,
[data-id="cart"] .ct-cart-item,
#offcanvas .ct-toggle-dropdown-mobile {
	position: relative;
}
.ct-header-trigger::before,
.ct-header-search::before,
[data-id="cart"] .ct-cart-item .ct-icon-container::before,
#offcanvas .ct-toggle-dropdown-mobile::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	translate: -50% -50%;
}
[data-id="cart"] .ct-cart-item .ct-icon-container {
	position: relative;
}
[data-id="trigger"].ct-header-trigger {
	margin-inline-start: 8px;
}

/* The cart's count as a small badge on the bag, hidden while the cart is empty. Blocksy loads its own badge styles only
   on shop pages, so elsewhere the count was a full-size "0" beside the bag. */
.ct-cart-item .ct-dynamic-count-cart {
	position: absolute;
	top: -7px;
	inset-inline-end: -9px;
	display: block;
	min-width: 17px;
	height: 17px;
	padding-inline: 4px;
	border-radius: 999px;
	background: var(--theme-palette-color-1);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 17px;
	text-align: center;
}
.ct-cart-item .ct-dynamic-count-cart[data-count="0"] {
	display: none;
}

/* The phone menu starts at the top, so opening a section pushes down only what's below it. Centred, the whole list
   moved 88px at once and the row just tapped left the thumb. */
#offcanvas .ct-panel-content {
	justify-content: flex-start;
}

/* With two buttons, a phone stacks them at full width, so their edges line up. */
@media (max-width: 599px) {
	.wp-block-buttons:has(> .wp-block-button + .wp-block-button) > .wp-block-button {
		flex: 1 1 100%;
	}
	.wp-block-buttons:has(> .wp-block-button + .wp-block-button) .wp-block-button__link {
		width: 100%;
		justify-content: center;
	}
}

/* The cookie banner on a phone: one row of three buttons in the order a keyboard reaches them (Customise, Reject,
   Accept), smaller text, and room for the iPhone's home bar. It took 342px of an 844px screen and covered the fields of
   the form behind it. */
@media (max-width: 600px) {
	.cky-consent-container .cky-consent-bar {
		padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
	}
	.cky-consent-container .cky-title {
		margin-bottom: 4px !important;
		font-size: 16px !important;
	}
	.cky-consent-container .cky-notice-des,
	.cky-consent-container .cky-notice-des p {
		font-size: 14px !important;
		line-height: 1.45 !important;
	}
	.cky-consent-container .cky-notice-btn-wrapper {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		gap: 8px;
		margin-top: 12px !important;
	}
	.cky-consent-container .cky-notice-btn-wrapper .cky-btn {
		order: 0 !important;
		flex: 1 1 0;
		width: auto !important;
		min-height: 44px;
		margin: 0 !important;
		padding: 8px 4px !important;
		font-size: 14px !important;
	}
}

/* ---------------------------------------------------------------------------------------------------------------
 * Forms (#52)
 * ------------------------------------------------------------------------------------------------------------- */
/* Errors in a deep brick red that sits with the slate and orange, not Ninja Forms' pure red; the submit never looks
   switched off (functions.php keeps it enabled, so a press shows what to fix). */
.nf-form-cont .nf-error .ninja-forms-field {
	border-color: #a8321c !important;
}
.nf-form-cont .nf-error-msg,
.nf-form-cont .nf-error-msg a {
	color: #a8321c !important;
	font-size: 15px;
}
.nf-form-cont input[type="submit"][disabled] {
	opacity: 1;
}

/* On a phone the form gets the width: the dark band's and the white card's padding left it 213px wide on a 360px
   screen, First and Last name 104px each. The band keeps 12px, the card 16px; the two names stack below 400px. */
@media (max-width: 599px) {
	.wp-block-group.has-background:has(.nf-form-cont) {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}
	.wp-block-group.alignwide.has-background:has(.nf-form-cont) {
		padding-left: 12px !important;
		padding-right: 12px !important;
	}
}
@media (max-width: 399px) {
	.nf-form-cont .nf-field-container.one-half {
		width: 100% !important;
		float: none !important;
		margin-left: 0 !important;
	}
}

/* ---------------------------------------------------------------------------------------------------------------
 * Blog and shop cards (#53)
 * ------------------------------------------------------------------------------------------------------------- */
/* A blog or case study card links as a whole, like the cards elsewhere: its title's link covers the card, and the
   image and category links sit above that cover so they still go where they say. */
.entries .entry-card {
	position: relative;
}
.entries .entry-card .entry-title a::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.entries .entry-card :is(.ct-media-container, .entry-meta a) {
	position: relative;
	z-index: 1;
}
.entries .entry-card {
	transition: translate 0.25s var(--do-ease), box-shadow 0.25s var(--do-ease);
}
@media (hover: hover) and (pointer: fine) {
	.entries .entry-card:hover {
		translate: 0 -3px;
		box-shadow: var(--do-lift);
	}
	.entries .entry-card:hover .entry-title a {
		text-decoration: underline;
		text-underline-offset: 0.2em;
	}
}
.entries .entry-card:has(.entry-title a:focus-visible) {
	outline: 2px solid var(--do-logo-orange);
	outline-offset: 3px;
}
.entries .entry-card .entry-title a:focus-visible {
	outline: none !important;
}
@media (prefers-reduced-motion: reduce) {
	.entries .entry-card {
		transition: none;
	}
	.entries .entry-card:hover {
		translate: none;
	}
}

/* Shop product cards answer a pointer: the name underlines and the picture lifts slightly. Add to cart gives way on a
   press like every other button. */
@media (hover: hover) and (pointer: fine) {
	.woocommerce ul.products li.product .ct-media-container img {
		transition: translate 0.25s var(--do-ease);
	}
	.woocommerce ul.products li.product:has(a:hover) .woocommerce-loop-product__title a {
		text-decoration: underline;
		text-underline-offset: 0.2em;
	}
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.woocommerce ul.products li.product:has(.ct-media-container:hover) .ct-media-container img {
		translate: 0 -3px;
	}
}
.single_add_to_cart_button,
.woocommerce ul.products li.product .button {
	transition: background-color 0.2s var(--do-ease), color 0.2s var(--do-ease), scale 0.16s var(--do-ease);
}
@media (prefers-reduced-motion: no-preference) {
	.single_add_to_cart_button:active,
	.woocommerce ul.products li.product .button:active {
		scale: 0.97;
	}
}

/* On a phone: the sort menu and quantity box at 16px, so iPhones don't zoom in when they're tapped and stay zoomed (they
   were 14px and 15px); quantity buttons 44px wide; and no category link 13px above each Add to cart, where a slightly
   high tap opened the category instead. */
@media (max-width: 689px) {
	.woocommerce-ordering select,
	.quantity input.qty {
		font-size: 16px !important;
	}
	.woocommerce-ordering select {
		min-height: 44px;
		min-width: 44px;
	}
	.quantity :is(.ct-increase, .ct-decrease) {
		width: 44px !important;
	}
	.woocommerce ul.products li.product .entry-meta {
		display: none;
	}
}
