/* ==========================================================================
   Z Accountancy: enhancements
   Full-screen heroes · service illustrations · area maps · WhatsApp button ·
   team card details. Loaded after main.css so it can refine those rules
   without editing them in place.
   ========================================================================== */

:root {
	--za-hdr: 87px; /* replaced by the measured header height (enhancements.js) */
	--za-wa-green: #25D366;
	--za-wa-green-dark: #1DA851;
}
@media (max-width: 782px) {
	:root { --za-hdr: 75px; }
}

/* ==========================================================================
   1. Full-screen heroes (home, service, area)
   The hero owns the first screen below the sticky header on every device.
   Content is centred vertically; extra room at the foot is kept for the
   scroll cue.
   ========================================================================== */
body.za-fs-hero .za-hero,
body.za-fs-hero .za-service-hero,
body.za-fs-hero .za-area-hero {
	position: relative;
	box-sizing: border-box;
	min-height: calc(100vh - var(--za-hdr));
	min-height: calc(100svh - var(--za-hdr));
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-top: clamp(2rem, 6vh, 4.5rem) !important;
	padding-bottom: clamp(4.25rem, 9vh, 6rem) !important;
	margin-block-start: 0;
}
/* Flex children shrink to their content; constrained layout still caps
   them at the content width and centres them. */
body.za-fs-hero .za-hero > .za-hero-split,
body.za-fs-hero .za-service-hero > .wp-block-columns,
body.za-fs-hero .za-area-hero > .wp-block-columns {
	width: 100%;
	margin-block: 0 !important;
}
/* The homepage split used to size itself on phones; the section does it now. */
body.za-fs-hero .za-hero .za-hero-split {
	min-height: 0;
}
/* Phones: the homepage hero already has a tight one-screen rhythm of its
   own (main.css); keep it and only reserve room for the cue. */
@media (max-width: 700px) {
	body.za-fs-hero .za-hero {
		padding-top: 0 !important;
		padding-bottom: 0 !important;
	}
	body.za-fs-hero .za-hero .za-hero-split {
		padding: 0.6rem 0 3.9rem;
	}
	/* A slightly smaller paperwork scene lets copy, buttons and scene share
	   one phone screen. zoom keeps GSAP's internal geometry intact. */
	body.za-fs-hero .za-hero .za-scene-stage {
		zoom: 0.74;
	}
	body.za-fs-hero .za-hero .za-hero-stage {
		margin-top: 0;
	}
}

