/*
Theme Name: TOFTS Farm
Theme URI: https://toftsfarm.com
Author: Jonah May
Description: Custom block theme for TOFTS Farm, LLC: Perkins Brailler repair and farm goods from Pittsburg, Texas. Built to WCAG 2.2 AA.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tofts
*/

/* ---- Links: always underlined (WCAG 1.4.1), clearer on hover ---- */
a {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}
a:hover {
	text-decoration-thickness: 2px;
}

/* ---- Focus: one visible ring everywhere (WCAG 2.4.7 / 2.4.13) ---- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--ink);
	outline-offset: 3px;
	border-radius: 2px;
}
.has-ink-background-color :focus-visible,
.has-barn-red-background-color :focus-visible,
.has-sage-background-color :focus-visible {
	outline-color: var(--wp--preset--color--paper);
}

/* Text and links on dark sections */
.has-ink-background-color a:where(:not(.wp-element-button)),
.has-sage-background-color a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--paper);
}
.has-ink-background-color :where(h1, h2, h3, h4),
.has-sage-background-color :where(h1, h2, h3, h4) {
	color: var(--wp--preset--color--paper);
}

/* Buttons on dark sections: paper fill, ink text */
.has-ink-background-color .wp-element-button:where(:not(.is-style-outline .wp-element-button)) {
	background-color: var(--wp--preset--color--paper);
	border-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}
/* Hover on dark sections and covers: barn red fill, white text (7.6:1); theme.json's ink hover would vanish on ink */
:is(.has-ink-background-color, .tofts-cover) .wp-element-button:where(:not(.is-style-outline .wp-element-button)):hover {
	background-color: var(--wp--preset--color--barn-red);
	border-color: var(--wp--preset--color--barn-red);
	color: var(--wp--preset--color--white);
}

/* Outline button: transparent with ink border */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background-color: transparent;
	border-color: currentColor;
	color: var(--wp--preset--color--ink);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}
.has-ink-background-color .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--paper);
}
.has-ink-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--paper);
	border-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

/* ---- Header ---- */
.tofts-utility {
	font-size: var(--wp--preset--font-size--small);
}
.tofts-utility a {
	text-decoration-thickness: 1px;
}
.wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 0.375rem; /* 24px+ target size (WCAG 2.5.8) */
}
/* Mobile menu open/close: icon buttons on paper, barn red on hover (6.6:1) */
.wp-block-navigation__responsive-container-open:hover,
.wp-block-navigation__responsive-container-close:hover {
	color: var(--wp--preset--color--barn-red);
}
.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation [aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.35em;
}
.wp-block-navigation [aria-current="page"] {
	text-decoration-color: var(--wp--preset--color--barn-red);
}
.wp-block-site-title {
	margin: 0;
	text-transform: uppercase;
}
.wp-block-site-title a {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}
.wp-block-site-title a:hover {
	text-decoration: underline;
}
.wp-block-site-title picture {
	display: contents;
}
.tofts-logo {
	flex: none;
	width: 72px;
	height: 72px;
	border-radius: 6px;
	box-shadow: 0 0 0 1px var(--wp--preset--color--rule);
}
@media (max-width: 600px) {
	.tofts-logo {
		width: 56px;
		height: 56px;
	}
	.wp-block-site-title {
		font-size: 1.375rem !important;
	}
}

/* ---- Hero lead ---- */
.tofts-lead {
	max-width: 42rem;
}

/* ---- Pricing card laid out across the page ---- */
ul.is-style-price-list.tofts-price-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	column-gap: 2.5rem;
}
ul.is-style-price-list.tofts-price-grid > li {
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	gap: 0.25rem;
}

/* ---- Eyebrow paragraph ---- */
.is-style-eyebrow {
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--barn-red);
}
.has-ink-background-color .is-style-eyebrow {
	color: var(--wp--preset--color--paper);
}

/* ---- Shipping-tag card (pricing at a glance) ---- */
.is-style-tag {
	position: relative;
	background: var(--wp--preset--color--white);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 4px;
	padding: clamp(1.5rem, 3vw, 2.25rem);
}
.is-style-tag::before {
	/* the eyelet; decorative */
	content: "";
	position: absolute;
	top: 1.125rem;
	right: 1.125rem;
	width: 0.875rem;
	height: 0.875rem;
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 50%;
	background: var(--wp--preset--color--paper);
}

