/*
Theme Name: Steps2Wellbeing
Theme URI: https://steps2wellbeing.co.uk/
Author: Silo Media
Description: Theme for Steps2Wellbeing, NHS Talking Therapies Dorset. Built on the Access Wellbeing foundation (BlankSlate base) with per-page colour schemes and ACF flexible content sections.
Version: 2026.10
Text Domain: accesswellbeing
*/

/* =============================================================
   Fonts — Frutiger (NHS identity typeface), self-hosted
   ============================================================= */
@font-face {
	font-family: 'Frutiger';
	src: url("fonts/frutiger_light.woff2") format("woff2");
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Frutiger';
	src: url("fonts/frutiger_regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Frutiger';
	src: url("fonts/frutiger_regular_italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: 'Frutiger';
	src: url("fonts/frutiger_bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* =============================================================
   Design tokens
   Colour schemes: --scheme is the AA-safe shade used behind white text and
   for coloured text on white; --scheme-bright is the original brand colour,
   used only for decoration. Set per page via the body class, and per
   component by adding a scheme-* class.
   ============================================================= */
:root {
	--font: 'Frutiger', Arial, 'Helvetica Neue', Helvetica, sans-serif;
	--text: #212b32;
	--text-muted: #4c6272;
	--grey-bg: #f0f4f5;
	--grey-mid: #e8edee;
	--grey-border: #d8dde0;
	--white: #fff;
	--red: #DA291C;
	--focus: #ffeb3b;
	--radius: 0.75rem;
	--radius-lg: 1.25rem;
	--shadow: 0 6px 24px rgba(33, 43, 50, 0.12);
	--section-space: clamp(2.5rem, 5vw, 4rem);
	--content-width: 52rem;

	/* Legacy names used by the shared components */
	--medium: var(--grey-border);
	--light: var(--grey-mid);
	--lighter: var(--grey-bg);
	--tertiary: #AE2573;

	font-size: 18px;
}

@media (max-width: 1000px) { :root { font-size: 17px; } }
@media (max-width: 600px)  { :root { font-size: 16px; } }

:root,
.scheme-blue   { --scheme: #0072CE; --scheme-bright: #0072CE; --scheme-dark: #005499; --scheme-bg: #0072CE; --scheme-on: #fff;    --scheme-bg-hover: #0061af; --scheme-shape: #0064b5; }
.scheme-green  { --scheme: #4C7A12; --scheme-bright: #78BE20; --scheme-dark: #385A0D; --scheme-bg: #78BE20; --scheme-on: #212b32; --scheme-bg-hover: #93cb4d; --scheme-shape: #90ca48; }
.scheme-teal   { --scheme: #007A72; --scheme-bright: #00A499; --scheme-dark: #005A54; --scheme-bg: #00A499; --scheme-on: #212b32; --scheme-bg-hover: #33b6ad; --scheme-shape: #2eb4ab; }
.scheme-orange { --scheme: #B35A00; --scheme-bright: #ED8B00; --scheme-dark: #864300; --scheme-bg: #ED8B00; --scheme-on: #212b32; --scheme-bg-hover: #f1a233; --scheme-shape: #f0a02e; }
.scheme-pink   { --scheme: #AE2573; --scheme-bright: #AE2573; --scheme-dark: #841b57; --scheme-bg: #AE2573; --scheme-on: #fff;    --scheme-bg-hover: #941f62; --scheme-shape: #992165; }
.scheme-red    { --scheme: #C4261A; --scheme-bright: #DA291C; --scheme-dark: #941c13; --scheme-bg: #DA291C; --scheme-on: #fff;    --scheme-bg-hover: #b92318; --scheme-shape: #c02419; }

:root,
[class*="scheme-"] {
	--scheme-tint: color-mix(in srgb, var(--scheme-bright) 9%, #fff);
	--scheme-tint-strong: color-mix(in srgb, var(--scheme-bright) 18%, #fff);
	--primary: var(--scheme);
	--primary-contrast: var(--scheme);
	--primary-contrast-alt: #fff;
	--secondary: var(--scheme-dark);
}

/* =============================================================
   Reset & base
   ============================================================= */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--text);
	background: var(--white);
	margin: 0;
	padding: 0;
	-webkit-font-smoothing: antialiased;
}

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

img,
video,
canvas {
	overflow: clip !important;
}

::selection {
	background: var(--scheme);
	color: #fff;
}

.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	width: 1px !important;
	height: 1px !important;
	overflow: hidden;
	white-space: nowrap;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -10rem;
	z-index: 10000;
	background: var(--focus);
	color: var(--text);
	padding: 0.75rem 1.25rem;
	font-weight: 700;
	text-decoration: underline;
	border-radius: 0 0 0.5rem 0.5rem;
}

.skip-link:focus {
	top: 0;
}

/* Visible, high-contrast focus indicator that works on white and on colour */
:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 0;
	box-shadow: 0 0 0 6px var(--text);
	border-radius: 2px;
}

.site-main:focus {
	outline: none;
}

/* =============================================================
   Typography
   ============================================================= */
p {
	margin: 0 0 1em;
	text-wrap: pretty;
}

a {
	color: var(--scheme);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

a:hover {
	color: var(--scheme-dark);
	text-decoration-thickness: 2px;
}

strong,
b {
	font-weight: 700;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font);
	font-weight: 700;
	color: var(--text);
	line-height: 1.2;
	margin: 0 0 0.6em;
	text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.55rem, 2.6vw, 2rem); margin-top: 1.5em; }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.45rem); margin-top: 1.25em; }
h4 { font-size: 1.15rem; }

h2:first-child,
h3:first-child,
h4:first-child {
	margin-top: 0;
}

ul,
ol {
	margin: 0 0 1em;
	padding-left: 1.5em;
}

li {
	margin-bottom: 0.35em;
}

li > p {
	margin: 0;
}

li::marker {
	color: var(--scheme);
}

blockquote {
	margin: 0;
}

hr {
	border: 0;
	border-top: 1px solid var(--grey-border);
	margin: 2rem 0;
}

table {
	border-collapse: collapse;
	width: 100%;
	margin-bottom: 1.5em;
}

th,
td {
	text-align: left;
	padding: 0.6em 0.8em;
	border-bottom: 1px solid var(--grey-border);
}

iframe {
	width: 100%;
	border: 0;
	border-radius: var(--radius);
}

.container {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 clamp(1rem, 5vw, 4rem);
}

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

/* =============================================================
   Buttons
   ============================================================= */
.button,
.wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	min-height: 2.75rem;
	padding: 0.55em 1.4em;
	border: 2px solid var(--scheme-bg);
	border-radius: 0.4rem;
	background: var(--scheme-bg);
	color: var(--scheme-on);
	font-family: var(--font);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.button:hover,
.wpcf7-submit:hover {
	background: var(--scheme-bg-hover);
	border-color: var(--scheme-bg-hover);
	color: var(--scheme-on);
	text-decoration: none;
}

.button--outline {
	background: #fff;
	border-color: var(--scheme);
	color: var(--scheme);
}

.button--outline:hover {
	background: var(--scheme-bg);
	border-color: var(--scheme-bg);
	color: var(--scheme-on);
}

.button--on-colour {
	background: #fff;
	border-color: #fff;
	color: var(--scheme);
}

.button--on-colour:hover {
	background: transparent;
	border-color: var(--scheme-on);
	color: var(--scheme-on);
}

.button--outline-light {
	background: transparent;
	border-color: #fff;
	color: #fff;
}

.button--outline-light:hover {
	background: #fff;
	border-color: #fff;
	color: var(--scheme);
}

/* =============================================================
   Header
   Sticky, so "Help me now" and the menu are always one tap away.
   ============================================================= */
html {
	scroll-padding-top: calc(var(--header-h, 5.5rem) + 1rem);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--scheme-bg);
	color: var(--scheme-on);
	transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
	box-shadow: 0 2px 16px rgba(33, 43, 50, 0.28);
}

.admin-bar .site-header { top: 32px; }

@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}

@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
}

/* Short landscape screens: don't pin the header */
@media (max-height: 520px) {
	.site-header { position: relative; }
}

.site-header-inner {
	display: flex;
	align-items: center;
	gap: clamp(0.75rem, 2.5vw, 2rem);
	min-height: 5.5rem;
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
}

/* Logos */
.site-branding {
	display: flex;
	align-items: center;
	gap: clamp(0.75rem, 2vw, 1.5rem);
	min-width: 0;
}

.site-header .site-logo {
	display: block;
	flex: 0 1 auto;
	border-radius: 0.25rem;
}

.site-header .site-logo img {
	display: block;
	width: clamp(140px, 19vw, 280px);
	height: auto;
}

.site-branding-divider {
	flex: none;
	width: 1px;
	height: 3.25rem;
	background: currentColor;
	opacity: 0.5;
}

.nhs-logo {
	display: block;
	flex: none;
	border-radius: 0.25rem;
}

.nhs-logo img {
	display: block;
	width: auto;
	height: 3.6rem;
}

/* Actions */
.site-header-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: clamp(0.5rem, 1.4vw, 1rem);
}

.header-search {
	position: relative;
	width: clamp(12rem, 17vw, 16rem);
}

.header-search input {
	width: 100%;
	min-height: 2.9rem;
	padding: 0.5em 3.1em 0.5em 1.1em;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: var(--text);
	font-family: var(--font);
	font-size: 1rem;
}

.header-search input::placeholder {
	color: var(--text-muted);
	opacity: 1;
}

.header-search-submit,
.menu-search-submit {
	position: absolute;
	right: 0.3rem;
	top: 50%;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 2.35rem;
	height: 2.35rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--scheme-bg);
	color: var(--scheme-on);
	cursor: pointer;
	transition: background-color 0.15s;
}

.header-search-submit:hover,
.menu-search-submit:hover {
	background: var(--scheme-bg-hover);
}

.header-search-submit svg,
.menu-search-submit svg {
	width: 1.1rem;
	height: 1.1rem;
}

/* Help me now: a tab hanging from the top edge. On hover/focus it is
   "pulled" down; the ::before extension keeps it attached to the top. */
.help-now {
	position: relative;
	align-self: flex-start;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin-top: -0.75rem;
	min-height: 4.75rem;
	padding: 0.7rem 1.15rem 0.85rem;
	border-radius: 0 0 1rem 1rem;
	background: var(--red);
	color: #fff;
	text-align: center;
	text-decoration: none;
	line-height: 1;
	white-space: nowrap;
	box-shadow: 0 4px 10px rgba(33, 43, 50, 0.18);
	transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background-color 0.2s;
}

.help-now::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 1.25rem;
	background: inherit;
}

.help-now:hover,
.help-now:focus-visible {
	color: #fff;
	background: #c42317;
	text-decoration: none;
	transform: translateY(0.55rem);
	box-shadow: 0 12px 24px rgba(33, 43, 50, 0.3);
}

.help-now:focus-visible {
	box-shadow: 0 0 0 6px var(--text), 0 12px 24px rgba(33, 43, 50, 0.3);
}

.help-now:active {
	transform: translateY(0.8rem);
}

.help-now-strong {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 0.9;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.help-now-sub {
	font-size: 1.05rem;
	line-height: 1;
}

.help-now[aria-current="page"] {
	background: #b81f14;
}

.scheme-red .help-now {
	box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(33, 43, 50, 0.18);
}

/* Menu toggle */
.menu-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 2.9rem;
	min-width: 2.9rem;
	padding: 0.4rem 1.15rem 0.4rem 0.95rem;
	border: 2px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font-family: var(--font);
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.menu-toggle:hover,
.menu-toggle[aria-expanded="true"] {
	background: #fff;
	border-color: #fff;
	color: var(--scheme);
}

.menu-toggle-icon {
	position: relative;
	display: block;
	flex: none;
	width: 20px;
	height: 14px;
}

.menu-toggle-icon span {
	position: absolute;
	left: 0;
	top: 0;
	width: 20px;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
	transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle-icon span:nth-child(2) { transform: translateY(6px); }
.menu-toggle-icon span:nth-child(3) { transform: translateY(12px); }

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(2) {
	opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(3) {
	transform: translateY(6px) rotate(-45deg);
}

/* =============================================================
   Menu panel (opened by the Menu button)
   Each link is colour-coded with its page's colour scheme.
   ============================================================= */
.menu-panel {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background: #fff;
	color: var(--text);
	border-top: 4px solid var(--scheme-bright);
	box-shadow: 0 24px 48px rgba(33, 43, 50, 0.25);
	max-height: calc(100vh - var(--header-h, 5.5rem));
	max-height: calc(100dvh - var(--header-h, 5.5rem));
	overflow-y: auto;
	overscroll-behavior: contain;
	opacity: 0;
	transform: translateY(-0.75rem);
	transition: opacity 0.2s ease, transform 0.25s ease;
}

.menu-panel.is-open {
	opacity: 1;
	transform: none;
}

.menu-panel[hidden] {
	display: none;
}

.menu-panel-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(11rem, 14rem);
	gap: clamp(1.5rem, 4vw, 3.5rem);
	padding-top: clamp(1.5rem, 3vw, 2.5rem);
	padding-bottom: clamp(1.75rem, 3vw, 2.75rem);
}

.menu-panel-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.6rem;
}

.menu-panel-menu li {
	margin: 0;
}

.menu-panel-menu a {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	height: 100%;
	min-height: 3.6rem;
	padding: 0.75rem 1.1rem 0.75rem 1.4rem;
	border-radius: 0.6rem;
	background: var(--grey-bg);
	color: var(--text);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
	overflow: hidden;
	transition: background-color 0.15s, color 0.15s;
}

/* Colour-coded edge */
.menu-panel-menu a::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 6px;
	background: var(--scheme-bright);
	transition: width 0.2s ease;
}

/* Chevron */
.menu-panel-menu a::after {
	content: '';
	flex: none;
	width: 0.55rem;
	height: 0.55rem;
	margin-right: 0.2rem;
	border: solid var(--scheme);
	border-width: 0 3px 3px 0;
	transform: rotate(-45deg);
	transition: transform 0.2s ease;
}

.menu-panel-menu a:hover {
	background: var(--scheme-tint);
	color: var(--scheme-dark);
}