/* --- scroll cue: on every screen size for full-screen heroes ------------ */
body.za-fs-hero .za-hero .za-hero-scrollcue,
body.za-fs-hero .za-service-hero .za-hero-scrollcue,
body.za-fs-hero .za-area-hero .za-hero-scrollcue {
	display: flex;
	position: absolute;
	left: 50%;
	bottom: clamp(1rem, 3vh, 1.75rem);
	transform: translateX(-50%);
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	color: var(--za-gold-bright);
	background: rgba(var(--za-white-rgb), 0.07);
	border: 1px solid rgba(var(--za-white-rgb), 0.2);
	animation: za-cue var(--za-cue-duration, 2.2s) ease-in-out infinite;
	z-index: 2;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
body.za-fs-hero .za-hero-scrollcue:hover {
	background: rgba(var(--za-white-rgb), 0.14);
	border-color: rgba(var(--za-gold-bright-rgb), 0.6);
}
body.za-fs-hero .za-hero-scrollcue svg {
	width: 16px;
	height: 16px;
}
.za-service-hero .za-hero-scrollcue,
.za-area-hero .za-hero-scrollcue {
	display: none; /* only shown when the hero is full-screen */
}
/* On short landscape screens the cue would crowd the content. */
@media (max-height: 560px) {
	body.za-fs-hero .za-hero-scrollcue { display: none !important; }
	body.za-fs-hero .za-hero,
	body.za-fs-hero .za-service-hero,
	body.za-fs-hero .za-area-hero { padding-bottom: 2.5rem !important; }
}
body.za-no-scrollcue .za-hero-scrollcue,
body.za-no-animations .za-hero-scrollcue { animation: none; }
body.za-no-scrollcue .za-service-hero .za-hero-scrollcue,
body.za-no-scrollcue .za-area-hero .za-hero-scrollcue { display: none !important; }

/* ==========================================================================
   2. Hero artwork (service illustrations + area maps)
   ========================================================================== */
.za-art {
	margin: 0;
	position: relative;
}
.za-art-svg {
	display: block;
	width: 100%;
	height: auto;
	max-width: 620px;
	margin-inline: auto;
	overflow: visible;
}

/* Two columns with a little more room for the artwork than before. */
.za-service-hero .wp-block-columns,
.za-area-hero .za-area-split {
	gap: clamp(1.5rem, 4vw, 4rem);
}
@media (min-width: 782px) {
	.za-service-hero .za-hero-copy-col,
	.za-area-hero .za-hero-copy-col {
		flex-basis: 50% !important;
	}
	.za-service-hero .za-hero-media-col,
	.za-area-hero .za-hero-media-col {
		flex-basis: 50% !important;
	}
	/* Pull the art slightly outward so it reads as a scene, not a boxed image. */
	.za-service-hero .za-hero-media-col:last-child .za-art,
	.za-area-hero .za-hero-media-col:last-child .za-art {
		margin-right: clamp(-2.5rem, -2vw, 0rem);
	}
}

/* Entrance: the drawing settles in once, after the copy. */
@media (prefers-reduced-motion: no-preference) {
	.za-art-svg {
		animation: za-art-in 0.9s cubic-bezier(.2, .7, .2, 1) 0.15s both;
	}
	body.za-no-animations .za-art-svg { animation: none; }
}
@keyframes za-art-in {
	from { opacity: 0; transform: translateY(18px) rotate(-0.6deg); }
	to   { opacity: 1; transform: none; }
}

/* Light-band mode (Design → sections): recolour the backdrop shapes. */
body.za-light-bands .za-art-bg { fill: #E4EBF2; }
body.za-light-bands .za-art-guide { stroke: #0B2A4A; }
body.za-light-bands .za-art-sh { fill: #0B2A4A; opacity: 0.14; }

/* --- phones: copy first, artwork compact beneath it --------------------- */
@media (max-width: 781px) {
	.za-service-hero .wp-block-columns,
	.za-area-hero .za-area-split {
		gap: 1.25rem;
	}
	/* Whatever side the image is set to on desktop, phones read message first. */
	.za-service-hero .za-hero-copy-col,
	.za-area-hero .za-hero-copy-col { order: 1; }
	.za-service-hero .za-hero-media-col,
	.za-area-hero .za-hero-media-col { order: 2; }

	.za-art-svg {
		max-width: min(440px, 100%);
		max-height: 34svh;
		width: auto;
	}
	.za-service-hero .wp-block-post-excerpt__excerpt,
	.za-service-hero .wp-block-post-excerpt {
		font-size: 1.04rem !important;
		line-height: 1.55;
	}
	.za-service-hero h1,
	.za-area-hero h1 {
		font-size: clamp(2rem, 9vw, 2.6rem) !important;
		line-height: 1.08;
	}
}

/* ==========================================================================
   3. Area hero: split layout
   ========================================================================== */
.za-area-hero.has-map {
	text-align: left;
}
.za-area-hero.has-map .wp-block-buttons {
	justify-content: flex-start;
	gap: 0.75rem;
}
.za-area-hero.has-map .za-eyebrow + .wp-block-heading::after {
	margin-inline: 0;
}
.za-area-hero .za-hero-copy-col > * {
	max-width: 36rem;
}
.za-area-hero h1 {
	margin-top: 0;
	text-wrap: balance;
}
.za-area-hero .za-area-postcodes {
	font-size: 0.95rem;
	margin: 0.5rem 0 1.6rem;
}
/* Outline "Call" button on the dark band. */
.za-area-hero .za-area-call .wp-block-button__link {
	color: var(--za-white) !important;
	border: 1.5px solid rgba(var(--za-white-rgb), 0.38) !important;
	background: rgba(var(--za-white-rgb), 0.06) !important;
}
.za-area-hero .za-area-call .wp-block-button__link:hover {
	background: rgba(var(--za-white-rgb), 0.14) !important;
	border-color: rgba(var(--za-white-rgb), 0.6) !important;
}
.za-area-hero .za-hero-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1.6rem;
}
.za-area-hero .za-hero-chip {
	margin: 0;
	padding: 0.45rem 0.95rem;
	border-radius: 999px;
	font-size: 0.85rem;
	color: rgba(var(--za-frost-rgb), 0.85);
	background: rgba(var(--za-white-rgb), 0.07);
	border: 1px solid rgba(var(--za-white-rgb), 0.2);
}
body.za-light-bands .za-area-hero .za-area-call .wp-block-button__link {
	color: var(--za-navy) !important;
	border-color: var(--za-navy) !important;
	background: transparent !important;
}
body.za-light-bands .za-area-hero .za-hero-chip {
	color: var(--za-slate);
	background: rgba(var(--za-white-rgb), 0.6);
	border-color: rgba(var(--za-navy-rgb), 0.14);
}
@media (max-width: 781px) {
	.za-area-hero .za-hero-chips { display: none; } /* keep the first screen to the essentials */
	.za-area-hero .za-area-postcodes { margin-bottom: 1.2rem; }
	.za-area-hero .wp-block-buttons > .wp-block-button { flex: 1 1 auto; }
	.za-area-hero .wp-block-buttons .wp-block-button__link { width: 100%; text-align: center; }
}

/* ==========================================================================
   4. Floating WhatsApp button
   A white pill with the green WhatsApp roundel on larger screens; the
   roundel alone on phones. Hidden until the hero has scrolled away.
   ========================================================================== */
.za-wa {
	position: fixed;
	right: clamp(1rem, 2.2vw, 1.75rem);
	bottom: calc(clamp(1rem, 2.2vw, 1.75rem) + env(safe-area-inset-bottom, 0px));
	z-index: 90;
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.4rem 1.25rem 0.4rem 0.4rem;
	border-radius: 999px;
	background: #fff;
	color: var(--za-navy);
	text-decoration: none;
	box-shadow:
		0 1px 0 rgba(var(--za-navy-rgb), 0.06),
		0 14px 34px -14px rgba(var(--za-navy-rgb), 0.55);
	border: 1px solid rgba(var(--za-navy-rgb), 0.08);
	transition:
		opacity 0.35s ease,
		transform 0.45s cubic-bezier(.2, .8, .2, 1),
		box-shadow 0.25s ease,
		visibility 0s linear 0s;
	-webkit-tap-highlight-color: transparent;
}
.za-wa.is-left {
	right: auto;
	left: clamp(1rem, 2.2vw, 1.75rem);
}
.za-wa.is-armed:not(.is-shown) {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(24px) scale(0.92);
	transition:
		opacity 0.25s ease,
		transform 0.3s ease,
		visibility 0s linear 0.3s;
}
.za-wa:hover,
.za-wa:focus-visible {
	transform: translateY(-2px);
	box-shadow:
		0 1px 0 rgba(var(--za-navy-rgb), 0.06),
		0 20px 40px -14px rgba(var(--za-navy-rgb), 0.6);
	color: var(--za-navy);
}
.za-wa:focus-visible {
	outline: 3px solid var(--za-gold-bright);
	outline-offset: 3px;
}
.za-wa-icon {
	position: relative;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--za-wa-green);
	color: #fff;
	transition: background-color 0.2s ease;
}
.za-wa:hover .za-wa-icon { background: var(--za-wa-green-dark); }
.za-wa-icon svg {
	width: 25px;
	height: 25px;
	display: block;
}
/* One soft ring when it first arrives, then it stays still. */
.za-wa-icon::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
	pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
	.za-wa.is-pinging .za-wa-icon::after {
		animation: za-wa-ping 1.3s ease-out 2;
	}
}
@keyframes za-wa-ping {
	0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
	100% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
}
.za-wa-text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
	white-space: nowrap;
}
.za-wa-note {
	font-size: 0.72rem;
	font-weight: 500;
	color: var(--za-slate);
	letter-spacing: 0.01em;
	margin-bottom: 0.15rem;
}
.za-wa-label {
	font-size: 0.95rem;
	font-weight: 650;
	color: var(--za-navy);
}