/* ---- Cards with a coloured top rule ---- */
.is-style-rule-red,
.is-style-rule-sage {
	border-top: 4px solid var(--wp--preset--color--barn-red);
	padding-top: 1.25rem;
}
.is-style-rule-sage {
	border-top-color: var(--wp--preset--color--sage);
}

/* ---- Price list: label left, price right, dashed leader ---- */
ul.is-style-price-list {
	list-style: none;
	padding: 0;
	margin-block: 1rem;
}
ul.is-style-price-list > li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding-block: 0.625rem;
	border-bottom: 1px dashed var(--wp--preset--color--muted);
}
ul.is-style-price-list > li strong {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--ink);
	white-space: nowrap;
}

/* ---- Numbered steps ---- */
ol.is-style-steps {
	list-style: none;
	counter-reset: step;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	gap: 2rem;
}
/* Four steps: 4 across, then 2x2, then stacked, never 3 + 1. */
ol.is-style-steps:has(> li:nth-child(4):last-child) {
	grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 64rem) {
	ol.is-style-steps:has(> li:nth-child(4):last-child) {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 36rem) {
	ol.is-style-steps:has(> li:nth-child(4):last-child) {
		grid-template-columns: 1fr;
	}
}
/* Five steps: 3 then 2 centered, then 2 + 2 + 1 centered, then stacked. DOM order is kept. */
ol.is-style-steps:has(> li:nth-child(5):last-child) {
	grid-template-columns: repeat(6, 1fr);
}
ol.is-style-steps:has(> li:nth-child(5):last-child) > li {
	grid-column: span 2;
}
ol.is-style-steps:has(> li:nth-child(5):last-child) > li:nth-child(4) {
	grid-column: 2 / span 2;
}
@media (max-width: 64rem) {
	ol.is-style-steps:has(> li:nth-child(5):last-child) {
		grid-template-columns: repeat(4, 1fr);
	}
	ol.is-style-steps:has(> li:nth-child(5):last-child) > li:nth-child(4) {
		grid-column: span 2;
	}
	ol.is-style-steps:has(> li:nth-child(5):last-child) > li:nth-child(5) {
		grid-column: 2 / span 2;
	}
}
@media (max-width: 36rem) {
	ol.is-style-steps:has(> li:nth-child(5):last-child),
	ol.is-style-steps:has(> li:nth-child(5):last-child) > li:nth-child(n) {
		grid-template-columns: 1fr;
		grid-column: auto;
	}
}
ol.is-style-steps > li {
	counter-increment: step;
	border-top: 2px solid var(--wp--preset--color--ink);
	padding-top: 1rem;
}
ol.is-style-steps > li::before {
	content: counter(step, decimal-leading-zero) / "";
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-size: 2.5rem;
	line-height: 1;
	color: var(--wp--preset--color--barn-red);
	margin-bottom: 0.5rem;
}
ol.is-style-steps > li strong {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--ink);
	margin-bottom: 0.25rem;
}

/* ---- Plain link list (footer) ---- */
ul.is-style-plain {
	list-style: none;
	padding: 0;
}
ul.is-style-plain > li + li {
	margin-top: 0.5rem;
}

/* ---- Tables ---- */
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}
.wp-block-table :where(th, td) {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--rule);
	padding: 0.75rem 0.5rem;
	text-align: left;
}
.wp-block-table thead {
	border: 0;
}
.wp-block-table thead th {
	border-bottom: 2px solid var(--wp--preset--color--ink);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}