.menu-panel-menu a:hover::before {
	width: 10px;
}

.menu-panel-menu a:hover::after {
	transform: translateX(3px) rotate(-45deg);
}

.menu-panel-menu .current-menu-item > a,
.menu-panel-menu a[aria-current="page"] {
	background: var(--scheme-bg);
	color: var(--scheme-on);
}

.menu-panel-menu .current-menu-item > a::before {
	background: rgba(255, 255, 255, 0.55);
}

.menu-panel-menu .current-menu-item > a::after {
	border-color: var(--scheme-on);
}

.menu-panel-aside {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding-left: clamp(1.5rem, 3vw, 3rem);
	border-left: 1px solid var(--grey-border);
}

.menu-search label {
	display: block;
	margin-bottom: 0.4rem;
	font-weight: 700;
}

.menu-search-field {
	position: relative;
}

.menu-search input {
	width: 100%;
	min-height: 3rem;
	padding: 0.5em 3.1em 0.5em 1.1em;
	border: 2px solid var(--text-muted);
	border-radius: 999px;
	background: #fff;
	color: var(--text);
	font-family: var(--font);
	font-size: 1rem;
}

.menu-panel-actions {
	display: grid;
	gap: 0.65rem;
}

.menu-panel-actions .button {
	width: 100%;
	min-height: 3rem;
	font-size: 1.05rem;
}

.menu-backdrop {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: rgba(33, 43, 50, 0.55);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.menu-backdrop.is-open {
	opacity: 1;
}

.menu-backdrop[hidden] {
	display: none;
}

html.menu-is-open {
	overflow: hidden;
}

/* Wide screens show search in the header bar; the panel copy is for smaller screens */
@media (min-width: 1201px) {
	.menu-search { display: none; }
}

@media (max-width: 1200px) {
	.header-search { display: none; }
	.menu-panel-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
	.menu-panel-inner { grid-template-columns: minmax(0, 1fr) minmax(12rem, 15rem); }
}

@media (max-width: 900px) {
	.site-header-inner { min-height: 4.5rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
	.site-branding-divider { height: 1.9rem; }
	.nhs-logo img { height: 1.7rem; }
}

@media (max-width: 760px) {
	.menu-panel-inner {
		display: flex;
		flex-direction: column;
		gap: 1.25rem;
	}
	.menu-panel-aside { display: contents; }
	.menu-search { order: -1; }
	.menu-panel-nav { order: 0; }
	.menu-panel-actions { order: 1; }
	.menu-panel-menu { grid-template-columns: minmax(0, 1fr); gap: 0.45rem; }
	.menu-panel-menu a { min-height: 3.2rem; }
}

@media (max-width: 900px) {
	.help-now { margin-top: -0.6rem; min-height: 3.9rem; padding: 0.55rem 0.9rem 0.7rem; border-radius: 0 0 0.8rem 0.8rem; }
	.help-now-strong { font-size: 1.35rem; }
	.help-now-sub { font-size: 0.85rem; }
}

@media (max-width: 600px) {
	.menu-toggle { padding: 0.4rem; justify-content: center; }
	.menu-toggle-label {
		position: absolute;
		clip: rect(1px, 1px, 1px, 1px);
		clip-path: inset(50%);
		width: 1px;
		height: 1px;
		overflow: hidden;
		white-space: nowrap;
	}
}

@media (max-width: 420px) {
	.site-header-inner { gap: 0.5rem; }
	.site-branding { gap: 0.55rem; }
	.site-header .site-logo img { width: 132px; }
	.nhs-logo img { height: 1.45rem; }
	.help-now { padding: 0.5rem 0.7rem 0.65rem; }
	.help-now-strong { font-size: 1.2rem; }
	.help-now-sub { font-size: 0.78rem; }
}

@media (max-width: 359px) {
	.site-branding-divider,
	.nhs-logo { display: none; }
}

/* =============================================================
   Page banner (continues the header colour)
   ============================================================= */
.page-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--scheme-bg);
	color: var(--scheme-on);
	text-align: center;
	padding: clamp(2rem, 5vw, 4rem) 0 clamp(4.5rem, 9vw, 7rem);
}

/* Decorative circles in a darker shade of the scheme colour */
.page-hero::before,
.page-hero::after {
	content: '';
	position: absolute;
	z-index: -1;
	border-radius: 50%;
	background: var(--scheme-shape);
	pointer-events: none;
}

.page-hero::before {
	width: clamp(14rem, 30vw, 26rem);
	aspect-ratio: 1;
	left: clamp(-10rem, -8vw, -4rem);
	top: 25%;
}

.page-hero::after {
	width: clamp(8rem, 16vw, 14rem);
	aspect-ratio: 1;
	right: clamp(-4rem, -2vw, -1rem);
	top: 12%;
	background: var(--scheme-shape);
	opacity: 0.7;
}

.page-hero-eyebrow {
	margin: 0 0 0.4rem;
	font-size: 1.1rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.95;
}

.page-hero-title {
	color: inherit;
	margin: 0 auto 0.35em;
	max-width: 22em;
	font-size: clamp(2rem, 4.6vw, 3.3rem);
	line-height: 1.15;
}

.page-hero-subtitle {
	margin: -0.15em auto 0.9em;
	max-width: 40em;
	font-size: clamp(1.15rem, 2vw, 1.5rem);
	font-weight: 300;
	line-height: 1.35;
}

.page-hero-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem 1rem;
	margin-top: 1.25rem;
}

.page-hero-buttons .button {
	font-size: 1.1rem;
	min-width: 10rem;
}

/* Home banner: more room and a larger title */
.page-hero--home {
	padding-top: clamp(2.5rem, 6vw, 5rem);
	padding-bottom: clamp(4.5rem, 9vw, 7rem);
}

.page-hero--home .page-hero-title {
	font-size: clamp(2.25rem, 5.2vw, 4rem);
	max-width: 15em;
	margin-bottom: 0.5em;
}

.page-hero--home .page-hero-buttons .button {
	min-height: 3.1rem;
	padding-left: 1.75em;
	padding-right: 1.75em;
	font-size: 1.15rem;
}

.page-hero--home::before {
	width: clamp(18rem, 40vw, 36rem);
	top: 18%;
}

.page-hero--home::after {
	width: clamp(10rem, 22vw, 20rem);
}

/* First-section boxes that sit across the bottom of the banner */
:root {
	--hero-overlap: clamp(5.5rem, 11vw, 9rem);
}

.page-hero--overlap {
	padding-bottom: calc(var(--hero-overlap) + clamp(3rem, 6vw, 4.5rem));
}

.site-main > .feature-boxes-section--overlap:first-child {
	position: relative;
	z-index: 2;
	margin-top: calc(-1 * var(--hero-overlap));
	padding-top: 0;
}

.feature-boxes-section--overlap .feature-box {
	aspect-ratio: auto;
	min-height: clamp(11rem, 19vw, 15.5rem);
	box-shadow: 0 18px 40px rgba(33, 43, 50, 0.25);
}

.feature-boxes-section--overlap .feature-box:hover {
	box-shadow: 0 24px 48px rgba(33, 43, 50, 0.32);
}

@media (max-width: 900px) {
	.feature-boxes-section--overlap .feature-boxes-grid--cols-3 { --cols: 3; }
}

@media (max-width: 700px) {
	:root { --hero-overlap: 3.5rem; }
	.feature-boxes-section--overlap .feature-boxes-grid { --cols: 1; gap: 0.75rem; }
	.feature-boxes-section--overlap .feature-box {
		flex-direction: row;
		justify-content: flex-start;
		gap: 1.1rem;
		min-height: 0;
		padding: 1.1rem 1.35rem;
		text-align: left;
	}
	.feature-boxes-section--overlap .feature-box-icon { height: 3rem; width: 3rem; }
}

/* Typewriter: the sizer reserves the final height so nothing jumps */
.js-typewriter {
	display: grid;
}

.js-typewriter > .typewriter-sizer,
.js-typewriter > .typewriter-text {
	grid-area: 1 / 1;
}

.js-typewriter > .typewriter-sizer {
	visibility: hidden;
}

.tw-word {
	white-space: nowrap;
}

.tw-char {
	position: relative;
}

.js-typewriter.is-typing .tw-char:not(.is-visible) {
	visibility: hidden;
}

/* Caret drawn out of flow so it never nudges the text */
.js-typewriter.is-typing .tw-char.is-caret::after {
	content: '';
	position: absolute;
	top: 0.12em;
	bottom: 0.08em;
	right: -0.12em;
	width: 0.08em;
	background: currentColor;
	animation: s2w-blink 0.7s step-start infinite;
}

@keyframes s2w-blink {
	50% { opacity: 0; }
}

.hero-wave {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: clamp(1.75rem, 4vw, 3.5rem);
	color: #fff;
	line-height: 0;
	pointer-events: none;
}

.hero-wave svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Over the side-nav column the area under the curve is the column's grey,
   so the navigation runs right up to the wave. */
.hero-wave--nav {
	color: var(--grey-mid);
	clip-path: inset(0 calc(100% - var(--section-nav-w)) 0 0);
}

.hero-wave--nav path:first-child {
	display: none;
}

/* =============================================================
   Section side navigation
   ============================================================= */
:root {
	--section-nav-w: clamp(14rem, 22%, 23rem);
}

/* The grey column runs flush from the banner's wave to the footer */
.section-nav-layout {
	display: grid;
	grid-template-columns: var(--section-nav-w) minmax(0, 1fr);
	align-items: stretch;
}

.section-nav {
	position: relative;
	z-index: 1;
	background: var(--grey-mid);
}

.section-nav-details > summary {
	display: none;
}

.section-nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.section-nav-menu li {
	margin: 0;
	border-bottom: 2px solid #fff;
}

.section-nav-menu a {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 4.5rem;
	padding: 0.85rem 1.5rem;
	color: var(--text);
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s;
}

.section-nav-menu a:hover {
	background: var(--grey-border);
}

.section-nav-menu .current-menu-item > a,
.section-nav-menu a[aria-current="page"] {
	background: var(--scheme-bg);
	color: var(--scheme-on);
}

/* Pointer: overlaps the tile by 1px so it is always joined to it */
.section-nav-menu .current-menu-item > a::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(100% - 1px);
	width: calc(1.25rem + 1px);
	background: var(--scheme-bg);
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.section-nav-content {
	min-width: 0;
}

.section-nav-content > :first-child {
	padding-top: 0;
}

/* Same maximum width as the site container. On very wide screens (where the
   nav column has reached its 23rem cap) the content lines up with the
   header and footer; otherwise it sits right next to the nav. */
.section-nav-content .container {
	max-width: 1400px;
	margin-left: max(0px, calc((100% - 1400px - 23rem) / 2));
	padding-left: clamp(1.5rem, 4vw, 4rem);
	padding-right: clamp(1rem, 4vw, 4rem);
}

@media (max-width: 900px) {
	.hero-wave--nav {
		display: none;
	}
	.section-nav-layout {
		grid-template-columns: minmax(0, 1fr);
	}
	/* Mobile: a card overlapping the banner wave, showing where you are */
	.section-nav {
		position: relative;
		z-index: 2;
		margin: -2rem clamp(1rem, 5vw, 4rem) 0.5rem;
		background: #fff;
		border-radius: var(--radius-lg);
		box-shadow: 0 10px 30px rgba(33, 43, 50, 0.18);
		overflow: hidden;
	}
	.section-nav-details > summary {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1rem;
		min-height: 3.75rem;
		padding: 0.8rem 1rem 0.8rem 1.25rem;
		background: #fff;
		color: var(--text);
		cursor: pointer;
		list-style: none;
	}
	.section-nav-details > summary::-webkit-details-marker {
		display: none;
	}
	.section-nav-summary {
		display: flex;
		flex-direction: column;
		gap: 0.15rem;
		min-width: 0;
		line-height: 1.25;
	}
	.section-nav-summary-label {
		font-size: 0.85rem;
		color: var(--text-muted);
	}
	.section-nav-summary-current {
		font-size: 1.1rem;
		font-weight: 700;
	}
	.section-nav-summary:not(:has(.section-nav-summary-current)) .section-nav-summary-label {
		font-size: 1.05rem;
		font-weight: 700;
		color: var(--text);
	}
	.section-nav-summary-icon {
		flex: none;
		display: grid;
		place-items: center;
		width: 2.25rem;
		height: 2.25rem;
		border-radius: 50%;
		background: var(--scheme-bg);
		transition: transform 0.25s ease;
	}
	.section-nav-summary-icon::before {
		content: '';
		width: 0.55rem;
		height: 0.55rem;
		margin-top: -0.2rem;
		border: solid var(--scheme-on);
		border-width: 0 2.5px 2.5px 0;
		transform: rotate(45deg);
	}
	.section-nav-details[open] .section-nav-summary-icon {
		transform: rotate(180deg);
	}
	.section-nav-menu {
		border-top: 1px solid var(--grey-border);
	}
	.section-nav-menu li {
		border-bottom: 1px solid var(--grey-border);
	}
	.section-nav-menu li:last-child {
		border-bottom: 0;
	}
	.section-nav-menu a,
	.section-nav-menu .current-menu-item > a {
		justify-content: space-between;
		gap: 1rem;
		text-align: left;
		min-height: 3.25rem;
		padding: 0.7rem 1.25rem 0.7rem calc(1.25rem + 6px);
		background: #fff;
		color: var(--text);
		font-size: 1rem;
	}
	.section-nav-menu a:hover {
		background: var(--grey-bg);
	}
	.section-nav-menu .current-menu-item > a {
		background: var(--scheme-tint);
		box-shadow: inset 6px 0 0 var(--scheme-bright);
	}
	.section-nav-menu .current-menu-item > a::after,
	.section-nav-menu a::after {
		content: '';
		position: static;
		flex: none;
		width: 0.5rem;
		height: 0.5rem;
		background: none;
		clip-path: none;
		border: solid var(--scheme);
		border-width: 0 2.5px 2.5px 0;
		transform: rotate(-45deg);
	}
	.section-nav-menu .current-menu-item > a::after {
		display: none;
	}
	.section-nav-content .container {
		padding-left: clamp(1rem, 5vw, 4rem);
	}
}

