/*
Theme Name: RCVDA Base
Theme URI: https://rcvda.org.uk
GitHub Theme URI: rcvda/rcvda-base
Primary Branch: main
Release Asset: true
Description: Shared RCVDA family base block theme. A token-driven full-site-editing theme; per-site styling is supplied as a style variation in /styles/. Built on WordPress core (theme.json), no third-party framework or page-builder dependency.
Author: RCVDA
Author URI: https://rcvda.org.uk
Version: 0.5.95
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rcvda-base
Tags: full-site-editing, block-styles, accessibility-ready, blog, custom-colors, custom-logo, editor-style, wide-blocks
*/

/*
 * Block themes are driven by theme.json — most styling lives there, not here.
 * This file carries the required theme header (above) plus any small extras
 * that theme.json cannot express. Keep it minimal; prefer theme.json + tokens.
 */

/* Visually-hidden utility (the one sanctioned exception to "no manual CSS"). */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Skip-to-content link reveal-on-focus.
 *
 * WordPress core auto-emits the block-theme skip link (<a id="wp-skip-link"
 * class="skip-link screen-reader-text" href="#wp--skip-link--target">) and its
 * own inline :focus reveal — but that reveal only resets `clip-path`, not the
 * deprecated `clip` property. Our `.screen-reader-text` utility sets
 * `clip: rect(0 0 0 0)`, which core never clears, so the link stayed clipped to
 * nothing on focus and the skip link appeared not to work. Re-reveal it here,
 * clearing BOTH clip mechanisms. `:root …` + `!important` clears the utility's
 * and core's `position: absolute !important` cleanly by weight, independent of
 * source order. Colours use the per-skin `brand` fill + `on-dark` (#fff) text so
 * contrast holds in light and dark mode (dark flips `base`, not `on-dark`). */
:root .skip-link.screen-reader-text:focus {
	position: fixed !important;
	top: 0.5rem !important;
	left: 0.5rem !important;
	z-index: 100000 !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0.75rem 1.25rem !important;
	clip: auto !important;
	clip-path: none !important;
	overflow: visible !important;
	background: var(--wp--preset--color--brand, #033e8c) !important;
	color: var(--wp--preset--color--on-dark, #fff) !important;
	font-weight: 600;
	text-decoration: underline;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	outline: 3px solid var(--wp--preset--color--interactive, var(--wp--preset--color--accent)) !important;
	outline-offset: 2px !important;
}

/* AAA focus indicator carried over from the Fundseekers design system. */
:where(a, button, input, select, textarea, .wp-block-button__link):focus-visible {
	outline: 3px solid var(--wp--preset--color--interactive, var(--wp--preset--color--accent));
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   INLINE ICON PRIMITIVE  (v0.5.3)
   Foundational sizing for the inline SVG glyphs emitted by BOTH icon helpers —
   rcvda_icon() (→ .rcvda-icon, rcvda-core) and rfs_icon() (→ .rfs-icon,
   rfs-core). Promoted into the base so any surface rendered by the theme or by
   rcvda-core — e.g. the [rcvda_style_guide] / [rfs_style_guide] shortcode —
   sizes its glyphs correctly WITHOUT depending on rfs-core's
   fundseekers-components.css being enqueued (it is not, outside the Fundseekers
   directory pages, which is why the style-guide palette glyph ballooned).
   The two helpers are slated to converge on one class (see Outstanding_Actions);
   until then this covers both. Low specificity on purpose: scoped component
   rules (footer, rail, a11y panel, to-top) still override it. */
.rcvda-icon,
.rfs-icon {
	width: 1em;
	height: 1em;
	flex-shrink: 0;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
/* Inline-glyph spacing/alignment inside headings and table cells. `:where()`
   keeps this at zero specificity so component overrides win. */
:where(h1, h2, h3, h4, h5, h6, td) .rcvda-icon,
:where(h1, h2, h3, h4, h5, h6, td) .rfs-icon {
	margin-right: 0.5em;
	vertical-align: -0.12em;
}

/* Muted-text utility — colour only (inherits size/leading from context).
   Used by rcvda-core surfaces including the style-guide shortcode. Class is
   doubled for specificity, matching the rfs-core original. */
.rfs-muted.rfs-muted {
	color: var(--wp--preset--color--muted);
}

/* ==========================================================================
   ACCESSIBILITY PREFERENCES — dark mode, large text, motion, spacing, underline
   Driven by html[data-*] attributes set by the priority-1 wp_head script
   (functions.php) and the floating panel. Ported from Fundseekers (v2.17.x).
   ========================================================================== */

/* --- Dark mode -----------------------------------------------------------
   WordPress has no published dark palette, so these are RCVDA-derived dark
   values. The preset custom properties are re-declared on the dark <body>
   so everything that references var(--wp--preset--color--*) retints at once.
   `brand` is kept dark (it is also used as a section background — footer,
   hero — which must stay dark); heading/text colours flip via contrast. */
/* Tell the user agent the page is dark/light so browser-painted UI
   (scrollbars, form controls, date pickers, number spinners) matches the
   active theme. data-theme is always set to dark|light by the boot script. */
html[data-theme="dark"]  { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

html[data-theme="dark"] body {
	--wp--preset--color--base: #0c1a33;       /* page background */
	--wp--preset--color--surface: #16284a;    /* panels */
	--wp--preset--color--contrast: #e8eef6;   /* body text */
	--wp--preset--color--muted: #aebfd6;       /* secondary text / links */
	--wp--preset--color--brand: #0a1730;       /* section backgrounds stay dark */
	--wp--preset--color--brand-light: #6f97c8; /* LINK colour — lifts to a readable blue on dark */
	--wp--preset--color--brand-mid: #123a6b;   /* medium-blue SECTION BACKGROUND — stays deep so white/amber read (white ~13:1, amber ~5.6:1) */
	--wp--preset--color--divider: #2c3d5e;
	/* accent (Yellow), alert (Red), on-dark (#fff) intentionally unchanged */

	/* ‼ LEGACY-COMPAT (underdavid-rcvda migration) — removable post-migration.
	   See README → "Legacy migration compatibility".
	   These flips are the dark-mode *background-role* values for the three dark
	   legacy slugs: dark-blue → deep section bg, blue → medium-blue section bg,
	   light-blue → panel — so light text reads on a `has-rcvda-*-background-color`
	   wrapper. The *text-role* overrides (`.has-rcvda-*-color`) are handled
	   separately in the Legacy section below, because one slug cannot be both a
	   dark background and a light text colour in dark mode (same reason the theme
	   split brand-light/brand-mid). Orange/red are invariant like accent/alert. */
	--wp--preset--color--rcvda-dark-blue: #0a1730;
	--wp--preset--color--rcvda-blue: #123a6b;
	--wp--preset--color--rcvda-light-blue: #16284a;
}
html[data-theme="dark"] :where(h1, h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--contrast);
}

/* Content links must lift in dark mode. The base maps links to `brand-light`
   (which pivots to a readable blue in dark), but a style variation may point
   links at `brand` instead — and `brand` stays dark in dark mode, so those
   links render dark-on-dark and become unreadable (the building-our-future
   skin does exactly this). Force post/page content links — plus the breadcrumb,
   page-toc and page-meta (byline) blocks, which sit outside the content wrappers and rendered
   dark-on-dark — to the lifting link blue in dark, still scoped so header,
   footer, site-nav and button links are untouched. Light mode is unchanged (each skin keeps its own
   rest-state link colour).

   The `:not()` list excludes links that are really UI controls and paint their
   own colour: WordPress button-links, plus the family's control-links (filter
   pills, buttons). Without the exclusion this rule (high specificity, to beat
   WP's :where() defaults) tints e.g. an active amber filter pill or a "Book /
   register" button light-blue on amber. Extend the list when a new control-link
   class is added rather than out-specifying this rule in the component CSS. */
html[data-theme="dark"] :where(.wp-block-post-content, .entry-content, .rcvda-breadcrumb, .rcvda-page-toc, .rcvda-page-meta) a:not(.wp-block-button__link):not(.wp-element-button):not(.rcvda-learn-pill):not(.rcvda-learn-btn):not(.rcvda-vac-btn):not(.rcvda-vac-pill):not(.fpt-cal__btn):not(.rfs-btn):not(.rfs-hero__quick-pill) {
	color: var(--wp--preset--color--brand-light);
}

/* Default (theme) buttons fill with `brand-light`, which is a deep blue in light
   mode (white label ~10:1) but flips to a light link-blue in dark — dropping the
   default white label to ~2.2:1. Give unclassed buttons a dark `brand` label in
   dark mode; buttons carrying an explicit colour class keep their own text. */
html[data-theme="dark"] :where(.wp-block-button__link, .wp-element-button):not(.has-text-color):not(.has-background) {
	color: var(--wp--preset--color--brand);
}

/* Links on always-dark brand-background sections (footer, hero) must read as
   light in BOTH modes — Medium Blue on navy fails contrast. Underline on
   hover only (matches Fundseekers; rest state is clean). */
.has-brand-background-color a:not(.wp-block-button__link):not(.wp-element-button) {
	color: var(--wp--preset--color--on-dark);
	text-decoration: none;
}
.has-brand-background-color a:not(.wp-block-button__link):not(.wp-element-button):hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* --- Larger text (≈112.5% root → 18px; rem tokens scale automatically) --- */
html[data-text-size="large"] { font-size: 112.5%; }

/* --- Reduce motion -------------------------------------------------------
   OS preference applies unless the visitor opted back into motion; the manual
   toggle sets data-motion="reduced". !important is the sanctioned exception. */
@media (prefers-reduced-motion: reduce) {
	html:not([data-motion="full"]) *,
	html:not([data-motion="full"]) *::before,
	html:not([data-motion="full"]) *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
	animation-duration: 0.01ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.01ms !important;
	scroll-behavior: auto !important;
}
/* v0.3.3 — also suppress the card hover-LIFT transform under reduced motion
   (not just make it instant) so there's no positional jump. Scoped to
   .rcvda-card so the a11y toggle thumb's translateX and other layout
   transforms are untouched. Mirrors Fundseekers v2.17.28. */
@media (prefers-reduced-motion: reduce) {
	html:not([data-motion="full"]) .rcvda-card:hover,
	html:not([data-motion="full"]) .rcvda-card:focus-within,
	html:not([data-motion="full"]) .rcvda-post-card:hover,
	html:not([data-motion="full"]) .rcvda-post-card:focus-within {
		transform: none !important;
	}
}
html[data-motion="reduced"] .rcvda-card:hover,
html[data-motion="reduced"] .rcvda-card:focus-within,
html[data-motion="reduced"] .rcvda-post-card:hover,
html[data-motion="reduced"] .rcvda-post-card:focus-within {
	transform: none !important;
}

/* --- Readable spacing (toward WCAG 1.4.12 Text Spacing) ------------------ */
html[data-readable="on"] body { line-height: 1.85; letter-spacing: 0.05em; word-spacing: 0.12em; }
html[data-readable="on"] p, html[data-readable="on"] li { line-height: 1.9; }

/* --- Underline links (no exceptions) -------------------------------------
   Accessibility "underline everything actionable" tool — matches Fundseekers
   v2.17.25 (owner decision: no exclusions). a[href] gives the anchor arm
   (0,2,2) specificity so it beats WP core's button `text-decoration: none`
   without !important; the button/input arms cover form controls. The base
   theme has no dark-mode `text-decoration: none` restatements, so this wins in
   both light and dark with no further work. --- */
html[data-underline-links="on"] a[href],
html[data-underline-links="on"] button,
html[data-underline-links="on"] input[type="submit"],
html[data-underline-links="on"] input[type="button"] {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
/* The rule above is (0,2,2), but nav, footer and any brand-background section
   set links to text-decoration:none at higher specificity (e.g.
   .has-brand-background-color a:not()… is (0,3,1)), so those "no exceptions"
   links were NOT underlining. Re-underline them when the tool is on, with
   selectors that out-specify the none rules (no !important). */
html[data-underline-links="on"] .rcvda-header .wp-block-navigation a[href],
html[data-underline-links="on"] .rcvda-footer a[href],
html[data-underline-links="on"] .has-brand-background-color a[href]:not(.wp-block-button__link):not(.wp-element-button) {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* --- OS high-contrast request (aligned to the no-exceptions rule) --------- */
@media (prefers-contrast: more) {
	a[href], button, input[type="submit"], input[type="button"] {
		text-decoration: underline;
		text-underline-offset: 0.15em;
	}
}

/* Support Us header button — keep on one line. */
.rcvda-support-btn { white-space: nowrap; }

/* ==========================================================================
   INTERACTION & ELEVATION STANDARD  (settled in the Fundseekers v2.17.x work,
   2026-06-16; ported here as the family-wide default)
   --------------------------------------------------------------------------
   One movement rule across the system:
     • Filled buttons   — hover/focus is an inset WHITE WASH over the existing
                          fill. They do NOT darken, lift, or cast a drop-shadow.
                          The wash is brand-neutral (lightens whatever the
                          accent is) and identical in light + dark. theme.json
                          keeps the hover/focus background equal to the rest
                          state, so this wash + the focus ring above are the
                          only hover/focus signals.
     • Cards            — the ONLY element that lifts (translateY) and casts a
                          drop-shadow on hover. Reduced-motion suppresses the
                          lift (see the reduce-motion block above).
     • Everything else  — border/colour shift, never lift, never drop-shadow.
   theme.json can't express the inset-wash box-shadow, so it lives here as a
   sanctioned "small extra". Canonical write-up + per-skin colour reasoning:
   Fundseekers Design/DESIGN.md § 5.7.
   ========================================================================== */
.wp-element-button:hover,
.wp-element-button:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
	box-shadow: inset 0 0 0 1000px rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   CORE BUTTON BLOCK STYLES — Outline (Secondary) + Danger
   The editor exposes three core/button styles: default Fill (= Primary, themed
   via theme.json elements.button), Outline (WP core built-in), and Danger
   (registered in rcvda-core/inc/block-styles.php). The Fundseekers design pairs
   Outline with the ghost/secondary look and Danger with the red outline; these
   rules brand both on `--wp--preset--color--*`, so they retint in dark via the
   token re-declaration above (no separate dark block). `:not(.has-text-color)`
   respects an editor-set custom colour (e.g. the hero outline buttons that carry
   has-on-dark-color stay white). `:root .wp-block-button.is-style-*` (0,4,0)
   outranks WP core's `:where()` defaults without !important.
   ========================================================================== */

/* Outline = Secondary — border + text on `contrast` (navy in light, cream in
   dark — pivots, so it stays visible in both); amber on hover, subtle fill. */
:root .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
:root .wp-block-button.is-style-outline .wp-element-button:not(.has-text-color) {
	background-color: transparent;
	border: 2px solid var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--contrast);
}
:root .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):hover,
:root .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):focus-visible,
:root .wp-block-button.is-style-outline .wp-element-button:not(.has-text-color):hover,
:root .wp-block-button.is-style-outline .wp-element-button:not(.has-text-color):focus-visible {
	border-color: var(--wp--preset--color--interactive, var(--wp--preset--color--accent));
	background-color: var(--wp--preset--color--surface);
	box-shadow: none;
}

/* Danger — transparent bg, alert-red border + text; red focus-ring on hover
   (no fill), matching the template .rfs-btn--danger. */
:root .wp-block-button.is-style-danger .wp-block-button__link,
:root .wp-block-button.is-style-danger .wp-element-button {
	background-color: transparent;
	border: 2px solid var(--wp--preset--color--alert);
	color: var(--wp--preset--color--alert);
}
:root .wp-block-button.is-style-danger .wp-block-button__link:hover,
:root .wp-block-button.is-style-danger .wp-block-button__link:focus-visible,
:root .wp-block-button.is-style-danger .wp-element-button:hover,
:root .wp-block-button.is-style-danger .wp-element-button:focus-visible {
	background-color: transparent;
	text-decoration: underline;
	text-underline-offset: 3px;
	box-shadow: 0 0 0 4px rgba(212, 53, 28, 0.15);
}
/* Dark mode — lift the danger red so it reads on the dark surface (the base
   keeps --alert static; this matches the template's lightened dark red and its
   softer ring), since alert does not pivot in the dark token block. */
html[data-theme="dark"] .wp-block-button.is-style-danger .wp-block-button__link,
html[data-theme="dark"] .wp-block-button.is-style-danger .wp-element-button {
	border-color: #ff7a66;
	color: #ff7a66;
}
html[data-theme="dark"] .wp-block-button.is-style-danger .wp-block-button__link:hover,
html[data-theme="dark"] .wp-block-button.is-style-danger .wp-block-button__link:focus-visible,
html[data-theme="dark"] .wp-block-button.is-style-danger .wp-element-button:hover,
html[data-theme="dark"] .wp-block-button.is-style-danger .wp-element-button:focus-visible {
	box-shadow: 0 0 0 4px rgba(255, 122, 102, 0.25);
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  LEGACY MIGRATION COMPATIBILITY (underdavid-rcvda → rcvda-base)         ║
   ║  Everything in this block + the three `--rcvda-*` flips in the dark     ║
   ║  token block above exists ONLY to render migrated page content that    ║
   ║  carries the old theme's `has-rcvda-{dark-blue,blue,light-blue,orange,  ║
   ║  red}-(background-)color` classes. A fresh fork of rcvda-base that      ║
   ║  starts on the semantic palette does NOT need any of it — it is safe to ║
   ║  delete this block, the dark-token `--rcvda-*` flips, and the five      ║
   ║  `rcvda-*` legacy palette entries in theme.json once no content uses    ║
   ║  the old classes. Authoritative list: README → "Legacy migration       ║
   ║  compatibility". (Light mode needs no rules here — the legacy slugs are ║
   ║  the same hexes as the old theme, so migrated content renders as before.)║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* (1) Legacy buttons: old content sets a dark *-background-color slug on the
   button but no text colour, so the label fell back to the theme default (dark
   navy) — unreadable on the dark-blue / blue / red fills in both modes. Force
   white text on those dark fills, only when no explicit text colour was chosen
   (`:not(.has-text-color)`). Light-blue/orange buttons keep dark text. */
.wp-block-button__link.has-rcvda-dark-blue-background-color:not(.has-text-color),
.wp-block-button__link.has-rcvda-blue-background-color:not(.has-text-color),
.wp-block-button__link.has-rcvda-red-background-color:not(.has-text-color) {
	color: var(--wp--preset--color--on-dark);
}

/* (2) Dark-mode TEXT-role overrides. Migrated content uses these slugs as text
   colour far more than as backgrounds (≈900 blue-text uses across the site).
   The dark-token flips above set the shared variable to a *dark* value for the
   background role, which would render that text dark-on-dark — so re-lighten the
   text role here. `!important` + the `html[data-theme="dark"]` prefix (0,1,1)
   beats WordPress's generated `.has-*-color{…!important}` (0,1,0). Backgrounds
   keep the dark flip; orange/red text is fine on dark and is left alone. */
html[data-theme="dark"] .has-rcvda-dark-blue-color { color: #e8eef6 !important; }
html[data-theme="dark"] .has-rcvda-blue-color { color: #6f97c8 !important; }
html[data-theme="dark"] .has-rcvda-light-blue-color { color: #a7c1d9 !important; }

/* Feature cards — the one element that lifts: subtle lift + accent border +
   drop-shadow on hover/focus-within (reduced-motion suppresses the lift). */
.rcvda-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}
.rcvda-card:hover, .rcvda-card:focus-within {
	transform: translateY(-2px);
	border-color: var(--wp--preset--color--brand);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
}
/* Card hover border pivots to accent (amber) in dark, where brand navy is
   invisible against the dark surface. Mirrors .rcvda-post-card below. */
html[data-theme="dark"] .rcvda-card:hover,
html[data-theme="dark"] .rcvda-card:focus-within {
	border-color: var(--wp--preset--color--interactive, var(--wp--preset--color--accent));
}
/* Pin the last element (the CTA / link) to the bottom so it aligns across
   cards whose body text differs in length — keeps left and right the same. */
.rcvda-card > :last-child { margin-top: auto; }

/* --- Support cards (OA §23) ---------------------------------------------
   The rebuilt David-era "Box Columns" signposting cards. Each card carries a
   semantic colour token (surface / muted / accent / alert / base) as its
   background; the icon (via [rcvda_icon]) and body text derive their colour
   from that token here, so nothing is hardcoded per card. Equal-height with
   the CTA pinned to the bottom, matching .rcvda-card. */
.rcvda-support-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}
.rcvda-support-card__icon {
	line-height: 0;
	color: inherit;
}
.rcvda-support-card__icon .rcvda-icon {
	width: 3em;
	height: 3em;
}
/* Light-background cards: navy icon, dark-blue body text. */
.rcvda-support-card.has-surface-background-color,
.rcvda-support-card.has-accent-background-color,
.rcvda-support-card.has-base-background-color {
	color: var(--wp--preset--color--contrast);
}
.rcvda-support-card.has-surface-background-color .rcvda-support-card__icon,
.rcvda-support-card.has-accent-background-color .rcvda-support-card__icon,
.rcvda-support-card.has-base-background-color .rcvda-support-card__icon {
	color: var(--wp--preset--color--brand);
}
/* Dark-background cards: white text; light-blue icon on muted, white on alert. */
.rcvda-support-card.has-muted-background-color,
.rcvda-support-card.has-alert-background-color {
	color: var(--wp--preset--color--on-dark);
}
.rcvda-support-card.has-muted-background-color .rcvda-support-card__icon {
	color: var(--wp--preset--color--surface);
}
.rcvda-support-card.has-alert-background-color .rcvda-support-card__icon {
	color: var(--wp--preset--color--on-dark);
}
/* Headings inherit the card's resolved text colour (WP would otherwise apply
   the global heading colour, which is invisible on the dark cards). */
.rcvda-support-card.has-muted-background-color :is(h2, h3, h4),
.rcvda-support-card.has-alert-background-color :is(h2, h3, h4) {
	color: inherit;
}
/* Pin the CTA to the bottom so buttons align across cards of differing length. */
.rcvda-support-card > :last-child { margin-top: auto; }

/* Projects grid (no card box): equal-height columns with the button pinned to
   the bottom, so the two project tiles are always the same size. */
.rcvda-projects .wp-block-column { display: flex; flex-direction: column; gap: var(--wp--preset--spacing--30); }
/* The column is is-layout-flow, so its children also pick up a flow block-gap
   `margin-block-start` that doubled with the flex gap above (16px gap + 24px
   margin = 40px). Zero it so the declared flex gap is the sole spacing. The
   buttons rule below is more specific, so the bottom-pin still wins. */
.rcvda-projects .wp-block-column > * { margin-block-start: 0; }
.rcvda-projects .wp-block-column > .wp-block-buttons { margin-top: auto; }

/* Card/grid images crop to a uniform size regardless of the source file —
   the inline aspect-ratio sets the shape, object-fit:cover does the crop. */
.rcvda-card img,
.rcvda-projects .wp-block-image img { width: 100%; object-fit: cover; }

/* Footer link lists — no bullets; comfortable spacing comes from line-height
   (1.7, matching Fundseekers .rfs-footer__list) rather than per-item margin,
   which read unevenly. Each item is flex so the rcvda-icon glyph sits flush
   against the link text (mirrors Fundseekers' rfs_icon() footer standard).
   Link colour comes from the .has-brand-background-color a rule above. */
.rcvda-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	line-height: 1.7;
}
.rcvda-footer__list li {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20, 0.5rem);
}
.rcvda-footer__list li svg {
	width: 1em;
	height: 1em;
	flex: 0 0 auto;
}
/* Footer column heading — clear space above the link list (the WP heading's
   own margin collapses too tight against the list). Matches the original
   Fundseekers footer: uppercase, small, with a 2px amber underline bar that
   spans the text width (inline-block), not the column. */
.rcvda-footer__heading {
	display: inline-block;
	margin: 0 0 var(--wp--preset--spacing--30);
	padding-bottom: var(--wp--preset--spacing--20);
	font-weight: 500;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-bottom: 2px solid var(--wp--preset--color--interactive-on-brand, var(--wp--preset--color--accent));
}
/* The heading block carries the preset `has-large-font-size` / `has-on-dark-color`
   classes (both WordPress !important). Override here at higher specificity +
   !important — the one legitimate use — so the size/colour match the original
   footer on the already-inserted (baked) part without needing a re-insert. */
.rcvda-footer .rcvda-footer__heading {
	font-size: 0.875rem !important;
	color: var(--wp--preset--color--on-dark) !important;
}
/* Strapline + © legal line are a muted (dimmed) white — quieter than the full-
   white nav links but still clearly light on the navy footer; the legal-page
   links row stays full white (navigation). NB: do NOT use the `muted` palette
   token here — in this palette `muted` is medium blue (#033e8c), which rendered
   as low-contrast blue text on the navy footer (the "© line is blue" bug, fixed
   v0.4.99). Use a dimmed on-dark white instead. */
.rcvda-footer .rcvda-footer__lede,
.rcvda-footer .rcvda-footer__legal {
	color: color-mix(in srgb, var(--wp--preset--color--on-dark) 72%, transparent) !important;
}

/* Footer strapline (rcvda/strapline — e.g. a partnership statement, sits above
   the legal line) and the legal-page links row (rcvda/legal-links, sits in the
   flex bottom strip beside the social icons — margin:0 keeps it baseline-aligned,
   matching the previous hard-coded paragraph). */
.rcvda-footer__lede  { margin: 0 0 var(--wp--preset--spacing--30); }
.rcvda-footer__links { margin: 0; }

/* Footer content links sit on the navy footer. Force them to the inherited
   on-dark text colour — otherwise they take the global (navy) link colour and
   read nearly invisible on the navy background (which is what made the column
   lists, the strapline and the legal links disappear). The "Get in touch"
   column was unaffected only because it's the site-contact block, which sets
   its own colour. */
.rcvda-footer__list a,
.rcvda-footer__lede a,
.rcvda-footer__links a {
	color: inherit;
}
.rcvda-footer__list a:hover,
.rcvda-footer__list a:focus-visible,
.rcvda-footer__lede a:hover,
.rcvda-footer__lede a:focus-visible,
.rcvda-footer__links a:hover,
.rcvda-footer__links a:focus-visible {
	text-decoration: underline;
}
/* Footer menu-item rollovers go amber (matches the original Fundseekers footer's
   hover). Specificity (0,3,2) beats the brand-bg link rule (.has-brand-background-color
   a:not()…, 0,3,1) which otherwise holds the link at the white on-dark colour. */
.rcvda-footer .rcvda-footer__list li a:hover,
.rcvda-footer .rcvda-footer__list li a:focus-visible {
	color: var(--wp--preset--color--interactive-on-brand, var(--wp--preset--color--accent));
	text-decoration: underline;
}

/* Footer divider — drawn as a border under the columns row, NOT a separator
   block. A hand-authored coloured separator kept failing Site-Editor block
   validation ("unexpected or invalid content" — the saved <hr> never matched
   core's separator save output); a CSS border on the columns has no block to
   validate and is consistent across every footer composition. */
.rcvda-footer .wp-block-columns {
	padding-bottom: var(--wp--preset--spacing--50);
	margin-bottom: var(--wp--preset--spacing--40);
	border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

/* Footer social row — a compact, left-aligned strip of icon-only links in the
   footer-bottom area, above the Privacy/Cookies links and proportionate to that
   small strip. Icons inherit the footer's on-dark colour via currentColor, so
   contrast matches the legal line without per-brand colours. Tap targets are
   28px with 8px gaps (≥24px spacing), meeting WCAG 2.5.8 Target Size (Minimum);
   the glyph sits icon-sized within. */
.rcvda-footer__social {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20, 0.5rem);
}
.rcvda-footer__social li { display: flex; }
.rcvda-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 6px;
}
.rcvda-footer__social a .rcvda-icon {
	width: 1.125rem;
	height: 1.125rem;
	flex: 0 0 auto;
}
.rcvda-footer__social a:hover,
.rcvda-footer__social a:focus-visible {
	background-color: rgba(255, 255, 255, 0.14);
}

/* Footer-bottom row — Privacy/Cookies/Accessibility/Terms links on the left,
   social icons pushed to the right, both vertically centred. A thin vertical
   rule (matching the footer separator colour) sits just left of the icon strip
   to set it apart. Wraps to stacked on narrow widths, where the rule is hidden. */
.rcvda-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20, 0.5rem) var(--wp--preset--spacing--40, 1.5rem);
}
.rcvda-footer__bottom > * { margin: 0; }
.rcvda-footer__bottom .rcvda-footer__social {
	border-left: 1px solid rgba(255, 255, 255, 0.28);
	padding-left: var(--wp--preset--spacing--40, 1rem);
	border-right: 1px solid rgba(255, 255, 255, 0.28);
	padding-right: var(--wp--preset--spacing--40, 1rem);
}
/* The fixed accessibility (.rcvda-a11y) and back-to-top (.rcvda-to-top) buttons
   both sit at right:24px (44px circles). Once the 1290px content column nears
   the viewport edge — below ~1450px — the right-aligned icons would collide
   with them, so reserve clearance on the row's right. Above that width the
   buttons clear the column and the icons stay flush right. */
@media (max-width: 1450px) {
	.rcvda-footer__bottom,
	.rcvda-footer__legal { padding-right: 80px; }
}
@media (max-width: 600px) {
	.rcvda-footer__bottom,
	.rcvda-footer__legal { padding-right: 0; }
	.rcvda-footer__bottom .rcvda-footer__social {
		border-left: 0;
		padding-left: 0;
		border-right: 0;
		padding-right: 0;
	}
}

/* Flush top-level sections: the root constrained layout adds a block-gap
   margin between the header part, <main>, and the footer part, which shows
   as a white seam between the navy CTA band and the navy footer. Zero the
   gap between root siblings only — inner content spacing is unaffected.
   .wp-site-blocks (0,1,0) beats core's :where() root-gap rule (0,0,0). */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Flush homepage section bands: the section bands render inside post-content,
   one level deeper than .wp-site-blocks, so the rule above doesn't reach them.
   Core's flow block-gap (:root :where(.is-layout-flow) > * { margin-block-start:
   var(--wp--preset--spacing--40) }) then shows as a pale seam between adjacent
   full-bleed bands — most visible where two coloured bands meet (the navy hero →
   blue stats join). Zero the gap between adjacent FULL-WIDTH bands only, so they
   butt together; ordinary (non-alignfull) content keeps its vertical rhythm.
   .wp-block-post-content > .alignfull + .alignfull (0,3,0) beats core (0,1,0). */
.wp-block-post-content > .alignfull + .alignfull { margin-block-start: 0; }

/* Section eyebrow — small uppercase kicker above a section heading
   (e.g. "Part of a wider network"). Colour is set per-block via a token. */
.rcvda-eyebrow {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* Footer separator — an accent rule demarcating the footer from the body
   above (the navy CTA and navy footer otherwise merge). The line the user
   asked for; mirrors Fundseekers' load-bearing footer top border. */
.rcvda-footer { border-top: 3px solid var(--wp--preset--color--interactive, var(--wp--preset--color--accent)); }

/* Footer background follows the `brand` token from the active skin (the block
   ships .has-brand-background-color). The base does NOT pin or !important-force
   the colour — per-site colour is the skin's job. Each skin sets `brand` for
   light and, if it wants a different dark value, for dark (html[data-theme="dark"]
   body) — so the footer is exactly what that skin chooses in each mode, fully
   under skin control. (Removed the --rcvda-footer-navy pin + its !important,
   v0.5.23.) */

/* Header / body separator — a hairline beneath the header so it reads as
   distinct from the content below (matters most in dark mode, where the
   header and hero are both dark navy). */
.rcvda-header { border-bottom: 1px solid var(--wp--preset--color--divider); }

/* Header navigation menu items — accent-underline scaffold, ported verbatim in
   intent from the original Fundseekers header (kadence-child style.css § nav).
   The text keeps the header's own pivoting colour (navy on the light header,
   cream on the navy/dark header); the AMBER UNDERLINE is the indicator, NOT a
   text-colour change. A transparent 2px border + matching padding reserves the
   underline's vertical space so hover/current don't reflow the row.
     - rest:    contrast text, weight 500, transparent underline
     - hover:   60% amber underline (text unchanged)
     - current: solid amber underline + semibold (text unchanged)
   Specificity (0,3,1)+ beats the :where() global link rule. */
.rcvda-header .wp-block-navigation a,
.rcvda-header .wp-block-navigation .wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
	font-weight: 500;
	text-decoration: none; /* the amber border-bottom is the only underline — kill the native link underline to avoid a double line */
	border-bottom: 2px solid transparent;
	padding-bottom: 6px;
	transition: border-color 0.2s ease;
}
.rcvda-header .wp-block-navigation a:hover,
.rcvda-header .wp-block-navigation a:focus-visible,
.rcvda-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.rcvda-header .wp-block-navigation .wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--contrast);
	border-bottom-color: color-mix(in srgb, var(--wp--preset--color--interactive, var(--wp--preset--color--accent)) 60%, transparent);
}
.rcvda-header .wp-block-navigation .current-menu-item > a,
.rcvda-header .wp-block-navigation a[aria-current],
.rcvda-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.rcvda-header .wp-block-navigation .wp-block-navigation-item__content[aria-current] {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
	border-bottom-color: var(--wp--preset--color--interactive, var(--wp--preset--color--accent));
}

/* Navigation dropdowns + mobile overlay — make them theme-aware.
   WordPress core ships two hardcoded-white defaults on a navigation block that
   has no background colour set (which ours doesn't):
     .wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container          { background-color:#fff }
     .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) { background-color:#fff }
   In dark mode our nav links pivot to the light `contrast` colour, so they
   ended up as near-white text on that white panel (the reported "white
   background, light-blue text" bug). Re-point both backgrounds at the `base`
   token so the panel pivots with the theme: white in light mode (identical to
   before), deep navy in dark mode. The `html[data-theme]` + `.rcvda-header`
   prefix lifts specificity above core's (0,2,0) / (0,5,0); base is always
   present because the wp_head script sets data-theme to light or dark. */
html[data-theme] .rcvda-header .wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {
	background-color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--divider);
}
html[data-theme] .rcvda-header .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
	background-color: var(--wp--preset--color--base);
}

/* Mobile overlay menu — cancel the desktop header's justify-right so the open
   overlay reads as a normal left-aligned column.
   The header nav is set `items-justified-right` (correct for the desktop bar,
   where the links sit on the right). In the full-screen mobile overlay,
   WordPress reuses that justification as the column's cross-axis alignment
   (`--navigation-layout-align: flex-end`), which right-aligns every item and
   clips the long top-level labels ("About Us", "Services") off the right edge —
   the reported "menu behaving strangely" bug. Override the layout custom
   properties at the open-overlay root (so it cascades to the nested submenu
   lists too) and left-align the item text. Scoped to `.rcvda-header` +
   `.is-menu-open`, so the desktop bar's right-justification is untouched.
   Shared across all rcvda-base sites (main RCVDA + Fundseekers) — both use the
   same overlay, so both benefit. */
.rcvda-header .wp-block-navigation__responsive-container.is-menu-open {
	--navigation-layout-align: flex-start;
	--navigation-layout-justification-setting: flex-start;
}
/* Re-set the layout vars *on the container itself* (not just the ancestor) and
   force the alignment explicitly. The nav carries `items-justified-right`, which
   re-declares `--navigation-layout-align` / `--navigation-layout-justification-setting`
   at the container level — overriding the ancestor value set above. Without this,
   the top-level items stayed right-aligned in the narrow overlay (the parent
   labels "About Us"/"Services" sat centred/right while the submenu items were
   left — the reported "padded only from one side" look). Setting the vars here
   plus explicit `align-items`/`justify-content` (with `!important` to beat the
   generated layout rule) left-aligns the whole column; `margin-right:auto` on the
   item content pushes each label to the left within its flex row. */
.rcvda-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	--navigation-layout-align: flex-start;
	--navigation-layout-justification-setting: flex-start;
	align-items: flex-start !important;
	justify-content: flex-start !important;
}
.rcvda-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	align-items: flex-start !important;
	justify-content: flex-start !important;
	text-align: left !important;
}
.rcvda-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	text-align: left !important;
	margin-right: auto !important;
}
.rcvda-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	align-items: flex-start;
	text-align: left;
}
/* Left/right gutter for the whole overlay. Once the items are left-aligned
   (above), the top-level labels sit flush against the screen edge because the
   overlay content wrapper has no horizontal padding (WP ships `padding-inline:0`
   here). Match the header's own 24px gutter so nothing touches the edge; the
   submenu items keep their built-in extra indent, so the parent→child hierarchy
   is preserved, just shifted in by the gutter. The close (X) button is a sibling
   of this wrapper, so padding here doesn't move it. */
.rcvda-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	box-sizing: border-box;
	padding-inline: var(--wp--preset--spacing--40, 24px);
}
/* Close (X) button inset. WordPress positions it `top:0; right:0` and relies on
   the overlay container's padding for the gap — but that padding is
   `clamp(1rem, var(--wp--style--root--padding-*), 20rem)`, and those root vars
   are undefined on this site, so the container padding collapses to 0 and the X
   lands in the very corner (tight to the right, no matching gap). Inset it by the
   same 24px gutter as the menu, so it's symmetric top/right and aligned with the
   content. */
.rcvda-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	top: var(--wp--preset--spacing--40, 24px);
	right: var(--wp--preset--spacing--40, 24px);
	/* WordPress hard-codes the close icon black, so it vanished on the dark navy
	   overlay in dark mode. Point it at the `contrast` token (the same one the nav
	   links use): it pivots to light on the dark overlay and to dark navy on the
	   light overlay. The icon SVG is fill:currentColor, so it follows. */
	color: var(--wp--preset--color--contrast);
}

/* Mobile header layout — centre the stacked rows.
   At the mobile/hamburger breakpoint the header can't fit the logo and the
   controls (nav toggle + search + Support Us) on one line, so they stack. With
   the default `space-between` flex each wrapped line falls to the left, which
   reads as accidental. Switch the header's outer flex to a centred column so
   the logo sits centred on top and the controls row sits centred beneath it —
   a deliberate, symmetric mobile header. Only the outer group changes to a
   column; the inner groups keep their own row layout (logo + title; the
   controls). 600px matches WordPress's mobile-overlay (hamburger) breakpoint,
   so this only applies once the header is in its collapsed format. Shared
   across all rcvda-base sites. The (0,2,0) selector beats the generated flex
   layout container rule (0,1,0), so no !important is needed. */
@media (max-width: 600px) {
	.rcvda-header > .wp-block-group {
		flex-direction: column;
		align-items: center;
		gap: var(--wp--preset--spacing--30, 1rem);
	}
}

/* Header site title — the "Redcar Fundseekers" wordmark text beside the dragon
   logo. Inherits the skin's body/UI font (DM Sans under Fundseekers). Colour is
   contrast so it pivots with the header (navy on the light header, cream on the
   navy/dark header), turning amber on hover/focus to match the nav. */
/* Header logo size is PER-SITE and lives in the active skin, NOT here.
   Each family site has a different mark (Fundseekers = a square-ish dragon;
   the main RCVDA site = a wide wordmark), so the right display height differs.
   The base theme therefore leaves the Site Logo block's own width — set per
   site in the Site Editor — to control sizing. The Fundseekers skin
   (styles/fundseekers.json → styles.css) pins its dragon to a fixed height;
   other skins keep the editor-driven default. (Was a forced height:100px here,
   which overrode the main site's editor width and rendered its wordmark ~5×
   too large — moved out v0.4.97.) */

.rcvda-header .wp-block-site-title { margin: 0; }
.rcvda-header .wp-block-site-title a {
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--fundseekers-display); /* DM Serif Display, as H1 */
	font-weight: 400;
	font-size: 2rem;
	line-height: 1.05;
	text-decoration: none;
}
.rcvda-header .wp-block-site-title a:hover,
.rcvda-header .wp-block-site-title a:focus-visible {
	color: var(--wp--preset--color--interactive, var(--wp--preset--color--accent));
}

/* Visually-hidden helper (used by the overlay's input label). */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* Header search glyph (§5) — a magnifier in the header right group that opens
   the full-screen overlay. Icon-only, so the header stays uncluttered; it is a
   real link to /?s= for the no-JS / no-plugin fallback. */
.rcvda-search-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 6px;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	transition: background-color 150ms ease, color 150ms ease;
}
.rcvda-search-trigger:hover,
.rcvda-search-trigger:focus-visible { background-color: var(--wp--preset--color--surface); }
.rcvda-search-trigger svg { display: block; }

/* Full-screen overlay live search (§5). The backdrop is an intentionally dark,
   translucent navy in both modes (it's a scrim over the page), so the panel
   text is light-on-dark regardless of light/dark theme — no token flipping
   needed for legibility here. */
.rcvda-search[hidden] { display: none; }
.rcvda-search {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	overflow-y: auto;
}
.rcvda-search__backdrop {
	position: fixed;
	inset: 0;
	background-color: rgba(8, 18, 40, 0.94);
	backdrop-filter: blur(2px);
}
.rcvda-search__panel {
	position: relative;
	width: 100%;
	max-width: 760px;
	margin: clamp(1.5rem, 12vh, 9rem) var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
	color: #fff;
}
.rcvda-search__close {
	position: absolute;
	top: -2.75rem;
	right: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: rgba(255, 255, 255, 0.85);
	cursor: pointer;
}
.rcvda-search__close:hover,
.rcvda-search__close:focus-visible { background-color: rgba(255, 255, 255, 0.12); color: #fff; }
.rcvda-search__form {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	border-bottom: 2px solid var(--wp--preset--color--interactive, var(--wp--preset--color--accent));
	padding-bottom: 0.5rem;
}
.rcvda-search__icon { flex: 0 0 auto; color: var(--wp--preset--color--interactive, var(--wp--preset--color--accent)); }
.rcvda-search__input {
	flex: 1 1 auto;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 1.75rem;
	line-height: 1.2;
	padding: 0.25rem 0;
}
.rcvda-search__input::placeholder { color: rgba(255, 255, 255, 0.55); }
.rcvda-search__input:focus { outline: none; }
.rcvda-search__status {
	margin: var(--wp--preset--spacing--30) 0 0;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.7);
}
.rcvda-search__results {
	list-style: none;
	margin: var(--wp--preset--spacing--30) 0 0;
	padding: 0;
}
.rcvda-search__result + .rcvda-search__result { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.rcvda-search__result a {
	display: block;
	padding: var(--wp--preset--spacing--30) 0.5rem;
	text-decoration: none;
	border-radius: 6px;
}
.rcvda-search__result a:hover,
.rcvda-search__result a:focus-visible { background-color: rgba(255, 255, 255, 0.08); }
.rcvda-search__rtype {
	display: block;
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--interactive, var(--wp--preset--color--accent));
}
.rcvda-search__rtitle {
	display: block;
	font-size: 1.125rem;
	font-weight: 600;
	color: #fff;
}
.rcvda-search__rexcerpt {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.75);
}
/* Reduced-motion: drop the blur/transition niceties. */
html[data-motion="reduced"] .rcvda-search__backdrop { backdrop-filter: none; }
html[data-motion="reduced"] .rcvda-search-trigger { transition: none; }

/* Back-to-top floating button (§6) — rendered once globally via wp_footer.
   Sits in the bottom-right floating-widget stack just above the accessibility
   trigger (which is at bottom:24px), matching its 44px circle styling. Hidden
   until the visitor scrolls down (JS toggles .is-visible). */
.rcvda-to-top {
	position: fixed; right: 24px; bottom: 80px; z-index: 9998;
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; padding: 0; cursor: pointer;
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--divider);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	color: var(--wp--preset--color--contrast);
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity 150ms ease, transform 150ms ease, background 150ms ease, color 150ms ease;
}
.rcvda-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.rcvda-to-top:hover, .rcvda-to-top:focus-visible { background: var(--wp--preset--color--surface); }
.rcvda-to-top svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }
html[data-motion="reduced"] .rcvda-to-top { transition: none; }

/* Page intro / standfirst (rcvda/page-intro block, rendered from the page
   Excerpt only when one is set). A muted lead line under the H1. Colour + size
   come from the block's textColor/fontSize supports (muted / large); this adds
   the lead-line treatment and rhythm. Token-driven → pivots in dark mode. */
.rcvda-page-intro {
	max-width: 65ch;
	margin-top: 0; /* first item in the reading column — start at the grid top, level with the rail */
	margin-bottom: var(--wp--preset--spacing--40);
	margin-inline: 0; /* left-align: never inherit constrained-layout auto-centring */
	line-height: 1.5;
	text-wrap: pretty;
}

/* ==========================================================================
   POST HERO (single.html) — graceful for a mixed-quality legacy archive
   --------------------------------------------------------------------------
   Posts don't force a 16:9 cover crop (that mangles low-res / odd-aspect
   legacy featured images). Instead show the whole image at its own size,
   centred, never upscaled past native resolution, capped in height so a big
   photo can't dominate. Pages keep the polished full-width banner.
   ========================================================================== */
.rcvda-post-hero img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 400px;
	height: auto;
	margin-inline: auto;
}

/* ==========================================================================
   TWO-COLUMN PAGE LAYOUT (default page template)
   A left reading column + a sticky right rail for the page furniture (TOC,
   listen control, page-meta). Body comes first in source order (so screen-
   reader / mobile order is content-first); the rail is placed to the right on
   desktop. The layout is capped narrower than the 1290px band so the body keeps
   a comfortable reading measure. Spec: Page_Header_Design_Note.md.
   ========================================================================== */
.rcvda-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 250px;
	gap: var(--wp--preset--spacing--60);
	align-items: start;
	max-width: 1120px;
	margin-inline: auto;
}
/* The grid columns are siblings, so WordPress's flow-layout `* + *` rule gives
   the rail (the second child) a block-gap top margin, dropping it ~24px below
   the content column. Zero it so both columns start on the same line. */
/* Wider rail (~1/3) — scoped modifier so only templates that opt in (FPT
   service points) get it; every other single page keeps the 250px rail. */
.rcvda-layout--wide-rail { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.rcvda-layout > * { margin-block-start: 0; }
.rcvda-layout__main { min-width: 0; }
/* The rail carries a left divider + padding so it reads as a distinct side
   panel rather than floating text. Because the title/intro now sit above the
   grid, the rail and the body start on the same line — so "On this page" aligns
   with the top of the content, not the page title. */
.rcvda-layout__rail {
	position: sticky;
	top: 1.5rem;
	align-self: start;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40);
	font-size: 0.9375rem;
	border-left: 1px solid var(--wp--preset--color--divider);
	padding-left: var(--wp--preset--spacing--40);
}
/* The rail is a flex column with `gap` (above), but WordPress's flow-layout rule
   (:where(.is-layout-flow) > * { margin-block-start }) still adds a block-gap top
   margin to each rail section, stacking on top of the flex gap. Because .rcvda-ra
   zeroes its own top margin but the TOC does not, the gap above "On this page"
   came out 48px vs 24px elsewhere. Zero the flow margins so only the flex gap
   governs — even spacing between all rail sections. Mirrors the .rcvda-layout > *
   reset above. */
.rcvda-layout__rail > * { margin-block-start: 0; margin-block-end: 0; }
/* Narrow screens: single column, rail below the body (a mobile refinement to
   place the rail's TOC nearer the top is noted in the design note). The left
   divider becomes a top divider when stacked. */
@media (max-width: 860px) {
	.rcvda-layout { grid-template-columns: 1fr; gap: var(--wp--preset--spacing--40); max-width: none; }
	.rcvda-layout__rail {
		position: static;
		border-left: 0;
		padding-left: 0;
		border-top: 1px solid var(--wp--preset--color--divider);
		padding-top: var(--wp--preset--spacing--40);
	}
}
/* The read-aloud control was designed for a wide content area; keep it (and
   especially its voice <select>) within the narrow rail so nothing overflows.
   A genuinely compact rail control is a read-aloud (rcvda-core) refinement. */
.rcvda-layout__rail .rcvda-ra,
.rcvda-layout__rail .rcvda-ra * { min-width: 0; max-width: 100%; }
.rcvda-layout__rail select { max-width: 100%; min-width: 0; box-sizing: border-box; }

/* Read-aloud control reflowed for the narrow rail (scoped — unchanged
   elsewhere). The bordered box is kept (a distinct boxed card), but the controls
   are stacked as clear, left-aligned rows: Play + Stop, then Speed (its glyph +
   label restored), then the voice selector with its label on its own line above
   it. align-items:stretch is essential — the base panel uses align-items:center,
   which in a column layout centres every row (the "indented" look). */
.rcvda-layout__rail .rcvda-ra__panel {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 10px;
}
.rcvda-layout__rail .rcvda-ra__panel > p:empty { display: none; }
.rcvda-layout__rail .rcvda-ra__controls { display: flex; gap: 8px; }
.rcvda-layout__rail .rcvda-ra__controls .rcvda-ra__btn { flex: 1 1 0; justify-content: center; }
/* wpautop converts the newlines in the [rcvda_read_aloud] shortcode output into
   <br> (and empty <p>, hidden above). The wide layout uses those <br> as real
   line breaks, so only suppress them inside the rail — broadened from __controls
   to the whole rail control so the voice field's stray <br> (which was adding a
   ~21px gap below "Choose your voice & language") is caught too. */
.rcvda-layout__rail .rcvda-ra br { display: none; }
.rcvda-layout__rail .rcvda-ra__field { display: flex; align-items: center; gap: 8px; margin: 0; }
.rcvda-layout__rail .rcvda-ra__field .rcvda-ra__label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.rcvda-layout__rail .rcvda-ra__speed { margin-left: auto; }
/* Voice field (the second .rcvda-ra__field): own line, label above the select. */
.rcvda-layout__rail .rcvda-ra__field + .rcvda-ra__field {
	flex-direction: column;
	align-items: stretch;
	gap: 3px;
}
.rcvda-layout__rail .rcvda-ra__field + .rcvda-ra__field .rcvda-ra__label { white-space: nowrap; font-size: 0.75rem; }
.rcvda-layout__rail .rcvda-ra__field + .rcvda-ra__field .rcvda-ra__voice { width: 100%; box-sizing: border-box; }

/* Rail items */
/* Rail section titles — clear, consistent, sentence case (no caps, per brand):
   a semibold glyph + label with a hairline divider so each rail section reads
   as a distinct, titled block. Includes the read-aloud "Listen to this page"
   title so all three rail sections match. */
.rcvda-page-toc__title,
.rcvda-page-meta__title,
.rcvda-layout__rail .rcvda-ra__title,
.rcvda-layout__rail .rcvda-ra__summary {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 0.5rem;
	padding-bottom: 0.3rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
	border-bottom: 1px solid var(--wp--preset--color--divider);
}
.rcvda-page-toc__title svg,
.rcvda-page-meta__title svg,
.rcvda-layout__rail .rcvda-ra__title svg,
.rcvda-layout__rail .rcvda-ra__summary svg { width: 1em; height: 1em; flex: 0 0 auto; }
/* Listen is a disclosure: it reads as a rail section title but is clickable.
   Drop the empty gap under it while collapsed (nothing shows below); reveal the
   accent on hover as an affordance. The chevron keeps its own right-alignment. */
.rcvda-layout__rail .rcvda-ra__disclosure:not([open]) .rcvda-ra__summary { margin-bottom: 0; }
.rcvda-layout__rail .rcvda-ra__summary:hover { color: var(--wp--preset--color--interactive, var(--wp--preset--color--accent)); }
.rcvda-page-toc ul { list-style: none; margin: 0; padding: 0; }
.rcvda-page-toc ul ul { padding-left: 0.9rem; }
.rcvda-page-toc li { margin: 0.25rem 0; line-height: 1.4; }
.rcvda-page-toc li.bold { font-weight: 500; }
.rcvda-page-meta { margin: 0; padding: 0; }
.rcvda-page-meta__list { list-style: none; margin: 0; padding: 0; }
.rcvda-page-meta li { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 6px; line-height: 1.6; padding: 2px 0; }
.rcvda-page-meta__i { flex: 0 0 auto; margin-top: 0.15em; align-self: flex-start; }
/* Let the text take the remaining width and wrap *beside* the glyph (flex-basis:0
   stops a long value — e.g. a list of tags — from being bumped to its own line as
   a block). The staleness chip is excluded — it keeps its own full-width line. */
.rcvda-page-meta li > span:not(.rcvda-page-meta__stale),
.rcvda-page-meta li > a { flex: 1 1 0; min-width: 0; }
/* Listening time is a link that jumps to — and starts — the read-aloud player. */
.rcvda-page-meta__listen { display: inline-flex; align-items: center; gap: 6px; color: var(--wp--preset--color--brand-light); text-decoration: none; }
.rcvda-page-meta__listen:hover,
.rcvda-page-meta__listen:focus-visible { color: var(--wp--preset--color--interactive, var(--wp--preset--color--accent)); text-decoration: underline; }
/* Staleness flag — a soft outlined "danger" chip on its own line under the date. */
.rcvda-page-meta__stale {
	flex-basis: 100%;
	margin-left: 21px;
	width: fit-content;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 1px 9px;
	border: 1px solid var(--wp--preset--color--alert);
	border-radius: 999px;
	color: var(--wp--preset--color--alert);
	font-size: 0.78rem;
	line-height: 1.5;
	white-space: nowrap;
}
.rcvda-page-meta__stale svg { width: 0.95em; height: 0.95em; flex: 0 0 auto; margin-top: 0; }
/* Collapsible TOC: by default it shows the top-level (h2) section list only; a
   "Show full contents" toggle reveals the nested h3/h4 levels so it can act as a
   full table of contents on demand. JS adds .is-collapsed and reveals the
   toggle; with no JS the full tree shows and the toggle stays hidden. */
.rcvda-page-toc.is-collapsed .rcvda-page-toc__items ul ul { display: none; }
/* Header chevron — folds the whole list away from the "On this page" title.
   Ships hidden; page-toc.js reveals it and toggles .is-section-collapsed. */
.rcvda-page-toc__collapse {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 2px;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	line-height: 0;
}
.rcvda-page-toc__collapse:hover,
.rcvda-page-toc__collapse:focus-visible { color: var(--wp--preset--color--interactive, var(--wp--preset--color--accent)); }
.rcvda-page-toc__collapse svg { width: 1em; height: 1em; transition: transform 150ms ease; }
/* Expanded (default): chevron points down. Collapsed: it rests as ">". */
.rcvda-page-toc__collapse[aria-expanded="true"] svg { transform: rotate(90deg); }
.rcvda-page-toc.is-section-collapsed .rcvda-page-toc__body { display: none; }
.rcvda-page-toc__more {
	margin-top: 0.4rem;
	padding: 0.15rem 0;
	background: none;
	border: 0;
	font: inherit;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--brand-light);
	cursor: pointer;
	text-decoration: underline;
}
.rcvda-page-toc__more:hover,
.rcvda-page-toc__more:focus-visible { color: var(--wp--preset--color--interactive, var(--wp--preset--color--accent)); }
/* Bottom-of-post writing credit (the author byline moved here from the top). */
.rcvda-writing-credit {
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--divider);
	font-style: italic;
}

/* News / archive / search pagination — Fundseekers-style: prev/next as labelled
   chevron pills + page-number pills, current page filled. Styles WP core's
   query-pagination markup; tokens only, so it flips in dark mode. */
.wp-block-query-pagination {
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-block-start: var(--wp--preset--spacing--50);
}
.wp-block-query-pagination .wp-block-query-pagination-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next,
.wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.9rem;
	border: 1px solid var(--wp--preset--color--divider);
	border-radius: 8px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-weight: 500;
	text-decoration: none;
	transition: border-color 0.15s ease;
}
.wp-block-query-pagination-previous:hover,
.wp-block-query-pagination-previous:focus-visible,
.wp-block-query-pagination-next:hover,
.wp-block-query-pagination-next:focus-visible,
.wp-block-query-pagination-numbers .page-numbers:hover,
.wp-block-query-pagination-numbers .page-numbers:focus-visible {
	border-color: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--contrast);
}
.wp-block-query-pagination-numbers .page-numbers.current,
.wp-block-query-pagination-numbers .page-numbers.current:hover {
	background: var(--wp--preset--color--brand-mid);
	color: var(--wp--preset--color--on-dark);
	border-color: var(--wp--preset--color--brand-mid);
}
.wp-block-query-pagination-numbers .page-numbers.dots {
	min-width: auto;
	padding: 0 4px;
	border-color: transparent;
	background: transparent;
	color: var(--wp--preset--color--muted);
}
/* Lucide chevrons (chevron-left before "Previous", chevron-right after "Next"),
   matching Fundseekers' rfs_icon() pagination — rendered via mask so they take
   currentColor (the post-card meta-glyph technique). The core text arrow is off
   (paginationArrow:none) so these are the only glyphs. */
.wp-block-query-pagination-previous::before,
.wp-block-query-pagination-next::after {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	flex: 0 0 auto;
	background-color: currentColor;
	-webkit-mask: var(--rcvda-chev) center / contain no-repeat;
	mask: var(--rcvda-chev) center / contain no-repeat;
}
.wp-block-query-pagination-previous::before { --rcvda-chev: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m15 18-6-6 6-6'/></svg>"); }
.wp-block-query-pagination-next::after { --rcvda-chev: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m9 18 6-6-6-6'/></svg>"); }

.rcvda-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rcvda-breadcrumb__sep { opacity: 0.5; }
.rcvda-breadcrumb__current { opacity: 0.8; }

/* Footer pledge / accreditation logos — uniform height, centred wrapping row,
   in a light card. The card colour is owned here (not by the rcvda/pledges
   render): WordPress strips a raw `background-color` from the block wrapper
   inline style when the block carries `has-background`, so the plugin's inline
   white never survives — the theme must supply it. Literal white (not a token)
   so the card stays light in dark mode and the full-colour charter marks read
   in both modes. The render's border-radius/margin/padding do survive inline. */
.rcvda-pledges { max-width: var(--wp--style--global--content-size, 1080px); margin-inline: auto; background-color: rgba(255, 255, 255, 0.85); border-radius: 8px; padding: var(--wp--preset--spacing--40); }
.rcvda-pledges__logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--wp--preset--spacing--50); }
.rcvda-pledges__logos img { height: 52px; width: auto; }

/* ==========================================================================
   FLOATING ACCESSIBILITY PANEL  (.rcvda-a11y*)
   Colours use the preset custom properties, so the panel pivots with dark
   mode automatically. Emitted by the wp_footer priority-30 hook.
   ========================================================================== */
.rcvda-a11y { position: fixed; bottom: 24px; right: 24px; z-index: 9999; }

.rcvda-a11y__trigger {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; padding: 0; cursor: pointer;
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--divider);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	color: var(--wp--preset--color--contrast);
	transition: background 150ms ease, color 150ms ease;
}
.rcvda-a11y__trigger svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }
.rcvda-a11y__trigger:hover, .rcvda-a11y__trigger:focus-visible { background: var(--wp--preset--color--surface); }

.rcvda-a11y__panel {
	position: absolute; right: 0; bottom: calc(100% + 10px);
	width: 240px; padding: 1rem;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--divider);
	border-radius: 8px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.rcvda-a11y__panel[hidden] { display: none; }

.rcvda-a11y__title {
	margin: 0 0 0.5rem; padding: 0 0.5rem;
	font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
	letter-spacing: 0.08em; color: var(--wp--preset--color--muted);
}
.rcvda-a11y__list { list-style: none; margin: 0; padding: 0; }

.rcvda-a11y__switch {
	display: flex; align-items: center; justify-content: space-between;
	width: 100%; gap: 1rem; padding: 0.5rem;
	background: none; border: none; border-radius: 6px; cursor: pointer;
	font-family: inherit; font-size: 0.9375rem;
	color: var(--wp--preset--color--contrast); text-align: left;
	transition: background 150ms ease;
}
.rcvda-a11y__switch:hover, .rcvda-a11y__switch:focus-visible { background: rgba(0, 0, 0, 0.06); }
html[data-theme="dark"] .rcvda-a11y__switch:hover,
html[data-theme="dark"] .rcvda-a11y__switch:focus-visible { background: rgba(255, 255, 255, 0.10); }
.rcvda-a11y__label { flex: 1 1 auto; color: var(--wp--preset--color--contrast); }

.rcvda-a11y__track {
	flex: 0 0 auto; position: relative; width: 38px; height: 22px;
	border-radius: 999px; background: #8896ad;
	transition: background 150ms ease;
}
.rcvda-a11y__thumb {
	position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
	border-radius: 50%; background: #ffffff; border: 1px solid rgba(0, 0, 0, 0.18);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 150ms ease;
}
.rcvda-a11y__switch[aria-checked="true"] .rcvda-a11y__track { background: var(--wp--preset--color--interactive, var(--wp--preset--color--accent)); }
.rcvda-a11y__switch[aria-checked="true"] .rcvda-a11y__thumb { transform: translateX(16px); }

.rcvda-a11y__reset {
	display: block; width: 100%; margin-top: 0.5rem; padding: 0.5rem;
	background: none; border: none; border-top: 1px solid var(--wp--preset--color--divider);
	cursor: pointer; font-family: inherit; font-size: 0.9375rem;
	color: var(--wp--preset--color--muted); text-align: center;
	transition: background 150ms ease, color 150ms ease;
}
.rcvda-a11y__reset:hover, .rcvda-a11y__reset:focus-visible {
	background: rgba(0, 0, 0, 0.06); color: var(--wp--preset--color--contrast);
}
html[data-theme="dark"] .rcvda-a11y__reset:hover,
html[data-theme="dark"] .rcvda-a11y__reset:focus-visible { background: rgba(255, 255, 255, 0.10); }

/* ==========================================================================
   FORMS  (WPForms — "modern markup")
   Give every form on the site one consistent, on-brand treatment: a card panel
   plus brand-token fields and submit button. WPForms 'modern' exposes
   --wpforms-* custom properties, so we map those to the design tokens (scoped
   to .wpforms-container). The colour-role variables are forced with `!important`
   so the theme palette wins over any per-form WPForms "Theme" colours — those
   are static hex emitted at ID specificity (#wpforms-NNN.wpforms-block-…) and
   do NOT pivot for dark mode, so left unforced they leave forms light-on-dark.
   Forcing them keeps every form on-brand and dark-aware regardless of the Theme
   picked in the block editor (the block colour pickers become no-ops by design).
   Everything references var(--wp--preset--color--*), so it adapts in dark mode
   and applies to any form, wherever it's placed.
   NOTE: this block requires WPForms "Modern" markup — that is what defines the
   --wpforms-* variables. Forms on CLASSIC markup are styled separately, by the
   "WPForms — classic markup" block immediately below.
   ========================================================================== */
.wpforms-container.wpforms-render-modern {
	/* No container background/border here on purpose: the form's panel is the
	   page's own wrapper block (e.g. a Columns/Group given a background colour
	   in the editor — that is the editor-controlled layer). We only give the
	   form a little internal padding so its content isn't flush to the wrapper
	   edges, and theme the fields/labels/button via WPForms' modern variables.
	   The double-class selector (0,2,0) beats WPForms' own
	   `div.wpforms-container-full` (0,1,1) which otherwise forces padding to 0. */
	padding: var(--wp--preset--spacing--40);

	/* Fields — shape props left unforced (a form may set its own radius); the
	   COLOUR-role vars below are forced so the palette wins over per-form Theme
	   colours and pivots in dark. */
	--wpforms-field-border-radius: 8px;
	--wpforms-field-border-style: solid;
	--wpforms-field-border-size: 1px;
	/* Field border — the pale `divider` hairline reads as too faint on form
	   fields, so use a 45% mix of the text colour: a clearly visible neutral
	   border that pivots correctly in both light and dark. (`-spare` is the
	   border WPForms uses for some field states, kept in sync.) */
	--wpforms-field-border-color: color-mix(in srgb, var(--wp--preset--color--contrast) 45%, transparent) !important;
	--wpforms-field-border-color-spare: color-mix(in srgb, var(--wp--preset--color--contrast) 45%, transparent) !important;
	--wpforms-field-background-color: var(--wp--preset--color--base) !important;
	--wpforms-field-text-color: var(--wp--preset--color--contrast) !important;
	--wpforms-field-menu-color: var(--wp--preset--color--base) !important;

	/* Labels */
	--wpforms-label-color: var(--wp--preset--color--contrast) !important;
	--wpforms-label-sublabel-color: var(--wp--preset--color--muted) !important;
	--wpforms-label-error-color: var(--wp--preset--color--alert) !important;

	/* Submit button — brand button: accent fill, navy text, no darken on hover */
	--wpforms-button-border-radius: 6px;
	--wpforms-button-background-color: var(--wp--preset--color--accent) !important;
	--wpforms-button-background-color-alt: var(--wp--preset--color--accent) !important;
	--wpforms-button-text-color: var(--wp--preset--color--brand) !important;
	--wpforms-button-text-color-alt: var(--wp--preset--color--brand) !important;

	/* Page-break / progress accents */
	--wpforms-page-break-color: var(--wp--preset--color--interactive, var(--wp--preset--color--accent));
}
/* Required marker reads as the alert colour (not colour-only — WPForms also
   outputs the "(required)" text/aria). */
.wpforms-container .wpforms-required-label { color: var(--wp--preset--color--alert); }

/* Theme focus ring on fields + submit (matches the global AAA indicator). */
.wpforms-container :where(input, textarea, select, button):focus-visible {
	outline: 3px solid var(--wp--preset--color--interactive, var(--wp--preset--color--accent));
	outline-offset: 2px;
}

/* Submit button: the theme's inset-wash hover (filled buttons wash, not darken). */
.wpforms-container button.wpforms-submit:hover,
.wpforms-container button.wpforms-submit:focus-visible {
	box-shadow: inset 0 0 0 1000px rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   COMPLIANZ COOKIE BANNER
   Shared, on-brand styling for the consent banner shown on every RCVDA site.
   Like the WPForms block above, everything references var(--wp--preset--color--*),
   so it retints automatically in dark mode via the token re-declaration on
   html[data-theme="dark"] body — no separate dark block needed. The `:root
   .cmplz-*` anchor (0,1,1) outranks Complianz's own compiled bare-class rules
   without !important. Complianz compiles its base colours from WP Admin →
   Consent Banner → Colors; this override layer wins regardless, but keeping that
   panel roughly on-brand avoids a flash of the plugin defaults.
   ========================================================================== */
:root .cmplz-cookiebanner {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--divider);
	color: var(--wp--preset--color--contrast);
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
:root .cmplz-cookiebanner .cmplz-header,
:root .cmplz-cookiebanner .cmplz-title,
:root .cmplz-cookiebanner h1,
:root .cmplz-cookiebanner h2,
:root .cmplz-cookiebanner h3,
:root .cmplz-cookiebanner .cmplz-message,
:root .cmplz-cookiebanner .cmplz-body,
:root .cmplz-cookiebanner .cmplz-body p {
	color: var(--wp--preset--color--contrast);
}
:root .cmplz-cookiebanner a,
:root .cmplz-cookiebanner .cmplz-links a {
	color: var(--wp--preset--color--brand-light);
	text-decoration: underline;
}

/* Buttons — shared idiom: pill-free, 6px radius, accent focus ring, wash-not-darken hover */
:root .cmplz-cookiebanner .cmplz-btn {
	border-radius: 6px;
	font-weight: 500;
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
:root .cmplz-cookiebanner .cmplz-btn:focus-visible {
	outline: 3px solid var(--wp--preset--color--interactive, var(--wp--preset--color--accent));
	outline-offset: 2px;
}
/* Accept — accent fill, navy text (brand spine, invariant by token role) */
:root .cmplz-cookiebanner .cmplz-accept,
:root .cmplz-cookiebanner button.cmplz-accept,
:root .cmplz-cookiebanner .cmplz-accept-all,
:root .cmplz-cookiebanner .cmplz-accept-marketing {
	background-color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--brand);
}
:root .cmplz-cookiebanner .cmplz-accept:hover,
:root .cmplz-cookiebanner .cmplz-accept-all:hover,
:root .cmplz-cookiebanner .cmplz-accept-marketing:hover {
	box-shadow: inset 0 0 0 1000px rgba(255, 255, 255, 0.18);
}
/* Deny — contrast fill, base text (pivots with the token pair) */
:root .cmplz-cookiebanner .cmplz-deny {
	background-color: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}
:root .cmplz-cookiebanner .cmplz-deny:hover {
	box-shadow: inset 0 0 0 1000px rgba(255, 255, 255, 0.12);
}
/* View / Save Preferences — outlined tertiary matching the shell */
:root .cmplz-cookiebanner .cmplz-view-preferences,
:root .cmplz-cookiebanner .cmplz-save-preferences {
	background-color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--contrast);
}
:root .cmplz-cookiebanner .cmplz-view-preferences:hover,
:root .cmplz-cookiebanner .cmplz-save-preferences:hover {
	background-color: var(--wp--preset--color--surface);
}

/* Category toggles */
:root .cmplz-cookiebanner .cmplz-categories,
:root .cmplz-cookiebanner .cmplz-categories .cmplz-category-header,
:root .cmplz-cookiebanner .cmplz-categories .cmplz-category h3 {
	color: var(--wp--preset--color--contrast);
}
:root .cmplz-cookiebanner .cmplz-categories .cmplz-category {
	border-color: var(--wp--preset--color--divider);
}
:root .cmplz-cookiebanner .cmplz-categories .cmplz-description {
	color: var(--wp--preset--color--muted);
}
:root .cmplz-cookiebanner .cmplz-banner-checkbox .cmplz-slider,
:root .cmplz-cookiebanner label.cmplz-category-toggle .cmplz-slider {
	background-color: var(--wp--preset--color--muted);
}
:root .cmplz-cookiebanner .cmplz-banner-checkbox .cmplz-slider::before,
:root .cmplz-cookiebanner label.cmplz-category-toggle .cmplz-slider::before {
	background-color: var(--wp--preset--color--base);
}
:root .cmplz-cookiebanner .cmplz-banner-checkbox input:checked + .cmplz-slider,
:root .cmplz-cookiebanner label.cmplz-category-toggle input:checked + .cmplz-slider {
	background-color: var(--wp--preset--color--contrast);
}
:root .cmplz-cookiebanner .cmplz-banner-checkbox input:checked + .cmplz-slider::before,
:root .cmplz-cookiebanner label.cmplz-category-toggle input:checked + .cmplz-slider::before {
	background-color: var(--wp--preset--color--base);
}

/* Floating "Manage consent" tab.
   NB: scope to the tab/button only — NOT .cmplz-manage-consent-container,
   which is the in-page consent panel on the cookie policy ([cmplz-manage-consent]
   shortcode). Including it filled the whole panel with the brand pill style. */
:root .cmplz-manage-consent,
:root #cmplz-manage-consent {
	background-color: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--on-dark);
	border: 1px solid var(--wp--preset--color--brand);
	border-radius: 999px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
:root .cmplz-manage-consent:hover,
:root .cmplz-manage-consent:focus-visible,
:root #cmplz-manage-consent:hover,
:root #cmplz-manage-consent:focus-visible {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--brand);
	border-color: var(--wp--preset--color--accent);
}

/* Cookies-overview shortcode + Complianz document body */
:root .cmplz-cookies-overview,
:root .cmplz-document {
	color: var(--wp--preset--color--contrast);
}
:root .cmplz-cookies-overview table,
:root .cmplz-cookies-overview th,
:root .cmplz-cookies-overview td {
	border-color: var(--wp--preset--color--divider);
	color: var(--wp--preset--color--contrast);
}
:root .cmplz-cookies-overview th {
	background-color: var(--wp--preset--color--surface);
	font-weight: 600;
}
:root .cmplz-cookies-overview a,
:root .cmplz-document a {
	color: var(--wp--preset--color--brand-light);
	text-decoration: underline;
}
/* On Complianz legal pages the editorial rail is rendered *inside* the
   .cmplz-document wrapper, so the rule above would underline the rail's TOC and
   page-meta links — inconsistent with every non-Complianz page (e.g. the
   privacy policy), where rail links have no rest underline. Keep rail links to
   the default treatment (no rest underline, underline on hover/focus). Same
   specificity as the rule above, placed after it so it wins by source order. */
:root .rcvda-layout__rail a {
	text-decoration: none;
}
:root .rcvda-layout__rail a:hover,
:root .rcvda-layout__rail a:focus-visible {
	text-decoration: underline;
}

/* Consent-gated video embeds (Complianz).
   WordPress opts this theme into responsive embeds, so core reserves the 16:9
   box with a `.wp-block-embed__wrapper::before { padding-top:56.25% }` and pins
   the raw <iframe> into it with position:absolute;inset:0. Complianz interposes
   its own wrapper element (a `.cmplz-blocked-content-container` span while
   blocked; it strips that class and swaps in the real iframe / a click-to-load
   facade once marketing consent is given). That interposed element is NOT the
   raw iframe, so core's rule doesn't pin it — it flows *below* the empty reserved
   box, leaving a gap above. Keying off `.cmplz-blocked-content-container`
   alone fixes only the pre-consent state; the class is removed on consent, so a
   smaller gap returns until the video is clicked. Pin whichever single element
   sits directly inside the wrapper — blocked placeholder, consent facade, or raw
   iframe — into the reserved box, so every state fills the frame with no gap.
   The wrapper only ever holds one embed child, so `> *` is safe; layout-only,
   token-free, no !important (the :root prefix outranks Complianz's bare-class rule). */
:root .wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper > * {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* ──────────────────────────────────────────────────────────────────────
 *  Author archive — rcvda/author-profile header + shared post-card
 *  (templates/author.html and templates/archive.html; the card is also used
 *  on index.html and search.html). Tokens only, approved combinations — the
 *  divider/muted tokens flip with dark mode via the theme's token system.
 * ──────────────────────────────────────────────────────────────────── */

/* Author profile header: avatar beside the name, website link and biography.
   The name and the "Website" label lead with an inline glyph (inlined by
   rcvda-core; sized here), matching the rail's labelled-meta idiom. */
.rcvda-author-profile {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--40);
	align-items: flex-start;
}
.rcvda-author-profile__avatar { flex: 0 0 auto; }
.rcvda-author-profile__avatar img {
	display: block;
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
}
.rcvda-author-profile__body { flex: 1 1 16rem; min-width: 0; }
.rcvda-author-profile__name { margin-top: 0; display: inline-flex; align-items: center; gap: 0.4em; }
.rcvda-author-profile__website {
	margin: var(--wp--preset--spacing--20) 0 0;
	font-size: var(--wp--preset--font-size--small);
}
.rcvda-author-profile__label { display: inline-flex; align-items: center; gap: 5px; color: var(--wp--preset--color--muted); font-weight: 700; }
.rcvda-author-profile__website a { overflow-wrap: anywhere; }
.rcvda-author-profile__bio { margin-top: var(--wp--preset--spacing--30); }
.rcvda-author-profile__bio > :first-child { margin-top: 0; }
.rcvda-author-profile__bio > :last-child { margin-bottom: 0; }
.rcvda-author-profile__i { width: 0.95em; height: 0.95em; flex: 0 0 auto; }
.rcvda-author-profile__i--name { width: 0.6em; height: 0.6em; opacity: 0.6; }

/* Shared post-card — a bordered card (v0.4.92): the featured image is an inline
   thumbnail preceding the title/excerpt/meta. The image is contained and capped,
   never upscaled (the v0.4.38 legacy-image rule), which suits the mixed-quality
   archive (square logos etc.). Used on author, archive, blog and search lists.
   Border/radius/padding/background come from the pattern's block attributes;
   the hover lift + amber border (matching .rcvda-card / .rfs-featured__card) is
   here. Suppressed under reduced motion alongside .rcvda-card below. */
.rcvda-post-card {
	display: flex;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--40);
	transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}
.rcvda-post-card:hover, .rcvda-post-card:focus-within {
	transform: translateY(-2px);
	border-color: var(--wp--preset--color--brand);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
}
/* Hover border pivots to accent (amber) in dark, where brand navy is invisible
   against the dark surface. Mirrors .rcvda-card above. */
html[data-theme="dark"] .rcvda-post-card:hover,
html[data-theme="dark"] .rcvda-post-card:focus-within {
	border-color: var(--wp--preset--color--interactive, var(--wp--preset--color--accent));
}
/* The card group is tagged is-layout-flow, so WordPress gives its second child
   (the body) a block-gap `margin-block-start`, dropping the title ~24px below the
   image top. Zero it so the image and the title share a top edge (same flex-gap +
   flow-margin clash fixed for the rail and the columns). */
.rcvda-post-card > * { margin-block-start: 0; margin-block-end: 0; }
.rcvda-post-card__media { flex: 0 0 auto; width: 120px; margin: 0; }
.rcvda-post-card__media img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 120px;
	object-fit: contain;
	border-radius: 10px;
}
.rcvda-post-card__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--wp--preset--spacing--20); }
.rcvda-post-card__body > * { margin: 0; }
.rcvda-post-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--muted);
}
@media (max-width: 600px) {
	.rcvda-post-card__media { width: 84px; }
	.rcvda-post-card__media img { max-height: 84px; }
	.rcvda-author-profile__avatar img { width: 84px; height: 84px; }
}

/* Glyphs on the card meta (calendar / folder / tag) and the "Posts & Pages"
   heading. Drawn with a CSS mask so they take the current text colour and flip
   with dark mode — mirrors the rail page-meta glyph set without needing to touch
   the core post-date / post-terms / heading block markup. */
.rcvda-post-card__meta .rcvda-card-date,
.rcvda-post-card__meta .rcvda-card-cat,
.rcvda-post-card__meta .rcvda-card-tag { display: inline-flex; flex-wrap: wrap; align-items: center; min-width: 0; }
/* Let a multi-term cat/tag list wrap onto new lines and shrink within the card
   instead of overflowing horizontally (e.g. a page carrying several tags). The
   meta row already wraps whole units; min-width:0 lets the term block shrink so
   its own flex-wrap can break the links. */
.rcvda-posts-title { display: flex; align-items: center; }
.rcvda-post-card__meta .rcvda-card-date::before,
.rcvda-post-card__meta .rcvda-card-cat::before,
.rcvda-post-card__meta .rcvda-card-tag::before,
.rcvda-posts-title::before {
	content: "";
	display: inline-block;
	flex: 0 0 auto;
	width: 0.95em;
	height: 0.95em;
	margin-right: 5px;
	background-color: currentColor;
	-webkit-mask: var(--rcvda-gly) center / contain no-repeat;
	mask: var(--rcvda-gly) center / contain no-repeat;
}
.rcvda-post-card__meta .rcvda-card-date { --rcvda-gly: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><path d='M3 10h18'/><path d='M8 2v4'/><path d='M16 2v4'/></svg>"); }
.rcvda-post-card__meta .rcvda-card-cat { --rcvda-gly: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/></svg>"); }
.rcvda-post-card__meta .rcvda-card-tag { --rcvda-gly: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12.59 2.59A2 2 0 0 0 11.17 2H4a2 2 0 0 0-2 2v7.17a2 2 0 0 0 .59 1.41l8.7 8.7a2.43 2.43 0 0 0 3.42 0l6.58-6.58a2.43 2.43 0 0 0 0-3.42z'/><path d='M7.5 7.5h.01'/></svg>"); }
.rcvda-posts-title { --rcvda-gly: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/><path d='M14 2v5h5'/><path d='M9 13h6'/><path d='M9 17h4'/></svg>"); }

/* Dark mode: brand-fill buttons sitting on a surface band go too dark to read
   (e.g. FPT's brand green #17643a flips to #0f3d22, which nearly vanishes on the
   dark surface band). Lift them with a hue-preserving brightness so the CTA stays
   vivid — skin-agnostic (RCVDA navy lifts to a lighter navy, still on-brand). */
html[data-theme="dark"] .has-surface-background-color .wp-block-button__link.has-brand-background-color { filter: brightness(2.4); }

/* ── Print ─────────────────────────────────────────────────────────────
   Floating on-screen chrome is never wanted on paper (it was printing the
   accessibility circle over the content, e.g. on the printable events calendar).
   Hide the fixed floating-widget stack — accessibility trigger/panel, back-to-top,
   the search overlay — plus the translate launcher when the plugin is present. */
@media print {
	.rcvda-a11y,
	.rcvda-to-top,
	.rcvda-search,
	.rcvda-translate {
		display: none !important;
	}
}