/* Phones: just the roundel, thumb-sized. */
@media (max-width: 782px) {
	.za-wa {
		padding: 0;
		gap: 0;
		background: transparent;
		border: 0;
		box-shadow: none;
		right: 1rem;
		bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
	}
	.za-wa.is-left { left: 1rem; }
	.za-wa:hover, .za-wa:focus-visible { box-shadow: none; }
	.za-wa-icon {
		width: 58px;
		height: 58px;
		box-shadow: 0 12px 26px -10px rgba(var(--za-navy-rgb), 0.65), 0 2px 6px rgba(0, 0, 0, 0.12);
	}
	.za-wa-icon svg { width: 30px; height: 30px; }
	.za-wa-text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
	}
}
/* Out of the way while the mobile menu overlay is open. */
body:has(.wp-block-navigation__responsive-container.is-menu-open) .za-wa {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}
@media print {
	.za-wa, .za-hero-scrollcue { display: none !important; }
}

/* ==========================================================================
   5. Team cards: qualifications and contact links
   ========================================================================== */
.za-team-quals {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0.6rem 0 0;
	padding: 0;
}
.za-team-quals li {
	margin: 0;
	padding: 0.18rem 0.55rem;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--za-navy);
	background: rgba(var(--za-gold-bright-rgb), 0.18);
	border: 1px solid rgba(var(--za-gold-muted-rgb), 0.35);
	border-radius: 4px;
}
.za-team-links {
	display: flex;
	gap: 0.5rem;
	margin-top: 1rem;
}
.za-team-links a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	color: var(--za-navy);
	border: 1px solid rgba(var(--za-navy-rgb), 0.16);
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.za-team-links a:hover,
.za-team-links a:focus-visible {
	background: var(--za-navy);
	color: var(--za-gold-bright);
	border-color: var(--za-navy);
}
.za-team-links svg {
	width: 17px;
	height: 17px;
}

