/*
 * NowFrame theme styles: only what theme.json can't express.
 *
 * Breakpoints (theme.json custom.breakpoint), min-width up and max-width .98 below:
 *   tablet  768px   laptop  1025px   desktop  1401px
 * The only other is WordPress's 600px, where it stops pinning the admin toolbar. Columns and Media & Text
 * are moved to the phone breakpoint (core stacks them at 781px and 600px; inc/sections.php, below).
 */

/* Root size: 16px up to 1920px wide, scaling to 20px at 2560px and holding there. */
html {
	font-size: clamp(100%, calc(100% + (100vw - 1920px) / 160), 125%);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Header, main and footer sit flush; spacing inside sections comes from the sections themselves. */
:where(.wp-site-blocks) > * {
	margin-block-start: 0;
}

/* Full-width sections stack flush; each section brings its own padding. */
:where(.wp-block-post-content) > .alignfull + .alignfull {
	margin-block-start: 0;
}

/*
 * Vertical rhythm on content pages: headings get room above them. On the default page template (content
 * runs edge to edge, no title), content that isn't a full-width section keeps a gap from the header and
 * footer; the other templates have that padding already.
 */
:where(.wp-block-post-content) > :is(h2, h3):not(:first-child) {
	margin-block-start: var(--wp--preset--spacing--60);
}

:where(.wp-block-post-content.alignfull) > :not(.alignfull):first-child {
	margin-block-start: var(--wp--preset--spacing--60);
}

:where(.wp-block-post-content.alignfull) > :not(.alignfull):last-child {
	margin-block-end: var(--wp--preset--spacing--70);
}

:where(.wp-block-post-content) > .alignfull + :not(.alignfull) {
	margin-block-start: var(--wp--preset--spacing--60);
}

:where(.wp-block-post-content) > :not(.alignfull) + .alignfull {
	margin-block-start: var(--wp--preset--spacing--70);
}

/* Accordion (also the FAQ style): dividers between questions. */
.wp-block-accordion-item {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.wp-block-accordion-item:first-child {
	border-top: 1px solid var(--wp--preset--color--border);
}

.wp-block-accordion-heading {
	margin: 0;
}

.wp-block-accordion-heading__toggle {
	gap: var(--wp--preset--spacing--30);
	padding-block: var(--wp--preset--spacing--30);
}

.wp-block-accordion-panel:not([hidden]) {
	padding-block-end: var(--wp--preset--spacing--30);
}

.wp-block-accordion-panel > :first-child {
	margin-block-start: 0;
}

/* Full-width cover (hero) content lines up with the header and page content. */
.wp-block-cover.alignfull {
	padding-left: var(--wp--style--root--padding-left);
	padding-right: var(--wp--style--root--padding-right);
}

/* The cover already carries the page padding; its content shouldn't add it again (covers in templates). */
.wp-block-cover.alignfull > .wp-block-cover__inner-container.has-global-padding {
	padding-left: 0;
	padding-right: 0;
}

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

/* Visible keyboard focus everywhere. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--custom--color--focus);
	outline-offset: 2px;
}

/* A sticky header shouldn't hide in-page anchor targets. header.js keeps --nowframe-sticky-offset at the
   header's height while it's pinned to the top (0 when it isn't). */
:where(html) {
	scroll-padding-top: calc(var(--nowframe-sticky-offset, 6rem) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
	:where(html) {
		scroll-behavior: smooth;
	}
}

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

/*
 * Corner radius. Buttons use the theme radius (theme.json custom.radius) as is; cards, boxes and form
 * fields use --nowframe-box-radius, the same radius capped so pill-shaped buttons don't make pill cards.
 * A child theme can set either on :root.
 */
:where(:root) {
	--nowframe-box-radius: min(var(--wp--custom--radius), 0.75rem);
	/* Shadows: --nowframe-shadow for things that float a little (cards on hover, dropdowns, the consent
	   bar), --nowframe-shadow-large for panels over the page (popups, the mega panel). */
	--nowframe-shadow: 0 0.5rem 1.5rem color-mix(in srgb, var(--wp--preset--color--contrast) 12%, transparent);
	--nowframe-shadow-large: 0 1.5rem 3rem -0.5rem color-mix(in srgb, var(--wp--preset--color--contrast) 28%, transparent);
}

/* On dark sections the focus ring follows the text color, so it stays visible. */
:where(.is-dark, .has-primary-dark-background-color, .has-contrast-background-color, .has-primary-background-color, .is-style-section-dark, .is-style-section-brand) :focus-visible {
	outline-color: currentColor;
}

/* Visually hidden, still read by screen readers. */
.screen-reader-text:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/*
 * Section colour schemes (inc/sections.php): Light, Light alt, Brand, Dark on Group and Column blocks.
 * Each scheme sets variables that the text, headings, links and buttons inside it read, so the nearest
 * scheme wins when they're nested (a Light card in a Dark section). Muted text and borders are redefined
 * too, so blocks using those colours adapt. Colours picked on a single block (has-*-color) still win.
 * Selectors start with the attribute so they outrank theme.json's element styles (:root :where(...)).
 */
[class*="is-style-section-"] {
	background-color: var(--nowframe-scheme-bg);
	color: var(--nowframe-scheme-text);
}

/* The palette's own muted and border colours, kept so a Light scheme nested in a Dark or Brand one can
   put them back (the dark schemes redefine both for light-on-dark). */
body {
	--nowframe-palette-muted: var(--wp--preset--color--muted);
	--nowframe-palette-border: var(--wp--preset--color--border);
}

.is-style-section-light,
.is-style-section-light-alt {
	--wp--preset--color--muted: var(--nowframe-palette-muted);
	--wp--preset--color--border: var(--nowframe-palette-border);
}

.is-style-section-light {
	--nowframe-scheme-bg: var(--wp--preset--color--base);
	--nowframe-scheme-text: var(--wp--preset--color--contrast);
	--nowframe-scheme-heading: var(--wp--preset--color--contrast);
	--nowframe-scheme-link: var(--wp--preset--color--primary);
	--nowframe-scheme-link-hover: var(--wp--preset--color--primary-dark);
	--nowframe-scheme-button: var(--wp--preset--color--primary);
	--nowframe-scheme-button-text: var(--wp--preset--color--base);
	--nowframe-scheme-button-hover: var(--wp--preset--color--primary-dark);
}

.is-style-section-light-alt {
	--nowframe-scheme-bg: var(--wp--preset--color--base-alt);
	--nowframe-scheme-text: var(--wp--preset--color--contrast);
	--nowframe-scheme-heading: var(--wp--preset--color--contrast);
	--nowframe-scheme-link: var(--wp--preset--color--primary);
	--nowframe-scheme-link-hover: var(--wp--preset--color--primary-dark);
	--nowframe-scheme-button: var(--wp--preset--color--primary);
	--nowframe-scheme-button-text: var(--wp--preset--color--base);
	--nowframe-scheme-button-hover: var(--wp--preset--color--primary-dark);
}

.is-style-section-brand,
.is-style-section-dark {
	--nowframe-scheme-text: var(--wp--preset--color--base);
	--nowframe-scheme-heading: var(--wp--preset--color--base);
	--nowframe-scheme-link: var(--wp--preset--color--base);
	--nowframe-scheme-link-hover: var(--wp--preset--color--base);
	--nowframe-scheme-button: var(--wp--preset--color--base);
	--nowframe-scheme-button-text: var(--wp--preset--color--primary-dark);
	--nowframe-scheme-button-hover: var(--wp--preset--color--base-alt);
	--wp--preset--color--muted: color-mix(in srgb, var(--wp--preset--color--base) 78%, transparent);
	--wp--preset--color--border: color-mix(in srgb, var(--wp--preset--color--base) 25%, transparent);
}

/*
 * Solid buttons in Brand and Dark sections are white by default. A child theme can keep its brand button
 * colour there instead, in theme.json: settings.custom.scheme.dark (or .brand) with button, buttonText
 * and buttonHover, e.g. "button": "var(--wp--preset--color--primary)".
 */
.is-style-section-brand {
	--nowframe-scheme-bg: var(--wp--preset--color--primary);
	--nowframe-scheme-button: var(--wp--custom--scheme--brand--button, var(--wp--preset--color--base));
	--nowframe-scheme-button-text: var(--wp--custom--scheme--brand--button-text, var(--wp--preset--color--primary-dark));
	--nowframe-scheme-button-hover: var(--wp--custom--scheme--brand--button-hover, var(--wp--preset--color--base-alt));
}

.is-style-section-dark {
	--nowframe-scheme-bg: var(--wp--preset--color--primary-dark);
	--nowframe-scheme-button: var(--wp--custom--scheme--dark--button, var(--wp--preset--color--base));
	--nowframe-scheme-button-text: var(--wp--custom--scheme--dark--button-text, var(--wp--preset--color--primary-dark));
	--nowframe-scheme-button-hover: var(--wp--custom--scheme--dark--button-hover, var(--wp--preset--color--base-alt));
}

[class*="is-style-section-"] :where(h1, h2, h3, h4, h5, h6) {
	color: var(--nowframe-scheme-heading);
}

[class*="is-style-section-"] :where(a:not(.wp-element-button)) {
	color: var(--nowframe-scheme-link);
}

[class*="is-style-section-"] :where(a:not(.wp-element-button)):hover {
	color: var(--nowframe-scheme-link-hover);
}

[class*="is-style-section-"] :where(.wp-block-button:not(.is-style-outline, .is-style-text-link)) > .wp-element-button:not(.has-background) {
	background-color: var(--nowframe-scheme-button);
}

[class*="is-style-section-"] :where(.wp-block-button:not(.is-style-outline, .is-style-text-link)) > .wp-element-button:not(.has-text-color) {
	color: var(--nowframe-scheme-button-text);
}

[class*="is-style-section-"] :where(.wp-block-button:not(.is-style-outline, .is-style-text-link)) > .wp-element-button:not(.has-background):hover {
	background-color: var(--nowframe-scheme-button-hover);
}

[class*="is-style-section-"] :where(.wp-block-button.is-style-outline) > .wp-element-button:not(.has-text-color) {
	color: var(--nowframe-scheme-text);
}

/*
 * Columns on phones: a column holding only an image (or video, gallery, cover, embed) moves above the text
 * beside it, as Media & Text already does. The Columns style "Keep order on phones" turns this off.
 */
@media (max-width: 767.98px) {
	.wp-block-columns:not(.is-not-stacked-on-mobile, .is-style-keep-order) > .wp-block-column:has(> :is(.wp-block-image, .wp-block-video, .wp-block-gallery, .wp-block-cover, .wp-block-embed)):not(:has(> :not(.wp-block-image, .wp-block-video, .wp-block-gallery, .wp-block-cover, .wp-block-embed))) {
		order: -1;
	}
}

/*
 * Media & Text stacks on phones (up to 767px, the theme's phone breakpoint) instead of WordPress's 600px,
 * so image-and-text sections don't squeeze into two narrow columns on large phones and small tablets.
 * Same rules as core's, at the theme breakpoint. (Columns get the same treatment in inc/sections.php.)
 */
@media (max-width: 767.98px) {
	.wp-block-media-text.is-stacked-on-mobile {
		grid-template-columns: 100% !important;
	}

	.wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__media {
		grid-column: 1;
		grid-row: 1;
	}

	.wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__content {
		grid-column: 1;
		grid-row: 2;
	}
}

/*
 * Grids (Group block, Grid layout) fit as many columns as their minimum width allows, so cards go three,
 * then two across as the screen narrows. On phones they go one per row, stacking where Columns do, except
 * logos and stats, which stay small enough to sit two or three across.
 */
@media (max-width: 767.98px) {
	.wp-block-group.is-layout-grid:not(:is(.nowframe-logos, .nowframe-stats) .is-layout-grid) {
		grid-template-columns: 100%;
	}
}

/*
 * Opening an accordion makes its column taller. In side-by-side Columns or Media & Text that are vertically
 * centred, the other side (usually a photo) would then move down; with an accordion inside they align to
 * the top instead, so nothing beside it moves.
 */
.wp-block-columns:has(.wp-block-accordion) > .wp-block-column {
	align-self: flex-start;
}

.wp-block-media-text:has(.wp-block-accordion) {
	align-items: start;
}

.wp-block-media-text:has(.wp-block-accordion) > :is(.wp-block-media-text__media, .wp-block-media-text__content) {
	align-self: start;
}

/* Line icons (class nowframe-line-icon: the NowFrame set, and a child's icons prepared with the tools repo's
   bin/line-icons.py): drawn as lines in the text colour. The Icon block keeps only plain paths and fills them. */
.wp-block-icon svg.nowframe-line-icon,
svg.nowframe-line-icon {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Outline buttons fill with their own colour on hover, the text taking the background's (WordPress gives
   them no hover). Inside a colour scheme those are the scheme's text and background colours. */
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):is(:hover, :focus-visible) {
	border-color: var(--nowframe-scheme-text, var(--wp--preset--color--contrast));
	background-color: var(--nowframe-scheme-text, var(--wp--preset--color--contrast));
	color: var(--nowframe-scheme-bg, var(--wp--preset--color--base));
}

/* Outline buttons: the same padding as solid ones (WordPress gives them its own, smaller), so the two
   are the same size side by side. Solid buttons have a matching transparent border (theme.json). */
:root :where(.wp-block-button.is-style-outline > .wp-block-button__link) {
	padding: var(--wp--custom--button-padding--y) var(--wp--custom--button-padding--x);
}

/*
 * Page hero and page call to action (parts page-hero / page-cta, inc/page-layout.php). Without a featured
 * image the hero is a titlebar band: shorter, the overlay colour solid. Content that isn't a full-width
 * section gets room above and below, since the template's sections sit flush against it.
 */
.nowframe-page-hero.is-titlebar {
	min-height: 0 !important;
	padding-block: var(--wp--preset--spacing--70);
}

.wp-block-cover.nowframe-page-hero.is-titlebar > .wp-block-cover__background.has-background-dim {
	opacity: 1;
}

/* Hero details (inc/page-layout.php): highlighted ending of the heading, jump links, photo card. */
.nowframe-highlight {
	color: var(--wp--custom--hero-highlight, var(--wp--preset--color--accent));
}

.is-dark .nowframe-highlight,
[class*="is-style-section-"]:is(.is-style-section-brand, .is-style-section-dark) .nowframe-highlight {
	color: var(--wp--custom--hero-highlight-on-dark, inherit);
}

.nowframe-hero-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
}

.nowframe-hero-links a {
	padding: 0.5rem 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
	transition: border-color var(--wp--custom--transition, 180ms ease), color var(--wp--custom--transition, 180ms ease);
}

.nowframe-hero-links a:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.nowframe-page-hero__card {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	border-radius: var(--nowframe-box-radius);
	background: var(--wp--preset--color--base);
	box-shadow: var(--nowframe-shadow);
	color: var(--wp--preset--color--contrast);
}

.nowframe-page-hero__card > * {
	margin: 0;
}

/* A page's own call to action text: paragraphs, lists and links. */
div.nowframe-page-cta__text > * {
	margin-block: 0;
}

div.nowframe-page-cta__text > * + * {
	margin-block-start: var(--wp--preset--spacing--20);
}

.wp-block-template-part:has(> .nowframe-page-hero) + .wp-block-post-content > :first-child:not(.alignfull) {
	margin-block-start: var(--wp--preset--spacing--60);
}

.wp-block-post-content:has(+ .wp-block-template-part > .nowframe-page-cta) > :last-child:not(.alignfull) {
	margin-block-end: var(--wp--preset--spacing--60);
}

/* Button style "Text link": a button that reads as a plain link (phone numbers, directions). */
.wp-block-button.is-style-text-link .wp-block-button__link {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font-weight: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.wp-block-button.is-style-text-link .wp-block-button__link:hover {
	text-decoration-thickness: 2px;
}

/*
 * Header
 *
 * Default header: phones show the logo, call icon and menu button; tablets add the full phone number and
 * appointment button; laptops and up (1025px) show the menu inline.
 *
 * Behaviour comes from Site Settings → Header as body classes (inc/header.php), applied to the <header>
 * wrapper so it works for any header layout:
 *   nowframe-sticky-always | -scroll_up | -off     stays at the top / hides until scrolling up / scrolls away
 *   nowframe-frosted, nowframe-frosted-light | -medium | -strong   frosted glass (only while it sticks)
 *   nowframe-nav-auto | -tablet | -laptop | -desktop | -always   when the menu becomes a menu button
 *   nowframe-header-overlay                          see-through over the page's hero
 */
.wp-site-blocks > header.wp-block-template-part {
	position: relative;
	z-index: 100;
}

:is(.nowframe-sticky-always, .nowframe-sticky-scroll_up) .wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
}

/* Phones: WordPress doesn't pin the toolbar, so the header sticks to the very top. */
@media (max-width: 600px) {
	:is(.nowframe-sticky-always, .nowframe-sticky-scroll_up) .wp-site-blocks > header.wp-block-template-part {
		top: 0;
	}
}

.nowframe-sticky-scroll_up .wp-site-blocks > header.wp-block-template-part {
	transition: transform var(--wp--custom--transition, 180ms ease);
}

.nowframe-sticky-scroll_up.nowframe-header-hidden .wp-site-blocks > header.wp-block-template-part {
	transform: translateY(calc(-100% - var(--wp-admin--admin-bar--height, 0px)));
}

/*
 * Frosted glass: the header's own background colours (the Header layout block's, its rows' colour schemes,
 * or any palette background in a custom header) turn partly see-through and the page blurs behind them.
 * Only in browsers that can blur; others keep the solid header. Off while a see-through header is over
 * its hero (it's clear there; frosted once the page scrolls), and while the menu is open (see below).
 */
.nowframe-frosted-light {
	--nowframe-frost-opacity: 88%;
	--nowframe-frost-blur: 6px;
}

.nowframe-frosted-medium {
	--nowframe-frost-opacity: 78%;
	--nowframe-frost-blur: 12px;
}

.nowframe-frosted-strong {
	--nowframe-frost-opacity: 62%;
	--nowframe-frost-blur: 20px;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
	.nowframe-frosted:not(.nowframe-header-overlay:not(.nowframe-scrolled)) .wp-site-blocks > header.wp-block-template-part {
		-webkit-backdrop-filter: blur(var(--nowframe-frost-blur)) saturate(1.4);
		backdrop-filter: blur(var(--nowframe-frost-blur)) saturate(1.4);
	}

	.nowframe-frosted:not(.nowframe-header-overlay:not(.nowframe-scrolled)) header.wp-block-template-part [class*="is-style-section-"] {
		background-color: color-mix(in srgb, var(--nowframe-scheme-bg) var(--nowframe-frost-opacity), transparent);
	}

	.nowframe-frosted:not(.nowframe-header-overlay:not(.nowframe-scrolled)) header.wp-block-template-part .has-base-background-color:not(.wp-block-button__link) {
		background-color: color-mix(in srgb, var(--wp--preset--color--base) var(--nowframe-frost-opacity), transparent) !important;
	}

	.nowframe-frosted:not(.nowframe-header-overlay:not(.nowframe-scrolled)) header.wp-block-template-part .has-base-alt-background-color:not(.wp-block-button__link) {
		background-color: color-mix(in srgb, var(--wp--preset--color--base-alt) var(--nowframe-frost-opacity), transparent) !important;
	}

	.nowframe-frosted:not(.nowframe-header-overlay:not(.nowframe-scrolled)) header.wp-block-template-part .has-contrast-background-color:not(.wp-block-button__link) {
		background-color: color-mix(in srgb, var(--wp--preset--color--contrast) var(--nowframe-frost-opacity), transparent) !important;
	}

	.nowframe-frosted:not(.nowframe-header-overlay:not(.nowframe-scrolled)) header.wp-block-template-part .has-muted-background-color:not(.wp-block-button__link) {
		background-color: color-mix(in srgb, var(--wp--preset--color--muted) var(--nowframe-frost-opacity), transparent) !important;
	}

	.nowframe-frosted:not(.nowframe-header-overlay:not(.nowframe-scrolled)) header.wp-block-template-part .has-primary-background-color:not(.wp-block-button__link) {
		background-color: color-mix(in srgb, var(--wp--preset--color--primary) var(--nowframe-frost-opacity), transparent) !important;
	}

	.nowframe-frosted:not(.nowframe-header-overlay:not(.nowframe-scrolled)) header.wp-block-template-part .has-primary-dark-background-color:not(.wp-block-button__link) {
		background-color: color-mix(in srgb, var(--wp--preset--color--primary-dark) var(--nowframe-frost-opacity), transparent) !important;
	}

	.nowframe-frosted:not(.nowframe-header-overlay:not(.nowframe-scrolled)) header.wp-block-template-part .has-accent-background-color:not(.wp-block-button__link) {
		background-color: color-mix(in srgb, var(--wp--preset--color--accent) var(--nowframe-frost-opacity), transparent) !important;
	}

	.nowframe-frosted:not(.nowframe-header-overlay:not(.nowframe-scrolled)) header.wp-block-template-part .has-border-background-color:not(.wp-block-button__link) {
		background-color: color-mix(in srgb, var(--wp--preset--color--border) var(--nowframe-frost-opacity), transparent) !important;
	}
}

.nowframe-header__bar {
	gap: var(--wp--preset--spacing--30);
}

.nowframe-header__logo img,
.nowframe-header .nowframe-site-title-fallback {
	max-width: min(180px, 40vw);
}

.nowframe-header .nowframe-site-title-fallback {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: 1.2;
}

.nowframe-header .nowframe-site-title-fallback a {
	color: inherit;
	text-decoration: none;
}

.nowframe-header__actions {
	gap: var(--wp--preset--spacing--30);
}

.nowframe-header__buttons {
	gap: var(--wp--preset--spacing--20);
}

.nowframe-header__buttons .wp-block-button__link {
	padding: 0.625rem 1rem;
	font-size: var(--wp--preset--font-size--small);
	white-space: nowrap;
}

.nowframe-header__buttons > .nowframe-header__cta {
	display: none;
}

/* Phones: the call button is an icon; its number stays readable to screen readers. The selector outranks
   the button styles (Outline, Text link), so the icon shows whichever style the phone button has. */
@media (max-width: 767.98px) {
	.wp-block-button.nowframe-header__phone .wp-block-button__link {
		position: relative;
		display: block; /* Not inline: no line box below it, so it centres with the logo and menu button. */
		width: 2.75rem;
		height: 2.75rem;
		padding: 0;
		overflow: hidden;
		border-color: var(--wp--preset--color--primary);
		color: transparent;
		text-decoration: none;
		white-space: nowrap;
	}

	.wp-block-button.nowframe-header__phone .wp-block-button__link::before {
		content: "";
		position: absolute;
		inset: 0;
		margin: auto;
		width: 1.25rem;
		height: 1.25rem;
		background: var(--wp--preset--color--primary);
		-webkit-mask: var(--nowframe-icon-phone) center / contain no-repeat;
		mask: var(--nowframe-icon-phone) center / contain no-repeat;
	}
}

:root {
	--nowframe-icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 0 1 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1l-2.3 2.2Z'/%3E%3C/svg%3E");
}

@media (min-width: 768px) {
	.nowframe-header__buttons > .nowframe-header__cta {
		display: block;
	}
}

/*
 * Menu button instead of the menu (Site Settings → Header). WordPress itself switches at 600px; these
 * rules move that point. "auto" also collapses whenever header.js finds the menu doesn't fit
 * (body class nowframe-nav-collapsed). The menu button sits at the end of the row in the default header.
 */
@media (max-width: 767.98px) {
	:is(.nowframe-nav-tablet, .nowframe-nav-laptop, .nowframe-nav-auto, .nowframe-nav-desktop) header.wp-block-template-part .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	:is(.nowframe-nav-tablet, .nowframe-nav-laptop, .nowframe-nav-auto, .nowframe-nav-desktop) header.wp-block-template-part .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	:is(.nowframe-nav-tablet, .nowframe-nav-laptop, .nowframe-nav-auto, .nowframe-nav-desktop) .nowframe-header__nav {
		order: 2;
	}
}

@media (max-width: 1024.98px) {
	:is(.nowframe-nav-laptop, .nowframe-nav-auto, .nowframe-nav-desktop) header.wp-block-template-part .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	:is(.nowframe-nav-laptop, .nowframe-nav-auto, .nowframe-nav-desktop) header.wp-block-template-part .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	:is(.nowframe-nav-laptop, .nowframe-nav-auto, .nowframe-nav-desktop) .nowframe-header__nav {
		order: 2;
	}
}

@media (max-width: 1400.98px) {
	.nowframe-nav-desktop header.wp-block-template-part .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.nowframe-nav-desktop header.wp-block-template-part .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.nowframe-nav-desktop .nowframe-header__nav {
		order: 2;
	}
}

:is(.nowframe-nav-always, .nowframe-nav-collapsed) header.wp-block-template-part .wp-block-navigation__responsive-container-open:not(.always-shown) {
	display: flex;
}

:is(.nowframe-nav-always, .nowframe-nav-collapsed) header.wp-block-template-part .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
	display: none;
}