.wp-block-table figcaption,
.wp-block-table caption {
	text-align: left;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* ---- Cover heroes: photo, dark ink overlay (70%), paper text in front ---- */
/* Only block margins: inline margins come from WordPress's root-padding-aware full-bleed rule. */
.wp-block-cover.tofts-cover {
	margin-block: 0;
	min-height: clamp(22rem, 36vw, 30rem);
	padding-block: var(--wp--preset--spacing--60);
	color: var(--wp--preset--color--paper);
}
/* Compact variant for task pages (contact, accessibility, privacy): keeps the form and content near the top. */
.wp-block-cover.tofts-cover.tofts-cover-compact {
	min-height: clamp(12rem, 20vw, 16rem);
}
/* Cover pages: the photo sits directly under the header, without the site blockGap. */
main:has(> .wp-block-post-content > :is(.tofts-cover, .tofts-page-header):first-child) {
	margin-block-start: 0;
}
.tofts-cover :where(h1, h2, h3, p) {
	color: var(--wp--preset--color--paper);
	text-shadow: 0 1px 3px rgb(0 0 0 / 0.45);
}
.tofts-cover .wp-block-cover__inner-container {
	text-align: center;
}
.tofts-cover h1 {
	max-width: 22ch;
	margin-block: 0.5rem 1.25rem;
	margin-inline: auto;
}
.tofts-cover .tofts-lead {
	max-width: 56rem;
	margin-inline: auto;
}
.tofts-cover .is-style-eyebrow {
	color: var(--wp--preset--color--paper);
}
.tofts-cover .wp-block-buttons {
	margin-top: var(--wp--preset--spacing--40);
	justify-content: center;
}
.tofts-cover .wp-element-button:where(:not(.is-style-outline .wp-element-button)) {
	background-color: var(--wp--preset--color--paper);
	border-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}
.tofts-cover .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--paper);
	border-color: var(--wp--preset--color--paper);
}
.tofts-cover .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}
.tofts-cover :focus-visible {
	outline-color: var(--wp--preset--color--paper);
}

/* Photos at the top of home-page cards. */
.wp-block-image.tofts-card-photo {
	margin-bottom: var(--wp--preset--spacing--40);
}
.wp-block-image.tofts-card-photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 4px;
}

ul.tofts-checklist > li {
	padding: 0.4rem 0;
	border-bottom: 1px solid var(--wp--preset--color--rule);
}

/* ---- Utility bar and contact card: decorative phone / mail icons (pseudo-elements, not read by screen readers) ---- */
:is(.tofts-utility, .tofts-icon-links) a[href^="tel:"]::before,
:is(.tofts-utility, .tofts-icon-links) a[href^="mailto:"]::before,
.tofts-icon-links a[href*="youtube.com"]::before {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-inline-end: 0.45em;
	vertical-align: -0.15em;
	background-color: currentColor;
	-webkit-mask: var(--tofts-icon) center / contain no-repeat;
	mask: var(--tofts-icon) center / contain no-repeat;
}
:is(.tofts-utility, .tofts-icon-links) a[href^="tel:"] {
	--tofts-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E");
}
:is(.tofts-utility, .tofts-icon-links) a[href^="mailto:"] {
	--tofts-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm1 2.4V17h16V7.4l-8 5.3zM5.2 7 12 11.5 18.8 7z' fill-rule='evenodd'/%3E%3C/svg%3E");
}
.tofts-icon-links a[href*="youtube.com"] {
	--tofts-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23 7.2a3 3 0 0 0-2.1-2.1C19 4.6 12 4.6 12 4.6s-7 0-8.9.5A3 3 0 0 0 1 7.2 31 31 0 0 0 .5 12a31 31 0 0 0 .5 4.8 3 3 0 0 0 2.1 2.1c1.9.5 8.9.5 8.9.5s7 0 8.9-.5a3 3 0 0 0 2.1-2.1 31 31 0 0 0 .5-4.8 31 31 0 0 0-.5-4.8zM9.8 15.1V8.9l5.4 3.1z' fill-rule='evenodd'/%3E%3C/svg%3E");
}
.tofts-utility a {
	text-decoration-skip-ink: auto;
}