/* =============================================================
   Content section
   ============================================================= */
.site-main {
	display: block;
}

.site-main > :first-child:not(.section-nav-layout),
.section-nav-content > :first-child {
	padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.content-section,
.documents-section,
.steps-section,
.video-section,
.feature-boxes-section,
.cards-section,
.contact-details-section,
.text-image-section--plain {
	padding: calc(var(--section-space) / 2) 0;
}

.site-main > :last-child,
.section-nav-content > :last-child {
	padding-bottom: var(--section-space);
}

/* The side-nav layout itself has no outer padding; its content column does */
.site-main > .section-nav-layout {
	padding-bottom: 0;
}

.section-content {
	max-width: var(--content-width);
}

/* Nothing inside a section adds space below its last line: trailing margins
   (including a final list item or paragraph nested in a list) stop here, so
   the gap between sections is always the sections' own padding. */
.section-content > :last-child,
.section-content > :last-child > :last-child,
.section-content > :last-child > :last-child > :last-child,
.more-info-content > :last-child,
.more-info-content > :last-child > :last-child,
.text-content .content > :last-child,
.text-content .content > :last-child > :last-child,
.entry-content > :last-child > :last-child {
	margin-bottom: 0;
}

.content-section--center .section-content {
	margin: 0 auto;
	text-align: center;
}

/* Banded sections: padding inside the band, no extra margin outside it */
.content-section--light,
.content-section--lighter {
	padding: var(--section-space) 0;
}

.content-section--light { background: var(--grey-mid); }
.content-section--lighter { background: var(--grey-bg); }

.content-section--heading-only {
	padding-bottom: 0;
}

.content-section--heading-only + * {
	padding-top: 0.75rem !important;
}

.section-title {
	position: relative;
	padding-bottom: 0.45em;
	margin-bottom: 0.75em;
}

.section-title::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 3.5rem;
	height: 4px;
	border-radius: 2px;
	background: var(--scheme-bright);
}

.content-section--center .section-title::after {
	left: 50%;
	transform: translateX(-50%);
}

.section-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.25rem 0 0;
}

.content-section--center .section-buttons {
	justify-content: center;
}

/* "More info" disclosure (also used for collapsed document lists) */
.more-info {
	margin: 1rem 0 0;
}

.more-info > summary {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 2.75rem;
	padding: 0.3rem 0;
	color: var(--scheme);
	font-weight: 700;
	font-size: 1.05rem;
	cursor: pointer;
	list-style: none;
}

.more-info > summary::-webkit-details-marker {
	display: none;
}

.more-info > summary::before {
	content: '';
	flex: 0 0 auto;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	background: var(--scheme) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 1rem no-repeat;
	transition: transform 0.2s;
}

.more-info[open] > summary::before {
	transform: rotate(180deg);
}

.more-info > summary:hover {
	color: var(--scheme-dark);
	text-decoration: underline;
}

.more-info-content {
	padding: 0.75rem 0 0.25rem 1.25rem;
	margin-left: 0.75rem;
	border-left: 3px solid var(--scheme-tint-strong);
}

.more-info-content > :last-child {
	margin-bottom: 0;
}

/* =============================================================
   Document list
   ============================================================= */
.documents-section {
	padding-top: 0;
}

.content-section + .documents-section {
	margin-top: -1.25rem;
}

.documents-title {
	font-size: 1.25rem;
}

.document-list {
	list-style: none;
	margin: 0.25rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.4rem;
}

.document-list li {
	margin: 0;
}

.document-list a {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 0.85rem;
	border: 1px solid var(--grey-border);
	border-radius: 0.5rem;
	background: #fff;
	color: var(--text);
	text-decoration: none;
	transition: border-color 0.15s, background-color 0.15s;
}

.document-list a:hover {
	border-color: var(--scheme);
	background: var(--scheme-tint);
}

.document-list-icon {
	width: 1.5rem;
	height: 1.5rem;
	color: var(--scheme);
}

.document-list-label {
	font-weight: 700;
	color: var(--scheme);
}

.document-list-meta {
	font-size: 0.85rem;
	color: var(--text-muted);
	white-space: nowrap;
}

/* =============================================================
   Steps
   ============================================================= */
.steps-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: clamp(1.5rem, 4vw, 4rem);
}

.step {
	position: relative;
	flex: 1 1 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 1rem;
}

.step-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: clamp(7rem, 12vw, 10rem);
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--scheme-bright);
	padding: 1.25rem;
}

.step-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.step-text {
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.35;
}

/* Chevron between steps */
.step:not(:last-child)::after {
	content: '';
	position: absolute;
	top: calc(clamp(7rem, 12vw, 10rem) / 2);
	right: calc(clamp(1.5rem, 4vw, 4rem) / -2);
	width: 0.9rem;
	height: 0.9rem;
	border: solid var(--text);
	border-width: 0 4px 4px 0;
	transform: translate(50%, -50%) rotate(-45deg);
}

@media (max-width: 760px) {
	.steps-list {
		flex-direction: column;
		gap: 2.25rem;
	}
	.step {
		max-width: none;
		flex-direction: row;
		text-align: left;
	}
	.step-icon {
		width: 5rem;
		flex: 0 0 5rem;
		padding: 0.85rem;
	}
	.step:not(:last-child)::after {
		top: auto;
		bottom: -1.45rem;
		right: auto;
		left: 2.5rem;
		transform: translate(-50%, 0) rotate(45deg);
	}
}

/* =============================================================
   Video (single)
   ============================================================= */
.video-frame {
	position: relative;
	margin: 0;
	/* Fill the content width, but never taller than the visible screen */
	max-width: min(100%, calc((100vh - var(--header-h, 5.5rem) - 4rem) * 16 / 9));
	max-width: min(100%, calc((100svh - var(--header-h, 5.5rem) - 4rem) * 16 / 9));
	aspect-ratio: 16 / 9;
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: #0b0b0b;
	box-shadow: var(--shadow);
}

.video-frame iframe,
.video-frame .video-card-player {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	border-radius: 0;
}

/* =============================================================
   Feature boxes (coloured link tiles)
   ============================================================= */
.feature-boxes-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 2rem);
}

.feature-boxes-grid--cols-2 { --cols: 2; --box-ratio: 2 / 1; }
.feature-boxes-grid--cols-3 { --cols: 3; }
.feature-boxes-grid--cols-4 { --cols: 4; }

.feature-boxes-grid > li {
	margin: 0;
	display: flex;
}

.feature-box {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.85rem;
	aspect-ratio: var(--box-ratio, 5 / 4);
	padding: clamp(1rem, 2.5vw, 2rem);
	border-radius: var(--radius-lg);
	background: var(--scheme-bg);
	color: var(--scheme-on);
	text-align: center;
	text-decoration: none;
	box-shadow: 0 0 0 0 transparent;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s;
}

.feature-box:hover {
	color: var(--scheme-on);
	background: var(--scheme-bg-hover);
	transform: translateY(-4px);
	box-shadow: var(--shadow);
	text-decoration: none;
}

.feature-box-icon {
	width: auto;
	height: clamp(3.5rem, 7vw, 5.5rem);
	object-fit: contain;
}

.feature-box-content {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.feature-box-title {
	font-size: clamp(1.2rem, 2.1vw, 1.65rem);
	font-weight: 700;
	line-height: 1.2;
	text-wrap: balance;
}

.feature-boxes-grid--cols-4 .feature-box-title {
	font-size: clamp(1.1rem, 1.7vw, 1.4rem);
}

.feature-box-description {
	font-weight: 300;
	font-size: 1rem;
}

@media (max-width: 900px) {
	.feature-boxes-grid--cols-4,
	.feature-boxes-grid--cols-3 { --cols: 2; }
}

@media (max-width: 420px) {
	.feature-box { aspect-ratio: auto; min-height: 8rem; }
	.feature-boxes-grid--cols-2,
	.feature-boxes-grid--cols-3,
	.feature-boxes-grid--cols-4 { --cols: 1; }
}

/* =============================================================
   Recent news (cards) and news list
   ============================================================= */
.recent-news {
	padding: var(--section-space) 0 !important;
	background: var(--grey-bg);
}

.recent-news h2 {
	margin-bottom: 1.25em;
}

.news-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 2rem);
}

.news-grid > li {
	margin: 0;
	display: flex;
}

.news-card {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(33, 43, 50, 0.12);
	transition: box-shadow 0.2s, transform 0.2s;
}

.news-card:hover {
	box-shadow: var(--shadow);
	transform: translateY(-3px);
}

.news-card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 1.4rem 1.5rem 1.5rem;
}

.news-card-title {
	font-size: 1.35rem;
	margin: 0 0 0.6rem;
}

.news-card-title a {
	color: var(--text);
	text-decoration: none;
}

/* Whole card clickable from the single title link */
.news-card-title a::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

.news-card-title a:focus-visible {
	box-shadow: none;
	outline: none;
}

.news-card:has(.news-card-title a:focus-visible) {
	outline: 3px solid var(--focus);
	box-shadow: 0 0 0 6px var(--text);
}

.news-card:hover .news-card-title a {
	color: var(--scheme-dark);
}

.news-card-date {
	margin: 0 0 0.35rem;
	font-size: 0.9rem;
	color: var(--text-muted);
}

.news-card-excerpt {
	color: var(--text);
	font-size: 0.95rem;
	margin-bottom: 1.25rem;
}

.news-card-more {
	align-self: flex-start;
	margin-top: auto;
	padding: 0.35em 1em;
	border: 2px solid var(--scheme);
	border-radius: 0.4rem;
	color: var(--scheme);
	font-weight: 700;
	font-size: 0.95rem;
	transition: background-color 0.2s, color 0.2s;
}

.news-card:hover .news-card-more {
	background: var(--scheme-bg);
	border-color: var(--scheme-bg);
	color: var(--scheme-on);
}

@media (max-width: 900px) {
	.news-grid { grid-template-columns: minmax(0, 1fr); }
}

.news-list-section {
	padding: calc(var(--section-space) / 2) 0;
}

.news-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1.5rem;
}

.news-list > li {
	margin: 0;
}

.news-list .news-card {
	flex-direction: row;
	border: 1px solid var(--grey-border);
	box-shadow: none;
}

.news-list .news-card-image {
	flex: 0 0 26%;
	max-width: 17rem;
	background: var(--grey-bg);
}

.news-list .news-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

.news-list .news-card-body {
	padding: clamp(1.25rem, 3vw, 2rem);
}

.news-list .news-card-title {
	font-size: clamp(1.3rem, 2.2vw, 1.75rem);
}

.news-list .news-card-more {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border: 0;
	padding: 0;
}

.news-list .news-card-more::after {
	content: '';
	width: 0.5rem;
	height: 0.5rem;
	border: solid currentColor;
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(-45deg);
	transition: transform 0.2s ease;
}

.news-list .news-card:hover .news-card-more {
	background: none;
	color: var(--scheme-dark);
}

.news-list .news-card:hover .news-card-more::after {
	transform: translateX(4px) rotate(-45deg);
}

@media (max-width: 700px) {
	.news-list .news-card { flex-direction: column; }
	.news-list .news-card-image { flex: none; max-width: none; }
	.news-list .news-card-image img { aspect-ratio: 16 / 9; }
}

.pagination,
.navigation.pagination {
	margin-top: 2rem;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.nav-links .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0 0.85rem;
	border: 2px solid var(--scheme);
	border-radius: 0.4rem;
	color: var(--scheme);
	font-weight: 700;
	text-decoration: none;
}

.nav-links .page-numbers.current,
.nav-links a.page-numbers:hover {
	background: var(--scheme-bg);
	border-color: var(--scheme-bg);
	color: var(--scheme-on);
}

/* =============================================================
   News article
   ============================================================= */
.news-article {
	padding-bottom: calc(var(--section-space) / 2);
}

.news-article-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(1.5rem, 4vw, 4rem);
	align-items: start;
}

.news-article-inner.has-image {
	grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
}

.news-article-body {
	max-width: var(--content-width);
}

.news-article-date {
	font-weight: 700;
	color: var(--text-muted);
	margin-bottom: 1.25rem;
}

.news-article-image {
	margin: 0;
	position: sticky;
	top: calc(var(--header-h, 5.5rem) + 1.5rem);
}

.news-article-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-lg);
}

@media (max-width: 800px) {
	.news-article-inner.has-image { grid-template-columns: minmax(0, 1fr); }
	.news-article-image { position: static; order: -1; max-width: 26rem; }
}

/* =============================================================
   Text and image
   ============================================================= */
.text-image-content {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, var(--img-col, 0.6fr));
	gap: clamp(1.5rem, 4vw, 4rem);
	align-items: center;
}

.text-image-section--img-small  { --img-col: 0.38fr; }
.text-image-section--img-medium { --img-col: 0.65fr; }
.text-image-section--img-large  { --img-col: 1fr; }

.text-image-content.image-left {
	grid-template-columns: minmax(0, var(--img-col, 0.6fr)) minmax(0, 1fr);
}

.text-image-content.image-left .image-content {
	order: -1;
}

.text-image-content.no-image {
	grid-template-columns: minmax(0, 1fr);
}

.text-image-content .text-content {
	max-width: var(--content-width);
}

.text-image-content .text-content > :last-child,
.text-image-content .content > :last-child {
	margin-bottom: 0;
}

.text-image-eyebrow {
	font-weight: 700;
	color: var(--text-muted);
	margin-bottom: 0.4rem;
}

.text-image-section .image-content img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-lg);
}

/* Coloured panel variant (quotes, "Farmers and families") */
.text-image-section--highlight {
	padding: calc(var(--section-space) / 2) 0;
}

.text-image-section--highlight .text-image-content {
	background: var(--scheme-bg);
	color: var(--scheme-on);
	border-radius: var(--radius-lg);
	overflow: hidden;
	gap: 0;
	align-items: stretch;
}

.text-image-section--highlight .text-content {
	padding: clamp(1.75rem, 5vw, 4rem);
	align-self: center;
}

.text-image-section--highlight h2,
.text-image-section--highlight a {
	color: inherit;
}