/* ==========================================================================
   6. Booking page (Microsoft Bookings embed)
   ========================================================================== */
.za-booking-hero {
	padding-bottom: clamp(5rem, 9vw, 7rem) !important; /* the calendar card overlaps this band */
}
.za-booking-hero > p:not(.za-eyebrow) {
	max-width: 46rem;
}
.za-booking {
	display: flow-root; /* keeps the grid's negative margin from collapsing through */
	padding-top: 0 !important;
	padding-bottom: clamp(3rem, 6vw, 5rem);
	margin-block-start: 0 !important;
	background: var(--za-canvas);
}
.za-booking-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
	gap: clamp(1.25rem, 3vw, 2.5rem);
	align-items: start;
	margin-top: clamp(-4.5rem, -6vw, -3rem) !important; /* core layout zeroes child margins */
	position: relative;
	z-index: 2;
}
.za-booking-aside,
.za-booking-frame {
	background: #fff;
	border: 1px solid var(--za-line);
	border-radius: var(--za-radius-card, 14px);
	box-shadow: 0 24px 48px -30px rgba(var(--za-navy-rgb), 0.45);
}
.za-booking-aside {
	padding: clamp(1.5rem, 2.5vw, 2rem);
	position: sticky;
	top: calc(var(--za-hdr) + 1.25rem);
}
.za-booking-aside-title {
	font-size: 1.3rem;
	margin: 0 0 1.1rem;
}
.za-booking-points {
	list-style: none;
	counter-reset: za-step;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.95rem;
}
.za-booking-points li {
	counter-increment: za-step;
	position: relative;
	padding-left: 2.6rem;
	line-height: 1.5;
	color: var(--za-navy);
	font-size: 0.97rem;
}
.za-booking-points li::before {
	content: counter(za-step);
	position: absolute;
	left: 0;
	top: -0.1rem;
	width: 1.8rem;
	height: 1.8rem;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--za-navy);
	background: rgba(var(--za-gold-bright-rgb), 0.28);
	border: 1px solid rgba(var(--za-gold-muted-rgb), 0.45);
}
.za-booking-alt {
	margin-top: 1.6rem;
	padding-top: 1.4rem;
	border-top: 1px solid var(--za-line);
	display: grid;
	gap: 0.6rem;
}
.za-booking-alt p {
	margin: 0 0 0.2rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--za-slate);
}
.za-booking-alt-link {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.7rem 0.9rem;
	border-radius: var(--za-radius-button, 4px);
	border: 1px solid rgba(var(--za-navy-rgb), 0.16);
	color: var(--za-navy);
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
.za-booking-alt-link:hover {
	background: var(--za-canvas);
	border-color: rgba(var(--za-navy-rgb), 0.35);
	color: var(--za-navy);
}
.za-booking-alt-link svg {
	width: 19px;
	height: 19px;
	flex: none;
}
.za-booking-alt-link.is-wa svg {
	color: var(--za-wa-green-dark);
}
.za-booking-frame {
	overflow: hidden;
}
.za-booking-frame iframe {
	display: block;
	width: 100%;
	height: var(--za-book-h, 1150px);
	border: 0;
	background: #fff;
}
.za-booking-fallback {
	margin: 0;
	padding: 0.85rem 1.25rem;
	font-size: 0.85rem;
	color: var(--za-slate);
	border-top: 1px solid var(--za-line);
	background: var(--za-canvas);
}
.za-booking-fallback a {
	color: var(--za-navy);
	font-weight: 600;
}
@media (max-width: 900px) {
	.za-booking-grid {
		grid-template-columns: 1fr;
	}
	/* Calendar first on small screens; the panel follows. */
	.za-booking-frame { order: 1; }
	.za-booking-aside { order: 2; position: static; }
	.za-booking-frame iframe {
		height: max(var(--za-book-h, 1150px), 1500px);
	}
}

/* --- checklist + FAQ under the calendar --------------------------------- */
.za-booking-more {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
	gap: clamp(1.25rem, 3vw, 2.5rem);
	margin-top: clamp(2.5rem, 5vw, 4rem);
}
.za-booking-more h2 {
	font-size: 1.35rem;
	margin: 0 0 1rem;
}
.za-booking-prep ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.7rem;
}
.za-booking-prep li {
	position: relative;
	padding-left: 1.9rem;
	line-height: 1.5;
	font-size: 0.97rem;
}
.za-booking-prep li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.22rem;
	width: 1.05rem;
	height: 1.05rem;
	border-radius: 3px;
	border: 1.5px solid rgba(var(--za-navy-rgb), 0.45);
	background: #fff;
}
.za-booking-prep li::after {
	content: "";
	position: absolute;
	left: 0.36rem;
	top: 0.34rem;
	width: 0.32rem;
	height: 0.6rem;
	border: solid var(--za-gold-muted);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.za-booking-faq details {
	border-top: 1px solid var(--za-line);
	padding: 0.15rem 0;
}
.za-booking-faq details:last-of-type {
	border-bottom: 1px solid var(--za-line);
}
.za-booking-faq summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1rem 0;
	font-weight: 600;
	color: var(--za-navy);
}
.za-booking-faq summary::-webkit-details-marker { display: none; }
.za-booking-faq summary::after {
	content: "+";
	flex: none;
	font-size: 1.3rem;
	line-height: 1;
	color: var(--za-gold-muted);
	transition: transform 0.2s ease;
}
.za-booking-faq details[open] summary::after { transform: rotate(45deg); }
.za-booking-faq details p {
	margin: -0.35rem 0 1.1rem;
	color: var(--za-slate);
	line-height: 1.6;
	max-width: 62ch;
}
@media (max-width: 900px) {
	.za-booking-more { grid-template-columns: 1fr; }
}