:is(.nowframe-nav-always, .nowframe-nav-collapsed) .nowframe-header__nav {
	order: 2;
}

/*
 * While the menu is open, nothing around it may act as the frame for its full-screen panel: a header styled
 * with a blur, filter or transform (e.g. a see-through header in a child theme) would otherwise shrink the
 * open menu to the header's own size.
 */
.wp-site-blocks > header:has(.wp-block-navigation__responsive-container.is-menu-open),
.wp-site-blocks > header:has(.wp-block-navigation__responsive-container.is-menu-open) * {
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	filter: none !important;
	transform: none !important;
}

/* "Menu" beside the menu button (Navigation block → Menu button). */
.wp-block-navigation__responsive-container-open:has(.nowframe-menu-label) {
	gap: 0.5em;
	width: auto !important;
	padding-inline: 0.25rem;
}

.nowframe-menu-label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.nowframe-header .wp-block-navigation__responsive-container-open,
.nowframe-header .wp-block-navigation__responsive-container-close {
	width: 2.75rem;
	height: 2.75rem;
	align-items: center;
	justify-content: center;
}

.nowframe-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--40);
}

/* The open menu in the site's own colours (WordPress uses plain white and black unless the menu has its own). */
.nowframe-header .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.nowframe-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-size: var(--wp--preset--font-size--large);
}