.text-image-section--highlight a:hover {
	color: inherit;
	text-decoration-thickness: 3px;
}

.text-image-section--highlight .text-image-content {
	--img-col: 0.8fr;
}

.text-image-section--highlight .image-content {
	position: relative;
	min-height: 20rem;
}

.text-image-section--highlight .image-content img {
	position: absolute;
	inset: 0;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
	border-radius: 0;
}

.text-image-section--highlight + .text-image-section--highlight {
	padding-top: 0;
}

@media (max-width: 800px) {
	.text-image-content,
	.text-image-content.image-left {
		grid-template-columns: minmax(0, 1fr);
	}
	.text-image-content .image-content {
		order: -1;
		max-width: 30rem;
	}
	.text-image-section--highlight .image-content {
		max-width: none;
	}
	.text-image-section--highlight .image-content {
		min-height: 0;
	}
	.text-image-section--highlight .image-content img {
		position: static;
		aspect-ratio: 16 / 10;
	}
}

/* =============================================================
   Testimonials carousel
   ============================================================= */
.testimonials-section {
	padding: var(--section-space) 0 !important;
	background: var(--grey-bg);
}

.testimonials-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.75rem;
}

.testimonials-header h2 {
	margin: 0;
}

.carousel-controls {
	display: flex;
	gap: 0.6rem;
}

.carousel-controls[hidden] {
	display: none;
}

.carousel-button {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 2px solid var(--scheme);
	border-radius: 50%;
	background: #fff;
	color: var(--scheme);
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, opacity 0.15s;
}

.carousel-button:hover:not(:disabled) {
	background: var(--scheme-bg);
	border-color: var(--scheme-bg);
	color: var(--scheme-on);
}

.carousel-button--prev svg {
	transform: rotate(180deg);
}

.carousel-button:disabled {
	opacity: 0.35;
	cursor: default;
}

.testimonials-track {
	--per-view: 3;
	--gap: clamp(1rem, 2.5vw, 2rem);
	list-style: none;
	margin: 0;
	padding: 0.25rem 0 0.75rem;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
	gap: var(--gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--grey-border) transparent;
}

.testimonials-track:focus-visible {
	outline-offset: 4px;
}

.testimonial {
	margin: 0;
	display: flex;
	scroll-snap-align: start;
}

.testimonial figure {
	flex: 1;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: clamp(1.5rem, 2.5vw, 2rem);
	background: #fff;
	border-radius: var(--radius-lg);
	box-shadow: 0 1px 3px rgba(33, 43, 50, 0.1);
}

.testimonial-mark {
	width: 1.6rem;
	height: auto;
	margin-bottom: 0.85rem;
	color: var(--scheme-bright);
}

.testimonial-quote {
	flex: 1;
	margin: 0 0 1.5rem;
}

.testimonial-quote p {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.6;
}

.testimonial-person {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding-top: 1.1rem;
	border-top: 1px solid var(--grey-border);
}

.testimonial-image {
	flex: none;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	object-fit: cover;
}

.testimonial-name {
	font-weight: 700;
	color: var(--scheme);
	line-height: 1.3;
}

@media (max-width: 1000px) {
	.testimonials-track { --per-view: 2; }
}

@media (max-width: 640px) {
	.testimonials-track { --per-view: 1.15; }
}

@media (prefers-reduced-motion: reduce) {
	.testimonials-track { scroll-behavior: auto; }
}

/* A page ending in testimonials flows straight into the referral buttons */
body:has(.referral-bar) .site-main > .testimonials-section:last-child {
	padding-bottom: 2rem !important;
}

body:has(.site-main > .testimonials-section:last-child) .referral-bar {
	padding-top: 0.5rem;
}

/* =============================================================
   Contact details
   ============================================================= */
.contact-details {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 2rem;
}

.contact-detail {
	margin: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 4px minmax(0, 1.4fr);
	gap: 0 clamp(1rem, 3vw, 2.5rem);
	align-items: stretch;
}

.contact-detail::before {
	content: '';
	grid-column: 2;
	grid-row: 1;
	border-radius: 2px;
	background: var(--scheme-bright);
}

.contact-detail-title {
	grid-column: 1;
	grid-row: 1;
	margin: 0;
	padding: 0.25rem 0;
	text-align: right;
	font-size: 1.15rem;
}

.contact-detail-info {
	grid-column: 3;
	grid-row: 1;
	padding: 0.25rem 0;
}

.contact-detail-info p {
	margin-bottom: 0.35em;
}

.contact-detail-info > :last-child {
	margin-bottom: 0;
}

@media (max-width: 700px) {
	.contact-detail {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto 4px auto;
	}
	.contact-detail::before { grid-column: 1; grid-row: 2; width: 4rem; }
	.contact-detail-title { grid-row: 1; text-align: left; padding-bottom: 0.5rem; }
	.contact-detail-info { grid-column: 1; grid-row: 3; padding-top: 0.5rem; }
}

/* =============================================================
   Option cards
   ============================================================= */
.cards-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: clamp(1rem, 2.5vw, 2rem);
}

.option-card {
	margin: 0;
	display: flex;
	flex-direction: column;
	background: var(--scheme-bg);
	color: var(--scheme-on);
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.option-card-image img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.option-card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 1.5rem 1.5rem 1.75rem;
	text-align: center;
}

.option-card-title {
	color: inherit;
	font-size: 1.6rem;
	margin: 0 0 0.6rem;
}

.option-card-content a {
	color: inherit;
}

.option-card-action {
	margin: auto 0 0;
	padding-top: 0.75rem;
}

/* =============================================================
   Referral bar & footer
   ============================================================= */
.referral-bar {
	background: var(--grey-bg);
	padding: 2.5rem 0;
}

.referral-bar .container {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
}

.referral-bar .button {
	font-size: 1.1rem;
	min-width: 11rem;
}

.site-footer {
	background: var(--scheme-bg);
	color: var(--scheme-on);
	padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.25rem;
	font-size: 0.95rem;
}

.site-footer a {
	color: inherit;
}

/* Row 1: logos left, social icons right */
.site-footer-brand {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent);
}

.site-footer-logos {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2vw, 1.5rem);
}

.site-footer .site-logo img {
	display: block;
	width: clamp(180px, 20vw, 260px);
	height: auto;
}

.site-footer .nhs-logo img {
	height: 3.4rem;
}

.site-footer .site-branding-divider {
	height: 3rem;
}

.social-icons {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0.75rem;
}

.social-icons li {
	margin: 0;
}

.social-icons a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border: 2px solid currentColor;
	border-radius: 50%;
	color: inherit;
	transition: background-color 0.2s, color 0.2s;
}

.social-icons a:hover {
	background: var(--scheme-on);
	border-color: var(--scheme-on);
	color: var(--scheme-bg);
}

.social-icons svg {
	width: 1.35rem;
	height: 1.35rem;
}

/* Row 2: two link lists, data notice, CQC rating */
.site-footer-main {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 1.2fr);
	gap: 2rem clamp(1.5rem, 3vw, 3rem);
	align-items: start;
	padding: 2.25rem 0 2.5rem;
}

.footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-menu li {
	margin: 0;
}

.footer-menu a {
	display: inline-block;
	padding: 0.3rem 0;
	text-decoration: none;
	line-height: 1.35;
}

.footer-menu a:hover {
	text-decoration: underline;
	color: inherit;
}

.data-matters {
	padding: 1.25rem 1.4rem 1.4rem;
	border-radius: var(--radius);
	color: #fff;
	background: color-mix(in srgb, var(--scheme-dark) 85%, #000);
}

.data-matters p {
	margin-bottom: 1rem;
	line-height: 1.5;
}

.data-matters .button {
	min-height: 2.5rem;
	font-size: 0.95rem;
}

.footer-cqc {
	min-width: 0;
}

.footer-cqc > div {
	max-width: 100%;
	border-radius: var(--radius);
	overflow: hidden;
}

/* Row 3: bottom bar */
.site-footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	padding-top: 1.1rem;
	border-top: 1px solid color-mix(in srgb, currentColor 35%, transparent);
	font-size: 0.875rem;
}

.site-footer-copyright {
	margin: 0;
}

.back-to-top {
	display: inline-flex;
	gap: 0.4rem;
	align-items: center;
	margin-left: auto;
	padding: 0.4rem 0;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.back-to-top:hover {
	text-decoration: underline;
}

@media (max-width: 1100px) {
	.site-footer-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 600px) {
	.site-footer-logos { flex-wrap: wrap; }
	.site-footer .site-logo img { width: 190px; }
	.site-footer .nhs-logo img { height: 2.9rem; }
	.site-footer-main { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
	.site-footer-main .footer-col + .footer-col { margin-top: -1rem; }
}

.footer-logos {
	background: #fff;
	padding: 2rem 0;
}

.footer-logos .container {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 2rem;
}

.footer-logos img {
	height: 3rem;
	width: auto;
}

/* =============================================================
   Post content (news articles, search page)
   ============================================================= */
.entry-content > :last-child {
	margin-bottom: 0;
}

.entry-content img {
	border-radius: var(--radius);
}

.search-page-form {
	max-width: 40rem;
	margin-bottom: 2rem;
}

.search-page-form label {
	display: block;
	font-weight: 700;
	margin-bottom: 0.4rem;
}

.search-page-form .search-input-wrapper {
	display: flex;
	gap: 0.6rem;
	max-width: none;
}

.search-page-form input[type="search"] {
	flex: 1;
	min-height: 2.75rem;
	padding: 0.5em 0.9em;
	border: 2px solid var(--text);
	border-radius: 0.4rem;
	font-family: var(--font);
	font-size: 1rem;
}

.search-results {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1.25rem;
	max-width: var(--content-width);
}

.search-result {
	margin: 0;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--grey-border);
	border-radius: var(--radius);
}

.search-result h2 {
	font-size: 1.35rem;
	margin: 0 0 0.4rem;
}

.search-result-meta {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	margin-bottom: 0.5rem;
	font-size: 0.85rem;
	color: var(--text-muted);
}

.search-result-meta .post-type {
	padding: 0.15rem 0.6rem;
	border-radius: 50vh;
	background: var(--scheme-tint);
	color: var(--scheme-dark);
	font-weight: 700;
}

.search-result-excerpt {
	margin: 0;
}

.search-count {
	color: var(--text-muted);
}

/* =============================================================
   Shared components (from the Access Wellbeing foundation)
   ============================================================= */

/* Custom HTML Section - No default styles to allow complete customization */

/* FAQs Section */
.faqs-section {
	padding: 2rem 0 4rem;

	h2 {
		margin-bottom: 2rem;
	}

	.faqs-list {
		max-width: 1200px;
		display: flex;
		flex-direction: column;
		gap: 1rem;
	}

	.faq-item {
		border: 1px solid var(--light);
		border-radius: 0.75rem;
		background: white;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
		transition: all 0.3s ease;

		&:hover {
			box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
		}

		&[open] {
			border-color: var(--primary);
			box-shadow: 0 4px 12px color-mix(in srgb, var(--scheme) 15%, transparent);

			summary {
				color: var(--primary);
				border-bottom: 1px solid var(--lighter);

				&::marker {
					color: var(--primary);
				}

				&::-webkit-details-marker {
					color: var(--primary);
				}
			}
		}
	}

	summary {
		padding: 1.5rem 5rem 1.5rem 1.5rem;
		font-family: var(--font); font-weight: 700;
		font-weight: 700;
		font-size: 1rem;
		cursor: pointer;
		list-style: none;
		position: relative;
		transition: all 0.3s ease;

		&::-webkit-details-marker {
			display: none;
		}

		&::marker {
			display: none;
		}

		&::after {
			content: '+';
			position: absolute;
			right: 1.5rem;
			top: 50%;
			transform: translateY(-50%);
			font-size: 1.5rem;
			font-weight: 300;
			color: var(--secondary);
			transition: all 0.3s ease;
		}

		&:hover {
			color: var(--primary);
		}
	}

	.faq-item[open] summary::after {
		content: '−';
		color: var(--primary);
	}

	.faq-answer {
		padding: 0 1.5rem 1.5rem;
		line-height: 1.7;

		p {
			margin-bottom: 1rem;

			&:last-child {
				margin-bottom: 0;
			}
		}
	}

	@media (max-width: 600px) {
		padding: 3rem 0;

		summary {
			padding: 1rem 4rem 1rem 1rem;
			font-size: 1rem;

			&::after {
				right: 1rem;
			}
		}

		.faq-answer {
			padding: 0 1rem 1rem;
		}
	}
}


/* Subnavigation Section */
.subnavigation-section {
    background-color: var(--light);
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.subnavigation-nav {
    display: flex;
    justify-content: center;
}

.subnavigation-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 0;
    width: 100%;
}

.subnavigation-nav li {
    border-left: 1px solid white;
    border-right: 1px solid white;
    flex: 1;
    text-align: center;
}

.subnavigation-nav li a {
    text-decoration: none;
    color: var(--secondary);
    font-family: var(--font); font-weight: 700;
    padding: 1rem 1.5rem;
    display: block;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
	min-height: 6rem;
    justify-content: center;
}

.subnavigation-nav li.active a {
    background-color: var(--primary);
    color: white;
}

.subnavigation-nav li.active a::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid var(--primary);
}

@media (max-width: 768px) {
    .subnavigation-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .subnavigation-section {
        margin-top: 6rem;
        position: relative;
        z-index: 10;
    }
    .subnavigation-section .container {
        padding-left: 0;
        padding-right: 0;
    }
    .subnavigation-nav ul {
        flex-direction: column;
    }
    .subnavigation-nav li {
        border-left: none;
        border-right: none;
        border-bottom: 2px solid white;
    }
    .subnavigation-nav li:last-child {
        border-bottom: none;
    }
    .subnavigation-nav li.active a::after {
        display: none;
    }
}

/* =============================================================
   Hero Section (overhauled)
   ============================================================= */
.hero-section {
    padding: 4rem 0 3rem;
}

.hero-section .hero-section-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 4rem;
    align-items: center;
}

.hero-section.no-boxes .hero-section-grid {
    grid-template-columns: minmax(0, 1fr);
}