/* --- booking window (dialog) ------------------------------------------- */
html.za-book-open { overflow: hidden; }
.za-book-dialog {
	width: min(1040px, calc(100vw - 48px));
	height: min(880px, calc(100vh - 48px));
	max-width: none;
	max-height: none;
	padding: 0;
	border: 0;
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 40px 90px -30px rgba(3, 15, 30, 0.6);
	display: none;
	flex-direction: column;
}
.za-book-dialog[open] {
	display: flex;
	animation: za-book-in 0.28s cubic-bezier(.2, .8, .2, 1);
}
.za-book-dialog::backdrop {
	background: rgba(7, 23, 42, 0.62);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}
@keyframes za-book-in {
	from { opacity: 0; transform: translateY(14px) scale(0.985); }
	to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.za-book-dialog[open] { animation: none; }
}
.za-book-dialog-bar {
	flex: none;
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem 0.75rem 0.75rem 1.4rem;
	background: var(--za-navy);
	color: #fff;
}
.za-book-dialog-title {
	flex: 1;
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: 0.01em;
}
.za-book-dialog-full {
	color: var(--za-gold-bright);
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}
.za-book-dialog-full:hover { color: #fff; text-decoration: underline; }
.za-book-dialog-close {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: transparent;
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}
.za-book-dialog-close:hover,
.za-book-dialog-close:focus-visible {
	background: rgba(255, 255, 255, 0.12);
	outline: none;
	border-color: var(--za-gold-bright);
}
.za-book-dialog-body {
	position: relative;
	flex: 1;
	background: #f4f4f4;
}
.za-book-dialog-body iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	opacity: 0;
	transition: opacity 0.3s ease;
}
.za-book-dialog.is-loaded iframe { opacity: 1; }
.za-book-dialog-loading {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	margin: 0;
	color: var(--za-slate);
	font-size: 0.95rem;
}
.za-book-dialog.is-loaded .za-book-dialog-loading { display: none; }