/* The open menu reads top to bottom from the left, whatever the bar's alignment. */
.nowframe-header .wp-block-navigation__responsive-container.is-menu-open :is(.wp-block-navigation__responsive-container-content, .wp-block-navigation__container, .wp-block-navigation-item, .wp-block-navigation__submenu-container) {
	align-items: flex-start;
	text-align: left;
}

.nowframe-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	padding-left: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--medium);
}

/*
 * Menu button open (phones, and wherever the menu collapses): a line between top-level items, and each
 * submenu closed behind an arrow button beside its link, so a long services menu stays short. The parent
 * link still goes to its page. WordPress's navigation script sets aria-expanded on the arrow; without
 * JavaScript every submenu shows.
 */
.nowframe-header .is-menu-open .wp-block-navigation__container {
	gap: 0;
	width: 100%;
}

.nowframe-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
	width: 100%;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.nowframe-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	padding-block: 0.75rem;
}

.nowframe-header .is-menu-open .wp-block-navigation-item.has-child {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	width: 100%;
}

.nowframe-header .is-menu-open .has-child > .wp-block-navigation-item__content {
	flex: 1;
}

.nowframe-header .is-menu-open .has-child > .wp-block-navigation-submenu__toggle {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.nowframe-header .is-menu-open .has-child > .wp-block-navigation-submenu__toggle svg {
	display: block;
	width: 1rem;
	height: 1rem;
	stroke: currentColor;
	transition: transform var(--wp--custom--transition, 180ms ease);
}

.nowframe-header .is-menu-open .has-child > .wp-block-navigation-submenu__toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.nowframe-header .is-menu-open .has-child > .wp-block-navigation__submenu-container {
	flex-basis: 100%;
	gap: 0;
	padding: 0 0 var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}

.nowframe-header .is-menu-open .has-child > .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding-block: 0.4rem;
}