/* Visually hidden, still read by screen readers (e.g. "Phone:" before an icon link). */
.screen-reader-text:not(:focus):not(:active) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---- Button and "Arrow link" icons: decorative pseudo-elements, so the accessible name stays the visible text ---- */
:root {
	--tofts-icon-arrow-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
	--tofts-icon-arrow-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E");
	--tofts-icon-arrow-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M6 11l6-6 6 6'/%3E%3C/svg%3E");
	--tofts-icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm1 2.4V17h16V7.4l-8 5.3zM5.2 7 12 11.5 18.8 7z' fill-rule='evenodd'/%3E%3C/svg%3E");
}
a.wp-block-button__link::after,
.is-style-more a::after,
.tofts-to-top::before {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	vertical-align: -0.15em;
	background-color: currentColor;
	-webkit-mask: var(--tofts-icon) center / contain no-repeat;
	mask: var(--tofts-icon) center / contain no-repeat;
	transition: transform 0.15s ease-out;
}
a.wp-block-button__link::after,
.is-style-more a::after {
	margin-inline-start: 0.5em;
}
/* Default: goes to another page */
a.wp-block-button__link,
.is-style-more a {
	--tofts-icon: var(--tofts-icon-arrow-right);
	--tofts-nudge: translateX(0.2em);
}
/* Jumps further down this page (#pricing, #request) */
a.wp-block-button__link[href^="#"],
.is-style-more a[href^="#"] {
	--tofts-icon: var(--tofts-icon-arrow-down);
	--tofts-nudge: translateY(0.2em);
}
/* Goes to the contact form */
a.wp-block-button__link[href*="/contact"] {
	--tofts-icon: var(--tofts-icon-mail);
	--tofts-nudge: none;
}
a.wp-block-button__link:is(:hover, :focus-visible)::after,
.is-style-more a:is(:hover, :focus-visible)::after {
	transform: var(--tofts-nudge);
}
.is-style-more a {
	font-weight: 600;
}

/* ---- Back to top: a plain footer link without JS; to-top.js floats it once the reader scrolls ---- */
html {
	/* Keep focused elements clear of the floating button when the browser scrolls them into view (WCAG 2.4.11) */
	scroll-padding-block-end: 5rem;
}
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
	/* Cross-fade between pages on same-origin navigation; browsers without support just navigate */
	@view-transition {
		navigation: auto;
	}
}
#top:focus {
	outline: none;
}
.tofts-to-top-wrap {
	margin-block-start: var(--wp--preset--spacing--40);
	min-height: 3rem;
}
.tofts-to-top {
	--tofts-icon: var(--tofts-icon-arrow-up);
}
.tofts-to-top::before {
	margin-inline-end: 0.45em;
}
.tofts-to-top.is-floating {
	position: fixed;
	z-index: 50;
	inset-block-end: max(1rem, env(safe-area-inset-bottom));
	inset-inline-end: max(1rem, env(safe-area-inset-right));
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0.5rem 1rem;
	border: 2px solid var(--wp--preset--color--paper);
	border-radius: 999px;
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 2px 8px rgb(0 0 0 / 0.25);
	/* visibility also takes the hidden button out of the tab order and the accessibility tree */
	visibility: hidden;
	opacity: 0;
}
/* to-top.js sets --tofts-vv-bottom (the visible viewport's bottom edge); anchoring from the top
   avoids iOS Safari drifting bottom-fixed elements to mid-screen when its toolbar collapses */
.tofts-to-top.is-floating[style*="--tofts-vv-bottom"] {
	inset-block-end: auto;
	inset-block-start: var(--tofts-vv-bottom);
	translate: 0 calc(-100% - max(1rem, env(safe-area-inset-bottom)));
}
/* Fade only after the first paint, so switching to floating on load doesn't flash the button */
.tofts-to-top.is-floating.is-ready {
	transition: opacity 0.2s, visibility 0.2s;
}
.tofts-to-top.is-floating.is-visible {
	visibility: visible;
	opacity: 1;
}
.tofts-to-top.is-floating:hover {
	background-color: var(--wp--preset--color--barn-red);
	text-decoration: underline;
}
.tofts-to-top.is-floating:hover::before {
	transform: translateY(-0.2em);
}
/* Two-tone ring: ink shows on light sections, paper on dark ones */
.tofts-to-top.is-floating:focus-visible {
	outline: 3px solid var(--wp--preset--color--ink);
	outline-offset: 0;
	box-shadow: 0 0 0 6px var(--wp--preset--color--paper);
}