/* ==========================================================================
   7. Layout fixes (site-wide audit, v4.5.1)
   ========================================================================== */

/* --- Lists: the same box model on every page -------------------------------
   WordPress prints `ol, ul { box-sizing: border-box }` only on pages that
   contain a List block (the service pages and articles do; the homepage and
   About do not). The header dropdown is a list, so it was sized one way on
   service pages and another everywhere else. Applying the rule everywhere
   makes every page match; it changes nothing else on the site. */
ol, ul {
	box-sizing: border-box;
}

/* --- Services dropdown -------------------------------------------------
   Core's own rule beat the theme's min-width, so the panel shrank to fit
   whatever room the parent item had. That room differs on service pages
   (where "Services" is the current section), so the panel came out 200px
   there and 218px elsewhere, wrapping "Self Assessment Tax Returns"
   differently. A fixed width makes it identical on every page. It is also
   opaque now: the frosted 86% white let hero headings show through. */
@media (min-width: 1021px) {
	.za-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container {
		width: 268px !important;
		min-width: 268px !important;
		max-width: calc(100vw - 2rem);
		background: #fff !important;
		-webkit-backdrop-filter: none !important;
		backdrop-filter: none !important;
		box-shadow: 0 1px 0 rgba(var(--za-navy-rgb), 0.04), 0 22px 44px -20px rgba(var(--za-navy-rgb), 0.38);
	}
	.za-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		white-space: nowrap;
	}
}
/* The page you are on is marked in the list. */
.za-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content[aria-current="page"] {
	background: rgba(var(--za-gold-bright-rgb), 0.14);
	font-weight: 600;
}

/* --- Mobile menu ---------------------------------------------------------- */
/* The "All services" divider started at the item's text indent and stopped
   short of the other dividers; inside the indented group it is not needed. */
