/* 🔴 BOLD MUST BE ABSOLUTE, NOT RELATIVE.
   The UA default for <strong>/<b> is `font-weight: bolder`, computed RELATIVE to
   the inherited weight. Legacy's body is 300 and its <strong> still renders 700,
   because Canvas pinned it. With only `bolder` inherited from 300, ours computed
   to 400 — visibly not bold. Measured via CDP getMatchedStylesForNode.

   Root weight stays at 300 to MATCH LEGACY (measured: body=300, p=300); the bold
   is pinned absolutely so the light body weight cannot flatten it. */
strong, b,
.wp-block-post-content strong,
.wp-block-post-content b,
.hw-sidebar strong,
.hw-sidebar b {
	font-weight: 700;
}

/* ---- LIST FORMATTING, measured against legacy ----------------------------
   Legacy: ul mb=15, li mb=0, nested ul mb=0, and nested bullets are `disc`
   (NOT the browser default `circle`). The block theme's defaults introduced
   4.5px between items, 18px under nested lists, and a different bullet glyph —
   which is why second-level bullets and line spacing read differently. */
.wp-block-post-content ul,
.wp-block-post-content ul ul,
.wp-block-post-content ul ul ul { list-style-type: disc; }

/*
Theme Name: HWTheme
Theme URI: https://www.healthways.com.au
Author: Healthways
Description: Block theme for Healthways Recreation & Aquatic Centres. Fully owned; no
             third-party framework heritage. Design tokens live in theme.json.
Version: 1.1.2
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: hwtheme
*/

:root {
	/* Height of the pinned nav bar. Measured at runtime by the inline script in
	   functions.php, because the menu wraps to a DIFFERENT number of rows per
	   site and per viewport width: Box Hill's wraps to 2 rows (88px), Ringwood's
	   to 3 (132px). A hardcoded offset parks the sticky sidebar UNDERNEATH the
	   nav on whichever site has more rows, hiding the contact details.
	   The value below is only a fallback for before the script runs. */
	--hw-nav-h: 88px;
	--hw-sticky-top: calc(var(--hw-nav-h) + 14px);
}

/* Heading spacing: legacy puts the gap BELOW a heading (mb=14/8, mt=0); the
   block theme defaulted to mt=24/mb=0, which reads as a gap in the wrong place
   and detaches a heading from the text it introduces. Measured on both stacks. */
.wp-block-post-content h1, .wp-block-post-content h2 { margin-top: 0; margin-bottom: 14px; line-height: 1.1; }
.wp-block-post-content h3, .wp-block-post-content h4,
.wp-block-post-content h5, .wp-block-post-content h6 { margin-top: 0; margin-bottom: 8px; }

/* 🔴 BOLD MUST BE ABSOLUTE, NOT RELATIVE.
   The UA default for <strong>/<b> is `font-weight: bolder`, which is computed
   RELATIVE to the inherited weight. theme.json set root weight to 300, so
   "bolder than 300" resolved to 400 — i.e. not bold at all. Every <strong> in
   the migrated content (38 in one post alone) rendered flat against legacy's
   700. Measured with CDP getMatchedStylesForNode, not guessed.
   Root weight is now 400, and bold is pinned to an absolute value so it can
   never be knocked out by an inherited weight again. */
strong, b,
.wp-block-post-content strong,
.wp-block-post-content b,
.hw-sidebar strong,
.hw-sidebar b {
	font-weight: 700;
}

/* ============================================================
   HWTheme — supplementary CSS
   Design tokens are in theme.json. This file holds only what
   theme.json cannot express: layout chrome, the boxed card,
   navigation behaviour and legacy-content compatibility.
   ============================================================ */

/* ---- DECISION 1: boxed layout ON by default -------------- */
.hw-boxed .wp-block-post-content,
.hw-card {
	background: var(--wp--preset--color--hw-white);
	padding: 0 35px 40px;
	border-radius: 5px;
}
/* blog1 landing overrides this via front-page.html (.hw-unboxed) */
.hw-unboxed .hw-card { background: transparent; padding: 0; border-radius: 0; }

/* ---- 960px wrapper -------------------------------------- */
.hw-wrap { width: 960px; max-width: 100%; margin: 0 auto; }

/* ---- DECISION 2: navigation, weight 300 ----------------- */
.hw-nav {
	background: var(--wp--preset--color--hw-teal-pale);
}
.hw-nav a,
.hw-nav .wp-block-navigation-item__content {
	font: 300 14px/1 Arial, sans-serif;
	color: var(--wp--preset--color--hw-teal-dark);
	padding: 14px;
	text-decoration: none;
}
.hw-nav a:hover,
.hw-nav .current-menu-item > a {
	background: var(--wp--preset--color--hw-teal-accent);
}

/* ---- DECISION 3: breadcrumbs (off on front-page) -------- */
.hw-breadcrumb { font-size: 14px; color: var(--wp--preset--color--hw-teal-dark); padding: 20px 0 6px; margin: 0; }
.hw-unboxed .hw-breadcrumb { display: none; }

/* ---- Canvas column split: 577px main / 284px sidebar -----
   The card has 35px padding each side, so the inner width is
   960 - 70 = 890px. Canvas rendered 577 + 284 + ~29px gap.
   flex-basis alone lets columns shrink; pin width explicitly. */
.hw-cols { gap: 29px; align-items: flex-start; }
.hw-cols > .wp-block-column:first-child {
	flex: 0 0 577px; width: 577px; max-width: 577px; min-width: 0;
}
.hw-cols > .wp-block-column:last-child  {
	flex: 0 0 284px; width: 284px; max-width: 284px; min-width: 0;
}
.hw-cols.hw-sidebar-left > .wp-block-column:first-child { order: 2; }
.hw-cols.hw-sidebar-left > .wp-block-column:last-child  { order: 1; }

/* ---- sidebar -------------------------------------------- */
.hw-sidebar hr { border: 0; border-top: 1px solid var(--wp--preset--color--hw-rule); margin: 14px 0; }
.hw-sidebar img { display: block; width: 100%; height: auto; margin: 0 0 14px; }
.hw-sidebar li { margin: 0 0 8px; font-size: 13px; }

/* ---- legacy content compatibility ----------------------- */
/* wp-table-reloaded output (48 uses / 25 pages) */
.wp-block-post-content table { width: 100%; border-collapse: collapse; }
.wp-block-post-content table td { padding: 12px 8px; border-bottom: 1px solid var(--wp--preset--color--hw-rule); vertical-align: top; }

/* Conversion wrapped inline images in <figure>, which broke float-based
   2x2 button grids on 63 pages. Restore side-by-side flow. */
.wp-block-post-content .alignleft  { float: left;  margin: 0 1em 1em 0; }
.wp-block-post-content .alignright { float: right; margin: 0 0 1em 1em; }
.wp-block-post-content figure.wp-block-image.alignleft,
.wp-block-post-content figure.wp-block-image.alignright { display: inline-block; }

/* 🔴 CONVERSION SIDE-EFFECT: rawHandler wrapped inline images in <figure>.
   A <figure> is display:block, so an image that used to float out of the text
   now takes a whole line and pushes the words below it — measured on the
   "Why swim with Healthways?" heading, where legacy flows text beside a
   float:right image and ours left a block of white space.
   The wrapper has NO wp-block-image class when it sits inside a heading, so it
   must be matched by the float class on either the figure or the img it holds. */
.wp-block-post-content figure:has(> img.alignright),
.wp-block-post-content figure.alignright {
	float: right; margin: 0 0 1em 1em; display: inline;
}
.wp-block-post-content figure:has(> img.alignleft),
.wp-block-post-content figure.alignleft {
	float: left; margin: 0 1em 1em 0; display: inline;
}
/* the img inside such a figure must not float again */
.wp-block-post-content figure > img.alignright,
.wp-block-post-content figure > img.alignleft { float: none; margin: 0; }
/* A heading containing a floated figure must NOT establish a block formatting
   context or clear the float — otherwise the float is trapped and the following
   heading is pushed below the whole image. Measured: legacy leaves 14px between
   "Why swim with Healthways?" and "Industry awards and recognition:"; ours left
   173px because the second heading cleared the float. */
.wp-block-post-content h1:has(figure),
.wp-block-post-content h2:has(figure),
.wp-block-post-content h3:has(figure),
.wp-block-post-content h4:has(figure) {
	overflow: visible;
	display: block;
	clear: none;
}
/* headings after a floated image flow beside it, as in legacy */
.wp-block-post-content h1, .wp-block-post-content h2,
.wp-block-post-content h3, .wp-block-post-content h4,
.wp-block-post-content h5, .wp-block-post-content h6 { clear: none; }