.hero-section .hero-section-content h1 {
    margin-top: 0;
    font-size: clamp(2rem, 4.5vw, 3.75rem);
    line-height: 1.1;
}

.hero-section .section-content p {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
}

.hero-feature-boxes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-content: center;
}

.hero-feature-box {
    border-radius: 1.25rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-feature-box:hover,
.hero-feature-box:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.hero-feature-box-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1.75rem;
    color: white;
    text-decoration: none;
    height: 100%;
    border-radius: 1.25rem;
    overflow: hidden;
}

.hero-feature-box--primary   .hero-feature-box-link { background: var(--primary); }
.hero-feature-box--secondary .hero-feature-box-link { background: var(--secondary); }
.hero-feature-box--tertiary  .hero-feature-box-link { background: var(--tertiary); }

.hero-feature-box-link:focus-visible {
    outline: 3px solid white;
    outline-offset: -4px;
}

.hero-feature-box-icon {
    height: 44px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    margin-bottom: 0.85rem;
}

.hero-feature-box-content { min-width: 0; }

.hero-feature-box-title {
    color: white;
    margin: 0 0 0.15rem;
    font-size: 1.2rem;
    line-height: 1.25;
}

.hero-feature-box-description {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.92;
    line-height: 1.45;
}

.hero-feature-box-description p { margin: 0; line-height: 1.45; }

.hero-feature-box-arrow {
    display: flex;
    align-items: center;
    color: white;
    margin-top: auto;
    padding-top: 1.5rem;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .hero-section .hero-section-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }
    .hero-feature-box { margin-left: 0 !important; margin-right: 0 !important; }
}

/* =============================================================
   Downloads block
   ============================================================= */
.downloads-section {
    padding: 3rem 0 4rem;
    background: var(--lighter);
}

.downloads-title { margin-top: 0; }

.downloads-intro { margin-bottom: 1.5rem; max-width: 52rem; }

/* ---- Controls bar ---- */
.downloads-controls {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    align-items: stretch;
}

.downloads-search { flex: 2 1 240px; position: relative; }
.downloads-filter { flex: 1 1 180px; min-width: 0; }

.downloads-search input,
.downloads-filter select {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    padding: 0 1em;
    border: 1px solid var(--medium);
    border-radius: 0.375rem;
    background: white;
    font: inherit;
    font-size: 0.9rem;
    color: var(--secondary);
}

.downloads-filter select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232d2b6d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px;
    padding-right: 2.25rem;
    cursor: pointer;
}

.downloads-search input:focus-visible,
.downloads-filter select:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 1px;
    border-color: var(--primary);
}

@media (max-width: 540px) {
    .downloads-controls { flex-direction: column; }
    .downloads-search,
    .downloads-filter { flex: none; width: 100%; }
}

/* ---- Table ---- */
.downloads-table-wrap {
    border: 1px solid var(--medium);
    border-radius: 0.5rem;
    overflow: hidden;
    background: white;
}

.downloads-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: auto;
}

.downloads-table thead {
    background: var(--lighter);
}

.downloads-table th,
.downloads-table td {
    text-align: left;
    padding: 0.9rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--light);
}

.downloads-table thead th {
    font-family: var(--font); font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--secondary);
    border-bottom: 1px solid var(--medium);
    opacity: 0.8;
}

.downloads-table tbody tr:last-child th,
.downloads-table tbody tr:last-child td {
    border-bottom: none;
}

.downloads-table tbody tr:hover { background: var(--lighter); }

/* Column widths — title grabs remaining space, others size to content */
.downloads-col-title    { width: 100%; }
.downloads-col-category { white-space: nowrap; }
.downloads-col-type     { white-space: nowrap; padding-right: 1.25rem; }
.downloads-col-actions  { white-space: nowrap; }

.downloads-cell-title strong { display: block; font-family: var(--font); font-weight: 700; }
.downloads-cell-title p { margin: 0.2rem 0 0; font-size: 0.78rem; font-family: var(--font); font-weight: 400; opacity: 0.6; line-height: 1.4; }

.downloads-pill {
    display: inline-block;
    padding: 0.2em 0.6em;
    border-radius: 0.25rem;
    background: var(--secondary);
    color: white;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    font-family: var(--font); font-weight: 700;
    white-space: nowrap;
}

.downloads-size {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    opacity: 0.6;
    white-space: nowrap;
}

.downloads-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
    align-items: center;
}

.downloads-actions .button {
    margin-top: 0;
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    line-height: 1;
}

.downloads-icon { flex-shrink: 0; display: inline-block; }

.downloads-actions .button-secondary {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 0.375rem;
}

.downloads-actions .button-secondary:hover,
.downloads-actions .button-secondary:focus-visible {
    background: var(--primary);
    color: white;
}

.downloads-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--secondary);
    margin: 0;
}

/* ---- Responsive table ---- */
/* Tablet: hide category column */
@media (max-width: 780px) {
    .downloads-col-category { display: none; }
}

/* Mobile: card-style stacked layout */
@media (max-width: 560px) {
    .downloads-table,
    .downloads-table tbody,
    .downloads-table tr,
    .downloads-table th,
    .downloads-table td { display: block; width: 100%; box-sizing: border-box; }

    .downloads-table thead { display: none; }

    .downloads-table tr {
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--light);
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    .downloads-table tbody tr:last-child { border-bottom: none; }

    .downloads-table th,
    .downloads-table td { padding: 0; border: none; }

    .downloads-col-category { display: none; }

    /* Type + actions on one row */
    .downloads-col-type,
    .downloads-col-actions { width: 100%; }

    .downloads-col-type .downloads-size { display: inline; margin-top: 0; margin-left: 0.4rem; }

    .downloads-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        margin-top: 0.25rem;
    }
}

/* =============================================================
   Directory block
   ============================================================= */
.directory-section { padding: 2rem 0 4rem; overflow-x: hidden; }
.directory-header { margin-bottom: 1.25rem; }
.directory-header h2 { margin-top: 0; }
.directory-intro { max-width: 62rem; }

.directory-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.directory-filter {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: var(--lighter);
    padding: 0.3rem;
    border-radius: 50vh;
    border: 1px solid var(--medium);
}

.directory-chip {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--secondary);
    font: inherit;
    font-size: 0.85rem;
    font-family: var(--font); font-weight: 700;
    padding: 0.45rem 1rem;
    border-radius: 50vh;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    line-height: 1;
    transition: background 200ms ease, color 200ms ease;
}

.directory-chip:hover { background: white; }
.directory-chip:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
.directory-chip.is-active {
    background: var(--secondary);
    color: white;
}

.directory-chip-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.directory-chip-dot--hub  { background: var(--tertiary); }
.directory-chip-dot--drop { background: var(--primary); }

/* ---- Grid toolbar (results count + filters) ---- */
.directory-grid-toolbar {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1rem 1.5rem;
    padding: 0.85rem 1rem;
    background: var(--lighter);
    border: 1px solid var(--medium);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.directory-results-count {
    margin: 0;
    font-size: 0.9rem;
    color: var(--secondary);
    font-family: var(--font); font-weight: 700;
}

.directory-grid-toolbar-controls {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
}

.directory-control {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}
.directory-control--select { flex: 0 0 auto; }
.directory-control--search { flex: 1 1 220px; max-width: 320px; }

/* Shared input/select sizing for visual consistency */
.directory-area-select,
.directory-control--search input {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    border: 1px solid var(--medium);
    border-radius: 0.375rem;
    background: white;
    font: inherit;
    font-size: 0.9rem;
    color: var(--secondary);
}

.directory-area-select {
    appearance: none;
    padding: 0 2.25rem 0 0.85rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232d2b6d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px;
    cursor: pointer;
    min-width: 140px;
}

.directory-control--search input {
    padding: 0 0.85rem 0 2.5rem;
}

.directory-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
    pointer-events: none;
}

/* AA-compliant focus ring (3px, high contrast) */
.directory-area-select:focus-visible,
.directory-control--search input:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 1px;
    border-color: var(--primary);
}

/* Responsive stack */
@media (max-width: 720px) {
    .directory-grid-toolbar {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .directory-grid-toolbar-controls {
        flex-wrap: wrap;
    }
    .directory-control--select,
    .directory-control--search {
        flex: 1 1 100%;
        max-width: none;
    }
    .directory-area-select { min-width: 0; }
}

.directory-map-wrap {
    margin-bottom: 2rem;
}

.directory-map {
    width: 100%;
    height: clamp(520px, 70vh, 1000px);
    background: var(--lighter);
    display: block;
}

.directory-map .leaflet-container { font-family: inherit; }

/* AA-compliant Leaflet zoom controls (44x44 hit target, clear contrast, visible focus) */
.directory-map.directory-map .leaflet-bar {
    border: 1px solid var(--medium);
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.directory-map.directory-map .leaflet-bar a,
.directory-map.directory-map .leaflet-bar a:hover,
.directory-map.directory-map .leaflet-bar a:focus,
.directory-map.directory-map .leaflet-bar a.leaflet-disabled {
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 1.4rem;
    box-sizing: border-box;
    color: var(--secondary);
    background-color: white;
    border-bottom: 1px solid var(--medium);
}
.directory-map.directory-map .leaflet-bar a:last-child { border-bottom: none; }
.directory-map.directory-map .leaflet-bar a:hover {
    background-color: var(--lighter);
    color: var(--primary);
}
.directory-map.directory-map .leaflet-bar a:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: -3px;
    z-index: 1;
}
.directory-map.directory-map .leaflet-bar a.leaflet-disabled {
    background-color: #f7f7f7;
    color: #aaa;
    cursor: not-allowed;
}

/* Subtle attribution; hide any embedded brand logos. */
.leaflet-control-attribution.leaflet-control {
    background: rgba(255, 255, 255, 0.85);
    color: #444;
    font-size: 0.6rem;
    padding: 2px 8px;
}
.leaflet-control-attribution.leaflet-control svg { display: none !important; }
.leaflet-control-attribution.leaflet-control a { color: #444; text-decoration: underline; }
.leaflet-control-attribution.leaflet-control {
    background: rgba(255, 255, 255, 0.85);
    color: #444;
	border-radius: 5px 0 0 0;
    font-size: 0.55rem;
    padding: 2px 8px;
}
.leaflet-control-attribution.leaflet-control svg { display: none !important; }
.leaflet-control-attribution.leaflet-control a { color: #444; text-decoration: underline; }

.directory-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.directory-card { display: flex; min-width: 0; }

.directory-card-button {
    text-align: left;
    width: 100%;
    background: white;
    border: 1px solid var(--medium);
    border-top: 3px solid transparent;
    border-radius: 0.375rem;
    padding: 1.5rem 1.75rem 1.25rem;
    cursor: pointer;
    color: inherit;
    font: inherit;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: box-shadow 200ms ease, transform 200ms ease;
}

.directory-card-button:hover,
.directory-card-button:focus-visible {
    box-shadow: 0 6px 20px rgba(0,0,0,0.09);
    transform: translateY(-3px);
    outline: none;
}
.directory-card-button:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.directory-card[data-type="hub"] .directory-card-button {
    border-top-color: var(--tertiary);
}
.directory-card[data-type="drop_in"] .directory-card-button {
    border-top-color: var(--primary);
}
/* When a distance bar is present it covers the top — hide the coloured border */
.directory-card-button:has(.directory-card-distance) {
    border-top-color: transparent;
}

.directory-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font); font-weight: 700;
    padding: 0.2rem 0.65rem 0.2rem 0.5rem;
    border-radius: 50vh;
    align-self: flex-start;
    line-height: 1.4;
    margin-bottom: 0.9rem;
}

.directory-card-tag--hub {
    background: rgba(174, 38, 116, 0.10);
    color: var(--tertiary);
}
.directory-card-tag--drop_in {
    background: color-mix(in srgb, var(--scheme) 10%, transparent);
    color: var(--primary);
}

.directory-card-tag-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
    flex-shrink: 0;
}

.directory-card-title {
    font-family: var(--font); font-weight: 700;
    font-size: 1rem;
    color: var(--secondary);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.directory-card-address {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #666;
    flex: 1;
}

.directory-card-hours {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: #888;
    min-width: 0;
}
.directory-card-hours svg { flex-shrink: 0; color: var(--primary); }
.directory-card-hours-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.directory-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light);
    width: 100%;
    color: var(--primary);
    font-family: var(--font); font-weight: 700;
    font-size: 0.8rem;
    transition: gap 150ms ease;
}

.directory-card-button:hover .directory-card-cta {
    gap: 0.5rem;
}

.directory-empty {
    margin: 1.5rem 0 0;
    text-align: center;
    color: var(--secondary);
    padding: 2rem 1.5rem;
    background: var(--lighter);
    border-radius: 0.875rem;
    font-size: 0.9rem;
}

.directory-postcode-attribution {
    margin: 2.5rem 0 0;
    font-size: 0.72rem;
    color: #aaa;
    text-align: center;
    line-height: 1.5;
}
.directory-postcode-attribution[hidden] { display: none; }
.directory-postcode-attribution a { color: inherit; }

.directory-card.is-hidden { display: none; }

/* Mobile type filter select (visible only on small screens) */
.directory-filter-select {
    display: none;
    appearance: none;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232d2b6d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.9em center;
    background-size: 16px;
    border: 1px solid var(--medium);
    border-radius: 0.375rem;
    padding: 0.7em 2.5em 0.7em 1em;
    font: inherit;
    font-size: 0.9rem;
    font-family: var(--font); font-weight: 700;
    color: var(--secondary);
    min-height: 44px;
    width: 100%;
    cursor: pointer;
}
.directory-filter-select:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-color: var(--primary);
}

@media (max-width: 1100px) {
    .directory-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .directory-grid { grid-template-columns: 1fr; }
}