.wp-block-navigation__responsive-container.is-menu-open .za-nav-all .wp-block-navigation-item__content {
	border-top: 0 !important;
	margin-top: 0 !important;
	padding-top: 0.5rem !important;
	color: var(--za-gold) !important;
	font-weight: 600;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--za-navy) !important;
	font-weight: 600;
}
/* The two menu-only actions (added in inc/enhancements.php) span the panel. */
.wp-block-navigation__responsive-container.is-menu-open .za-nav-tel,
.wp-block-navigation__responsive-container.is-menu-open .za-nav-cta {
	width: 100%;
}
.wp-block-navigation__responsive-container.is-menu-open .za-nav-cta .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	box-sizing: border-box;
	background: var(--za-gold-gradient) !important;
	color: var(--za-navy) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .za-nav-tel .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.za-nav-tel svg { width: 18px; height: 18px; flex: none; }
@media (min-width: 1021px) {
	.za-header .za-nav-tel,
	.za-header .za-nav-cta { display: none !important; }
}

/* --- 404 ------------------------------------------------------------------ */
/* The heading is centred; its gold rule and the buttons were left-aligned. */
.za-404 .za-eyebrow + .wp-block-heading::after { margin-inline: auto; }
.za-404 .wp-block-buttons { justify-content: center; margin-top: 2rem; }
.za-404 h1 { margin-bottom: 1rem; }

/* --- Articles ---------------------------------------------------------------
   The contents + text grid was 1024px wide (240 + 64 + 720) under a 1000px
   cover image, so both edges stuck out 12px. Same width as the cover now. */
@media (min-width: 1081px) {
	.za-article-page > .za-article.za-article {
		max-width: 1040px;
		grid-template-columns: 232px minmax(0, 1fr);
		justify-content: stretch;
		gap: 3.5rem;
		box-sizing: border-box;
	}
	.za-article-page > .za-article .za-toc { margin: 0; }
}

/* --- Service cards: titles were underlined like body links on the home and
   archive grids but not in "related services". Underline on hover only. --- */
.za-service-card h3 a {
	color: inherit;
	text-decoration: none;
}
.za-service-card:hover h3 a,
.za-service-card h3 a:focus-visible {
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 0.18em;
}

/* --- Accreditation carousel (phones): tiles were sliced hard against the
   arrows as the row glides. A short fade at each edge reads as "more this
   way" instead of "cut off". --------------------------------------------- */
@media (max-width: 860px) {
	.za-trust-bar.is-tiles .za-trust-logos {
		-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
		mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
	}
}

/* --- Homepage scene, 701–900px: the paperwork fan was pinned to the left of
   the stacked layout, so documents ran off the left edge. Centre it. ------ */
@media (min-width: 701px) and (max-width: 900px) {
	.za-hero .za-scene {
		margin-inline: auto;
	}
}

/* ==========================================================================
   8. Phone / tablet menu (≤1020px)
   ========================================================================== */
.za-nav-brand,
.za-sub-toggle { display: none; }