/* ---- Plain page header band (Contact, Accessibility) ---- */
.wp-block-group.tofts-page-header {
	margin-block: 0;
	padding-block: var(--wp--preset--spacing--60);
	text-align: center;
}
.tofts-page-header h1 {
	margin-block: 0.5rem 1rem;
}
.tofts-page-header .tofts-lead {
	max-width: 48rem;
	margin-inline: auto;
}
.tofts-icon-links > li {
	padding-block: 0.25rem;
	font-size: var(--wp--preset--font-size--medium);
}
footer .tofts-icon-links > li {
	font-size: inherit;
}
.tofts-footer-logo img {
	border-radius: 8px;
}

/* ---- WPForms (plugin loads base styles only) ---- */
.wpforms-container .wpforms-field {
	padding-block: 0 1.25rem;
}
.wpforms-container .wpforms-field-label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 700;
	color: var(--wp--preset--color--ink);
}
.wpforms-container .wpforms-required-label {
	color: var(--wp--preset--color--barn-red);
}
.wpforms-container :is(input[type="text"], input[type="email"], input[type="tel"], select, textarea) {
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	min-height: 2.875rem;
	padding: 0.6rem 0.75rem;
	font: inherit;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--white);
	/* muted on white is 6:1, above the 3:1 needed for control boundaries */
	border: 2px solid var(--wp--preset--color--muted);
	border-radius: 4px;
}
.wpforms-container textarea {
	min-height: 10rem;
	resize: vertical;
}
/* Checkbox groups: modern markup wraps them in fieldset + legend, so the question is announced with each box. */
.wpforms-container fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}
.wpforms-container legend.wpforms-field-label {
	padding: 0;
}
.wpforms-container .wpforms-field-description {
	margin-block: 0 0.5rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.wpforms-container .wpforms-field-checkbox ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.wpforms-container .wpforms-field-checkbox li {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	/* 2.75rem rows keep each box and label a comfortable target (WCAG 2.5.8 asks for 24px) */
	min-height: 2.75rem;
	margin: 0;
	padding: 0;
}
.wpforms-container input[type="checkbox"] {
	flex: none;
	width: 1.375rem;
	height: 1.375rem;
	margin: 0.15rem 0 0;
	accent-color: var(--wp--preset--color--ink);
}
.wpforms-container .wpforms-field-label-inline {
	display: inline;
	font-weight: 400;
	cursor: pointer;
}
.wpforms-container :is(input, select, textarea):focus-visible {
	border-color: var(--wp--preset--color--ink);
	outline: 3px solid var(--wp--preset--color--ink);
	outline-offset: 2px;
}
.wpforms-container :is(input, select, textarea).wpforms-error {
	border-color: var(--wp--preset--color--barn-red);
}
.wpforms-container label.wpforms-error,
.wpforms-container em.wpforms-error {
	display: block;
	margin-top: 0.35rem;
	font-style: normal;
	font-weight: 600;
	color: var(--wp--preset--color--barn-red);
}
.wpforms-container .wpforms-submit {
	padding: 0.8rem 1.75rem;
	font: inherit;
	font-weight: 600;
	color: var(--wp--preset--color--paper);
	background: var(--wp--preset--color--ink);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 4px;
	cursor: pointer;
}
.wpforms-container .wpforms-submit:hover {
	background: var(--wp--preset--color--barn-red);
	border-color: var(--wp--preset--color--barn-red);
}
.wpforms-confirmation-container-full,
.tofts-form-fallback,
.tofts-form-note {
	padding: 1.25rem 1.5rem;
	background: var(--wp--preset--color--cream);
	border-inline-start: 4px solid var(--wp--preset--color--sage);
	border-radius: 4px;
}
.tofts-form-note {
	border-inline-start-color: var(--wp--preset--color--barn-red);
	font-size: var(--wp--preset--font-size--small);
}

/* Cover photos wrapped in <picture> for AVIF (functions.php): keep the img the cover's own child for layout. */
.wp-block-cover > picture.tofts-cover-picture {
	display: contents;
}