/* Map markers (CSS-only divIcon) */
.awb-marker {
    width: 26px;
    height: 26px;
    border-radius: 50% 50% 50% 0;
    background: var(--primary);
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.awb-marker.awb-marker--hub {
    width: 36px;
    height: 36px;
    background: var(--tertiary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.leaflet-popup-content-wrapper {
    border-radius: 0.5rem !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid var(--medium);
}

.leaflet-popup-content {
    margin: 0 !important;
    font-size: 0.82rem !important;
    line-height: 1.4;
}

.awb-popup {
    padding: 1rem 1.1rem 0.9rem;
    min-width: 180px;
    max-width: 220px;
}

.awb-popup-type {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    font-family: var(--font); font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.15rem 0.55rem 0.15rem 0.4rem;
    border-radius: 50vh;
    margin-bottom: 0.55rem;
}
.awb-popup-type--hub   { background: rgba(174,38,116,0.1); color: var(--tertiary); }
.awb-popup-type--drop  { background: color-mix(in srgb, var(--scheme) 10%, transparent);  color: var(--primary);  }
.awb-popup-type-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
    flex-shrink: 0;
}

.awb-popup strong {
    display: block;
    font-family: var(--font); font-weight: 700;
    font-size: 0.88rem;
    color: var(--secondary);
    margin-bottom: 0.15rem;
}

.awb-popup p {
    color: #666;
    font-size: 0.78rem;
    margin: 0 0 0.65rem;
    line-height: 1.4;
}

.awb-popup button {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font: inherit;
    font-family: var(--font); font-weight: 700;
    font-size: 0.75rem;
    width: 100%;
    justify-content: center;
    transition: background 150ms ease;
}
.awb-popup button:hover { background: var(--primary); }

.leaflet-popup-tip-container { margin-top: -1px; }

/* ---- Directory modal detail ---- */
.directory-detail-header {
    padding: 1.25rem 3.5rem 1rem 1.25rem;
    background: var(--lighter);
    border-bottom: 3px solid transparent;
}
.directory-detail--hub     .directory-detail-header { border-bottom-color: var(--tertiary); }
.directory-detail--drop_in .directory-detail-header { border-bottom-color: var(--primary); }

.directory-detail-tag { display: inline-flex; margin-bottom: 0.5rem; }

.directory-detail-title {
    margin: 0 0 0.35rem;
    color: var(--secondary);
    font-size: 1.15rem;
    line-height: 1.2;
}

.directory-detail-managed {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
}
.directory-detail-label {
    font-family: var(--font); font-weight: 700;
    color: var(--secondary);
    margin-right: 0.25em;
}

.directory-detail-body {
    padding: 0 1.25rem 1.25rem;
}

.directory-detail-list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.directory-detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--light);
}
.directory-detail-row:last-child { border-bottom: none; }

.directory-detail-row dt {
    font-family: var(--font); font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--secondary);
    margin: 0;
    opacity: 0.7;
}

.directory-detail-row dd {
    margin: 0;
    line-height: 1.55;
    font-size: 0.88rem;
    color: #222;
}
.directory-detail-row dd a {
    color: var(--primary);
    text-decoration: none;
    font-family: var(--font); font-weight: 700;
}
.directory-detail-row dd a:hover { text-decoration: underline; }

.directory-phone-supp {
    display: block;
    font-size: 0.7rem;
    color: #777;
    margin-top: 0;
}

.directory-detail-maps-link {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: var(--primary);
    text-decoration: none;
}
.directory-detail-maps-link svg { vertical-align: middle; margin-right: 0.25em; }
.directory-detail-maps-link:hover { text-decoration: underline; }

.directory-detail-info {
    border-top: 1px solid var(--light);
    padding-top: 0.65rem;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    line-height: 1.55;
    color: #555;
}
.directory-detail-info p { margin: 0 0 0.35rem; }
.directory-detail-info p:last-child { margin-bottom: 0; }

/* ---- Directory search hero (above the map) ---- */

.directory-map-toolbar {
    background: var(--secondary);
    border-bottom: 3px solid var(--primary);
    padding: 2.25rem 6%;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.directory-toolbar-deco {
    position: absolute;
    width: 900px;
    opacity: 0.09;
    pointer-events: none;
    z-index: 0;
    top: 50%;
}
.directory-toolbar-deco--right { right: -720px; transform: translateY(-50%); }
.directory-toolbar-deco--left  { left: -720px;  transform: translateY(-50%) scaleX(-1); }

@media (max-width: 1100px) {
    .directory-toolbar-deco { display: none; }
}

.directory-toolbar-inner {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.directory-toolbar-heading {
    margin: 0;
    color: white;
    font-family: var(--font); font-weight: 700;
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    line-height: 1.2;
}

.directory-toolbar-intro {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    max-width: 720px;
}
.directory-toolbar-intro p { margin: 0; }

/* Search bar: input + button on a single row, full width of inner */
.directory-postcode-form {
    display: flex;
    align-items: stretch;
    width: 100%;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    transition: box-shadow 150ms ease;
}
.directory-postcode-form:focus-within {
    box-shadow: 0 0 0 3px var(--primary), 0 4px 16px rgba(0,0,0,0.18);
}

.directory-postcode-field {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
}

.directory-postcode-icon {
    position: absolute;
    left: 1rem;
    color: var(--primary);
    pointer-events: none;
}

.directory-postcode-input {
    width: 100%;
    height: 56px;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 1rem;
    color: var(--secondary);
    padding: 0 2.75rem 0 3rem;
    outline: none;
    text-align: left;
}
.directory-postcode-input::placeholder { color: #888; }
.directory-postcode-input:not(:placeholder-shown) {
    font-family: var(--font); font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.directory-postcode-clear {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    transition: color 120ms ease, background 120ms ease;
}
.directory-postcode-clear:hover { color: var(--secondary); background: var(--lighter); }
.directory-postcode-clear:focus-visible { outline: 2px solid var(--primary); }

.directory-postcode-btn {
    height: 56px;
    padding: 0 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    font: inherit;
    font-size: 0.95rem;
    font-family: var(--font); font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 150ms ease;
}
.directory-postcode-btn:hover,
.directory-postcode-btn:focus-visible { background: var(--scheme-dark); outline: none; }
.directory-postcode-btn:disabled { opacity: 0.65; cursor: wait; }

/* Filter chips, centred under the search bar (chip styles inherited from .directory-filter) */
.directory-toolbar-inner .directory-filter {
    margin: 0;
}
.directory-toolbar-inner .directory-filter-select { display: none; }

/* Error strip between hero and map */
.directory-postcode-error {
    margin: 0;
    padding: 0.65rem 6%;
    font-size: 0.9rem;
    color: #b3261e;
    font-family: var(--font); font-weight: 700;
    background: #fdecea;
    border-bottom: 1px solid #f5c6c6;
    text-align: center;
}

@media (max-width: 1000px) {
    .directory-map-toolbar { padding: 1.75rem 2rem; }
    .directory-postcode-error { padding-left: 2rem; padding-right: 2rem; }
}
@media (max-width: 560px) {
    .directory-postcode-form { flex-wrap: wrap; }
    .directory-postcode-field { flex: 1 1 100%; }
    .directory-postcode-btn { flex: 1 1 100%; }
    .directory-toolbar-inner .directory-filter { display: none; }
    .directory-toolbar-inner .directory-filter-select {
        display: block;
        width: 100%;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.3);
        color: white;
        border-radius: 0.375rem;
        padding: 0.7rem 0.9rem;
        font: inherit;
        font-size: 0.95rem;
    }
}


/* ---- "Sorted by distance" pill in the results toolbar ---- */
.directory-results-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    min-width: 0;
}

.directory-sorted-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    background: var(--primary);
    color: white;
    border-radius: 50vh;
    font-size: 0.72rem;
    font-family: var(--font); font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
}
.directory-sorted-pill svg { flex-shrink: 0; }
.directory-sorted-pill[hidden] { display: none; }

/* ---- Postcode search: loading spinner on submit button ---- */
@keyframes awb-spin { to { transform: rotate(360deg); } }

.directory-postcode-form.is-loading .directory-postcode-btn {
    position: relative;
    padding-right: 2.6rem;
    cursor: wait;
    background: var(--secondary);
}
.directory-postcode-form.is-loading .directory-postcode-btn::after {
    content: '';
    position: absolute;
    right: 0.7rem;
    top: 50%;
    margin-top: -7px;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: awb-spin 0.65s linear infinite;
}

/* ---- Distance bar — full-width top stripe on sorted cards ---- */
.directory-card-button { overflow: hidden; }

.directory-card-distance {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--secondary);
    color: white;
    font-family: var(--font); font-weight: 700;
    font-size: 0.78rem;
    line-height: 1;
    padding: 0.5rem 1.75rem;
    /* Break out of the card button's padding to span the full card width */
    margin: -1.5rem -1.75rem 0.85rem;
    flex-shrink: 0;
}
.directory-card-distance::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

/* ---- "You are here" postcode marker ---- */
.awb-marker--postcode {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--secondary);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--secondary), 0 2px 8px rgba(0,0,0,0.35);
}

/* ---- Postcode popup ---- */
.awb-popup--postcode {
    padding: 0.85rem 1rem;
}
.awb-popup--postcode strong {
    display: block;
    font-family: var(--font); font-weight: 700;
    font-size: 0.95rem;
    color: var(--secondary);
    margin: 0;
    line-height: 1.2;
}
.awb-popup--postcode span {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.15rem;
    line-height: 1.3;
}

/* ---- Google Maps directions interstitial dialog ---- */
.directory-maps-dialog {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0,0,0,0.5);
}
.directory-maps-dialog[hidden] { display: none; }

.directory-maps-dialog-box {
    background: white;
    border-radius: 0.75rem;
    padding: 1.75rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.directory-maps-dialog-box h3 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    color: var(--secondary);
    line-height: 1.2;
}
.directory-maps-dialog-box p {
    font-size: 0.9rem;
    color: #444;
    margin: 0 0 0.5rem;
    line-height: 1.5;
}
.directory-maps-dialog-note {
    background: var(--lighter);
    border-radius: 0.375rem;
    padding: 0.75rem 0.9rem;
    font-size: 0.82rem;
    color: #555;
    margin-top: 0.75rem;
    line-height: 1.45;
}
.directory-maps-dialog-actions {
    display: flex;
    gap: 0.65rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}
.directory-maps-dialog-confirm {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0.7rem 1.25rem;
    font: inherit;
    font-family: var(--font); font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 150ms ease;
}
.directory-maps-dialog-confirm:hover { background: var(--secondary); }
.directory-maps-dialog-cancel {
    background: none;
    color: var(--secondary);
    border: 1px solid var(--medium);
    border-radius: 0.375rem;
    padding: 0.7rem 1.1rem;
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
}
.directory-maps-dialog-cancel:hover { background: var(--lighter); }



/* =============================================================
   Modal (shared)
   ============================================================= */
.awb-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.awb-modal[hidden] { display: none; }

.awb-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    cursor: pointer;
}

.awb-modal-dialog {
    position: relative;
    background: white;
    border-radius: 0.375rem;
    max-width: 560px;
    width: 100%;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 0;
    box-shadow: 0 16px 48px rgba(0,0,0,0.22);
}

.awb-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: white;
    border: 1px solid var(--medium);
    width: 36px;
    height: 36px;
    border-radius: 0.25rem;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.awb-modal-close:hover,
.awb-modal-close:focus-visible {
    background: var(--lighter);
    outline: none;
}

body.awb-modal-open { overflow: hidden; }

/* =============================================================
   Video Grid block
   ============================================================= */
.video-grid-section {
    padding: 3rem 0 4rem;
}
.video-grid-section.has-bg {
    padding: 3rem 0 4rem;
}
.video-grid-title { margin-top: 0; }
.video-grid-intro { margin-bottom: 2rem; max-width: 52rem; }

.video-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.5rem;
}
.video-grid--cols-1 { grid-template-columns: minmax(0, 1fr); }
.video-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.video-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.video-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1100px) {
    .video-grid--cols-3,
    .video-grid--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .video-grid--cols-2,
    .video-grid--cols-3,
    .video-grid--cols-4 { grid-template-columns: minmax(0, 1fr); }
}

/* Card shell — clips both the text panel and the video frame to the same radius */
.video-card-inner {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--medium);
    border-radius: 0.875rem;
    overflow: hidden;
    height: 100%;
}

/* Text panel above the video */
.video-card-text {
    padding: 1.25rem 1.5rem 1rem;
}

.video-card-eyebrow {
    margin: 0 0 0.3rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--tertiary);
    font-family: var(--font); font-weight: 700;
}

.video-card-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    line-height: 1.3;
    color: var(--secondary);
}

.video-card-description {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #555;
}
.video-card-description p { margin: 0; }

/* Video frame: no border-radius — the card shell clips it at the bottom */
.video-card-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    background: var(--secondary);
    margin-top: auto;
}

.video-card-frame iframe,
.video-card-frame .video-card-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    margin: 0;
    display: block;
    border-radius: 0;
}

.video-card-player {
    appearance: none;
    background: var(--secondary);
    cursor: pointer;
    padding: 0;
    color: white;
    overflow: hidden;
}

.video-card-player img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 400ms ease;
}

.video-card-placeholder {
    position: absolute;
    inset: 0;
    background: var(--secondary);
}

.video-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.12);
    transition: background 200ms ease;
}

.video-card-player:hover .video-card-overlay,
.video-card-player:focus-visible .video-card-overlay {
    background: rgba(0, 0, 0, 0.25);
}

/* Play button: page colour disc with a white ring, and a soft ring that
   ripples out on hover/focus */
.video-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 0;
    border-radius: 50%;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.3));
}

.video-card-play svg {
    width: clamp(3.75rem, 7vw, 5.5rem);
    height: auto;
}

.video-card-grid .video-card-play svg,
.video-card-frame .video-card-play svg {
    width: clamp(3.25rem, 5vw, 4.5rem);
}

.video-card-play .play-disc {
    fill: var(--scheme-bg);
    stroke: #fff;
    stroke-width: 4;
}

.video-card-play .play-icon {
    fill: var(--scheme-on);
}

.video-card-play::before {
    content: '';
    position: absolute;
    inset: 4%;
    border-radius: 50%;
    border: 3px solid #fff;
    opacity: 0;
    pointer-events: none;
}

.video-card-player:hover img,
.video-card-player:focus-visible img { transform: scale(1.04); }