.nowframe-header .is-menu-open .has-child > .wp-block-navigation-submenu__toggle[aria-expanded="false"] + .wp-block-navigation__submenu-container {
	display: none;
}

/*
 * Open menu as a panel below the header (Site Settings → Header → Open menu): the header stays in view and
 * its menu button closes the panel again (header.js), so the panel's own close button is only for screen
 * readers. --nowframe-menu-top is where the header ends on screen, set by header.js as the menu opens.
 */
.nowframe-menu-below .nowframe-header .wp-block-navigation__responsive-container.is-menu-open {
	top: var(--nowframe-menu-top, var(--nowframe-header-h, 5rem));
	bottom: 0;
	height: auto;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	border-top: 1px solid var(--wp--preset--color--border);
	overflow-y: auto;
}

.nowframe-menu-below .nowframe-header .is-menu-open .wp-block-navigation__responsive-container-close {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
}

.nowframe-menu-below .nowframe-header .is-menu-open :is(.wp-block-navigation__responsive-dialog, .wp-block-navigation__responsive-container-content) {
	margin-top: 0;
	padding-top: 0;
}

/* Every submenu open in the open menu (Site Settings → Header → Submenus), indented under its parent. */
.nowframe-submenus-open .nowframe-header .is-menu-open .has-child > .wp-block-navigation-submenu__toggle {
	display: none;
}

.nowframe-submenus-open .nowframe-header .is-menu-open .has-child > .wp-block-navigation-submenu__toggle + .wp-block-navigation__submenu-container {
	display: flex;
}

/*
 * See-through header over the hero (Site Settings → Header). The header overlaps the hero by its own
 * height (--nowframe-header-h, kept up to date by header.js) and turns white; once the page scrolls
 * (nowframe-scrolled) it gets its background back.
 */