@media (max-width: 1020px) {
	/* --- header row: logo left, button + ☰ together on the right.
	   The ☰ used to float in the gap between logo and button. */
	.za-header > .wp-block-group { gap: 0.75rem; }
	.za-header .wp-block-navigation { order: 3; flex: none; }
	.za-header .za-header-actions { order: 2; margin-left: auto; }
	.za-header .wp-block-navigation__responsive-container-open {
		width: 44px;
		height: 44px;
		margin: -4px -8px -4px 0;   /* full tap target without growing the header */
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		border-radius: 8px;
	}
	.za-header .wp-block-navigation__responsive-container-open:focus-visible {
		outline: 2px solid var(--za-gold-bright);
	}

	/* --- the open panel ---------------------------------------------------- */
	.wp-block-navigation__responsive-container.is-menu-open {
		padding: 0 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px)) !important;
		overscroll-behavior: contain;
	}
	/* Brand bar, same height as the header, the × sits on its right. */
	.wp-block-navigation__responsive-container.is-menu-open .za-nav-brand {
		display: flex;
		align-items: center;
		height: var(--za-hdr, 73px);
		margin: 0 -1.5rem 0.5rem;
		padding: 0 4.5rem 0 1.5rem;
		border-bottom: 1px solid var(--za-line);
		position: sticky;
		top: 0;
		z-index: 1;
		background: var(--za-white);
	}
	/* Same proportions as the header logo. */
	.za-nav-brand .za-logo {
		display: inline-flex;
		align-items: center;
		gap: 0.4rem;
		color: var(--za-navy);
		text-decoration: none;
	}
	.za-nav-brand .za-logo-mark { display: inline-flex; width: 26px; height: 26px; flex: none; }
	.za-nav-brand .za-logo-mark svg { width: 100%; height: 100%; }
	.za-nav-brand .za-logo-word {
		font-family: var(--za-font-heading);
		font-size: 1.32rem;
		line-height: 1;
		letter-spacing: -0.01em;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
		top: calc((var(--za-hdr, 73px) - 44px) / 2) !important;
		right: 1rem !important;
		width: 44px;
		height: 44px;
		padding: 9px !important;
		position: fixed !important;
		z-index: 3;
	}

	/* --- rows: even spacing, divider under the whole row -------------------- */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
		border-bottom: 1px solid var(--za-line);
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
		padding: 0.85rem 0 !important;
		font-size: 1.28rem;
		line-height: 1.3;
		border: 0 !important;
	}
	/* The two actions have no divider and sit apart at the end. */
	.wp-block-navigation__responsive-container.is-menu-open .za-nav-tel,
	.wp-block-navigation__responsive-container.is-menu-open .za-nav-cta {
		border-bottom: 0 !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open .za-nav-tel { margin-top: 0.9rem !important; }
	.wp-block-navigation__responsive-container.is-menu-open .za-nav-tel .wp-block-navigation-item__content {
		padding: 0.6rem 0 !important;
		font-size: 1rem !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open .za-nav-cta { margin-top: 0.5rem !important; }
	.wp-block-navigation__responsive-container.is-menu-open .za-nav-cta .wp-block-navigation-item__content {
		padding: 0.95rem 1rem !important;
		font-size: 1rem !important;
		text-align: center;
		border-radius: var(--za-radius-button);
	}

	/* --- Services folds away ------------------------------------------------ */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu > .wp-block-navigation__submenu-container {
		grid-column: 1 / -1;
		display: flex !important;
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		width: 100% !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu > .wp-block-navigation__submenu-container > .wp-block-navigation-item {
		width: 100% !important;
	}
	/* Core's own chevron is decoration only here; ours is the control. */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon { display: none !important; }
	.wp-block-navigation__responsive-container.is-menu-open .za-sub-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		margin-right: -10px;
		padding: 0;
		border: 0;
		border-radius: 8px;
		background: transparent;
		color: var(--za-navy);
		cursor: pointer;
	}
	.za-sub-toggle svg { width: 22px; height: 22px; transition: transform 0.2s ease; }
	.za-sub-open > .za-sub-toggle svg { transform: rotate(180deg); }
	.za-sub-toggle:focus-visible { outline: 2px solid var(--za-gold-bright); }
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu:not(.za-sub-open) > .wp-block-navigation__submenu-container {
		display: none !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open .za-sub-open > .wp-block-navigation__submenu-container {
		margin-bottom: 0.6rem !important;
	}
}
@media (prefers-reduced-motion: reduce) {
	.za-sub-toggle svg { transition: none; }
}

/* Short screens (iPhone SE, phones held sideways): tighter rows so the whole
   menu, including Book, fits or nearly fits without scrolling. */
@media (max-width: 1020px) and (max-height: 700px) {
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
		padding: 0.62rem 0 !important;
		font-size: 1.14rem;
	}
	.wp-block-navigation__responsive-container.is-menu-open .za-nav-brand { margin-bottom: 0.15rem; }
	.wp-block-navigation__responsive-container.is-menu-open .za-nav-tel { margin-top: 0.4rem !important; }
	.wp-block-navigation__responsive-container.is-menu-open .za-nav-cta .wp-block-navigation-item__content { padding: 0.8rem 1rem !important; }
}