/* ---- Canvas [button] shortcode replacement -------------- */
.hw-button {
	display: inline-block;
	background: var(--wp--preset--color--hw-teal);
	color: var(--wp--preset--color--hw-white) !important;
	padding: 7px 14px;
	border-radius: 3px;
	font: 700 13px/1.4 Arial, sans-serif;
	text-transform: uppercase;
	text-decoration: none;
	margin: 0 0 10px;
}
.hw-button:hover { background: var(--wp--preset--color--hw-teal-dark); }

/* ---- footer --------------------------------------------- */
.hw-footer {
	border-top: 1px solid rgba(255,255,255,.3);
	margin-top: 30px; padding: 16px 0; font-size: 12px;
	color: rgba(255,255,255,.85);
}
.hw-footer a { color: rgba(255,255,255,.85) !important; }

/* ---- front page ------------------------------------------ */
/* Base-site splash: no card, no breadcrumb, no news loop. */
.hw-unboxed .hw-card { background: transparent; padding: 0; border-radius: 0; }
.hw-unboxed .hw-breadcrumb,
.hw-unboxed .hw-front-news { display: none; }
/* Centre front pages keep the card and show the news loop. */
.hw-front-news .wp-block-post-featured-image img { max-width: 100%; height: auto; }
.hw-front-news > .wp-block-post-template > li { margin-bottom: 2.5em; }

/* ---- CTA rails (synced patterns) ------------------------- */
.hw-cta-rail { margin: 1.5em 0; }
.hw-cta-rail figure { margin: 0 0 10px; }
.hw-cta-rail img { max-width: 100%; height: auto; display: block; }
.hw-cta-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}
.hw-cta-grid figure { margin: 0; }
@media (max-width: 600px) { .hw-cta-grid { grid-template-columns: 1fr; } }

/* ---- responsive ------------------------------------------ */
@media (max-width: 980px) {
	.hw-wrap { width: 100%; padding: 0 12px; }

	/* Core ships `.wp-block-columns.is-layout-flex{display:flex}` — TWO classes,
	   specificity 0-2-0. A bare `.hw-cols{display:block}` (0-1-0) loses to it, so
	   the columns stayed side by side at every width: 354px + 284px crammed into a
	   390px phone. Match core's specificity and force the stack. Verified by
	   measuring getComputedStyle at 390/768/1366/1920, not by reading the CSS. */
	.hw-cols.wp-block-columns.is-layout-flex,
	.hw-cols.wp-block-columns {
		display: block !important;
	}
	.hw-cols > .wp-block-column,
	.hw-cols.is-layout-flex > .wp-block-column {
		flex-basis: auto !important;
		width: 100% !important;   /* core writes an inline/derived px width */
		max-width: 100% !important;
		margin-bottom: 2em;
	}
	.hw-cols > .wp-block-column:last-child { margin-bottom: 0; }

	.hw-card { padding: 0 18px 24px; }
	.hw-logo img { width: 100% !important; max-width: 600px; }
}
@media (max-width: 600px) {
	.hw-nav a, .hw-nav .wp-block-navigation-item__content { padding: 10px; font-size: 13px; }
	.hw-footer { display: block; text-align: center; }
	.wp-block-post-content .alignleft,
	.wp-block-post-content .alignright { float: none; margin: 0 0 1em; }
}

/* ============================================================
   PHASE G — pixel tuning against baseline/prod
   Conversion wrapped every inline image in <figure>, which
   introduced block margins and killed float-based grids.
   ============================================================ */

/* 1. Kill the stacked vertical gaps between converted images. */
.wp-block-post-content figure.wp-block-image { margin: 0 0 1em; }
.wp-block-post-content figure.wp-block-image:has(+ figure.wp-block-image) { margin-bottom: .5em; }
/* Hide genuinely empty paragraphs left by the block conversion — but NOT
   paragraphs that merely contain a <br> alongside real text (addresses). */
.wp-block-post-content p:empty { display: none; }
.hw-loc-address, .hw-loc-phone, .hw-loc-heading { display: block !important; }

/* 2. Restore side-by-side image rows.
      Canvas floated inline images; blocks stack them full width.
      Measured on prod: content column 578px, paired images 278px each. */
.wp-block-post-content figure.wp-block-image.alignleft,
.wp-block-post-content figure.wp-block-image.alignright {
	display: inline-block;
	vertical-align: top;
	max-width: 100%;
}
/* Consecutive alignnone images sat two-up in Canvas at ~278px. */
.wp-block-post-content figure.wp-block-image.alignnone:not(.size-full):not(.aligncenter) {
	display: inline-block;
	vertical-align: top;
	margin: 0 12px 12px 0;
	max-width: 278px;
}
.wp-block-post-content figure.wp-block-image.alignnone:not(.size-full) img { width: auto; max-width: 100%; }
.wp-block-post-content figure.wp-block-image.alignleft  { float: left;  margin: 0 1em 1em 0; }
.wp-block-post-content figure.wp-block-image.alignright { float: right; margin: 0 0 1em 1em; }
.wp-block-post-content figure.wp-block-image.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* Headings must NOT clear floats — legacy flows them beside a float:right image.
   `clear: both` here pushed "Industry awards and recognition:" below the whole
   image, leaving 173px of white space where legacy has 14px. Measured on
   /ringwood/2025/10/06/come-swim-at-healthways/. Only the LAST heading before a
   new full-width section should clear, which the content itself controls. */
.wp-block-post-content h1,
.wp-block-post-content h2,
.wp-block-post-content h3 { clear: none; }

/* 3. Images must fill their column, not sit at intrinsic size. */
.wp-block-post-content img { max-width: 100%; height: auto; }
.wp-block-post-content figure.size-full img { width: auto; max-width: 100%; }
.wp-block-post-content figure.aligncenter img { width: auto; max-width: 100%; }

/* ============================================================
   DESKTOP NAV SEARCH
   A flex sibling of the menu INSIDE .hw-nav — not positioned over it. The nav's
   last row has 488px free on Box Hill and 620px on Ringwood (measured), so the
   search sits at the end of the row without forcing another wrap.
   Canvas had `woo_nav_search = false`: this is a deliberate ADDITION.
   ============================================================ */