.nowframe-header-overlay .wp-site-blocks > header.wp-block-template-part {
	margin-block-end: calc(var(--nowframe-header-h, 5rem) * -1);
}

.nowframe-hero-under-header {
	padding-top: calc(var(--nowframe-header-h, 5rem) + var(--wp--preset--spacing--50)) !important;
}

.nowframe-header-overlay header.wp-block-template-part > * {
	transition: background-color var(--wp--custom--transition, 180ms ease), border-color var(--wp--custom--transition, 180ms ease), color var(--wp--custom--transition, 180ms ease);
}

.nowframe-header-overlay:not(.nowframe-scrolled) header.wp-block-template-part > *,
.nowframe-header-overlay:not(.nowframe-scrolled) header.wp-block-template-part > * .has-background:not(.wp-block-button__link) {
	border-color: transparent !important;
	background-color: transparent !important;
	color: var(--wp--preset--color--base) !important;
}

.nowframe-header-overlay:not(.nowframe-scrolled) header.wp-block-template-part :is(a, .wp-block-navigation-item__content, .wp-block-navigation__responsive-container-open, .wp-block-site-title a) {
	color: var(--wp--preset--color--base);
}

.nowframe-header-overlay:not(.nowframe-scrolled) header.wp-block-template-part .is-style-outline .wp-block-button__link {
	border-color: currentColor;
	color: var(--wp--preset--color--base);
}

.nowframe-header-overlay:not(.nowframe-scrolled) .nowframe-header__phone .wp-block-button__link::before {
	background: var(--wp--preset--color--base);
}

/* Phones: the call icon's number stays hidden over the hero too (the white text above would show it). */
@media (max-width: 767.98px) {
	.nowframe-header-overlay:not(.nowframe-scrolled) header.wp-block-template-part .wp-block-button.nowframe-header__phone .wp-block-button__link {
		border-color: var(--wp--preset--color--base);
		color: transparent;
	}
}

/* The open menu panel keeps normal colors. */
.nowframe-header-overlay header.wp-block-template-part .wp-block-navigation__responsive-container.is-menu-open :is(a, .wp-block-navigation-item__content) {
	color: var(--wp--preset--color--contrast);
}

/* No light logo uploaded: the normal one is shown in white. With one, the two swap. */
.nowframe-header-overlay:not(.nowframe-has-light-logo):not(.nowframe-scrolled) header.wp-block-template-part .custom-logo {
	filter: brightness(0) invert(1);
}

.nowframe-logo-light {
	display: none;
}

.nowframe-has-light-logo:not(.nowframe-scrolled) header.wp-block-template-part .custom-logo {
	display: none;
}

.nowframe-has-light-logo:not(.nowframe-scrolled) header.wp-block-template-part .nowframe-logo-light {
	display: block;
	width: 100%;
	max-width: inherit;
	height: auto;
}

/*
 * Notice bar (Site Settings → Notice bar): one line above the header.
 */
.nowframe-notice {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--20);
	padding: 0.5rem var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
	text-align: center;
}

.nowframe-notice--dark {
	background: var(--wp--preset--color--primary-dark);
}

.nowframe-notice--accent {
	background: var(--wp--preset--color--accent);
}

.nowframe-notice--light {
	background: var(--wp--preset--color--base-alt);
	color: var(--wp--preset--color--contrast);
}

.nowframe-notice__text {
	margin: 0;
}

.nowframe-notice a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	white-space: nowrap;
}

.nowframe-notice__close {
	flex: none;
	position: relative;
	width: 2rem;
	height: 2rem;
	margin-inline-end: calc(var(--wp--preset--spacing--20) * -1);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: inherit;
	cursor: pointer;
}

.nowframe-notice__close::before,
.nowframe-notice__close::after {
	content: "";
	position: absolute;
	inset: 0;
	width: 0.875rem;
	height: 2px;
	margin: auto;
	background: currentColor;
	transform: rotate(45deg);
}

.nowframe-notice__close::after {
	transform: rotate(-45deg);
}

.nowframe-notice__close:hover {
	background: color-mix(in srgb, currentColor 15%, transparent);
}

/*
 * Button bar on phones (Site Settings → Header): call / book / directions fixed to the bottom of the screen.
 */
.nowframe-mobile-bar {
	display: none;
}

@media (max-width: 767.98px) {
	.nowframe-has-mobile-bar {
		padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
	}

	.nowframe-mobile-bar {
		position: fixed;
		inset: auto 0 0;
		z-index: 99;
		display: flex;
		padding-bottom: env(safe-area-inset-bottom, 0px);
		background: var(--wp--preset--color--primary);
		box-shadow: 0 -1px 0 color-mix(in srgb, var(--wp--preset--color--contrast) 15%, transparent);
	}

	.nowframe-mobile-bar a {
		flex: 1 1 0;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0.5rem;
		min-height: 3.5rem;
		padding: 0 0.5rem;
		color: var(--wp--preset--color--base);
		font-size: var(--wp--preset--font-size--small);
		font-weight: 600;
		text-decoration: none;
	}

	.nowframe-mobile-bar a + a {
		border-left: 1px solid color-mix(in srgb, var(--wp--preset--color--base) 25%, transparent);
	}

	.nowframe-mobile-bar a::before {
		content: "";
		flex: none;
		width: 1.125rem;
		height: 1.125rem;
		background: currentColor;
		-webkit-mask: var(--nowframe-icon-phone) center / contain no-repeat;
		mask: var(--nowframe-icon-phone) center / contain no-repeat;
	}

	.nowframe-mobile-bar .nowframe-mobile-bar__book::before {
		-webkit-mask-image: var(--nowframe-icon-calendar);
		mask-image: var(--nowframe-icon-calendar);
	}

	.nowframe-mobile-bar .nowframe-mobile-bar__dir::before {
		-webkit-mask-image: var(--nowframe-icon-pin);
		mask-image: var(--nowframe-icon-pin);
	}

	/* Light bar with buttons (Site Settings → Header → Button bar style): the site's button shape, Book solid
	   in the brand colour, the others outlined. */
	.nowframe-mobile-bar-buttons.nowframe-has-mobile-bar {
		padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
	}

	.nowframe-mobile-bar-buttons .nowframe-mobile-bar {
		justify-content: center;
		gap: 0.5rem;
		padding: 0.625rem 0.75rem calc(0.625rem + env(safe-area-inset-bottom, 0px));
		background: color-mix(in srgb, var(--wp--preset--color--base) 95%, transparent);
		-webkit-backdrop-filter: blur(10px);
		backdrop-filter: blur(10px);
		box-shadow: 0 -1px 0 var(--wp--preset--color--border);
	}

	.nowframe-mobile-bar-buttons .nowframe-mobile-bar a,
	.nowframe-mobile-bar-buttons .nowframe-mobile-bar a + a {
		max-width: 12rem;
		min-height: 3rem;
		padding: 0.5rem 1rem;
		border: 2px solid var(--wp--preset--color--contrast);
		border-radius: var(--wp--custom--radius);
		color: var(--wp--preset--color--contrast);
	}

	.nowframe-mobile-bar-buttons .nowframe-mobile-bar .nowframe-mobile-bar__book {
		border-color: var(--wp--preset--color--primary);
		background: var(--wp--preset--color--primary);
		color: var(--wp--preset--color--base);
	}

	/* The header's call icon repeats the bar's Call button. */
	.nowframe-mobile-bar-calls .nowframe-header__phone {
		display: none;
	}
}