.video-card-player:hover .video-card-play,
.video-card-player:focus-visible .video-card-play {
    transform: translate(-50%, -50%) scale(1.1);
}

.video-card-player:hover .video-card-play::before,
.video-card-player:focus-visible .video-card-play::before {
    animation: s2w-play-ripple 1.4s ease-out infinite;
}

@keyframes s2w-play-ripple {
    0%   { transform: scale(1);   opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

.video-card-player:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: -3px;
}

/* Tiny disclaimer pinned to the bottom of the play button.
   Lives inside the button so it disappears when the iframe replaces it. */
.video-card-disclaimer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0.35rem 0.75rem;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 0.65rem;
    line-height: 1.3;
    text-align: center;
}

/* =============================================================
   Stories Grid block
   ============================================================= */
.stories-section {
    padding: 3rem 0 4rem;
}

.stories-title { margin-top: 0; }
.stories-intro { margin-bottom: 2rem; max-width: 52rem; }

.stories-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.5rem;
    align-items: start;
}
.stories-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stories-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stories-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1100px) {
    .stories-grid--cols-3,
    .stories-grid--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .stories-grid--cols-2,
    .stories-grid--cols-3,
    .stories-grid--cols-4 { grid-template-columns: minmax(0, 1fr); }
}

/* Card shell — same construction as .video-card-inner */
.story-card-inner {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--medium);
    border-radius: 0.875rem;
    overflow: hidden;
    height: 100%;
}

/* Image panel: flush to top of card */
.story-card-image {
    flex-shrink: 0;
    height: 200px;
    overflow: hidden;
}

.story-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Text panel */
.story-card-text {
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.story-card-eyebrow {
    margin: 0 0 0.6rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font); font-weight: 700;
    color: var(--tertiary);
}

.story-card-quote {
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
}

.story-card-quote p {
    margin: 0;
    font-family: var(--font); font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--secondary);
}

.story-card-content {
    font-size: 0.88rem;
    line-height: 1.65;
    color: #444;
}

.story-card-content p {
    margin: 0 0 0.75em;
}

.story-card-content p:last-child {
    margin-bottom: 0;
}

/* =============================================================
   Calendar (Events) block
   ============================================================= */
.events-section {
    padding: 0 0 4rem;
    background: var(--lighter);
}
/* No hero band (no title/intro)? Give the toolbar breathing room instead. */
.events-section > .container:first-child { padding-top: 2.5rem; }

/* ---- Hero band — mirrors the Directory search hero ---- */
.events-hero {
    background: var(--secondary);
    border-bottom: 3px solid var(--primary);
    padding: 2.25rem 6%;
    position: relative;
    overflow: hidden;
    margin-bottom: 2.25rem;
}
.events-hero-deco {
    position: absolute;
    width: 900px;
    opacity: 0.09;
    pointer-events: none;
    z-index: 0;
    top: 50%;
}
.events-hero-deco--right { right: -720px; transform: translateY(-50%); }
.events-hero-deco--left  { left: -720px;  transform: translateY(-50%) scaleX(-1); }
@media (max-width: 1100px) {
    .events-hero-deco { display: none; }
}
.events-hero-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}
.events-hero-heading {
    margin: 0;
    color: white;
    font-family: var(--font); font-weight: 700;
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    line-height: 1.2;
}
.events-hero-intro {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0.5rem 0 0;
}
.events-hero-intro p { margin: 0; line-height: 1.6; }

.events-toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

/* Category chips — same pattern as the Directory filter */
.events-filter {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: white;
    padding: 0.3rem;
    border-radius: 50vh;
    border: 1px solid var(--medium);
}

.events-chip {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--secondary);
    font: inherit;
    font-size: 0.85rem;
    font-family: var(--font); font-weight: 700;
    padding: 0.45rem 1rem;
    border-radius: 50vh;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    line-height: 1;
    transition: background 200ms ease, color 200ms ease;
}
.events-chip:hover { background: var(--lighter); }
.events-chip:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
.events-chip.is-active {
    background: var(--secondary);
    color: white;
}

.events-chip-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Select fallback for the chips on small screens */
.events-control {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}
.events-control--select { display: none; }
.events-control--search { flex: 1 1 220px; max-width: 320px; }

.events-cat-select,
.events-control--search input {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    border: 1px solid var(--medium);
    border-radius: 0.375rem;
    background: white;
    font: inherit;
    font-size: 0.9rem;
    color: var(--secondary);
}
.events-cat-select {
    appearance: none;
    padding: 0 2.25rem 0 0.85rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232d2b6d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px;
    cursor: pointer;
    min-width: 160px;
}
.events-control--search input { padding: 0 0.85rem 0 2.5rem; }
.events-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
    pointer-events: none;
}
.events-cat-select:focus-visible,
.events-control--search input:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 1px;
    border-color: var(--primary);
}

@media (max-width: 900px) {
    .events-filter { display: none; }
    .events-control--select { display: flex; flex: 1 1 100%; }
    .events-control--search { flex: 1 1 100%; max-width: none; }
}

.events-error {
    background: #fbeaea;
    border: 1px solid #e7b3ad;
    color: #8a1f11;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* ---- FullCalendar theming ---- */
/* The calendar sits in a white card so the grid pops on the tinted section. */
.events-calendar {
    background: white;
    border: 1px solid var(--medium);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    --fc-border-color: var(--medium);
    --fc-page-bg-color: #fff;
    --fc-neutral-bg-color: var(--lighter);
    --fc-today-bg-color: var(--scheme-tint);
    --fc-button-bg-color: #fff;
    --fc-button-border-color: var(--medium);
    --fc-button-text-color: var(--secondary);
    --fc-button-hover-bg-color: var(--lighter);
    --fc-button-hover-border-color: var(--medium);
    --fc-button-active-bg-color: var(--secondary);
    --fc-button-active-border-color: var(--secondary);
    --fc-list-event-hover-bg-color: var(--lighter);
    --fc-small-font-size: 0.78rem;
    font-size: 0.9rem;
}

.events-calendar .fc-toolbar-title {
    font-family: var(--font); font-weight: 700;
    font-size: 1.3rem;
    color: var(--secondary);
}

.events-calendar .fc-button {
    font: inherit;
    font-size: 0.85rem;
    font-family: var(--font); font-weight: 700;
    border-radius: 50vh;
    padding: 0.45rem 1rem;
    line-height: 1.2;
    text-transform: none;
    box-shadow: none !important;
    transition: background 200ms ease, color 200ms ease;
}
.events-calendar .fc-button:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
.events-calendar .fc-button-group { gap: 0.3rem; }
.events-calendar .fc-button-group .fc-button { border-radius: 50vh !important; }
.events-calendar .fc-button-primary:not(:disabled).fc-button-active,
.events-calendar .fc-button-primary:not(:disabled):active {
    color: #fff;
}
.events-calendar .fc-toolbar.fc-header-toolbar {
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.events-calendar .fc-col-header-cell-cushion {
    font-family: var(--font); font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
    padding: 0.4rem 0.25rem;
}
.events-calendar .fc-daygrid-day-number {
    color: #373233;
    text-decoration: none;
    padding: 0.35rem 0.5rem;
}
.events-calendar .fc-day-today .fc-daygrid-day-number {
    font-family: var(--font); font-weight: 700;
    color: var(--primary-contrast);
}

/* Events: white card with a coloured accent so text stays AA-readable */
.events-calendar .fc-event { cursor: pointer; }
.events-calendar .fc-daygrid-event {
    border-radius: 0.3rem;
    font-size: var(--fc-small-font-size);
}
.events-calendar .fc-daygrid-dot-event .fc-daygrid-event-dot {
    border-color: var(--awb-ev, var(--primary));
}
.events-calendar .fc-daygrid-dot-event .fc-event-title,
.events-calendar .fc-daygrid-dot-event .fc-event-time {
    color: #373233;
}
.events-calendar .fc-daygrid-dot-event:hover,
.events-calendar .fc-daygrid-dot-event.fc-event-mirror {
    background: var(--lighter);
}
.events-calendar .fc-h-event {
    background: color-mix(in srgb, var(--awb-ev, var(--primary)) 14%, white);
    border: 1px solid color-mix(in srgb, var(--awb-ev, var(--primary)) 35%, white);
    border-left: 4px solid var(--awb-ev, var(--primary));
}
.events-calendar .fc-h-event .fc-event-title,
.events-calendar .fc-h-event .fc-event-time {
    color: #2a2627;
}
.events-calendar .fc-event:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 1px;
}

/* Week (time grid) view: same white-card-with-accent treatment */
.events-calendar .fc-v-event {
    background: color-mix(in srgb, var(--awb-ev, var(--primary)) 14%, white);
    border: 1px solid color-mix(in srgb, var(--awb-ev, var(--primary)) 35%, white);
    border-left: 4px solid var(--awb-ev, var(--primary));
    box-shadow: none;
    border-radius: 0.3rem;
}
.events-calendar .fc-v-event .fc-event-title,
.events-calendar .fc-v-event .fc-event-time {
    color: #2a2627;
}
.events-calendar .fc-timegrid-slot-label-cushion,
.events-calendar .fc-timegrid-axis-cushion {
    font-size: 0.75rem;
    color: #50575e;
}
.events-calendar .fc-timegrid-now-indicator-line { border-color: var(--tertiary); }
.events-calendar .fc-timegrid-now-indicator-arrow { border-color: var(--tertiary); }

/* "+2 more" link + popover */
.events-calendar .fc-daygrid-more-link {
    color: var(--primary-contrast);
    font-size: var(--fc-small-font-size);
    font-family: var(--font); font-weight: 700;
}
.events-calendar .fc-popover {
    border-radius: 0.375rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.16);
    border: 1px solid var(--medium);
}
.events-calendar .fc-popover-title { font-family: var(--font); font-weight: 700; }

/* List view */
.events-calendar .fc-list {
    border-radius: 0.375rem;
    overflow: hidden;
}
.events-calendar .fc-list-day-cushion {
    background: var(--lighter);
}
.events-calendar .fc-list-day-text,
.events-calendar .fc-list-day-side-text {
    font-family: var(--font); font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
}
.events-calendar .fc-list-event-dot {
    border-color: var(--awb-ev, var(--primary));
}
.events-calendar .fc-list-event-title a {
    color: #373233;
    text-decoration: none;
    font-family: var(--font); font-weight: 700;
}
.events-calendar .fc-list-event-time { color: #50575e; }

@media (max-width: 700px) {
    .events-calendar { padding: 0.85rem 0.6rem; }
    .events-calendar .fc-toolbar.fc-header-toolbar { justify-content: center; }
    .events-calendar .fc-toolbar-title { font-size: 1.1rem; width: 100%; text-align: center; order: -1; }
}

/* ---- No-JS fallback ---- */
.events-noscript {
    background: white;
    border: 1px solid var(--medium);
    border-radius: 0.375rem;
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
}
.events-noscript-list { padding-left: 1.2rem; }
.events-noscript-list li { margin-bottom: 0.35rem; }

/* ---- Category tag (modal + single page) ---- */
.events-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--lighter);
    border: 1px solid var(--medium);
    border-radius: 50vh;
    padding: 0.3rem 0.9rem;
    font-size: 0.78rem;
    font-family: var(--font); font-weight: 700;
    color: var(--secondary);
    line-height: 1.2;
    margin-right: 0.4rem;
}

/* ---- Event quick-view modal content ---- */
/* The shared dialog has no padding of its own (the Directory supplies padded
   markup), so the events content carries its own. The category colour is
   passed in as --awb-ev and used for the header accent. */
.awb-modal-dialog:has(.events-modal) { max-width: 680px; }

.events-modal-header {
    background: var(--lighter);
    padding: 1.5rem 3.5rem 1.25rem 2rem; /* right side clears the close button */
    border-bottom: 3px solid var(--awb-ev, var(--primary));
}
.events-modal-header .events-tag {
    background: white;
    margin-bottom: 0.6rem;
}
.events-modal h3 { margin-top: 0; }
.events-modal-title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.25;
    color: var(--secondary);
}

.events-modal-body { padding: 1.25rem 2rem 2rem; }

/* Labelled detail rows — a clean two-column table */
.events-modal-list { margin: 0; }
.events-modal-row {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--light);
    font-size: 0.9rem;
}
.events-modal-row:last-child { border-bottom: none; }
.events-modal-row dt {
    font-family: var(--font); font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary);
    padding-top: 0.2rem;
}
.events-modal-row dd {
    margin: 0;
    line-height: 1.55;
}

.events-modal-summary {
    margin: 1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.events-modal-footer {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem 1.5rem;
    flex-wrap: wrap;
}
.events-modal-footer .button { margin-top: 0; }

@media (max-width: 600px) {
    .events-modal-header { padding: 1.25rem 3.25rem 1rem 1.25rem; }
    .events-modal-body { padding: 1rem 1.25rem 1.5rem; }
    .events-modal-row { grid-template-columns: 5rem minmax(0, 1fr); gap: 0.75rem; }
}

/* =============================================================
   Single event page
   ============================================================= */
.event-single { padding: 2.5rem 0 4rem; }

.event-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 19rem;
    gap: 2.5rem;
    align-items: start;
}
/* Collapse early — the sidebar squeezes the content badly on tablets. */
@media (max-width: 1100px) {
    .event-single-layout { grid-template-columns: 1fr; gap: 1.5rem; }
    .event-single-aside { max-width: 34rem; }
}

.event-single-tags { margin-bottom: 0.75rem; }

.event-single-when {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font); font-weight: 700;
    color: var(--primary-contrast);
    font-size: 1.05rem;
}

.event-single-expired {
    background: #fdf0e6;
    border: 1px solid #eccfae;
    color: #8a4b08;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.event-single-image img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.event-single-contact {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--medium);
}

.event-single-card {
    background: white;
    border: 1px solid var(--medium);
    border-top: 3px solid var(--primary);
    border-radius: 0.375rem;
    padding: 0.5rem 1.5rem;
}
.event-single-card-row {
    padding: 1rem 0;
    border-bottom: 1px solid var(--light);
}
.event-single-card-row:last-child { border-bottom: none; }
.event-single-card-row h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--secondary);
    margin: 0 0 0.35rem;
}
.event-single-card-row p { margin: 0 0 0.35rem; line-height: 1.5; }