.hw-navsearch { display: none; }
@media (min-width: 601px) {
	.hw-navsearch {
		display: flex; align-items: center;
		margin-left: auto;              /* push to the end of the flex row */
		position: relative;             /* anchor for the results dropdown */
		/* Sit on the LAST existing row rather than creating one. The nav wraps,
		   so a plain flex child claims a new line; pinning it to the bottom-right
		   of the wrapped row keeps the nav at its measured height (Box Hill 88px,
		   Ringwood 132px) instead of growing to 146/190. */
		position: absolute; right: 6px; bottom: 4px;
		z-index: 40;
	}
	/* the search is a child of .hw-nav, so anchor against it */
	.hw-nav { position: relative; }
	.hw-navsearch form { position: relative; margin: 0; display: flex; align-items: center; }
	.hw-navsearch input[type="search"] {
		width: 0; opacity: 0; padding: 0; border: 0; min-width: 0;
		box-sizing: border-box; font-size: 14px;
		background: #fff; color: var(--wp--preset--color--hw-teal-dark, #184e52);
		border-radius: 3px;
		transition: width .22s ease, opacity .18s ease, padding .22s ease;
	}
	.hw-navsearch.is-open input[type="search"] {
		width: 240px; opacity: 1;
		padding: 6px 10px; border: 1px solid rgba(24,78,82,.28);
	}
	.hw-navsearch-btn {
		width: 34px; height: 34px; flex: 0 0 34px;
		border: 0; background: transparent; cursor: pointer; padding: 0;
		color: var(--wp--preset--color--hw-teal-dark, #184e52);
		display: flex; align-items: center; justify-content: center;
	}
	.hw-navsearch-btn svg { width: 17px; height: 17px; fill: currentColor; }
	.hw-navsearch-btn:hover { color: var(--wp--preset--color--hw-link, #29558d); }

	.hw-navsearch .hw-nav-hits { display: none; }
	.hw-navsearch.hw-filtering .hw-nav-hits {
		display: block; position: absolute; top: calc(100% + 8px); right: 0;
		width: 320px; z-index: 60; background: #fff;
		border: 1px solid rgba(24,78,82,.18); border-radius: 3px; overflow: hidden;
	}
}

/* ============================================================
   MOBILE NAV — off-canvas drawer + persistent search
   The nav carries 61 items across 3 levels. Core's overlay renders every
   submenu expanded (2683px of scroll on a 412x915 device) on a white ground.
   Replaced with a right-hand drawer: submenus collapsed behind disclosure
   toggles, site palette, and SEARCH LIFTED OUT into the nav bar itself so it
   is reachable without opening the menu (Bstew, 2026-08-30).
   Slide from the right = thumb-friendly on a phone.
   ============================================================ */

/* --- the bar: search + burger, side by side --- */
/* !important: the bar is injected as a plain <div>, and core's layout rules for
   children of the header group set `display:block` at higher specificity. */
.hw-mobilebar { display: none !important; }
@media (max-width: 600px) {
	.hw-mobilebar {
		display: flex !important; align-items: center; gap: 8px;
		padding: 8px 12px;
		background: var(--wp--preset--color--hw-nav-bg, #e9f3f3);
		border-top: 1px solid rgba(24,78,82,.10);
	}
	.hw-mobilebar form { flex: 1 1 auto; margin: 0; position: relative; }
	.hw-mobilebar input[type="search"] {
		width: 100%; box-sizing: border-box;
		padding: 10px 12px; font-size: 16px;      /* 16px = no iOS zoom on focus */
		border: 1px solid rgba(24,78,82,.22); border-radius: 3px;
		background: #fff; color: var(--wp--preset--color--hw-teal-dark, #184e52);
	}
	/* core's own burger is replaced by ours, inside the bar */
	.wp-block-navigation__responsive-container-open { display: none !important; }
	.hw-burger {
		flex: 0 0 auto; width: 44px; height: 44px;   /* 44px = min touch target */
		border: 1px solid rgba(24,78,82,.22); border-radius: 3px;
		background: #fff; cursor: pointer; padding: 0;
		display: flex; flex-direction: column; justify-content: center;
		align-items: center; gap: 4px;
	}
	.hw-burger span {
		display: block; width: 20px; height: 2px; border-radius: 2px;
		background: var(--wp--preset--color--hw-teal-dark, #184e52);
		transition: transform .22s ease, opacity .18s ease;
	}
	.hw-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
	.hw-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
	.hw-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* --- scrim behind the drawer --- */
.hw-scrim {
	position: fixed; inset: 0; z-index: 998;
	background: rgba(10,40,42,.45);
	opacity: 0; visibility: hidden;
	transition: opacity .24s ease, visibility .24s ease;
}
body.hw-drawer-open .hw-scrim { opacity: 1; visibility: visible; }

/* --- the drawer itself --- */
.hw-drawer {
	position: fixed; top: 0; left: 0; bottom: 0; z-index: 999;
	width: min(86vw, 360px);
	background: var(--wp--preset--color--hw-nav-bg, #e9f3f3);
	/* No drop shadow — Bstew, 2026-08-30: it distracts from the content behind.
	   A single hairline edge separates the drawer without casting over the page. */
	border-right: 1px solid rgba(24,78,82,.18);
	transform: translateX(-100%);
	transition: transform .26s cubic-bezier(.22,.61,.36,1);
	display: flex; flex-direction: column;
	overscroll-behavior: contain;
}
body.hw-drawer-open .hw-drawer { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
	.hw-drawer, .hw-scrim { transition: none; }
}
.hw-drawer-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 14px 16px; border-bottom: 1px solid rgba(24,78,82,.14);
	flex: 0 0 auto;
}
.hw-drawer-title {
	font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
	color: var(--wp--preset--color--hw-meta, #7a8f91);
}
.hw-drawer-close {
	width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer;
	font-size: 26px; line-height: 1; color: var(--wp--preset--color--hw-teal-dark, #184e52);
}
.hw-drawer-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 0 32px; }

/* --- menu rows inside the drawer --- */
.hw-drawer .hw-mrow {
	display: flex; align-items: stretch;
	border-bottom: 1px solid rgba(24,78,82,.10);
}
.hw-drawer .hw-mrow > a {
	flex: 1 1 auto; padding: 14px 16px; font-size: 16px; text-decoration: none;
	color: var(--wp--preset--color--hw-teal-dark, #184e52);
}
.hw-drawer .hw-mrow > a:hover { background: var(--wp--preset--color--hw-nav-active, #d4e7e8); }
.hw-drawer .hw-mtoggle {
	flex: 0 0 48px; border: 0; border-left: 1px solid rgba(24,78,82,.10);
	background: transparent; cursor: pointer; position: relative;
	color: var(--wp--preset--color--hw-teal-dark, #184e52);
}
.hw-drawer .hw-mtoggle::after {
	content: ""; position: absolute; top: 50%; left: 50%;
	width: 9px; height: 9px; margin: -6px 0 0 -5px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(45deg); transition: transform .18s ease;
}
.hw-drawer li.hw-open > .hw-mrow .hw-mtoggle::after { transform: rotate(-135deg); margin-top: -2px; }
.hw-drawer ul { list-style: none; margin: 0; padding: 0; }
.hw-drawer li > ul {
	display: none; background: rgba(255,255,255,.5);
	border-left: 3px solid rgba(24,78,82,.16); margin-left: 16px;
}
.hw-drawer li.hw-open > ul { display: block; }
.hw-drawer li > ul .hw-mrow > a { padding-left: 16px; font-size: 15px; }
.hw-drawer li > ul ul .hw-mrow > a { font-size: 14px; }

/* --- live menu filter results --- */
.hw-nav-hits { display: none; }
.hw-filtering .hw-nav-hits {
	display: block; position: absolute; left: 0; right: 0; top: calc(100% + 6px);
	z-index: 1001; background: #fff;
	border: 1px solid rgba(24,78,82,.18); border-radius: 3px;
	overflow: hidden;
}
.hw-nav-hit {
	display: block; padding: 12px; font-size: 15px; text-decoration: none;
	color: var(--wp--preset--color--hw-teal-dark, #184e52);
	border-bottom: 1px solid rgba(24,78,82,.08);
}
.hw-nav-hit:last-child { border-bottom: 0; }
.hw-nav-hit:hover, .hw-nav-hit:focus { background: var(--wp--preset--color--hw-nav-active, #d4e7e8); }
.hw-nav-nohit { display: block; padding: 12px; font-size: 14px; color: #777; }
/* tier label: "Did you mean…" / "From site content" / "Searching the site…" */
.hw-nav-note {
	display: block; padding: 8px 12px;
	font-size: 12px; letter-spacing: .05em; text-transform: uppercase;
	color: var(--wp--preset--color--hw-meta, #7a8f91);
	background: rgba(24,78,82,.05);
	border-bottom: 1px solid rgba(24,78,82,.10);
}

/* hide the core overlay entirely — the drawer replaces it */
@media (max-width: 600px) {
	.wp-block-navigation__responsive-container { display: none !important; }
}

/* ---- EMBEDS (YouTube etc.) -------------------------------------------------
   Legacy wraps each iframe in a <p>, which carries margin-bottom: 18px, so text
   never sits flush under a video. The block editor emits <figure.wp-block-embed>
   with NO bottom margin, so the following heading or paragraph butted straight
   against the player. Measured on both stacks: legacy 18px, ours 0px. */
.wp-block-post-content .wp-block-embed,
.wp-block-post-content figure.wp-block-embed {
	/* 25px, not 18: legacy wraps the iframe in a <p> whose 18px margin sits below
	   the line box, giving 25px of VISUAL space. Measured on screen, both stacks. */
	margin: 0 0 25px;
}
.wp-block-post-content .wp-block-embed__wrapper { margin: 0; }
/* an embed that follows text needs breathing room above it too */
.wp-block-post-content p + .wp-block-embed,
.wp-block-post-content h1 + .wp-block-embed,
.wp-block-post-content h2 + .wp-block-embed,
.wp-block-post-content h3 + .wp-block-embed,
.wp-block-post-content h4 + .wp-block-embed { margin-top: 6px; }

/* 4. Paragraph and list rhythm — MEASURED from legacy, not estimated.
   Legacy computed values: ul margin-bottom 15px, li margin-bottom 0.
   The earlier 1.2em/.3em were guesses and added visible space between every
   list item, which is what made the awards list read differently. */
.wp-block-post-content p { margin: 0 0 1.2em; }
.wp-block-post-content ul,
.wp-block-post-content ol { margin: 0 0 15px; padding-left: 30px; }
.wp-block-post-content li { margin: 0 0 0; }
/* nested lists sit flush inside their parent item */
.wp-block-post-content ul ul,
.wp-block-post-content ul ol,
.wp-block-post-content ol ul,
.wp-block-post-content ol ol { margin: 0; }

/* ---- FIX: remove double padding on post content ----------
   theme.json's root padding was cascading onto .wp-block-post-content,
   which sits INSIDE the already-padded .hw-card. Net effect was
   577 - 70 = 507px usable, so every image rendered ~13% too small
   and pages ran ~23% taller than Canvas. */
.wp-block-post-content,
.entry-content.wp-block-post-content {
	padding-left: 0 !important;
	padding-right: 0 !important;
	max-width: none;
}
.hw-wrap { padding-left: 0; padding-right: 0; }
.hw-cols > .wp-block-column { padding: 0; }

/* ---- FIX: consecutive images must flow side-by-side -------
   Classic->blocks conversion dropped alignment classes, leaving bare
   `wp-block-image is-resized` figures that stack full-width. Canvas
   floated these, fitting 2 per row at ~278px. Restore inline flow so
   sized images sit together instead of one per line. */
.wp-block-post-content figure.wp-block-image.is-resized {
	display: inline-block;
	vertical-align: top;
	margin: 0 12px 12px 0;
	width: auto;
	max-width: 100%;
}
.wp-block-post-content figure.wp-block-image.is-resized img {
	width: auto;
	max-width: 100%;
	height: auto;
}
/* A resized image that is genuinely full width keeps its own line. */
.wp-block-post-content figure.wp-block-image.is-resized img[width="577"],
.wp-block-post-content figure.wp-block-image.aligncenter { display: block; }

/* ============================================================
   PHASE G — chrome corrections measured against prod
   prod: logo 890x137 top 40 | nav h=90 | card top 349
         white background is on #wrapper, so the FOOTER sits
         INSIDE the white area, not on the teal.
   ============================================================ */

/* There are THREE .hw-wrap elements (header part, body, footer part).
   Painting each white produces three panels with teal gaps between, and
   a white-on-white logo. Paint ONE continuous panel on the page container
   instead, and keep the wraps transparent. */
.hw-wrap { background: transparent; }

/* The logo is a WHITE png and must sit on the TEAL, above the panel.
   So the white starts at the nav bar and runs to the footer — exactly
   as Canvas did (#wrapper white, logo outside it). */
body.hw-boxed .wp-site-blocks { background: transparent; }

/* The footer is a SIBLING <footer> element, so a background on .hw-wrap
   cannot contain it. Paint one continuous 960px white column behind the
   whole page instead, and punch the header back out to teal so the white
   logo stays visible. */
body.hw-boxed .wp-site-blocks {
	position: relative;
}
body.hw-boxed .wp-site-blocks::before {
	content: "";
	position: absolute;
	left: 50%; transform: translateX(-50%);
	width: 960px; max-width: 100%;
	top: 217px;               /* nav bar starts here, as on prod */
	bottom: 0;
	background: var(--wp--preset--color--hw-white);
	border-radius: 5px;
	z-index: 0;
}
body.hw-boxed .wp-site-blocks > * { position: relative; z-index: 1; }
body.hw-boxed .hw-nav { background: var(--wp--preset--color--hw-teal-pale); border-radius: 5px 5px 0 0; }
.hw-card { background: transparent; border-radius: 0; }

/* Logo: 890px wide with 40px breathing room above, like prod. */
.hw-logo { margin: 0; padding-top: 40px; }
.hw-logo img { width: 890px; max-width: 100%; height: auto; }

/* Nav: prod is 90px tall; ours ran to 108. */
.hw-nav { line-height: 1; }
.hw-nav a,
.hw-nav .wp-block-navigation-item__content { padding: 15px 14px; }
.hw-nav .wp-block-navigation { gap: 0; row-gap: 0; }
.hw-nav .wp-block-navigation__container { gap: 0; }

/* Footer sits INSIDE the white panel and is 85px tall on prod. */

/* The footer template part is full-bleed; constrain it to the 960px
   column so the copyright sits INSIDE the white panel, not on the teal. */
footer.wp-block-template-part { width: 960px; max-width: 100%; margin: 0 auto; }
.hw-footer {
	border-top: 1px solid var(--wp--preset--color--hw-rule);
	margin: 0 35px;
	padding: 30px 0;
	min-height: 85px;
	box-sizing: border-box;
	align-items: center;
	color: var(--wp--preset--color--hw-body-text);
}
.hw-footer a { color: var(--wp--preset--color--hw-teal-mid) !important; }

/* The base-site splash stays unboxed on teal. */
.hw-unboxed .hw-wrap { background: transparent; }
.hw-unboxed .hw-footer { border-top-color: rgba(255,255,255,.3); color: rgba(255,255,255,.85); }
.hw-unboxed .hw-footer a { color: rgba(255,255,255,.85) !important; }

/* prod: card top 349 (nav ends 307, +42px gap). Match that offset. */
.hw-card { padding-top: 43px; }
.hw-breadcrumb { padding: 0 0 6px; }

/* ---- nav dropdowns: values MEASURED from Canvas ----------
   submenu  bg #d4e7e8, width 168px, padding 5.6px 0
   links    #184e52, padding 8.82px 12.6px, 12.6px/300
   arrow    solid triangle, spaced away from the label       */
.hw-nav .wp-block-navigation-submenu__toggle,
.hw-nav .wp-block-navigation__submenu-icon {
	padding: 0 0 0 8px;
	margin: 0;
	width: auto;
	color: inherit;
}
.hw-nav .wp-block-navigation__submenu-icon svg { width: 10px; height: 10px; }

.hw-nav .wp-block-navigation__submenu-container {
	background: #d4e7e8;
	border: 0;
	min-width: 168px;
	width: 168px;
	padding: 5.6px 0;
	box-shadow: none;
}
.hw-nav .wp-block-navigation__submenu-container li { border: 0; }
.hw-nav .wp-block-navigation__submenu-container a,
.hw-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	background: #d4e7e8;
	color: #184e52;
	padding: 8.82px 12.6px;
	font-size: 12.6px;
	font-weight: 300;
	line-height: 1.3;
}
.hw-nav .wp-block-navigation__submenu-container a:hover { background: #e9f3f3; }


/* archive listings: featured image sizing to match Canvas */
.wp-block-post-template .wp-block-post-featured-image { margin: 0 0 12px; }
.wp-block-post-template .wp-block-post-featured-image img { width: 100%; height: auto; }
.wp-block-post-template > li { margin: 0 0 2.5em; }

/* ---- FIX: submenu container is white + bordered by core -----
   Core paints .wp-block-navigation__submenu-container white with a
   0.15 black border. Canvas is flat #d4e7e8, no border. Override
   with the same specificity core uses. */
.hw-nav .wp-block-navigation .wp-block-navigation__submenu-container,
.wp-block-navigation .has-child .wp-block-navigation__submenu-container {
	background-color: #d4e7e8 !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #184e52 !important;
}
.hw-nav .wp-block-navigation__submenu-container a,
.hw-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 8.82px 12.6px !important;
	background: transparent !important;
}

/* ---- FIX: footer overflowing the white panel ---------------
   The footer group is a flex row; its children were spilling past
   the 960px column. Constrain and box it properly. */
footer.wp-block-template-part {
	width: 960px;
	max-width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
	overflow: hidden;
}
.hw-footer {
	width: auto;
	max-width: none;
	margin: 0 35px;
	box-sizing: border-box;
}
.hw-footer > * { margin: 0; }

/* ---- FIX: caret must sit tight against its label -----------
   The link carries 14px right padding, so the arrow rendered ~22px
   away from the text. Move the padding onto the LIST ITEM instead,
   so label+caret stay together inside one padded box, as Canvas did. */
.hw-nav .wp-block-navigation-item.has-child {
	padding-right: 14px;
}
.hw-nav .wp-block-navigation-item.has-child > .wp-block-navigation-item__content,
.hw-nav .wp-block-navigation-item.has-child > a {
	padding-right: 0 !important;
}
.hw-nav .wp-block-navigation-item.has-child > .wp-block-navigation-submenu__toggle {
	padding: 0 0 0 5px !important;
	margin: 0 !important;
}
.hw-nav .wp-block-navigation__submenu-icon { margin: 0 !important; padding: 0 0 0 5px !important; }

/* ---- FIX: caret glyph + item separators --------------------
   Canvas draws a solid down-triangle and a faint divider between
   top-level items. The block's chevron SVG is replaced with a CSS
   triangle so the glyph matches. */
.hw-nav .wp-block-navigation__submenu-icon svg { display: none; }
.hw-nav .wp-block-navigation-item.has-child > .wp-block-navigation-submenu__toggle::after,
.hw-nav .wp-block-navigation__submenu-icon::after {
	content: "";
	display: inline-block;
	width: 0; height: 0;
	margin-left: 5px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	border-bottom: 0;
	vertical-align: middle;
}
/* Canvas does NOT flip the caret when the submenu opens — measured on
   prod, a::after is identical in both states. Keep ▼ always. */
.hw-nav .wp-block-navigation-item.has-child[aria-expanded="true"] > .wp-block-navigation-submenu__toggle::after,
.hw-nav .wp-block-navigation-submenu__toggle[aria-expanded="true"]::after,
.hw-nav button.wp-block-navigation__submenu-icon[aria-expanded="true"]::after {
	border-top: 5px solid currentColor !important;
	border-bottom: 0 !important;
}

/* faint separators between top-level items */
.hw-nav > .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item,
.hw-nav .wp-block-navigation__container > .wp-block-navigation-item {
	border-right: 1px solid rgba(24, 78, 82, .08);
}
.hw-nav .wp-block-navigation__container > .wp-block-navigation-item:last-child { border-right: 0; }
/* submenu items keep no separators */
.hw-nav .wp-block-navigation__submenu-container .wp-block-navigation-item { border-right: 0; }

/* ---- FIX: nested submenu arrows point RIGHT, not down ------
   A caret inside a submenu indicates a THIRD level opening to the
   side. Canvas draws ▶ there. My global ▼ rule was overriding it. */
.hw-nav .wp-block-navigation__submenu-container .wp-block-navigation-submenu__toggle::after,
.hw-nav .wp-block-navigation__submenu-container .wp-block-navigation__submenu-icon::after {
	border-left: 5px solid currentColor;
	border-right: 0;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	margin-left: 6px;
}
/* keep it pointing right even when open */
.hw-nav .wp-block-navigation__submenu-container .wp-block-navigation-submenu__toggle[aria-expanded="true"]::after {
	border-left: 5px solid currentColor;
	border-bottom: 4px solid transparent;
	border-top: 4px solid transparent;
}

/* submenu width: Canvas is 168px, ours rendered 200px */
.hw-nav .wp-block-navigation__submenu-container {
	width: 168px !important;
	min-width: 168px !important;
}
/* the parent tab stays highlighted while its submenu is open */
.hw-nav .wp-block-navigation-item.has-child:hover > .wp-block-navigation-item__content,
.hw-nav .wp-block-navigation-item.has-child:focus-within > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--hw-teal-accent);
}

/* ---- FIX: submenu was being painted OVER by page content ----
   `.wp-site-blocks > * { z-index: 1 }` (added for the white panel)
   put the header and the content in the SAME stacking layer, so
   later siblings won every overlap. The submenu was present and
   unclipped but painted underneath — items appeared to vanish.
   Raise the header above the content. */
body.hw-boxed header.wp-block-template-part,
header.wp-block-template-part { position: static; z-index: 100; }
.hw-nav { position: relative; z-index: 100; }
.hw-nav .wp-block-navigation__submenu-container { z-index: 101; }
.hw-nav .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container { z-index: 102; }

/* ---- FIX: parent caret rendered as an hourglass glyph -------
   Hiding the SVG left the button's own text content visible.  */
.hw-nav .wp-block-navigation-submenu__toggle { font-size: 0; line-height: 0; }
.hw-nav .wp-block-navigation-submenu__toggle::after,
.hw-nav .wp-block-navigation__submenu-icon::after { font-size: 0; }

/* ---- FIX: hide the block's chevron SVG properly ------------
   `.hw-nav .wp-block-navigation__submenu-icon svg { display:none }`
   did not win against core. Target the SVG wherever it sits inside
   any nav toggle, at higher specificity. */
.hw-nav button.wp-block-navigation__submenu-icon > svg,
.hw-nav button.wp-block-navigation-submenu__toggle > svg,
.hw-nav .wp-block-navigation-submenu__toggle svg,
.hw-nav .wp-block-navigation__submenu-icon svg {
	display: none !important;
	width: 0 !important;
	height: 0 !important;
}
/* the button itself must still occupy space for the CSS triangle */
.hw-nav button.wp-block-navigation__submenu-icon,
.hw-nav button.wp-block-navigation-submenu__toggle {
	background: transparent;
	border: 0;
	display: inline-flex;
	align-items: center;
	min-width: 0;
	color: var(--wp--preset--color--hw-teal-dark);
}

/* ---- FIX: nested (3rd level) arrows point RIGHT ------------ */
.hw-nav .wp-block-navigation__submenu-container button.wp-block-navigation__submenu-icon::after,
.hw-nav .wp-block-navigation__submenu-container button.wp-block-navigation-submenu__toggle::after,
.hw-nav .wp-block-navigation__submenu-container .wp-block-navigation__submenu-icon::after {
	border-left: 5px solid currentColor !important;
	border-right: 0 !important;
	border-top: 4px solid transparent !important;
	border-bottom: 4px solid transparent !important;
}
/* nested toggle sits at the right edge of the submenu row */
.hw-nav .wp-block-navigation__submenu-container .wp-block-navigation-item.has-child {
	position: relative;
}
.hw-nav .wp-block-navigation__submenu-container button.wp-block-navigation__submenu-icon {
	position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
}

/* ---- FIX: hover/active highlight must cover the WHOLE item --
   The caret lives in a separate <button>, so highlighting only the
   <a> left the chevron on a different background — it read as two
   controls. Move the highlight to the LIST ITEM so label + caret
   feel like one button, as Canvas did. */
.hw-nav .wp-block-navigation-item { transition: background-color .1s; }
.hw-nav .wp-block-navigation__container > .wp-block-navigation-item:hover,
.hw-nav .wp-block-navigation__container > .wp-block-navigation-item:focus-within,
.hw-nav .wp-block-navigation__container > .wp-block-navigation-item.current-menu-item,
.hw-nav .wp-block-navigation__container > .wp-block-navigation-item.current-menu-ancestor {
	background: var(--wp--preset--color--hw-teal-accent);
}
/* WordPress marks a CUSTOM "Home" link as current whenever the URL prefix
   matches, so it highlighted on EVERY page. Canvas highlights it only on the
   actual front page. `body.hw-front-page` is added by functions.php, so the
   custom-link highlight is suppressed everywhere except there. */
body:not(.hw-front-page) .hw-nav .wp-block-navigation__container
  > .wp-block-navigation-item.menu-item-object-custom:not(:hover):not(:focus-within),
body:not(.hw-front-page) .hw-nav .wp-block-navigation__container
  > .wp-block-navigation-item.menu-item-object-custom:not(:hover):not(:focus-within) > a,
body:not(.hw-front-page) .hw-nav .wp-block-navigation__container
  > .wp-block-navigation-item.menu-item-object-custom:not(:hover):not(:focus-within)
  > .wp-block-navigation-item__content {
	background: transparent !important;
}
/* children stay transparent so the item colour shows through */
.hw-nav .wp-block-navigation__container > .wp-block-navigation-item:hover
  > .wp-block-navigation-item__content,
.hw-nav .wp-block-navigation__container > .wp-block-navigation-item:hover > a,
.hw-nav .wp-block-navigation__container > .wp-block-navigation-item:hover
  > .wp-block-navigation-submenu__toggle,
.hw-nav .wp-block-navigation__container > .wp-block-navigation-item:focus-within
  > .wp-block-navigation-item__content,
.hw-nav .wp-block-navigation__container > .wp-block-navigation-item:focus-within
  > .wp-block-navigation-submenu__toggle {
	background: transparent !important;
}
/* same treatment inside submenus */
.hw-nav .wp-block-navigation__submenu-container .wp-block-navigation-item:hover {
	background: var(--wp--preset--color--hw-teal-pale);
}
.hw-nav .wp-block-navigation__submenu-container .wp-block-navigation-item:hover > a,
.hw-nav .wp-block-navigation__submenu-container .wp-block-navigation-item:hover
  > .wp-block-navigation-item__content { background: transparent !important; }

/* ---- FIX: top-level caret glyph (was rendering as hourglass) */
.hw-nav .wp-block-navigation__container > .wp-block-navigation-item
  > button.wp-block-navigation__submenu-icon > svg { display: none !important; }
/* text-indent pushed the ::after triangle off-screen too — use
   font-size:0 alone, which hides the text node but not a border-drawn
   pseudo-element. */
.hw-nav .wp-block-navigation__container > .wp-block-navigation-item
  > button.wp-block-navigation__submenu-icon {
	font-size: 0 !important;
	width: auto;
	padding: 0 0 0 5px !important;
	overflow: visible;
}

/* ============================================================
   POST LISTINGS — matched to Canvas magazine layout
   Featured (sticky) post: full width, image with caption over.
   Grid: 2 columns, 262x212 thumbnails, "Continue Reading".
   ============================================================ */

/* ---- featured / sticky post ---- */
.hw-featured { margin: 0 0 30px; position: relative; }
.hw-featured .wp-block-post-featured-image { margin: 0; }
.hw-featured .wp-block-post-featured-image img { width: 100%; height: auto; display: block; }
.hw-featured-caption {
	position: absolute; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,.55);
	padding: 16px 20px;
	color: #fff;
}
.hw-featured-caption h2,
.hw-featured-caption h2 a { color: #fff !important; font-size: 22px; margin: 0 0 6px; }
.hw-featured-caption p { color: rgba(255,255,255,.9); font-size: 13px; margin: 0; }

/* ---- 2-column post grid (Canvas .block / .block last) ---- */
.hw-postgrid .wp-block-post-template {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr);
	gap: 0 25px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.hw-postgrid .wp-block-post-template > li { margin: 0 0 34px; }

/* thumbnails: prod renders 262x212 */
.hw-postgrid .wp-block-post-featured-image { margin: 0 0 12px; }
/* Prod scales the whole image to 262px wide and lets the height follow — it
   does NOT crop. The block writes `object-fit:cover` INLINE on the <img>, so
   it must be overridden with !important. */
.hw-postgrid .wp-block-post-featured-image img {
	width: 262px !important;
	max-width: 100%;
	height: auto !important;
	object-fit: fill !important;
	display: block;
}
.hw-postgrid .wp-block-post-featured-image {
	height: auto !important;
	min-height: 0;
}
/* grid rows must size to their own content, not the tallest sibling */
.hw-postgrid .wp-block-post-template { grid-auto-rows: min-content; align-items: start; }
.hw-postgrid .wp-block-post-template > li { align-self: start; }

/* titles */
.hw-postgrid .wp-block-post-title { font-size: 18px; line-height: 1.3; margin: 0 0 8px; }
.hw-postgrid .wp-block-post-title a { color: var(--wp--preset--color--hw-teal-dark); }

/* meta line: "by X on DATE in CATEGORY" */
.hw-postmeta { margin: 0 0 10px; font-size: 12px; color: var(--wp--preset--color--hw-meta); }
/* Post meta line — measured from legacy: 12px/18px, #999, and 21.6px of space
   before the content below it. The block editor's flex group defaults to a 24px
   gap and no bottom margin, which ran the video hard up against this line. */
.hw-meta-line {
	margin: 0 0 21.6px !important;
	font-size: 12px !important;
	line-height: 18px !important;
	color: #999999;
	gap: 0 4px !important;          /* words flow, not columns */
}
.hw-meta-line, .hw-meta-line * { font-size: 12px !important; line-height: 18px !important; }
.hw-meta-line .wp-block-post-author-name,
.hw-meta-line .wp-block-post-date,
.hw-meta-line .wp-block-post-terms { color: #999999; margin: 0; }
.hw-meta-line a { color: var(--wp--preset--color--hw-meta); }
.hw-meta-line strong { color: var(--wp--preset--color--hw-body-text); font-weight: 700; }

/* excerpt + Continue Reading */
.hw-postgrid .wp-block-post-excerpt { margin: 0; font-size: 13px; line-height: 1.6; }
.hw-postgrid .wp-block-post-excerpt__more-text { margin: 8px 0 0; }
.hw-postgrid .wp-block-post-excerpt__more-link,
.hw-featured .wp-block-post-excerpt__more-link {
	color: var(--wp--preset--color--hw-teal-mid);
	font-size: 13px;
	text-decoration: none;
}

/* content sits ~40px below the nav, as on prod */
.hw-card { padding-top: 40px; }

@media (max-width: 780px) {
	.hw-postgrid .wp-block-post-template { grid-template-columns: 1fr; }
	.hw-postgrid .wp-block-post-featured-image img { width: 100%; height: auto; }
}

/* ============================================================
   GRAVITY FORMS
   The previous theme shipped its own form styling at
   canvas/includes/integrations/gravity-forms/css/gravity-forms.css.
   Gravity Forms itself styles almost nothing, so dropping Canvas
   left submit buttons as raw browser defaults. Ported here.
   ============================================================ */
.gform_wrapper { margin: 1.5em 0; }
.gform_wrapper .gform_title { font: 700 18.75px/28.125px Arial, sans-serif; color: var(--wp--preset--color--hw-teal-dark); margin: 0 0 .6em; }
.gform_wrapper .gform_description { display: block; margin: 0 0 1em; }

/* fields */
.gform_wrapper .gfield { margin: 0 0 16px; }
.gform_wrapper .gfield_label,
.gform_wrapper legend.gfield_label {
	display: block;
	font: 700 15px/1.4 Arial, sans-serif;
	color: var(--wp--preset--color--hw-body-text);
	margin: 0 0 4px;
}
.gform_wrapper .gfield_required { color: #c33; margin-left: 3px; }

.gform_wrapper input[type=text],
.gform_wrapper input[type=email],
.gform_wrapper input[type=tel],
.gform_wrapper input[type=url],
.gform_wrapper input[type=number],
.gform_wrapper input[type=password],
.gform_wrapper select,
.gform_wrapper textarea {
	font: 15px/1.4 Arial, sans-serif;
	color: var(--wp--preset--color--hw-body-text);
	padding: 5px 4px;
	border: 2px solid var(--wp--preset--color--hw-field-border);
	background: #fff;
	border-radius: 0;
	box-sizing: border-box;
	max-width: 100%;
}
.gform_wrapper textarea { padding: 6px; }
.gform_wrapper input:focus,
.gform_wrapper select:focus,
.gform_wrapper textarea:focus {
	border-color: var(--wp--preset--color--hw-teal-mid);
	outline: none;
}

/* sub-labels ("First", "Last", "Enter Email") */
.gform_wrapper .gform_fileupload_rules,
.gform_wrapper .gfield_description,
.gform_wrapper .ginput_complex label,
.gform_wrapper .instruction {
	font-size: 13px;
	color: var(--wp--preset--color--hw-meta);
	margin-top: 3px;
}

/* section breaks */
.gform_wrapper .gsection {
	border-bottom: 1px solid var(--wp--preset--color--hw-rule);
	padding: 0 0 8px;
	margin: 24px 0 16px;
}
.gform_wrapper .gsection_title { font: 700 16px/1.3 Arial, sans-serif; color: var(--wp--preset--color--hw-teal-dark); margin: 0; }

/* lists */
.gform_wrapper ul.gform_fields { list-style: none; margin: 0; padding: 0; }
.gform_wrapper ul li.gfield { list-style: none; }
.gform_wrapper .gfield_checkbox li,
.gform_wrapper .gfield_radio li { margin: 0 0 6px; font-size: 15px; }

/* submit button — Canvas styled this teal; the browser default was grey */
.gform_wrapper .gform_button,
.gform_wrapper input[type=submit],
.gform_wrapper button[type=submit] {
	background: var(--wp--preset--color--hw-teal) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 3px;
	padding: 8px 18px !important;
	font: 700 15px/1.4 Arial, sans-serif !important;
	text-transform: uppercase;
	cursor: pointer;
	width: auto;
}
.gform_wrapper .gform_button:hover,
.gform_wrapper input[type=submit]:hover { background: var(--wp--preset--color--hw-teal-dark) !important; }

/* validation */
.gform_wrapper .gfield_error input,
.gform_wrapper .gfield_error select,
.gform_wrapper .gfield_error textarea { border-color: #c33; }
.gform_wrapper .validation_message { color: #c33; font-size: 13px; margin-top: 4px; }
.gform_wrapper .gform_validation_errors { border: 1px solid #c33; background: #fff5f5; padding: 10px 14px; margin: 0 0 1em; }

/* confirmation */
.gform_confirmation_message { padding: 14px 18px; background: var(--wp--preset--color--hw-teal-pale); border-left: 4px solid var(--wp--preset--color--hw-teal); }

/* ============================================================
   TYPOGRAPHY — corrected against measured prod values
     prod  p       15px / 22.5px  "Helvetica Neue"  mb 18px  #555
     prod  h3   18.75px / 28.125px  Arial           mb 6px
     prod  h4      16px / 24px      Arial           mb 8px
   ============================================================ */

/* Body copy uses Helvetica Neue on prod, Arial here. Match the stack. */
.wp-block-post-content,
.wp-block-post-content p,
.wp-block-post-content li,
.hw-card p, .hw-card li {
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
/* Headings stay Arial, as on prod. */
.wp-block-post-content h1, .wp-block-post-content h2,
.wp-block-post-content h3, .wp-block-post-content h4,
.wp-block-post-content h5, .wp-block-post-content h6 {
	font-family: Arial, Helvetica, sans-serif;
}

/* h3 line-height was 22.5px; prod is 28.125px (1.5) */
.wp-block-post-content h3 { font-size: 18.75px; line-height: 28.125px; margin: 0 0 6px; }
/* h4 had no bottom margin; prod has 8px */
.wp-block-post-content h4 { font-size: 16px; line-height: 24px; margin: 0 0 8px; }
.wp-block-post-content h2 { font-size: 24px; line-height: 1.3; margin: 0 0 8px; }

/* ---- content starts level with the sidebar (prod: both at 349) ----
   Ours sat at 396 because the breadcrumb pushed the columns down. */
.hw-card { padding-top: 20px; }
.hw-breadcrumb { padding: 0 0 8px; margin: 0; line-height: 1.4; }
.hw-cols { margin-top: 0; }
.hw-cols > .wp-block-column > *:first-child { margin-top: 0; }
.wp-block-post-title { margin-top: 0; }

/* ---- content sits directly under the title, as on prod ----
   The block editor gives .entry-content a 24px top margin, pushing the
   body 66px below the H1. Prod has no separate title element at all. */
.hw-cols .wp-block-post-content,
.hw-cols .entry-content { margin-top: 0 !important; }
.hw-cols .wp-block-post-title { margin: 0 0 10px; line-height: 1.2; }
/* prod puts content at 349; the breadcrumb block was adding ~47px */
.hw-card { padding-top: 0; }
.hw-breadcrumb { padding: 20px 0 6px; }

/* h3 in body copy keeps prod's 1.5 line-height (28.125px on 18.75px) */
.wp-block-post-content h3:not(.gform_title) { line-height: 28.125px; }

/* ============================================================
   STICKY CHROME — enhancements beyond the original design
   Nav bar and sidebar follow the reader down the page.
   Pure CSS (position: sticky) — no JavaScript.
   ============================================================ */

/* --- sticky nav bar ---
   The header and its wrapper must NOT be positioned, or the nav becomes
   sticky only within that 305px block and scrolls away with it. */
/* A sticky element can only travel within its parent. <header> is only
   ~265px tall, so anything sticky inside it stops there. Make the HEADER
   itself sticky — its parent is .wp-site-blocks, which spans the page —
   and collapse the logo bar once the page scrolls so only the nav pins. */
header.wp-block-template-part {
	position: sticky !important;
	top: calc(-1 * var(--hw-logobar-h, 217px));  /* logo 137 + 40 top + 40 bottom */
	z-index: 100;
}
.hw-navbar { width: 960px; max-width: 100%; margin: 0 auto; }
.hw-nav { box-shadow: 0 1px 4px rgba(0,0,0,.10); }
/* teal behind the logo so it does not sit on white while pinned */
.hw-logobar { background: var(--wp--preset--color--hw-teal); }

/* --- sticky sidebar --- */
/* Sticky sidebar — must stay locked under the nav for the WHOLE page.
   `position: sticky` is bounded by its parent, and the columns row ends
   before the page does, so the sidebar was sliding away at the bottom.
   Making the COLUMNS ROW full-height gives the sticky child room to travel
   all the way down. */
.hw-cols { align-items: stretch; }
.hw-cols > .wp-block-column:last-child {
	position: sticky;
	top: var(--hw-sticky-top);          /* directly under the pinned nav, whatever its height */
	align-self: start;
	padding-right: 6px;
	/* 🔴 NO max-height / overflow HERE. A later rule sets this column to
	   overflow:visible !important but could not undo a max-height, so the
	   sidebar was CLIPPED at 662px on a 1080p screen with no way to scroll to
	   the rest — worse than the double scrollbar it was meant to fix.
	   The inner .wp-block-template-part is the only thing that ever scrolls,
	   and only on tall viewports. See the min-height:1200px block below. */
}
/* 🔴 The sidebar COLUMN never scrolls — it is overflow:visible !important
   below, so the whole page scrolls it. Scrollbar styling on the column was
   declared TWICE here with conflicting widths (7px then 6px) and styled a
   scrollbar that cannot exist. Removed: only the inner template-part scrolls,
   and only when there is room for that to be useful. See the sticky block. */

/* sidebar-left variant pins the other column */
.hw-cols.hw-sidebar-left > .wp-block-column:last-child { position: sticky; }

/* Disable on small screens — sticky columns are counterproductive when
   the layout has already collapsed to a single column. */
@media (max-width: 980px) {
	.hw-cols > .wp-block-column:last-child {
		position: static;
		max-height: none;
		overflow: visible;
	}
}
@media (max-width: 600px) {
	header.wp-block-template-part, .hw-nav { position: static; box-shadow: none; }
}

/* Respect users who prefer reduced motion / fixed layouts */
@media (prefers-reduced-motion: reduce) {
	header.wp-block-template-part, .hw-nav,
	.hw-cols > .wp-block-column:last-child { position: static; }
}

/* ---- FIX: nav bar must span the full 960px, flush with the panel ----
   The constrained layout was applying the card's 35px side padding to the
   nav, leaving it 890px wide with white bleeding past each end. */
.hw-navbar { padding-left: 0 !important; padding-right: 0 !important; }
.hw-navbar > .hw-nav {
	width: 960px;
	max-width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}
.hw-logobar { padding-left: 0 !important; padding-right: 0 !important; }

/* Sticky sidebar — the sidebar template part is wrapped in a
   DIV.wp-block-template-part inside the column, so THAT wrapper is what has
   to stick. The column itself must stay static and full height, otherwise
   sticky has nowhere to travel and the sidebar scrolls away. */
.hw-cols > .wp-block-column:last-child {
	align-self: stretch !important;
	display: block;              /* not flex: a flex parent stretches the sticky child */
	position: static !important;
	/* Sticky can only travel INSIDE this column. The column ends where the
	   content column ends, so on a page whose content is shorter than the
	   sidebar is tall the sticky box runs out of room and gets shunted up
	   behind the nav (measured: Box Hill stickyTop=-47 at the page bottom).
	   Guaranteeing the column is at least viewport-tall gives it room to rest. */
	min-height: 100vh;
	max-height: none !important;
	overflow: visible !important;
	padding-right: 0 !important;
}
.hw-cols > .wp-block-column:last-child > .wp-block-template-part {
	position: sticky !important;
	/* 🔴 NOT a fixed 96px. The nav wraps to a different number of rows per site
	   (Box Hill 2 = 88px, Ringwood 3 = 132px), so a hardcoded offset parked the
	   sidebar UNDER the nav on Ringwood and cut off the contact details.
	   --hw-nav-h is measured from the live nav on load/resize. */
	top: var(--hw-sticky-top);
	display: block;
	/* Must stay within the viewport minus the sticky offset, or a tall sidebar
	   (Box Hill has two promo images) scrolls its own top out of sight. */
	/* Must never exceed the viewport below the nav, or the box is taller than its
	   sticky window and the browser lets its top scroll out of sight — measured
	   at sidebarTop=-57 on Box Hill, whose sidebar is 1020px tall.
	   `align-self: start` stops the flex column stretching the box, so at the end
	   of the page the sticky element shrinks into the remaining space instead of
	   being shunted up behind the nav. */
	align-self: start;
	padding-right: 6px;
}

/* ────────────────────────────────────────────────────────────────────────
   🔴 INTERNAL SCROLLING IS OPT-IN, NOT THE DEFAULT.  (UAT, 2026-09-09)
   
   Making the sidebar scroll internally at every height produced TWO
   scrollbars side by side and a scroll trap: the pointer crosses the
   sidebar, the wheel scrolls THAT instead of the page, and the reader
   stalls halfway down the article.
   
   Measured target: 1080p / 24in, the standard staff and member screen.
   That is ~870-940px of viewport once browser chrome is taken out; minus
   a 3-row nav (Ringwood, 132px) the sidebar window is ~740px, while Box
   Hill's sidebar is ~1020px tall. So at the most common resolution the
   old rule ALWAYS scrolled — the worst case, not the edge case.
   
   Below 1200px tall the sidebar simply flows with the page: it sticks
   while it fits and then scrolls away like normal content, which is what
   people expect. Only on genuinely tall screens, where an internal
   scrollbar is a convenience rather than an obstacle, does it come back.
   ──────────────────────────────────────────────────────────────────── */
@media (min-height: 1200px) {
	.hw-cols > .wp-block-column:last-child > .wp-block-template-part {
		max-height: calc(100vh - var(--hw-sticky-top) - 16px);
		overflow-y: auto;
		/* keep a wheel gesture inside the sidebar from chaining to the page */
		overscroll-behavior: contain;
		scrollbar-width: thin;
		scrollbar-color: rgba(24,78,82,.28) transparent;
	}
}
/* Scrollbar styling belongs with the media query that creates the scrollbar —
   outside it these style an element that never overflows. */
@media (min-height: 1200px) {
	.hw-cols > .wp-block-column:last-child > .wp-block-template-part::-webkit-scrollbar { width: 7px; }
	.hw-cols > .wp-block-column:last-child > .wp-block-template-part::-webkit-scrollbar-track { background: transparent; }
	.hw-cols > .wp-block-column:last-child > .wp-block-template-part::-webkit-scrollbar-thumb {
		background: rgba(24,78,82,.28); border-radius: 4px;
	}
}
/* the inner group must NOT be positioned or it creates a new context */
.hw-sidebar { position: static !important; }

/* ---- spacing restored after the header split ----
   prod: logo bottom 177 -> nav top 217  = 40px gap
         nav bottom 307  -> h1 top 391   = 84px (breadcrumb sits in between)
   The split into .hw-logobar / .hw-navbar dropped the logo's bottom margin
   and the breadcrumb had no padding of its own. */
.hw-logobar { padding-bottom: 40px; }
.hw-navbar { margin-top: 0; }

/* 🔴 SINGLE SOURCE OF TRUTH for breadcrumb spacing.
   Five earlier rules on this selector fought each other (20/0/0/20px paddings)
   and this one won with 50px !important, making the breadcrumb 82px tall against
   legacy's 21px — the extra gap above the page title.
   Legacy measured: height 21px, padding 0, margin-bottom 21px, h1 42px below it. */
.hw-breadcrumb {
	padding: 20px 0 0 !important;
	margin: 0 0 21px !important;
	line-height: 1.5;
	font-size: 14px;
}
.hw-cols .wp-block-post-title { margin-top: 0; }

/* Prod's sidebar starts ABOVE the page heading (349 vs h1 at 391) because the
   breadcrumb sits only in the content column. Pull the sidebar up to match.

   🔴 The offset must NOT be a negative margin on the sticky element itself.
   A negative margin-top shifts where sticky comes to rest (96 - 38 = 58), and
   once the box is taller than the viewport it scrolls its own top out of view —
   measured at wrapper@-49, taking the contact details with it. Box Hill showed
   this and Ringwood did not, purely because Box Hill's sidebar is taller
   (1020px vs 377px): the same CSS, different content height.

   Offset the COLUMN instead, leaving the sticky child's geometry untouched. */
.hw-cols > .wp-block-column:last-child { margin-top: -38px; }
.hw-cols > .wp-block-column:last-child > .wp-block-template-part { margin-top: 0; }

/* ============================================================
   SPLASH PAGE TEMPLATE (page-splash.html)
   A one-page landing with no sidebar and no news loop. Assigned
   per page in the editor — it is NOT tied to any particular site,
   so any site can use it. The base site's landing page uses it.
   ============================================================ */
.hw-splash .wp-block-post-content { max-width: 960px; margin: 0 auto; }
.hw-splash { padding-bottom: 20px; }
/* the splash sits on teal, not in the white card */
body.hw-unboxed .hw-splash { background: transparent; }

/* ============================================================
   SPLASH PAGE — location cards
   Redesigned (Bstew, 2026-08-30): image header with the centre name
   overlaid, details below, the WHOLE card is one link. Replaces the
   old table layout where the button appeared twice and the image sat
   awkwardly beside cramped text.
   ============================================================ */

.hw-splash { padding-top: 60px; padding-bottom: 40px; }
.hw-splash > .wp-block-post-content > h1:first-child { margin: 0 0 6px; font-size: 30px; }
.hw-splash h2 { margin: 0 0 40px; font-size: 22px; font-weight: 400; }

.hw-locations { gap: 30px !important; }
.hw-locations > .wp-block-column { padding: 0; }

/* ---- the card ---- */
.hw-loc-card {
	display: block;
	background: var(--wp--preset--color--hw-white);
	border-radius: 6px;
	overflow: hidden;
	text-decoration: none !important;
	color: var(--wp--preset--color--hw-body-text) !important;
	box-shadow: 0 1px 3px rgba(0,0,0,.10);
	transition: box-shadow .18s ease, transform .18s ease;
	height: 100%;
}
.hw-loc-card:hover,
.hw-loc-card:focus-visible {
	box-shadow: 0 6px 18px rgba(0,0,0,.18);
	transform: translateY(-2px);
}
.hw-loc-card:focus-visible { outline: 3px solid var(--wp--preset--color--hw-teal-mid); outline-offset: 2px; }

/* ---- image header with overlaid name ---- */
.hw-loc-media { position: relative; margin: 0; line-height: 0; }
.hw-loc-media img {
	width: 100%; height: 210px; object-fit: cover; display: block;
	border: 0; padding: 0; margin: 0;
}
.hw-loc-media figcaption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 16px 20px 14px;
	background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.45) 60%, rgba(0,0,0,0) 100%);
	line-height: 1.25;
	text-align: center;
}
.hw-loc-name {
	display: block;
	font: 700 20px/1.25 Arial, sans-serif;
	color: #fff;
}
.hw-loc-est {
	display: block; margin-top: 3px;
	font: 400 13px/1.3 Arial, sans-serif;
	color: rgba(255,255,255,.88);
	text-transform: uppercase; letter-spacing: .04em;
}

/* ---- body ----
   Everything in the card body shares the address's typeface, size and
   line-height so the block reads as one consistent unit. */
.hw-loc-body { padding: 18px 20px 20px; }
.hw-loc-address,
.hw-loc-phone,
.hw-loc-heading,
.hw-loc-list,
.hw-loc-list li {
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
	font-size: 15px !important;
	line-height: 22.5px !important;
	font-weight: 400 !important;
}
/* address and phone are centred; the facilities list stays left-aligned
   so the bullets read as a proper list */
.hw-loc-address {
	margin: 0 0 6px;
	color: var(--wp--preset--color--hw-body-text);
	text-align: center;
	font-weight: 700 !important;   /* bold, as the original had it */
}
.hw-loc-phone {
	margin: 0 0 18px;
	font-weight: 700 !important;
	color: var(--wp--preset--color--hw-teal-dark);
	text-align: center;
}
.hw-loc-heading {
	margin: 0 0 6px;
	font-weight: 700 !important;
	text-transform: uppercase; letter-spacing: .06em;
	color: var(--wp--preset--color--hw-meta);
}
.hw-loc-list { margin: 0 0 20px; padding-left: 18px; list-style: disc; }
.hw-loc-list li { margin: 0 0 3px; color: var(--wp--preset--color--hw-body-text); }

/* ---- call to action ---- */
.hw-loc-cta {
	display: block;
	text-align: center;
	background: var(--wp--preset--color--hw-teal);
	color: #fff;
	border-radius: 3px;
	padding: 8px 16px;
	font: 700 13px/1.4 Arial, sans-serif;
	text-transform: uppercase; letter-spacing: .03em;
}
.hw-loc-card:hover .hw-loc-cta { background: var(--wp--preset--color--hw-teal-dark); }

@media (max-width: 780px) {
	.hw-locations { display: block; }
	.hw-locations > .wp-block-column { margin-bottom: 24px; }
	.hw-loc-media img { height: 180px; }
}
@media (prefers-reduced-motion: reduce) {
	.hw-loc-card { transition: none; }
	.hw-loc-card:hover { transform: none; }
}

/* Cards in a row should match height, with the CTA pinned to the bottom. */
.hw-locations > .wp-block-column { display: flex; }
.hw-loc-card { display: flex; flex-direction: column; width: 100%; }
.hw-loc-body { display: flex; flex-direction: column; flex: 1 1 auto; }
.hw-loc-cta { margin-top: auto; align-self: center; }

/* A splash/banner page has no real navigation — the base site carried a single
   leftover menu item — so the nav strip is hidden for a clean start.

   Keyed on `body.hw-splash-page`, added by hwtheme_is_splash_page() in
   functions.php. That follows the TEMPLATE, not the page's position in the
   site, so it is correct on the old multisite AND the merged single site:
   a banner page keeps its styling wherever it lives, and an ordinary front
   page never loses its navigation by accident. */
body.hw-splash-page .hw-navbar { display: none; }

/* logo link should not pick up link styling */
.hw-logo-link { display: inline-block; line-height: 0; text-decoration: none; }
.hw-logo-link:focus-visible { outline: 3px solid rgba(255,255,255,.7); outline-offset: 3px; }