:root {
	--nowframe-icon-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3a1 1 0 0 1 1 1v15a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3V2Zm12 8H5v9h14v-9ZM5 6v2h14V6H5Z'/%3E%3C/svg%3E");
	--nowframe-icon-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 1 7 7c0 5.2-7 13-7 13S5 14.2 5 9a7 7 0 0 1 7-7Zm0 4.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z'/%3E%3C/svg%3E");
}

/*
 * Consent bar (Site Settings → Privacy): bottom of the screen, doesn't block the page. Accept and
 * Decline are equally prominent.
 */
.nowframe-consent {
	position: fixed;
	inset: auto var(--wp--preset--spacing--30) var(--wp--preset--spacing--30);
	z-index: 1000;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
	max-width: 60rem;
	margin-inline: auto;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--nowframe-box-radius);
	background: var(--wp--preset--color--base);
	box-shadow: var(--nowframe-shadow);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

.nowframe-consent[hidden] {
	display: none;
}

.nowframe-consent__text {
	flex: 1 1 24rem;
	margin: 0;
}

.nowframe-consent__text a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.nowframe-consent__buttons {
	display: flex;
	flex: 1 0 auto;
	justify-content: flex-end;
	gap: var(--wp--preset--spacing--20);
}

.nowframe-consent__button {
	flex: 1 0 auto;
	min-height: 2.75rem;
	padding: 0.5rem 1.25rem;
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.nowframe-consent__button.is-primary {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

@media (min-width: 768px) {
	.nowframe-consent__buttons {
		flex-grow: 0;
	}
}

/* Phones: above the button bar. */
@media (max-width: 767.98px) {
	.nowframe-has-mobile-bar .nowframe-consent {
		bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px) + var(--wp--preset--spacing--20));
	}
}

.nowframe-consent-link {
	margin-block: var(--wp--preset--spacing--20) 0;
}

/* Footer */
.nowframe-footer address {
	font-style: normal;
}

/* Several offices sit side by side in the footer. */
.nowframe-footer__contact {
	flex: 1 1 20rem;
	max-width: 52rem;
}

/* width, not align-self: stretch: Chrome sizes a stretched grid's height as if it had one column. */
.nowframe-footer__contact > .nowframe-footer__locations {
	width: 100%;
}

/* Social icons in one color (the text color) instead of each brand's; 44px tap targets. */
.wp-block-social-links.nowframe-social-links.is-style-logos-only .wp-social-link {
	color: inherit;
}

.wp-block-social-links.nowframe-social-links .wp-social-link a {
	padding: 0.625rem;
}

.wp-block-social-links.nowframe-social-links {
	gap: 0;
	margin-inline-start: -0.625rem;
}

.nowframe-footer .wp-block-site-logo img,
.nowframe-footer .nowframe-site-title-fallback {
	max-width: 180px;
}

.nowframe-footer .nowframe-site-title-fallback {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
}

.nowframe-footer .nowframe-site-title-fallback a {
	text-decoration: none;
}

/* Editor-only message from a block that has nothing to show yet. */
.nowframe-block-empty {
	padding: var(--wp--preset--spacing--30);
	border: 1px dashed var(--wp--preset--color--border);
	color: var(--wp--preset--color--muted);
}

/*
 * "Page with hero and sidebar" template: hero from the featured image, content with a sidebar (table of
 * contents and a call to action) that stays in view on laptops and up. Phones and tablets show only the
 * content. Works for any long page: services, practice areas, guides…
 */
.nowframe-sidebar-layout__content > :first-child {
	margin-block-start: 0;
}

.nowframe-sidebar-layout__content > :is(h2, h3) {
	margin-block-start: var(--wp--preset--spacing--50);
}

.nowframe-sidebar-layout__sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
}

/* The call-to-action box in the page sidebar and the blog sidebar (parts sidebar and blog-cta). */
.nowframe-sidebar-cta {
	border-radius: var(--nowframe-box-radius);
}

.nowframe-sidebar-cta > * {
	margin: 0;
}

/*
 * Phones and tablets: the content takes the full width and the sidebar isn't shown. Pages usually end with
 * their own call-to-action section above the footer, so the sidebar box would repeat it; "On this page" is
 * the collapsible box above the content (post-contents block) instead.
 */
@media (max-width: 1024.98px) {
	.nowframe-sidebar-layout > .wp-block-columns {
		flex-wrap: wrap !important; /* Core keeps columns side by side from 782px. */
	}

	.nowframe-sidebar-layout > .wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
	}

	.nowframe-sidebar-layout > .wp-block-columns > .wp-block-column:has(> .nowframe-sidebar-layout__sidebar) {
		display: none;
	}
}

@media (min-width: 1025px) {
	.nowframe-sidebar-layout__sidebar {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--nowframe-sticky-offset, 6rem) + 1rem);
		transition: top var(--wp--custom--transition, 180ms ease);
	}
}

/* Timeline (pattern "Timeline"): a line down the left with a dot per entry. */
.nowframe-timeline {
	position: relative;
	padding-left: var(--wp--preset--spacing--50);
	border-left: 2px solid var(--wp--preset--color--border);
}

.nowframe-timeline__entry {
	position: relative;
}

.nowframe-timeline__entry > * {
	margin: 0;
}

.nowframe-timeline__entry::before {
	content: "";
	position: absolute;
	top: 0.3rem;
	left: calc(-1 * var(--wp--preset--spacing--50) - 0.5rem - 1px);
	width: 1rem;
	height: 1rem;
	border: 3px solid var(--wp--preset--color--base);
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	box-sizing: border-box;
}

.nowframe-timeline__year {
	color: var(--wp--preset--color--muted);
	font-weight: 700;
	letter-spacing: 0.05em;
}

/*
 * Section patterns (patterns/*.php). Each section is a full-width group with the class nowframe-section;
 * colors and spacing come from block settings, so editors can change them.
 */

/* Small label above a heading. */
.nowframe-eyebrow {
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.8;
}

/* Rounded photos (hero, team, media and text). */
.nowframe-rounded img,
.nowframe-media-text__inner .wp-block-media-text__media img {
	border-radius: var(--nowframe-box-radius);
}

/* Cards: equal heights in a row, link pinned to the bottom. */
.nowframe-card {
	height: 100%;
	border-radius: var(--nowframe-box-radius);
	box-sizing: border-box;
}

.nowframe-card > * {
	margin: 0;
}

.nowframe-card__link {
	margin-top: auto;
	font-weight: 600;
}

/* Cards with images: the photo runs edge to edge at the top, the text sits in the card body. */
.nowframe-card--image {
	overflow: hidden;
}

.nowframe-card__image {
	width: 100%;
	margin: 0;
}

.nowframe-card__image img {
	display: block;
	width: 100%;
}

.nowframe-card__body {
	flex: 1;
	width: 100%;
	box-sizing: border-box;
}

.nowframe-card__body > * {
	margin: 0;
}

/* Stats: big numbers. */
.nowframe-stat > * {
	margin: 0;
}

.nowframe-stat__number {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	line-height: 1;
}

/* Steps: numbered circles. */
.nowframe-step > * {
	margin: 0;
}

.nowframe-step__number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-weight: 700;
	line-height: 1;
}

/* Logos: same height, muted until hovered. */
.nowframe-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
}

.nowframe-logo img {
	width: auto;
	max-width: 100%;
	max-height: 3.5rem;
	filter: grayscale(1);
	opacity: 0.75;
	transition: filter var(--wp--custom--transition), opacity var(--wp--custom--transition);
}

.nowframe-logo img:hover {
	filter: none;
	opacity: 1;
}

/* Team cards. */
.nowframe-team-card > * {
	margin: 0;
}

.nowframe-team-card .nowframe-rounded img {
	width: 100%;
}