.event-single-dates {
    list-style: none;
    margin: 0;
    padding: 0;
}
.event-single-dates li {
    padding: 0.3rem 0;
    border-bottom: 1px dashed var(--light);
    font-size: 0.92rem;
}
.event-single-dates li:first-child { font-family: var(--font); font-weight: 700; }
.event-single-dates li:last-child { border-bottom: none; }
.event-single-until {
    font-size: 0.8rem;
    color: #50575e;
    margin-top: 0.4rem;
}

.event-single-venue { font-family: var(--font); font-weight: 700; }
.event-single-address { font-size: 0.92rem; }

.event-single-ics {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--primary-contrast);
    font-family: var(--font); font-weight: 700;
    font-size: 0.9rem;
    text-decoration: underline;
}
.event-single-ics:hover { color: var(--secondary); }

.event-single-map-wrap { margin-top: 1rem; }
.event-single-map {
    width: 100%;
    height: clamp(320px, 45vh, 520px);
    background: var(--lighter);
    border-radius: 0.5rem;
    overflow: hidden;
    display: block;
}
.event-single-map .leaflet-container { font-family: inherit; }

/* =============================================================
   Contact Form block (blocks/contact_form.php)
   Interactive Dorset area map + Contact Form 7 "Request a callback".
   ============================================================= */
.contact-form-section {
    padding: 4rem 0;
}
@media (max-width: 800px) {
    .contact-form-section { padding: 2.5rem 0; }
}
/* Avoid doubled whitespace when it directly follows a content section. */
.content-section + .contact-form-section {
    padding-top: 0;
}

.contact-form-head {
    max-width: 46rem;
    margin: 0 0 2.5rem;
}
.contact-form-title {
    color: var(--secondary);
    font-family: var(--font); font-weight: 700;
    margin: 0 0 0.75rem;
}
.contact-form-intro {
    color: #444;
    line-height: 1.55;
}
.contact-form-intro p:last-child { margin-bottom: 0; }

.contact-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 900px) {
    .contact-form-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ---- Map card ---- */
.contact-map-card {
    background: var(--lighter);
    border: 1px solid var(--light);
    border-radius: 1.25rem;
    padding: 1.75rem;
}
.contact-map-heading {
    color: var(--secondary);
    font-family: var(--font); font-weight: 700;
    font-size: 1.15rem;
    margin: 0 0 0.4rem;
}
.contact-map-help {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1.25rem;
}

.contact-map-figure {
    background: white;
    border-radius: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--light);
}
.contact-map-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

/* ---- Map regions ---- */
.contact-map-region {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
/* Remove the browser's default focus rectangle around the <g> (it hugs the
   region's bounding box); the pink marker halo is our focus indicator instead. */
.contact-map-region:focus,
.contact-map-region:focus-visible { outline: none; }

.contact-map-shape {
    stroke: #ffffff;
    stroke-width: 1.5;
    stroke-linejoin: round;
    /* No CSS `filter` here: a filter region draws faint box edges during
       repaint. Feedback is done with stroke-width + opacity, which don't. */
    transition: stroke-width 160ms ease, opacity 160ms ease;
}
/* Dim the non-selected regions once a choice has been made, so the active one
   stands out more dramatically. */
.js-contact-map.has-selection .contact-map-region:not(.is-selected) .contact-map-shape {
    opacity: 0.4;
}
.contact-map-region:hover .contact-map-shape,
.contact-map-region:focus-visible .contact-map-shape {
    stroke-width: 4;
    opacity: 1;
}

/* "Light up" overlay: a white copy of the area that fades in on hover/selection
   to brighten the county. No CSS filter, so no repaint artefacts. */
.contact-map-glow {
    fill: #ffffff;
    stroke: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}
.contact-map-region:hover .contact-map-glow,
.contact-map-region:focus-visible .contact-map-glow {
    opacity: 0.34;
}
.contact-map-region.is-selected .contact-map-glow {
    opacity: 0.42;
}

/* Marker badge.
   No CSS transforms on the marker: the group already carries an SVG
   translate(cx,cy), and a CSS transform would replace it (jumping the badge to
   the origin). Hover / focus / selected feedback is done with the halo ring and
   dot colour only, so the badge never moves. */
.contact-map-marker-halo {
    fill: none;
    stroke: #ffffff;
    stroke-width: 8;
    opacity: 0;
    transition: opacity 160ms ease;
}
.contact-map-marker-dot {
    fill: var(--secondary);
    stroke: #ffffff;
    stroke-width: 4;
    transition: fill 160ms ease;
}
.contact-map-marker-text {
    fill: #ffffff;
    font-family: var(--font); font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.4px;
    pointer-events: none;
}
.contact-map-marker-check {
    opacity: 0;
    transition: opacity 140ms ease;
}
.contact-map-marker-check circle { fill: var(--primary); }

/* Hover: faint pink ring previewing the selection colour */
.contact-map-region:hover .contact-map-marker-halo {
    opacity: 0.5;
    stroke: var(--tertiary);
    stroke-width: 10;
}

/* Focus ring for keyboard users (drawn on the marker, SVG-safe) */
.contact-map-region:focus-visible .contact-map-marker-halo {
    opacity: 1;
    stroke: var(--tertiary);
    stroke-width: 10;
    stroke-dasharray: 9 7;
}

/* Selected state (source-ordered after focus so it wins when both apply).
   Pink (--tertiary) isn't in any region fill, so it reads clearly over the
   white figure background AND every coloured area; the dot's own white stroke
   gives a clean white/pink edge on dark regions too. */
.contact-map-region.is-selected .contact-map-marker-halo {
    opacity: 1;
    stroke: var(--tertiary);
    stroke-width: 12;
    stroke-dasharray: none;
}
.contact-map-region.is-selected .contact-map-marker-check { opacity: 1; }

/* ---- Legend / touch picker ---- */
.contact-map-legend {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.contact-map-legend-btn {
    appearance: none;
    border: 2px solid var(--light);
    background: white;
    color: var(--secondary);
    font: inherit;
    font-size: 0.8rem;
    font-family: var(--font); font-weight: 700;
    padding: 0.5rem 0.85rem;
    min-height: 44px;
    border-radius: 50vh;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.1;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}
.contact-map-legend-btn:hover { border-color: var(--primary); }
.contact-map-legend-btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
.contact-map-legend-btn[aria-pressed="true"] {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}
.contact-map-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.12) inset;
}
.contact-map-status {
    margin: 1rem 0 0;
    font-size: 0.85rem;
    color: var(--primary-contrast);
    font-family: var(--font); font-weight: 700;
    min-height: 1.2em;
}

/* ---- Form card ---- */
/* Offset for the smooth scroll-to-form on mobile after picking an area. */
.contact-form-form-col { scroll-margin-top: 1.5rem; }
.contact-form-card {
    background: white;
    border: 1px solid var(--light);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 12px 30px -18px rgba(45, 43, 109, 0.35);
}
@media (max-width: 800px) {
    .contact-form-card,
    .contact-map-card { padding: 1.35rem; }
}
.contact-form-placeholder {
    color: #777;
    font-style: italic;
    margin: 0;
}

/* Contact Form 7 fields (autop disabled — markup is hand-written) */
.contact-form-card .cf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}
@media (max-width: 520px) {
    .contact-form-card .cf-row { grid-template-columns: 1fr; }
}
.contact-form-card .cf-field { margin: 0 0 1.1rem; }
.contact-form-card .cf-label {
    display: block;
    font-family: var(--font); font-weight: 700;
    font-size: 0.9rem;
    color: var(--secondary);
    margin: 0 0 0.4rem;
}
.contact-form-card .cf-required { color: var(--red); }
.contact-form-card .cf-optional {
    color: #888;
    font-family: var(--font);
    font-weight: normal;
    font-size: 0.85em;
}
.contact-form-card .cf-hint {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.contact-form-card .cf-input,
.contact-form-card input[type="text"],
.contact-form-card input[type="tel"],
.contact-form-card input[type="email"],
.contact-form-card textarea,
.contact-form-card select {
    width: 100%;
    font: inherit;
    font-size: 0.95rem;
    padding: 0.7rem 0.85rem;
    border: 2px solid var(--medium);
    border-radius: 0.6rem;
    background: white;
    color: #222;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.contact-form-card textarea { min-height: 6rem; resize: vertical; }
.contact-form-card select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232d2b6d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}
.contact-form-card .cf-input:focus,
.contact-form-card input:focus,
.contact-form-card textarea:focus,
.contact-form-card select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--scheme) 22%, transparent);
}

/* Reason checkboxes */
.contact-form-card .cf-fieldset {
    border: 0;
    margin: 0 0 1.1rem;
    padding: 0;
    min-width: 0;
}
.contact-form-card .cf-legend {
    font-family: var(--font); font-weight: 700;
    font-size: 0.9rem;
    color: var(--secondary);
    margin: 0 0 0.6rem;
    padding: 0;
}
.contact-form-card .wpcf7-checkbox { display: block; }
.contact-form-card .wpcf7-list-item {
    display: block;
    margin: 0 0 0.5rem;
}
.contact-form-card .wpcf7-list-item label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
}
.contact-form-card .wpcf7-list-item input[type="checkbox"],
.contact-form-card .cf-consent input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    margin: 0.05rem 0 0;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}
.contact-form-card .wpcf7-list-item-label { flex: 1; }

/* Consent */
.contact-form-card .cf-consent {
    background: var(--lighter);
    border: 1px solid var(--light);
    border-radius: 0.75rem;
    padding: 1rem 1.1rem;
    margin: 0 0 1.25rem;
}
.contact-form-card .cf-consent .wpcf7-list-item { margin: 0; }
.contact-form-card .cf-consent label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #444;
    cursor: pointer;
}

/* Cloudflare Turnstile */
.contact-form-card .cf-turnstile { margin: 0 0 1.25rem; }

/* Submit */
.contact-form-card .cf-actions {
    margin: 0.5rem 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.contact-form-card .cf-submit,
.contact-form-card .wpcf7-submit {
    appearance: none;
    border: 0;
    background: var(--primary);
    color: white;
    font: inherit;
    font-family: var(--font); font-weight: 700;
    font-size: 1rem;
    padding: 0.85rem 2rem;
    min-height: 52px;
    border-radius: 50vh;
    cursor: pointer;
    transition: background 150ms ease, transform 120ms ease;
}
.contact-form-card .cf-submit:hover,
.contact-form-card .wpcf7-submit:hover { background: var(--primary-contrast); }
.contact-form-card .cf-submit:focus-visible,
.contact-form-card .wpcf7-submit:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 3px;
}
.contact-form-card .cf-submit:active,
.contact-form-card .wpcf7-submit:active { transform: translateY(1px); }

/* CF7 spinner + validation + response messages */
.contact-form-card .wpcf7-spinner { margin: 0; }
.contact-form-card .wpcf7-not-valid-tip {
    display: block;
    color: var(--red);
    font-size: 0.8rem;
    margin-top: 0.35rem;
}
.contact-form-card .wpcf7-not-valid {
    border-color: var(--red) !important;
    box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.15) !important;
}
.contact-form-card .wpcf7-response-output {
    margin: 1.25rem 0 0 !important;
    padding: 0.85rem 1rem !important;
    border-radius: 0.6rem;
    border-width: 2px !important;
    font-size: 0.9rem;
    line-height: 1.45;
}
.contact-form-card .wpcf7-mail-sent-ok {
    border-color: var(--primary) !important;
    background: color-mix(in srgb, var(--scheme) 8%, transparent);
    color: var(--primary-contrast-alt);
}
.contact-form-card .wpcf7-validation-errors,
.contact-form-card .wpcf7-mail-sent-ng,
.contact-form-card .wpcf7-aborted {
    border-color: var(--red) !important;
    background: rgba(218, 41, 28, 0.06);
    color: #8a1a12;
}

/* ---- Disclaimer / small print ---- */
.contact-form-disclaimer {
    margin: 1.25rem 0 0;
    padding: 1.1rem 1.25rem;
    background: var(--lighter);
    border-left: 4px solid var(--medium);
    border-radius: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.55;
    color: #555;
}
.contact-form-disclaimer p:first-child { margin-top: 0; }
.contact-form-disclaimer p:last-child { margin-bottom: 0; }
.contact-form-disclaimer a { color: var(--primary-contrast); }

/* =============================================================
   Print — content only, with link destinations shown
   ============================================================= */
@media print {
	@page { margin: 1.5cm; }

	.skip-link,
	.site-header-actions,
	.menu-panel,
	.menu-backdrop,
	.hero-wave,
	.page-hero-buttons,
	.section-nav,
	.video-section,
	.video-grid-section,
	.recent-news,
	.testimonials-section,
	.referral-bar,
	.site-footer,
	.footer-logos,
	#wysa-container,
	iframe {
		display: none !important;
	}

	:root { font-size: 11pt; }

	body,
	.site-header,
	.page-hero,
	.text-image-section--highlight .text-image-content,
	.feature-box,
	.option-card {
		background: #fff !important;
		color: #000 !important;
		box-shadow: none !important;
	}

	.site-header { position: static; border-bottom: 2pt solid #000; }
	.site-header img { filter: invert(1) grayscale(1); }
	.page-hero { text-align: left; padding: 0.5cm 0; }
	.page-hero::before, .page-hero::after { display: none; }
	.page-hero-title, .page-hero-subtitle, h1, h2, h3, h4,
	.text-image-section--highlight h2, .text-image-section--highlight a,
	.option-card-title, .option-card-content a { color: #000 !important; }
	.section-nav-layout { display: block; }
	.container { max-width: none; padding: 0; }

	details > *:not(summary) { display: block !important; }
	details > summary { list-style: none; }

	a[href^="http"]::after,
	a[href^="/"]:not(.feature-box)::after {
		content: " (" attr(href) ")";
		font-size: 0.85em;
		font-weight: 400;
		word-break: break-all;
	}

	.news-card-title a::after { position: static; content: none; }

	h2, h3 { break-after: avoid; }
	img, figure, .news-card, .contact-detail { break-inside: avoid; }
}