/* Section intros keep their parts close together. */
.nowframe-section__intro > * {
	margin-block: 0;
}

/* Media and text sections: the text lines up with the section edge; the gap sits next to the photo. */
.nowframe-media-text__inner > .wp-block-media-text__content {
	padding-left: var(--wp--preset--spacing--60);
	padding-right: 0;
}

.nowframe-media-text__inner.has-media-on-the-right > .wp-block-media-text__content {
	padding-left: 0;
	padding-right: var(--wp--preset--spacing--60);
}

@media (max-width: 767.98px) {
	.nowframe-media-text__inner.is-stacked-on-mobile > .wp-block-media-text__content {
		padding: var(--wp--preset--spacing--40) 0 0;
	}
}

/*
 * Blog (templates/index.html for the blog page, categories and search; templates/single.html for posts).
 * A sidebar beside the posts on laptops and up: categories and the "Blog call to action" box on the blog
 * page, "On this page / Related posts" and the box on posts. Site Settings → Blog → Sidebar side: right
 * (the default) adds nowframe-blog-sidebar-right. On phones the blog page shows categories, posts, then the box;
 * a post shows the post, then the box and related posts.
 */
.nowframe-blog-layout {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--60);
}

.nowframe-blog-layout > *,
.nowframe-blog-main > *,
.nowframe-blog-sidebar > * {
	margin-block: 0;
}

.nowframe-blog-sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
}

.nowframe-blog-layout.is-post-list .nowframe-blog-sidebar {
	display: contents;
}

.nowframe-blog-layout.is-post-list .nowframe-blog-filter {
	order: -1;
}

.nowframe-blog-layout.is-post-list > .nowframe-blog-heading {
	order: -2;
}

.nowframe-blog-layout.is-post .nowframe-blog-sidebar > :last-child {
	order: -1;
}

@media (min-width: 1025px) {
	.nowframe-blog-layout {
		display: grid;
		grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
		grid-template-areas: "side main";
		align-items: start;
		column-gap: var(--wp--preset--spacing--70);
	}

	.nowframe-blog-layout.is-post-list {
		grid-template-areas: "head head" "side main";
	}

	.nowframe-blog-sidebar-right .nowframe-blog-layout {
		grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
		grid-template-areas: "main side";
	}

	.nowframe-blog-sidebar-right .nowframe-blog-layout.is-post-list {
		grid-template-areas: "head head" "main side";
	}

	.nowframe-blog-layout.is-post-list .nowframe-blog-sidebar {
		display: flex;
	}

	.nowframe-blog-layout.is-post .nowframe-blog-sidebar > :last-child {
		order: 0;
	}

	/* The heading (in the editor, the block wrapper around it). */
	.nowframe-blog-layout > :not(.nowframe-blog-main, .nowframe-blog-sidebar) {
		grid-area: head;
	}

	.nowframe-blog-main {
		grid-area: main;
	}

	.nowframe-blog-sidebar {
		grid-area: side;
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--nowframe-sticky-offset, 6rem) + 1rem);
		max-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - var(--nowframe-sticky-offset, 6rem) - 2rem);
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
		transition: top var(--wp--custom--transition, 180ms ease);
	}

	/* The editor canvas scrolls differently; keep the sidebar in place there. */
	.editor-styles-wrapper .nowframe-blog-sidebar {
		position: static;
		max-height: none;
	}

	.editor-styles-wrapper .nowframe-blog-layout > * {
		margin-block: 0;
	}
}

/* Blog page heading. */
.nowframe-blog-heading > * {
	margin: 0;
}

.nowframe-blog-heading__title:focus {
	outline: none;
}

.nowframe-blog-heading__intro {
	max-width: 48rem;
	margin-top: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--medium);
}

.nowframe-blog-heading .wp-block-search {
	max-width: 32rem;
	margin-top: var(--wp--preset--spacing--40);
}

/* Category buttons: wrap in the sidebar; a row that scrolls sideways on phones. */
.nowframe-blog-filter__title {
	margin: 0 0 var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nowframe-blog-filter__list {
	display: flex;
	gap: var(--wp--preset--spacing--20);
	margin: 0;
	padding: 0;
	list-style: none;
}

.nowframe-blog-filter__button {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	padding: 0.35rem 0.85rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color var(--wp--custom--transition), background-color var(--wp--custom--transition), color var(--wp--custom--transition);
}

.nowframe-blog-filter__button:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--contrast);
}

.nowframe-blog-filter__button[aria-current="page"] {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.nowframe-blog-filter__count {
	opacity: 0.65;
}

@media (max-width: 1024.98px) {
	.nowframe-blog-filter__list {
		margin-inline: calc(-1 * var(--wp--preset--spacing--30));
		padding: 2px var(--wp--preset--spacing--30);
		overflow-x: auto;
		scrollbar-width: none;
	}
}

@media (min-width: 1025px) {
	.nowframe-blog-filter__list {
		flex-wrap: wrap;
	}
}

/* Post cards: date, title, a short excerpt and "Read more"; the featured image too when switched on. */
.nowframe-post-cards {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40);
}

.nowframe-blog-main [aria-busy="true"] .nowframe-post-cards,
.nowframe-blog-main[aria-busy="true"] .nowframe-post-cards {
	opacity: 0.5;
	transition: opacity var(--wp--custom--transition);
}

.nowframe-post-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	height: 100%;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--nowframe-box-radius);
	background: var(--wp--preset--color--base);
	box-sizing: border-box;
}

.nowframe-post-card__image {
	margin: 0;
}

.nowframe-post-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nowframe-post-card__body {
	padding: var(--wp--preset--spacing--40);
}

.nowframe-post-card__body > * {
	margin: 0;
}

.nowframe-post-card__date {
	color: var(--wp--preset--color--muted);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.nowframe-post-card__title {
	margin-top: var(--wp--preset--spacing--10);
	line-height: 1.25;
}

.nowframe-post-card__title a {
	color: inherit;
	text-decoration: none;
}

.nowframe-post-card__title a:hover {
	color: var(--wp--preset--color--primary);
}

.nowframe-post-card__excerpt {
	margin-top: var(--wp--preset--spacing--20);
}

.nowframe-post-card__excerpt .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--wp--preset--color--muted);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.nowframe-post-card__excerpt .wp-block-post-excerpt__more-text {
	margin: var(--wp--preset--spacing--20) 0 0;
}

.nowframe-post-card__excerpt .wp-block-post-excerpt__more-link {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

@media (min-width: 768px) {
	.nowframe-post-card:has(.nowframe-post-card__image) {
		flex-direction: row;
	}

	.nowframe-post-card__image {
		flex: 0 0 34%;
	}

	.nowframe-post-card__image a {
		display: block;
		height: 100%;
	}
}

/* "Load more posts" (assets/js/blog.js); without JavaScript it's a link to the next page. */
.nowframe-load-more {
	margin-top: var(--wp--preset--spacing--50);
}

/* Looks like an outline button: the button padding from theme.json, the 2px border of core's outline style. */
.nowframe-load-more a {
	display: inline-block;
	padding: 0.875rem 1.5rem;
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: var(--wp--custom--radius);
	color: var(--wp--preset--color--primary);
	font-weight: 600;
	text-decoration: none;
	transition: background-color var(--wp--custom--transition), color var(--wp--custom--transition);
}

.nowframe-load-more a:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* Posts: title and date over the content, no hero. */
.nowframe-post-title {
	margin: 0;
}

.nowframe-post-meta {
	margin-top: var(--wp--preset--spacing--20) !important;
	color: var(--wp--preset--color--muted);
}

.nowframe-post-meta .wp-block-post-date {
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.nowframe-post-meta > * + *::before {
	content: "·";
	margin-right: var(--wp--preset--spacing--20);
}

.nowframe-post-meta .wp-block-post-author__byline::after {
	content: "\00a0";
}

.nowframe-post-meta .wp-block-post-author__content,
.nowframe-post-meta .wp-block-post-author__byline,
.nowframe-post-meta .wp-block-post-author__name {
	display: inline;
	margin: 0;
	font-size: inherit;
}

.nowframe-post-image {
	margin-top: var(--wp--preset--spacing--50) !important;
}

.nowframe-post-image img {
	border-radius: var(--nowframe-box-radius);
}

.nowframe-post-content {
	margin-top: var(--wp--preset--spacing--50) !important;
}

.nowframe-post-content > :first-child {
	margin-block-start: 0;
}

.nowframe-post-content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--nowframe-box-radius);
}

/* Imported posts often float images inside lists; keep the list beside them. */
.nowframe-post-content :is(ul, ol) {
	display: flow-root;
}

.nowframe-post-content .alignright {
	float: right;
	margin: 0 0 var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
}

.nowframe-post-content .alignleft {
	float: left;
	margin: 0 var(--wp--preset--spacing--40) var(--wp--preset--spacing--30) 0;
}

@media (max-width: 767.98px) {
	.nowframe-post-content :is(.alignright, .alignleft) {
		float: none;
		margin: 0 0 var(--wp--preset--spacing--30);
	}
}

.nowframe-post-nav {
	gap: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--60) !important;
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--border);
}

.nowframe-post-nav > * {
	flex: 1 1 0;
	max-width: 50%;
}

.nowframe-post-nav > :only-child {
	max-width: none;
}

.nowframe-post-nav a {
	font-weight: 600;
	text-decoration: none;
}

.nowframe-post-nav a:hover {
	text-decoration: underline;
}

.nowframe-blog-main .wp-block-comments {
	margin-top: var(--wp--preset--spacing--60);
}

/* Legal links (block nowframe/legal-links), beside the copyright in the footer. */
.nowframe-legal-links ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--10) var(--wp--preset--spacing--40);
	margin: 0;
	padding: 0;
	list-style: none;
}

.nowframe-footer__bottom > * {
	margin: 0;
}

/* Popups (inc/popups.php): a centred card over a dimmed page; scrolls inside if it's taller than the screen. */
.nowframe-popup {
	width: min(100% - 2rem, var(--nowframe-popup-width, 40rem));
	max-width: none;
	max-height: min(90vh, 100% - 2rem);
	padding: 0;
	border: 0;
	border-radius: var(--nowframe-box-radius);
	box-shadow: var(--nowframe-shadow-large);
	overflow: auto;
	overscroll-behavior: contain;
}

.nowframe-popup--small {
	--nowframe-popup-width: 28rem;
}

.nowframe-popup--large {
	--nowframe-popup-width: 56rem;
}

.nowframe-popup::backdrop {
	background: rgb(0 0 0 / 0.6);
}

.nowframe-popup[open] {
	animation: nowframe-popup-in 200ms ease-out;
}

@keyframes nowframe-popup-in {
	from {
		opacity: 0;
		transform: translateY(1rem);
	}
}

.nowframe-popup__inner {
	padding: var(--wp--preset--spacing--50);
}

.nowframe-popup__inner > * {
	margin-block: 0;
}

.nowframe-popup__inner > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}

.nowframe-popup__title {
	padding-right: 2.5rem;
	font-size: var(--wp--preset--font-size--x-large);
}

.nowframe-popup__close-form {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	margin: 0;
}

.nowframe-popup__close {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.nowframe-popup__close:hover {
	background: var(--wp--preset--color--base-alt);
}

.nowframe-popup__close::before,
.nowframe-popup__close::after {
	content: "";
	grid-area: 1 / 1;
	width: 1.25rem;
	height: 2px;
	background: currentColor;
	transform: rotate(45deg);
}

.nowframe-popup__close::after {
	transform: rotate(-45deg);
}

/* While a popup is open the page behind it doesn't scroll. */
html:has(.nowframe-popup[open]) {
	overflow: hidden;
}

/*
 * Mega panel (inc/mega-menu.php): a submenu styled "Mega panel" opens as a wide panel under the menu,
 * aligned to its right edge: the links in 1–3 columns, "All …", and up to four image cards. In the
 * menu button's menu it's an ordinary submenu (the cards and "All" are left out there).
 */
.nowframe-mega__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container {
	position: relative;
}

.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item.is-style-mega {
	position: static;
}

.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .is-style-mega > .nowframe-mega {
	right: 0;
	left: auto;
	flex-direction: row;
	gap: var(--wp--preset--spacing--50);
	width: min(var(--nowframe-mega-width, 20rem), 100vw - 2rem);
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--nowframe-box-radius);
	background: var(--wp--preset--color--base);
	box-shadow: var(--nowframe-shadow-large);
	color: var(--wp--preset--color--contrast);
	box-sizing: border-box;
}

.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .nowframe-mega.has-cards {
	--nowframe-mega-width: calc(var(--nowframe-mega-columns) * 16rem + 28rem);
}

.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .nowframe-mega.no-cards {
	--nowframe-mega-width: calc(var(--nowframe-mega-columns) * 16rem + 2rem);
}

.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .nowframe-mega__links {
	flex: 0 0 calc(var(--nowframe-mega-columns) * 16rem - var(--wp--preset--spacing--40));
	min-width: 0;
}

.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .nowframe-mega__list {
	columns: var(--nowframe-mega-columns);
	column-gap: var(--wp--preset--spacing--40);
}

.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .nowframe-mega__list > li {
	break-inside: avoid;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .nowframe-mega__list .wp-block-navigation-item__content {
	padding: 0.55rem 0;
}

.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .nowframe-mega__list .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--primary);
}

/* Nested submenus inside a panel are listed under their parent, not as flyouts. */
.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .nowframe-mega .wp-block-navigation__submenu-container {
	position: static;
	width: auto;
	height: auto;
	padding-left: var(--wp--preset--spacing--30);
	border: 0;
	visibility: inherit;
	opacity: inherit;
	overflow: visible;
}

.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .nowframe-mega .wp-block-navigation-submenu__toggle {
	display: none;
}

.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .nowframe-mega__all {
	border-bottom: 0 !important;
}

.nowframe-header .wp-block-navigation__responsive-container:not(.is-menu-open) .nowframe-mega__all .wp-block-navigation-item__content {
	margin-top: var(--wp--preset--spacing--20);
	font-weight: 600;
}

.nowframe-mega__cards {
	display: grid;
	flex: 1;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--30);
	align-content: start;
}

.nowframe-mega__card {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border-radius: var(--nowframe-box-radius);
	background: var(--wp--preset--color--base-alt);
	color: #fff;
	text-decoration: none;
}

.nowframe-mega__card-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms ease;
}

.nowframe-mega__card:hover .nowframe-mega__card-img {
	transform: scale(1.05);
}

.nowframe-mega__card-text {
	position: absolute;
	inset: auto 0 0;
	display: flex;
	flex-direction: column;
	padding: 2rem 0.75rem 0.65rem;
	background: linear-gradient(transparent, rgb(0 0 0 / 0.7));
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.3;
}

.nowframe-mega__card-text b {
	font-size: var(--wp--preset--font-size--base);
}

.nowframe-mega__card-text span {
	opacity: 0.85;
}

/* In the menu button's menu: a plain list. */
.nowframe-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content :is(.nowframe-mega__cards, .nowframe-mega__all) {
	display: none;
}
