/*
Theme Name: AA
Author: RJP
Description: Australia Awards Theme. Based on Frost.
Tags: block-patterns, block-styles, custom-colors, custom-logo, custom-menu, editor-style, full-site-editing, one-column, template-editing, threaded-comments, translation-ready, wide-blocks
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 7.2
Version: 1.64
Text Domain: aa
*/

/* NOTE: WP caches patterns until a version bump.  Modify above. */

/* Defaults
---------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
	scroll-margin-block-start: 1em;
	transition: border-color 0.1s ease-in-out;
}

:root{
	--border-radius-default: 5px;
	--border-card: 1px solid var(--wp--preset--color--light);
	--shadow-card: 0 2px 12px rgba(0, 45, 74, 0.05);
	--min-card-width: 20ch;
	--colour-warning: var(--wp--preset--color--orange);

	/* Theme icons — static assets in assets/icons/ (URLs resolve relative to
	   this stylesheet). Used as mask-image; colour comes from background-color. */
	--icon-menu-levels: url('assets/icons/menu-levels.svg');
	--icon-link: url('assets/icons/link.svg');

	text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  overscroll-behavior-y: none;
}

html {
	scroll-behavior: smooth;
}

body{
	-webkit-overflow-scrolling: touch;
	/* background-color: #f3f9fb; */
	scrollbar-gutter: stable;
}

html:has(.wp-lightbox-overlay.active),
body:has(.wp-lightbox-overlay.active) {
	overflow: hidden;
}

/* Top-level blocks (header, main, footer, full-bleed bands) sit flush.
   Core emits this same gap rule with two different selectors: the front end
   gets `:where(.wp-site-blocks) > *` (0,0,0) from PHP, the editor canvas gets
   `:root :where(.wp-site-blocks) > *` (0,1,0) from editor.js. Leaving the
   class bare rather than in :where() puts us at (0,2,0), which clears both
   without !important and without depending on stylesheet order — so the
   editor and the render agree. */
:root .wp-site-blocks > * {
	margin-block: 0;
}

/* vertical layout */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.wp-site-blocks {
    display: flex;
    flex-direction: column;
    flex: 1;
}

main {
    flex: 1;

		&.pad-top{
			padding-top: var(--wp--preset--spacing--small);
		}
		&.wp-block-group > h2.wp-block-post-title{
			margin-block-start: var(--wp--preset--spacing--small);
		}
}

.main-inner{
	padding-top: var(--wp--preset--spacing--small);
	padding-bottom: var(--wp--preset--spacing--small);
	/* margin: 0 auto;
	width: fit-content; */
}

a,
button,
input:focus,
input[type="button"],
input[type="submit"],
textarea:focus,
.wp-element-button,
svg,
p
{
	transition: color 0.1s ease-in-out;
}

a,
a:focus,
a:hover,
a:not(.wp-element-button) {
	text-decoration-thickness: 1px;
}

a,
a::before{
	transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out;
}
a:hover,
.card a:hover,
.card a:focus,
.card a:active,
.wp-block-navigation a:hover{
	color: var(--wp--preset--color--yellow);
}

a svg:hover,
a img:hover{
	fill: var(--wp--preset--color--yellow);
	color: var(--wp--preset--color--yellow);
}

.wp-block-site-logo a:hover,
.wp-block-site-logo a:hover svg{
	color: inherit;
}

.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
    color: var(--wp--preset--color--yellow);
}

.current-menu-item > a{
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

footer a{
	text-decoration: none;
}

mark {
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font-weight--regular);
	padding: 5px 8px;
}

/* -- Lists -- */

.wp-block-list{
	li{
		line-height: 1.5;
		/* Add space between list items, excluding the last */
		&:not(:last-of-type){
			margin-block-end: 0.5em;
		}
		/* Handle nested lists */
		& > ul,
		& > ol{
			margin-block-start: 0.5em;
		}
	}
}

/* Tight: drops the item gap at every depth, for lists that read as one group.
   Same weight as the gap rule above, so it must stay after it. */
.wp-block-list.is-style-tight li{
	margin-block-end: 0;

	& > ul,
	& > ol{
		margin-block-start: 0;
	}
}

/* The tick is a real marker, so ::marker inherits the list's text colour and
   follows the block's font colour selection. Don't set a colour here. */
ul.is-style-ticks {
	list-style-type: "\2713\a0\a0";

	/* Nested lists inherit the ticks; revert them to normal bullets. */
	ul {
		list-style-type: disc;
	}
}

/* Bullets: disc, circle, then a dash from level 3 down (replaces the browser's square). */
ul:where(ul ul ul) {
	list-style-type: "\2013\a0\a0";
}

/* Bold list numbers */
:where(ol) > li::marker {
	font-weight: 700;
}


/* -- Buttons -- */

/* The site's button hover is yellow text over an unchanged fill, from the
   plain a:hover above. Colours picked in the editor block it: core's preset
   colour classes carry !important, so these hover rules need it too. Colours
   at rest stay entirely the editor's. */
.wp-block-button__link {
	transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out, border-color 0.1s ease-in-out;
}

.wp-block-button__link.has-text-color:hover,
.wp-block-button__link.has-text-color:focus-visible {
	color: var(--wp--preset--color--yellow, #FFA100) !important;
}

/* Yellow text is unreadable on a light fill (2:1 on white), so light-filled
   buttons fill yellow instead and keep navy text (7:1). A yellow button takes
   the default button's hover pairing, navy with yellow text. */
.wp-block-button__link:is(.has-base-background-color, .has-light-background-color, .has-sky-background-color, .has-cream-background-color, .has-aqua-background-color):hover,
.wp-block-button__link:is(.has-base-background-color, .has-light-background-color, .has-sky-background-color, .has-cream-background-color, .has-aqua-background-color):focus-visible {
	background-color: var(--wp--preset--color--yellow, #FFA100) !important;
	color: var(--wp--preset--color--primary) !important;
}

.wp-block-button__link.has-yellow-background-color:hover,
.wp-block-button__link.has-yellow-background-color:focus-visible {
	background-color: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--yellow, #FFA100) !important;
}

/* -- Forms -- */

input,
select,
textarea {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--primary);
	border-radius: 0;
	color: var(--wp--preset--color--primary);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: var(--wp--custom--font-weight--light);
	line-height: var(--wp--custom--line-height--body);
	padding: var(--wp--preset--spacing--xx-small) var(--wp--preset--spacing--x-small);
	width: 100%;
}

/* The transparent outline is invisible normally but is repainted in forced
   colours (Windows contrast themes), which wipe out the background change. */
input:focus,
textarea:focus {
	background-color: var(--wp--preset--color--sky);
	outline: 2px solid transparent;
}

input[type="image"] {
	width: auto;
}

/* Checkboxes and radios are drawn by the theme rather than left native: WebKit
   has long ignored width/height on native controls, so appearance: none is the
   only way to one size in every engine. The tick is a background image, not a
   ::before, so it survives plugins (Fluent Forms) resetting display. */
input[type="checkbox"],
input[type="radio"] {
	-webkit-appearance: none;
	appearance: none;
	background-color: var(--wp--preset--color--base);
	background-position: center;
	background-repeat: no-repeat;
	background-size: 80%;
	border: 1px solid var(--wp--preset--color--primary);
	border-radius: 0;
	cursor: pointer;
	flex-shrink: 0;
	height: 1.25rem;
	padding: 0;
	transition: background-color 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
	vertical-align: middle;
	width: 1.25rem;
}

input[type="radio"] {
	border-radius: 50%;
}

input[type="checkbox"]:checked {
	background-color: var(--wp--preset--color--primary);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' d='M3 8.5l3.5 3.5L13 4.5'/%3E%3C/svg%3E");
}

input[type="radio"]:checked {
	background-color: var(--wp--preset--color--primary);
	box-shadow: inset 0 0 0 3px var(--wp--preset--color--base);
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
	outline: 2px solid var(--wp--preset--color--secondary);
	outline-offset: 2px;
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

/* Forced colours (Windows high contrast) repaint backgrounds and drop
   box-shadows, which would erase the tick and the radio dot. Hand those
   users the native control, which the OS draws correctly. */
@media (forced-colors: active) {
	input[type="checkbox"],
	input[type="radio"] {
		-webkit-appearance: auto;
		appearance: auto;
	}
}

input[type="button"],
input[type="email"],
input[type="search"],
input[type="submit"],
input[type="text"],
textarea {
	-webkit-appearance: none;
}

::placeholder {
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.5;
}

/* -- Make all inlined SVGs inherit text colour by default -- */
.svg-inline path,
.svg-inline rect,
.svg-inline circle,
.svg-inline polygon,
.svg-inline ellipse,
.svg-inline polyline,
.svg-inline line {
    fill: currentColor;
}

/* Preserve stroke-based icons (comment out if not needed) */
.svg-inline [stroke]:not([stroke="none"]) {
    stroke: currentColor;
    fill: none;
}

/* -- Sizing -- */
.svg-inline {
    display: block;
    width: 100%;
    height: auto;
}


/* Overrides
---------------------------------------- */

/* Full-width bands stack flush.
   block-gap gives every block its 30px rhythm; full-bleed sections opt out
   of it so backgrounded bands butt straight up against each other.
   (0,2,0) — beats core's `:root :where(.is-layout-*) > *` at (0,1,0). */
:root :where(.is-layout-flow, .is-layout-constrained) > .alignfull {
	margin-block: 0;
}

:root :where(.is-layout-constrained){

	& > h2.wp-block-post-title{
		margin-block-start: var(--wp--preset--spacing--medium);
		margin-block-end: var(--wp--preset--spacing--small);
	}

	& > h3{
		margin-block-start: var(--wp--preset--spacing--medium);
	}

	.hero-cover {
		margin-top: unset;
	}
}

/* Disabled editor-set in an uncomfortable way */
/* :root :where(.is-layout-grid) {
	gap: var(--wp--preset--spacing--small);
} */

a:where(:not(.wp-element-button)) {
    color: inherit;
}

a, a:focus, a:hover, a:not(.wp-element-button) {
    text-underline-offset: 0.15em;
}

.wp-block-post-title :where(a) {
	word-break: normal;
}

/* Long unbroken strings — typically pasted URLs, linked or bare — should wrap
   inside their container instead of overflowing it. Scoped to editor body
   content (.entry-content, e.g. paragraphs, list items, the breakout box) and
   to links inside table cells. Nav, buttons, titles, and headings are left
   alone so they keep the controlled wrapping set by the word-break rules. */
.entry-content p,
.entry-content li,
.entry-content a:not(.wp-element-button),
.wp-block-flexible-table-block-table td a:not(.wp-element-button) {
	overflow-wrap: anywhere;
}

.has-global-padding {
    /* padding: 0 var(--wp--preset--spacing--x-small); */
		
	& > .alignfull {
			margin-right: calc(var(--wp--style--root--padding-right) * -1);
			margin-left: calc(var(--wp--style--root--padding-left) * -1);
	}
}

.wp-block-navigation{
	/* gap: var(--wp--preset--spacing--x-small); */

	.wp-block-navigation-item__content.wp-block-navigation-item__content {
			color: unset;
	}
}

.has-max-36-font-size{
	line-height: 1.2;
}

.wp-block-file:not(.wp-element-button) {
    font-size: inherit;
}

.wp-block-query .wp-block-post-template.is-flex-container{
	gap: var(--wp--preset--spacing--x-small);
}

.wp-block-image.aligncenter {
  text-align: inherit;
}

/* center the navigation items in hamburger - broken with nested links */
/* .wp-block-navigation__responsive-container.has-modal-open.is-menu-open{
	.wp-block-navigation__container{
		width: 100%;
		justify-content: center;
		align-items: center;
		.wp-block-navigation-item.wp-block-navigation-link{
			text-align: center;
		}
	}
} */

/* Featured layout: the first two cards wider. The class sits on the listing's
   own query wrapper — set from the page's subpages_layout field for the
   template loop, or from an inserted Subpages block's own layout (see
   inc/subpages-block.php) — so the rule below reaches only that listing's grid. */
.subpages-featured-first-two{
	.wp-block-post-template.wp-block-post-template-is-layout-grid {
		grid-template-columns: repeat(6, 1fr);

		& > li {
			grid-column: span 2;
			width: auto;
		}
		& > li:nth-child(-n+2) {
			grid-column: span 3;
		}
	}
}

/* ACF controlled param: arrange the subpage cards as a per-count GRID shape,
   joined by connectors. Cards auto-populate from the Query Loop;
   each card's grid cell (--cx / --cy) and the connector endpoints are stamped
   server-side from frost_circular_layout (see functions.php). */
.subpages-circular,
.subpages-clockwise {
	/* ── Sizing model — the knobs (override in @media / @container) ──
	   --card-gap        : the GUARANTEED gap between cards (a WP spacing var).
	   --card-size       : card width.
	   --card-row-height : vertical room per row. MEASURED at runtime from the
	                       tallest card by subpages-circular.js (this value is
	                       only the pre-JS fallback), so the gap stays correct
	                       whatever the content.
	   --col-step/--row-step : DERIVED spacing between grid cells = card + gap.
	   Because positions are counted in (card + gap) units, adjacent cards are
	   always exactly --card-gap apart at minimum.
	   cqw (not %) lets --card-size feed translate()/hypot() as a real length. */
	--card-gap: var(--wp--preset--spacing--x-small);
	/* Match the default 3-column card width — one third of the container minus the
	   two gaps between three columns. Shrinks with the container; never wider. */
	--card-size: calc((100cqw - 2 * var(--card-gap)) / 3);
	--card-row-height: 5.5rem;
	--col-step: calc(var(--card-size) + var(--card-gap));
	--row-step: calc(var(--card-row-height) + var(--card-gap));

	/* Chevron connector */
	--chev-color: var(--wp--preset--color--secondary);
	--chev-size: 0.9rem;
	--chev-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 12'%3E%3Cpath d='M2 2 L6 6 L2 10' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

	/* Card shadow as a drop-shadow() FILTER (not box-shadow): because the "see
	   more" dropdown is a descendant of the card, the filter shadows the union of
	   card + revealed dropdown as one shape and follows the clip-path reveal — so
	   the shadow extends with the list and reads as a single piece. */
	--card-shadow: drop-shadow(0 2px 8px rgba(0, 45, 74, 0.12));
	--card-shadow-hover: drop-shadow(0 4px 13px rgba(0, 45, 74, 0.22));

	/* Scope every grid rule to the page's OWN (top-level) subpage query via
	   child combinators. The "see more" dropdowns contain their own nested
	   .wp-block-query / .wp-block-post-template / .card — those must stay
	   plain lists, so we must never use descendant selectors here. */
	.main-inner > .wp-block-query {
		/* Establish the container so cqw resolves against the wrapper width. */
		container-type: inline-size;
		position: relative;

		/* The grid box: sized from the stamped span so the absolutely-positioned
		   cards fit; centred in the wrapper. */
		> .wp-block-post-template {
			position: relative;
			display: block;
			/* Horizontal step is card + gap (see --col-step above), so cards sit a
			   single 3-column gap apart. With 3-col-width cards a 2-column bulge span
			   exactly fills the wrapper (grid-cols·step + card = 100cqw); narrower
			   spans centre with space to the sides. */
			width: calc(var(--grid-cols, 0) * var(--col-step) + var(--card-size));
			max-width: 100%;
			height: calc(var(--grid-rows, 0) * var(--row-step) + var(--card-row-height));
			/* Anchor to the left: the flat sits on the wrapper's left edge, and any
			   spare width (counts that don't fill it) falls on the right. */
			margin-inline: 0 auto;
			gap: 0;

			/* Let the card escape the <li> so it positions against the grid box. */
			> li {
				display: contents;
			}

			> li > .card {
				position: absolute;
				top: 50%;
				left: 50%;
				width: var(--card-size);
				margin: 0;
				/* Place the card at its grid cell: column × col-step, row ×
				   row-step, from the centre. Stays upright; collapsed height is
				   preserved (the "see more" sub-list drops out of flow below). */
				transform:
					translate(-50%, -50%)
					translate(
						calc(var(--cx, 0) * var(--col-step)),
						calc(var(--cy, 0) * var(--row-step))
					);

				/* Shadow via filter so it wraps card + open dropdown as one. */
				box-shadow: none;
				filter: var(--card-shadow);

				/* Raise a card and its dropdown above neighbours while open. */
				&:hover,
				&:has(.aa-sub-accordion[open]) {
					z-index: 5;
					filter: var(--card-shadow-hover);
				}

				/* The overlay dropdown itself — its stacking, its seam with the card and
				   its clip-path reveal — is now defined once for every card alongside
				   .aa-sub-accordion further down, and applies here too. Only the shadow
				   above stays flow-specific (these layouts use their own heavier values). */
			}
		}

		/* Chevron connectors. The container overlays the wrapper; each link is a
		   bar from card --fx/--fy to --tx/--ty, its length/angle computed from the
		   same --col-step / --row-step the cards use (so it always lands on the
		   card centres), and tiled with a chevron mask flowing toward the next
		   card. Cards paint on top, so each meets its cards with no gap. */
		> .subpages-circular__links {
			position: absolute;
			inset: 0;
			pointer-events: none;
			z-index: 0;
		}

		/* A connector line between two cards. subpages-circular.js positions each
		   bar (left/top/width/rotate) from the real card geometry; transform-origin
		   is the bar's start, matching the JS. Rounded ends soften the meeting point
		   at each card. */
		.subpages-circular__link {
			position: absolute;
			height: var(--conn-width, 2.5px);
			border-radius: var(--conn-width, 2.5px);
			transform-origin: 0 50%;
			background-color: var(--chev-color);
		}

		/* The flat of the D — the wrap-around from the last card back to the first,
		   drawn dashed so it reads as "loops back" rather than another step. */
		.subpages-circular__link.is-dashed {
			background: repeating-linear-gradient(
				90deg,
				var(--chev-color) 0 6px,
				transparent 6px 12px
			);
			border-radius: 0;
		}
	}

	/* ── Retuning per breakpoint ──────────────────────────────────────────
	   Everything derives from --card-size / --card-row-height / --card-gap, so
	   override those in a @media (or @container) block to retune. Example:

	   @media (max-width: 1000px) {
	       .subpages-circular { --card-size: 11rem; --card-row-height: 5rem; }
	   } */

	/* Too narrow for the grid — fall back to a stacked column, drop connectors. */
	@media (max-width: 600px) {
		.main-inner > .wp-block-query > .wp-block-post-template {
			width: 100%;
			height: auto;
			display: flex;
			flex-direction: column;
			gap: var(--card-gap);

			> li {
				display: block;
			}
			> li > .card {
				position: static;
				width: auto;
				transform: none;
			}
		}
		.main-inner > .wp-block-query > .subpages-circular__links {
			display: none;
		}
	}
}

/* Aside subpage loop: pages pulled out of the circular flow, rendered as the
   same cards used elsewhere. Nested one level under .main-inner (not a direct
   child), so it sits outside the .subpages-circular grid scope and stays in
   normal flow. Collapses entirely when the loop returns no cards. */
.subpages-aside {
	margin-top: var(--wp--preset--spacing--small);
}
.subpages-aside:not(:has(.wp-block-post)) {
	display: none;
}

/* Card spacing for subpage listings: the page-subpages template's loops, and an
   inserted Subpages block anywhere (inc/subpages-block.php puts .frost-subpages
   on its wrapper). :is() weighs as its heaviest argument — one class either way —
   so the template's rules are exactly as heavy as they were. */
:is(.page-template-page-subpages, .frost-subpages) .wp-block-post-template {
    &.is-layout-flex {
        & > * {
            min-width: fit-content;
        }
    }
}
:is(.page-template-page-subpages, .frost-subpages){
	.is-layout-grid{
		gap: var(--wp--preset--spacing--x-small);
	}
}


/*  */
:root :where(
	.wp-element-caption, 
	.wp-block-audio figcaption, 
	.wp-block-embed figcaption, 
	.wp-block-gallery figcaption, 
	.wp-block-image figcaption, 
	.wp-block-table figcaption,
	.wp-block-flexible-table-block-table figcaption, 
	.wp-block-video figcaption)
{
	margin-top: 0.5em;
	margin-bottom: 1em;
}

/* Blocks
---------------------------------------- */

/* -- Spacing -- */

.wp-block-media-text{
	margin-block-end: var(--wp--preset--spacing--small);
}

.wp-block-image{
	/* margin-block-start: 1rem; */

	& + p{
		/* margin-top: var(--wp--preset--spacing--medium); */
	}
}

.page-template-page-subpages-cards .main-inner{
	padding-top: 0;
}

/* -- Site logo -- */
.wp-block-site-logo .svg-inline {
  /* width: auto;
  height: 124px; */
	width: 150px;
	height: auto;
}

/* -- Post title -- */

.wp-block-post-title{
	letter-spacing: -0.03em;

	&:not(.card .wp-block-post-title, .text .wp-block-post-title, .sidebar .wp-block-post-title, .wp-block-frost-post-banner .wp-block-post-title){
		font-size: clamp(2rem, 7vh, 10vw);
		/* text-transform: uppercase; */
		line-height: .95;
	}
}

/* -- Heading-- */

h1.wp-block-heading,
h2.wp-block-heading,
h3.wp-block-heading{
	clear: both;

	&.has-tex-gyre-termes-font-family,
	&.has-times-new-roman-font-family{
		letter-spacing: unset;
		font-weight: unset;
	}

}


h3.wp-block-heading{
	clear: unset;
	margin-block-start: var(--wp--preset--spacing--large);
	font-size: clamp(1.5rem, 4.5vh, 7.5vw);
	letter-spacing: -0.03em;
	
	&:first-child{
		margin-block-start: 0;
	}
}

h4.wp-block-heading{
	margin-block-start: var(--wp--preset--spacing--small);
	font-size: clamp(1.25rem, 3vh, 5vw);
	&:first-child{
		margin-block-start: 0;
	}
}

h5.wp-block-heading{
	font-size: clamp(1.15rem, 2.5vh, 4vw);
}

/* -- Blockquote -- */
:root :where(.wp-block-quote) {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);

	& > p{
		font-size: var(--wp--preset--font-size--large);
	}
}

/* -- Navigation -- */

.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--custom--spacing--gap);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: var(--wp--custom--spacing--gap);
}

.wp-block-navigation__responsive-container-close,
.wp-block-navigation__responsive-container-open {
	border: 1px solid currentColor;
	padding: 2px;
}

.has-background .wp-block-navigation__responsive-container-open:focus,
.has-background .wp-block-navigation__responsive-container-open:hover {
	color: var(--wp--preset--color--base);
}

/* -- Navigation Submenu -- */

.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {
	background-color: var(--wp--preset--color--primary);
	border: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	padding: var(--wp--preset--spacing--xx-small);
}

.wp-block-navigation :where(.wp-block-navigation__submenu-container) a {
	padding: 2px 10px;
}

/* -- Social icons -- */

/* Core paints each service its own brand colour — Facebook blue, Instagram
   pink, X black — from :where() rules carrying no specificity. Here the icons
   are a set rather than badges, so on the two chipless styles they take the
   colour of the text around them: white on the navy footer, navy on white,
   and the outline ring reads on both. An icon colour picked in the editor
   still wins, since core marks that with .has-icon-color. */
.wp-block-social-links.is-style-logos-only:not(.has-icon-color) .wp-social-link,
.wp-block-social-links.is-style-outline:not(.has-icon-color) .wp-social-link {
	color: inherit;
}

/* The Outline style's transparent fill lives in theme.json, which core wraps in
   :root :where() — one class, tying with the brand colours above and losing on
   order, so the rings came out filled. It needs to be set where specificity is
   real. A background picked in the editor still wins. */
.wp-block-social-links.is-style-outline:not(.has-icon-background-color) .wp-social-link {
	background-color: transparent;
}

/* Links fade to yellow on hover everywhere else on the site, but core pins the
   social anchor to currentColor through :hover and :visited with a five-class
   selector, so matching it takes that weight plus a :root. */
:root .wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor {
	transition: color 0.1s ease-in-out;
}

:root .wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:hover,
:root .wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:focus-visible {
	color: var(--wp--preset--color--yellow);
}

/* The colour fade is the hover here, as it is for every other link. Core's
   extra 1.1 scale is the only pop of its kind on the site. */
.wp-block-social-links .wp-block-social-link:hover {
	transform: none;
}

/* -- Image -- */

:root :where(.wp-block-image.is-style-rounded img,.wp-block-image .is-style-rounded img) {
	border-radius: var(--border-radius-default);
}

.wp-lightbox-overlay .wp-block-image {
	max-height: none !important;
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	max-width: none !important;
	border-radius: 0 !important;
}

.wp-lightbox-overlay .wp-block-image img {
	max-height: none !important;
	max-width: none !important;
	object-fit: contain !important;
	border-radius: 0 !important;
}

/* Alignment model. Whatever an editor picks in the sidebar should hold at every
   viewport, so each alignment gets one job:

   - default/centre : the figure shrink-wraps the image so the caption tracks the
                      image width. A width set on the block is honoured, clamped
                      to the content column so it can't overflow.
   - wide/full      : the image fills its slot edge to edge, capped at 80vh.
   - left/right     : floated at half the content column so body text keeps a
                      readable measure beside the image and wraps back underneath
                      it. 50% is a hard cap — a width set on the block can go
                      smaller, not wider. Unfloated below 600px, where half a
                      column is too narrow to read either side. */
.wp-block-image{
	max-height: 80vh;
	width: fit-content;

	&.is-style-fill-container{
		width: 100%;
	}

	img{
		max-height: inherit;
		max-width: 100%;
		width: 100%;
		object-fit: cover;
	}

	/* fit-content on its own sizes the figure to the caption's one-line length
	   whenever that is longer than the image, so the caption stuck out past it.
	   inline-size containment takes the caption out of that sum, leaving the
	   image to set the width and the caption to wrap inside it. break-word
	   catches the Flickr URLs some captions hold, which have no spaces. */
	& > figcaption{
		contain: inline-size;
		overflow-wrap: break-word;
	}

	&.alignwide,
	&.alignfull{
		/* auto, not 100% — alignfull is widened by the negative root padding
		   margins, and a percentage width ignores them and shifts it left. */
		width: auto;
		max-height: none;

		img{
			min-width: 100%;
			max-height: 80vh;
		}
	}

	&.alignleft,
	&.alignright{
		margin-bottom: var(--wp--preset--spacing--xx-small);
		max-width: 50%;
	}
	&.alignleft {
		float: left;
		margin-right: var(--wp--preset--spacing--x-small);
	}
	&.alignright {
		margin-left: var(--wp--preset--spacing--x-small);
		float: right;
	}

	@media (max-width: 600px) {
		&.alignleft,
		&.alignright{
			float: none;
			max-width: 100%;
			margin-left: 0;
			margin-right: 0;
		}
	}
}

/* Floated images are the common case here, so a block that spans the column has
   to start below them rather than beside them. Headings already clear; wide and
   full need the same. */
.alignwide,
.alignfull{
	clear: both;
}

.is-style-fill-container img,
.editor-styles-wrapper .is-style-fill-container img{
	width: 100%;
	height: 100%;
	object-fit: cover;
}


/* -- Accordion --
   Core hides collapsed panels with display: none, which is correct on its own
   and is left in place: collapsed text stays out of find-in-page and out of the
   accessibility tree. Where the browser can interpolate to height: auto we add
   an animated collapse on top, holding display until the transition finishes
   via allow-discrete. Browsers without interpolate-size keep core's instant
   show/hide unchanged. */

/* Items stack flush — the panel borders are the separator, so the 30px
   block-gap must not apply between them. (0,2,0) beats core's (0,1,0). */
:root :where(.wp-block-accordion) > * {
	margin-block: 0;
}

@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .wp-block-accordion-panel {
      interpolate-size: allow-keywords;
      overflow: clip;
      height: auto;
      transition: height 0.25s ease, display 0.25s allow-discrete;

      @starting-style {
        height: 0;
      }
    }
    .wp-block-accordion-panel[inert],
    .wp-block-accordion-panel[aria-hidden="true"] {
      display: block;
      content-visibility: hidden;
      height: 0;
    }
  }
}



/* -- Tables -- */

.wp-block-table,
body .wp-block-flexible-table-block-table{
	border: 0;
	border-radius: var(--border-radius-default);
	border-color: var(--wp--preset--color--primary);
	border-style: solid;
	border-width: 1px;
	background-color: var(--wp--preset--color--base);

	&.is-style-stripes {
		border-bottom-color: inherit;

		tbody tr:nth-child(odd) {
			background-color: var(--wp--preset--color--sky);
			@supports (color: color-mix(in srgb, blue 50%, transparent)) {
				background-color: color-mix(in srgb, var(--wp--preset--color--sky) 50%, transparent);
			}
		}

		th{
			border-right-color: var(--wp--preset--color--base);
		}
	}

	table{
		*{
			border-width: 0;
		}
		td,
		th{
			border-width: 1px;
			&:last-child{
				border-right-width: 0;
			}
			&:first-child{
				border-left-width: 0;
			}
		}
		thead{
			font-weight: bold;
			background-color: var(--wp--preset--color--primary);
			color: var(--wp--preset--color--base);

			th{
				border-right-color: var(--wp--preset--color--base);
			}
		}
		tr:first-child{
			*{
				border-top: 0;
			}
		}
		tr:last-child:not(tr:only-child){
			*{
				border-bottom: 0;
			}
			td:first-child{
				border-bottom-left-radius: var(--border-radius-default);
			}
		}
	}

	&.is-style-filled-first-column td:first-of-type{
		background-color: var(--wp--preset--color--primary);
		@supports (color: color-mix(in srgb, blue 50%, transparent)) {
			background-color: color-mix(in srgb, var(--wp--preset--color--primary) 85%, transparent);
		}
		color: var(--wp--preset--color--base);
	}
	&.is-style-filled-first-column tr:not(:last-of-type) td:first-of-type{
		border-bottom-color: var(--wp--preset--color--base) !important;
		border-top-color: var(--wp--preset--color--base) !important;
	}
	&.striped tr:nth-child(even) {
		background-color: rgba(0, 0, 0, 0.05);
		border-radius: var(--border-radius-default);
	}
}

/* flexible table */

body .wp-block-flexible-table-block-table.wp-block-flexible-table-block-table > table {
	border-width: 0;
}
.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table>table{
	
	border-top-left-radius: var(--border-radius-default);
	border-top-right-radius: var(--border-radius-default);

	th{
		overflow-wrap: unset;
	}
	thead{
		border-top-left-radius: var(--border-radius-default);
		border-top-right-radius: var(--border-radius-default);
		th:first-child{
			border-top-left-radius: var(--border-radius-default);
		}
		th:last-child{
			border-top-right-radius: var(--border-radius-default);
		}
	}
	
}

/* -- query -- */

/* outer query block */
.wp-block-query:first-of-type{
	/* margin: 0; */
}

.page-link + .wp-block-query:last-child {
	/* margin-bottom: 0; */
}

/* For card outers */
.wp-block-post-template{
	&.is-layout-flex{
		gap: var(--wp--preset--spacing--x-small);
		align-items: flex-start;
		justify-content: center;

		& > *{
			flex: 1;
			min-width: var(--min-card-width);
		}
	}
}

/* icon to indicate another branch inside heading */
.has-subpages{
	position: relative;

	a::before{
		content: '';
		height: 1em;
		width: 1em;
		position: absolute;
		left: 0.25rem;
		top: 0.75rem;
		mask-image: var(--icon-menu-levels); 
		mask-size: contain;
		background-color: var(--wp--preset--color--primary);
	}
	a:hover::before{
		background-color: var(--wp--preset--color--yellow);
	}

	/* Forced colours (Windows contrast themes) repaint backgrounds, which
	   would turn the masked icon into the page colour. */
	@media (forced-colors: active) {
		a::before,
		a:hover::before{
			background-color: LinkText;
		}
	}
}

/* icon to indicate external link instead of page in subpages */
.np-redirect{ 
	position: relative;

	a::before {
    content: '';
    height: 1rem;
		width: 1rem;
    left: 0.25rem;
		margin-top: 0.05em;
		position: absolute;
    mask-image: var(--icon-link);
    mask-size: contain;
    background-color: var(--wp--preset--color--primary);
	}
	a:hover::before{
		background-color: var(--wp--preset--color--yellow);
	}

	/* Forced colours: see .has-subpages above. */
	@media (forced-colors: active) {
		a::before,
		a:hover::before{
			background-color: LinkText;
		}
	}
	h3 a::before {
		margin-top: 0.2em;
	}
}

/* -- Media -- */

.wp-block-media-text {
	& > .wp-block-media-text__media{
		height: 100%;
		img{
			/* width: 100%;
			object-fit: cover;
			height: 100%; */
		}
	}
	.wp-block-media-text__content{
		align-self: unset;
		padding: 0px 5%;

		& > *:first-child{
			margin-block-start: 0;
		}
	}
}



/* Utility
---------------------------------------- */

/* -- Box Shadow -- */

.is-style-shadow-light {
	box-shadow: var(--wp--preset--shadow--light);
}

.is-style-shadow-solid {
	box-shadow: var(--wp--preset--shadow--solid);
}


/* Components
---------------------------------------- */

/* -- Headings -- */

.header-banner,
.header-icon{
	position: relative;
	display: flex;
	align-items: center;
	padding-top: var(--wp--preset--spacing--x-small);

	.text{
		display: flex;
		align-items: center;
		justify-content: center;
		color: var(--wp--preset--color--base);
		background-color: var(--wp--preset--color--primary);
	
		p{
			padding: var(--wp--preset--spacing--xx-small);
			padding-left: 1.5rem;
		}
	}
}

.header-banner{
	height: 300px;
	border-bottom: 1px solid var(--wp--preset--color--light);

	img{
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: bottom;
		object-position: center;
		z-index: -1;
	}

	p{
		margin: 0;
		font-size: var(--wp--preset--font-size--medium);
	}

}

.header-banner .header-title.alignwide,
.header-icon .header-title{
	width: 100%;
	padding-inline: max(
		var(--wp--style--root--padding-left),
		calc(50% - var(--wp--style--global--wide-size) / 2)
	);
}

.header-title{
	display: grid;
	align-content: center;
	grid-template-columns: 1fr 1fr 1fr;
	gap: var(--wp--preset--spacing--x-small);
}
.header-title > *,
.header-icon > * {
	flex-grow: 1;
	flex-basis: 50%;
	border-radius: var(--border-radius-default);
	height: 100%;
}
.header-icon > *{
	height: auto;
	align-items: center;
}
.header-title .frost-search-mount{
	background-color: var(--wp--preset--color--base);
	padding: var(--wp--preset--spacing--xx-small) var(--wp--preset--spacing--xx-small);
	grid-column: span 2;
}

.header-icon{
	img,
	svg{
		position: absolute;
		z-index: -1;
		height: 100%;
		width: 100%;
		object-fit: contain;
			object-position: left;
			padding-inline: max(
			var(--wp--style--root--padding-left),
			calc(50% - var(--wp--style--global--wide-size) / 2)
		);
		z-index: 0;
		pointer-events: none;
		opacity: 0.2;
	}
	.text{
		h2{
			margin-left: var(--wp--preset--spacing--x-small);
			margin-right: var(--wp--preset--spacing--x-small);
		}
	}
}

.header-banner h1,
.header-icon h1{
	margin: 0;
	font-size: var(--wp--preset--font-size--max-60);
	word-break: keep-all;
}

/* -- Page Labels -- */
/* Chips above the page title. Content type and review status are independent
   and both optional; render.php emits no wrapper at all when neither is set,
   so unlabelled pages get no stray element and no leftover spacing — which is
   why the old per-type templates' inline margin-top on the title was not
   carried over. The title's own margin (54px, measured) already separates it
   from the chips, so no extra spacing rule is needed here. Variant colours
   (.page-label--yellow etc.) are generated from aa_label_colours() in
   inc/page-labels.php against the active style variation's palette. */

.page-labels {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--xxx-small);
}

.page-label {
	padding: var(--wp--preset--spacing--x-small);
	font-weight: bold;
	display: inline-block;
}

/* Content type keeps the look the retired per-type templates had. */
.page-label--type {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
}

/* -- Page Anchor Nav */

.page-anchor-nav {
	position: sticky;
	top: 0;
	z-index: 500;
	color: var(--wp--preset--color--base);

	ol, ul {
		list-style: none;
		margin: 0;
		padding: 0;
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: 1fr;

		li a{
				border: 1px solid var(--wp--preset--color--base);
				background: var(--wp--preset--color--primary);
				text-align: center;
				text-decoration: none;
				font-weight: bold;
				/* display: inline-block; */
				width: 100%;
				height: 100%;
				padding: 0.5rem;

				display: flex;
				align-items: center;
				justify-content: center;

				&:hover{
					background: var(--wp--preset--color--base);
					color: var(--wp--preset--color--primary);
				}
		}
		li a{
			border-right: 0;
			border-left: 0;
		}
	}
}


/* -- Images -- */

/* hero pattern */
.hero-cover.no-heading .wp-block-cover__inner-container{
	position: unset;
}
.hero-cover.no-heading p{
	position: absolute;
	bottom: 0;
	right: 0;
	font-size: var(--wp--preset--font-size--small) !important;
}

/* -- Lists -- */


/* -- Buttons -- */


/* -- Breakout Box -- */
.wp-block-group.is-style-breakout-box {
    border: 4px solid var(--wp--preset--color--primary);
    /* background-color: var(--wp--preset--color--sky); */
		background-color: var(--wp--preset--color--sky);
		@supports (color: color-mix(in srgb, blue 50%, transparent)) {
			background-color: color-mix(in srgb, var(--wp--preset--color--sky) 50%, transparent);
		}
    padding: var(--wp--preset--spacing--x-small);
		border-radius: var(--border-radius-default);
}

/* -- Cards -- */
.card{
	background-color: var(--wp--preset--color--base);
	border: var(--border-card);
	border-radius: var(--border-radius-default);
	box-shadow: var(--shadow-card);
	transition: box-shadow 0.15s;
	position: relative;
	/* margin-top: var(--wp--preset--spacing--small); */
}

.card{
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	position: relative;
	gap: 0;
	
	/* height: stretch; */
  /* justify-content: center; */

	*{
		margin: 0;
	}

	&,
	a{
		text-decoration: none;
	}

	&:hover{
		box-shadow: 0 2px 12px rgba(0, 45, 74, 0.2);
	}

	ul{
		display: flex;
		flex-direction: column;

		li:last-of-type{
			border-bottom: none;
		}

		a{
			font-size: var(--wp--preset--font-size--medium);
			color: var(--wp--preset--color--primary);
			font-weight: 700;
		}
	}

	h2.wp-block-post-title,
	h3.wp-block-post-title{
		/* text-transform: uppercase; */
		word-break: keep-all;
	}

	h2.wp-block-post-title,
	h3.wp-block-post-title,
	p.wp-block-post-excerpt__excerpt,
	li{
		padding: var(--wp--preset--spacing--xx-small) 1.5rem;
	}
	h3.wp-block-post-title,
	li{
		border-bottom: 1px solid var(--wp--preset--color--light);
		/* width: 100%; */
	}

	h4{
		font-weight: 400;
	}

	.wp-block-post-excerpt{
		color: var(--wp--preset--color--primary);
	}

	.page-link{
		width: -moz-available;
		width: -webkit-fill-available;
		width: stretch;
		h3{
			width: -moz-available;
			width: -webkit-fill-available;
			width: stretch;
			padding: 0;
			a{
				display: block;
				padding: var(--wp--preset--spacing--xx-small) 1.5rem;
			}
		}
	}

	&.page-link {
		min-height: clamp(6em, 30vh, 16em);
		background-color: var(--wp--preset--color--primary);
		/* background: none; */
		color: var(--wp--preset--color--base);
		justify-content: center;
		align-items: center;

		h3.wp-block-post-title{
			border: 0;
			text-align: center;
			font-size: var(--wp--preset--font-size--max-36);
			padding: var(--wp--preset--spacing--x-small);
			z-index: 5;
		}
		/* extend page-link area as a whole-card link */
		.wp-block-post-title a::after {
			content: '';
			position: absolute;
			inset: 0;
			z-index: 1;
		}

		.inner{
			/* aspect-ratio: 16 / 9; */
			padding: var(--wp--preset--spacing--xx-small);

			figure{
				position: absolute;
				top: 0;
				left: 0;
				z-index: 0;
				width: 100%;
				height: 100%;
				object-fit: cover;
			}

			h2{
				font-size: var(--wp--preset--font-size--large);
			}
		}

		figure{
			border-radius: var(--border-radius-default);
			svg,
			img{
				width: 100%;
				height: 100%;
				object-fit: contain;
				object-position: center;
				color: var(--wp--preset--color--base);
				fill: var(--wp--preset--color--base);
				opacity: 0.1;
			}
		}

	}

	/* Obsolete - card intro for KH */
	.wp-block-post-excerpt{
		display: flex;
		justify-content: flex-end;
	}
	.wp-block-post-excerpt__more-link{
		display: flex;
		justify-content: center;
		align-items: center;
		aspect-ratio: 1 / 1;
		width: 2.5em;
		border: 1px solid var(--wp--preset--color--light);
		border-right: 0;
		border-bottom: 0;
		border-radius: var(--border-radius-default) 0 0 0;
		/* padding: var(--wp--preset--spacing--xx-small); */
		/* padding-top: var(--wp--preset--spacing--xxx-small);
		padding-bottom: var(--wp--preset--spacing--xxx-small); */
	}

	/* prevent bottom border for headings without subpages */
	&:not(:has(.wp-block-post-template, .wp-block-post-excerpt)) .page-link {
			h2,
			h3{
				border-bottom: none;
			}
	}
}

/* Card styles (ACF card_style field) */

.card.card-style-blue,
.card.card-style-orange,
.card.card-style-secondary,
.card.card-style-burgundy {
	color: var(--wp--preset--color--base);
	a{
		color: inherit;

		&::before{
			background-color: var(--wp--preset--color--base);
		}

		&:hover,
		&:focus,
		&:active {
			color: var(--wp--preset--color--yellow);

			&::before{
				background-color: var(--wp--preset--color--yellow);
			}
		}
	}
}

/* --card-surface / --card-edge expose the card's colours so attached UI (e.g.
   the circular "see more" dropdown) can match the card it extends from. */
.card.card-style-blue {
	--card-surface: var(--wp--preset--color--primary);
	--card-edge: var(--wp--preset--color--primary);
	background-color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

.card.card-style-orange {
	--card-surface: var(--wp--preset--color--orange);
	--card-edge: var(--wp--preset--color--orange);
	background-color: var(--wp--preset--color--orange);
	figure {
		/* background-color: var(--wp--preset--color--orange); */
		background-color: #d4621b;
	}
}
.card.card-style-secondary {
	--card-surface: var(--wp--preset--color--secondary);
	--card-edge: var(--wp--preset--color--secondary);
	background-color: var(--wp--preset--color--secondary);
	figure {
		 background-color: var(--wp--preset--color--secondary);
	}
}
.card.card-style-burgundy {
	--card-surface: var(--wp--preset--color--burgundy);
	--card-edge: var(--wp--preset--color--burgundy);
	background-color: var(--wp--preset--color--burgundy);
	figure {
		background-color: var(--wp--preset--color--burgundy);
	}
}


/* -- Card + Card (linked) -- */

.wp-block-group.is-style-card-link,
.wp-block-group.is-style-card {
	border-radius: var(--border-radius-default);
	position: relative;
	display: flex;
	gap: var(--wp--preset--spacing--xxx-small);
	align-items: stretch;
	background-color: var(--wp--preset--color--base);
	/* color: var(--wp--preset--color--base); */
	border: 2px solid var(--wp--preset--color--primary);
	overflow: hidden;
	/* padding: var(--wp--preset--spacing--x-small); */
	/* padding-right: var(--wp--preset--spacing--small); */
	transition: color 0.1s ease-in-out, border-color 0.1s ease-in-out;

	margin-block-start: 30px;
	margin-left: 0 !important;
	margin-right: 0 !important;
	/* width: max-content; */
	width: -moz-available;
	width: -webkit-fill-available;
	width: stretch;

	p, svg {
		transition: none;
	}
	& > .wp-block-group{
		gap: var(--wp--preset--spacing--xx-small);
	}
	& > * {
		flex: 1;
	}
	p,
	ul,
	ol{
		margin-block-start: 0;
	}
	.card-link-heading{
		font-size: var(--wp--preset--font-size--max-36);
		font-weight: bold;
		line-height: 1.2;
		a{
			/* display: inline-block;
    	width: max-content; */
		}
	}
	ul,
	ol{
		padding-left: 1em;
	}
	& > .wp-block-image {
		aspect-ratio: 1 / 1;
		margin: 0;
		max-width: 5em;
		display: flex;
		background-color: var(--wp--preset--color--primary);
		color: var(--wp--preset--color--base);
		padding: var(--wp--preset--spacing--xxx-small);
		transition: background-color 0.1s ease-in-out, color 0.1s ease-in-out;
	}
	& > .wp-block-image :is(img, svg) {
		width: 100%;
		height: 100%;
		object-fit: cover;
		max-height: unset;
		max-width: unset;
	}
	& > .wp-block-group {
		flex: 1;
		margin-block-start: 0;
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: var(--wp--preset--spacing--x-small);
		& :empty{
			/* margin: 0; */
			display: none;
		}
	}
	&.card-warning{
		border-color: var(--colour-warning);
		&,
		& > * {
			color: var(--colour-warning);
		}
		& > .wp-block-image {
			background-color: var(--colour-warning);
			color: var(--wp--preset--color--base);
		}
	}
}

/* Linked card only: whole-card hover, stretched-link overlay and inherited link colour */
.wp-block-group.is-style-card-link {
	a {
		transition: none;
		color: inherit;
		text-decoration: none;
	}
	&:hover{
		color: var(--wp--preset--color--yellow);
		border-color: var(--wp--preset--color--yellow);
		svg{
			color: inherit;
		}
		.wp-block-image {
			background-color: var(--wp--preset--color--yellow);
		}
	}
	& :is(.card-link-heading, h1, h2, h3, h4, h5, h6, p) > a::after {
		content: '';
		position: absolute;
		inset: 0;
	}
}

/* Disable the stretched-link overlay inside the block editor so cursor placement works normally */
.editor-styles-wrapper .wp-block-group.is-style-card-link{
	:is(h1, h2, h3, h4, h5, h6, p) > a::after {
		display: none;
	}
	&:hover,
	:hover{
		color: inherit;
		border-color: inherit;
	}
}

/* Don't hide empty paragraphs inside the editor — an unfilled card paragraph is
   :empty, so display:none makes the block vanish while you're trying to type in it. */
.editor-styles-wrapper .wp-block-group:is(.is-style-card, .is-style-card-link) > .wp-block-group :empty {
	display: revert;
}

/* Quote with portrait: the fixed circular portrait sits inline with the citation on the last row
   inside the quote box; the quote text spans the full width above them, so no responsive rules. */
.wp-block-quote.quote-portrait {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--font-size--x-small, 1rem);
	> * {
		margin: 0;
	}
	> p {
		flex-basis: 100%; /* quote text takes its own row above the byline */
	}
	.wp-block-image {
		flex: 0 0 auto;
		img {
			width: 96px;
			height: 96px;
			object-fit: cover;
			border-radius: 50%;
		}
	}
	> cite {
		flex: 1;
	}
	/* Links take the quote's font colour. Section themes colour every link
	   (sections.css), which left links white on a quote given its own text
	   colour. A link colour picked on the quote, or on a block inside it, still
	   wins, and so does the site's yellow hover. */
	a:where(:not(.wp-element-button, :hover, .quote-portrait.has-link-color *, .quote-portrait .has-link-color *)) {
		color: inherit;
	}
}



/* -- Quick links -- */

.quick-links{
	background-color: var(--wp--preset--color--base);
	border: var(--border-card);
	border-radius: var(--border-radius-default);
	box-shadow: var(--shadow-card);
	transition: box-shadow 0.15s;
	position: relative;

	/* padding-right: 1rem;
	width: fit-content; */

	margin-top: var(--wp--preset--spacing--large);
	margin-bottom: var(--wp--preset--spacing--x-small);

	h4{
		height: -moz-available;
		height: -webkit-fill-available;
		height: stretch;
		display: flex;
		align-items: center;
		text-align: center;
		text-transform: uppercase;
		padding: var(--wp--preset--spacing--xx-small);
		background-color: var(--wp--preset--color--primary);
		color: var(--wp--preset--color--base);
		border-top-left-radius: inherit;
		border-bottom-left-radius: inherit;
	}

	.wp-block-navigation{
		gap: var(--wp--preset--spacing--xxx-small) var(--wp--preset--spacing--x-small);
		padding: var(--wp--preset--spacing--xxx-small) 0;
	}
	/* border-bottom: 0;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0; */
}

/* -- Breadcrumbs -- */

.breadcrumbs{
	font-size: var(--wp--preset--font-size--small);
}

.breadcrumbs ol{
	list-style: none;
	padding: 0;
	display: flex;
	/* Wrap between crumbs; without this they shrink and wrap mid-title. */
	flex-wrap: wrap;
	align-items: baseline;
	/* No column gap: the separators carry the horizontal spacing themselves,
	   so it stays equal on both sides of each glyph. */
	gap: 0.25em 0;
	margin: 0;
}

.breadcrumbs li{
	white-space: nowrap;
}

.breadcrumbs a{
	text-decoration: none;
}

/* The current page is the one crumb allowed to wrap: it runs far longer than
   any ancestor, and nowrap on a 60-odd character title overflows the page. */
.breadcrumbs .current{
	white-space: normal;
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

/* The glyph is narrow and sits off-centre in its own advance width, so give
   it a square box and centre it there. That, plus equal margins, is what
   keeps the space either side of a separator even. */
.breadcrumbs__sep{
	display: inline-block;
	inline-size: 1em;
	text-align: center;
	margin-inline: 0.25em;
}

/* -- Breadcrumbs: the "…" that stands in for folded levels -- */

/* Inline-level, or the separator after it drops onto its own line. */
.breadcrumbs__more details{
	display: inline-block;
}

.breadcrumbs__more summary{
	cursor: pointer;
	list-style: none;
	padding-inline: 0.35em;
	position: relative;
}

/* "…" is narrower than a 24px target; grow the hit area, not the line box. */
.breadcrumbs__more summary::after{
	content: "";
	position: absolute;
	inset-block-start: 50%;
	inset-inline-start: 50%;
	translate: -50% -50%;
	inline-size: max(100%, 24px);
	block-size: max(100%, 24px);
}

.breadcrumbs__more summary::-webkit-details-marker{
	display: none;
}

.breadcrumbs__more summary:hover,
.breadcrumbs__more summary:focus-visible{
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

/* A folded trail keeps the first two levels, the parent and the current page.
   The current page can be long enough to wrap a trail on its own, so this
   applies at every width rather than only on narrow screens. */

.breadcrumbs--collapsible > li:not(:nth-child(-n+2), .breadcrumbs__more, :nth-last-child(-n+2)){
	display: none;
}

/* Opening the "…" restores the full trail in place. */
.breadcrumbs--collapsible:has(> .breadcrumbs__more details[open]) > li{
	display: list-item;
}

/* Without :has() the "…" could not expand, so leave the trail unfolded and
   let it wrap instead of hiding levels behind a dead control. */
@supports not selector(:has(*)){
	.breadcrumbs--collapsible > li{
		display: list-item;
	}

	.breadcrumbs--collapsible > .breadcrumbs__more{
		display: none;
	}
}


/* -- Sub-subpage accordion -- */

.card .wp-block-template-part{
	width: -moz-available;
	width: -webkit-fill-available;
	width: stretch;
}

.aa-sub-accordion {
	li{
		padding: 0;
	}
	h4{
		width: -moz-available;
		width: -webkit-fill-available;
		width: stretch;
		padding: 0;
		a{
			display: block;
			padding: var(--wp--preset--spacing--xx-small) 1.5rem;
		}
	}
}

.aa-sub-accordion__summary {
  list-style: none;
  cursor: pointer;
  /* user-select: none; */
}

.aa-sub-accordion__summary::-webkit-details-marker {
  display: none;
}

.aa-sub-accordion__label {
  opacity: 0.55;
  /* text-transform: uppercase; */
	padding: 0.5rem 1.5rem;
	display: flex;
	align-items: center;
}

/* Corner arrow indicator — points right (collapsed), rotates down (expanded) */
.aa-sub-accordion__label::after {
  content: '';
  display: inline-block;
  margin-left: 0.3rem;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  vertical-align: middle;
}

.aa-sub-accordion[open] .aa-sub-accordion__label::after {
  transform: rotate(45deg);
}

/* Grid trick: animates height on open and close without knowing the content height */
.aa-sub-accordion__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.aa-sub-accordion__inner {
  overflow: hidden;
}

.aa-sub-accordion[open]:not(.is-closing) .aa-sub-accordion__body {
  grid-template-rows: 1fr;
}

/* ── Card dropdowns OVERLAY instead of pushing the grid apart ──────────────────
   The default above animates height in flow, which shoves the rows below it down.
   On a subpage CARD the panel instead drops out of flow beneath the card and is
   revealed with clip-path, so the grid never reflows — matching the D-shape and
   clockwise flow layouts (which carry their own, more specific copy of these
   rules; see .subpages-circular).

   Scoped to a card's OWN dropdown via direct children, so an accordion nested
   INSIDE a panel keeps the default in-flow behaviour and simply makes the
   (already out-of-flow) panel taller. */
.card > .wp-block-template-part > .aa-sub-accordion {
	position: relative;
}

.card > .wp-block-template-part > .aa-sub-accordion > .aa-sub-accordion__body {
	position: absolute;
	top: 100%;
	left: -1px;
	right: -1px;
	display: block;
	/* Match the card's surface so a styled card keeps its colour through the panel. */
	background: var(--card-surface, var(--wp--preset--color--base));
	border: 1px solid var(--card-edge, var(--wp--preset--color--light));
	border-top: 0;
	border-radius: 0 0 var(--border-radius-default) var(--border-radius-default);
	clip-path: inset(0 0 100% 0);
	transition: clip-path 0.25s ease;
}

.card > .wp-block-template-part > .aa-sub-accordion > .aa-sub-accordion__body > .aa-sub-accordion__inner {
	overflow: visible;
}

.card > .wp-block-template-part > .aa-sub-accordion[open]:not(.is-closing) > .aa-sub-accordion__body {
	clip-path: inset(0 0 0 0);
}

.card:has(> .wp-block-template-part > .aa-sub-accordion[open]) {
	/* Square the bottom corners and drop the bottom border so the card meets the
	   panel as a single piece. */
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	border-bottom-color: transparent;
	/* Lift above neighbours: grid items paint in DOM order, so without this a
	   later card would cover an earlier card's open panel. */
	z-index: 5;
}

/* A panel that is closing keeps [open] for the length of its transition, so it
   would tie the z-index of the card the cursor just moved onto and win on DOM
   order alone. Demote the one on its way out so the opening panel always paints
   over it, while it still sits above the cards that aren't involved. */
.card:has(> .wp-block-template-part > .aa-sub-accordion.is-closing) {
	z-index: 4;
}

/* A card that HAS a dropdown carries its shadow as a FILTER rather than a
   box-shadow. The panel is a descendant, so drop-shadow() outlines card + open
   panel as one continuous shape and follows the clip-path reveal; a box-shadow
   traces the card box alone and cuts a visible seam across the join. Values mirror
   the existing card shadows, so cards without a dropdown look unchanged beside
   them. (filter makes the card a stacking context, which the z-index rules above
   already account for; the panel's containing block is still the accordion.) */
.card:has(> .wp-block-template-part > .aa-sub-accordion) {
	box-shadow: none;
	filter: drop-shadow(0 2px 12px rgba(0, 45, 74, 0.05));
	transition: filter 0.15s;
}

.card:has(> .wp-block-template-part > .aa-sub-accordion):hover {
	box-shadow: none;
	filter: drop-shadow(0 2px 12px rgba(0, 45, 74, 0.2));
}

/* An overlay panel is out of flow, so it cannot push anything itself. Panels are
   free to cover what follows the grid (quick links, the aside) — only the FOOTER is
   protected: sub-accordion.js measures how far a panel would reach into it and
   publishes that as --aa-panel-overhang here, reserving just enough to keep the
   footer clear. With JS off the value is absent and it falls back to 0, so the
   overlay simply overlaps everything, as it did before. */
.wp-block-query:has(> .wp-block-post-template > li > .card > .wp-block-template-part > .aa-sub-accordion) {
	padding-bottom: var(--aa-panel-overhang, 0px);
	transition: padding-bottom 0.25s ease;
}


/* -- Template layout (templates/*.html) --
   Spacing previously inlined in the template block markup. */

/* Main content wrapper */
main.site-content {
    margin-top: 0;
}

.site-content--padded {
    padding-top: var(--wp--preset--spacing--small);
    padding-bottom: var(--wp--preset--spacing--small);
}

/* The body of a single post, news story or event: everything between the
   photo banner and the footer. Padding, not margin on main, because the banner
   sits inside main and must stay flush with the header. The padding replaces
   the 30px block gap above rather than adding to it, and the first and last
   children lose their own margins (the event details carry 1rem), so every
   single gets exactly this space. :root lifts each rule to (0,2,0), over
   core's (0,1,0) flow-layout margins, whatever the stylesheet order. Kept
   flat, not nested: the editor scopes this file by rewriting each selector
   (:root .single-body becomes :root .editor-styles-wrapper .single-body),
   and a flat selector is the case that rewrite is known to handle. */
:root .single-body {
    margin-block-start: 0;
    padding-block: var(--wp--preset--spacing--medium);
}

:root .single-body > :first-child {
    margin-block-start: 0;
}

:root .single-body > :last-child {
    margin-block-end: 0;
}

/* Intro group above archive/search result lists */
.archive-intro {
    margin-bottom: var(--wp--preset--spacing--medium);
}

/* -- Pattern layout (patterns rendered via templates/parts) --
   Spacing previously inlined in pattern block markup. */

/* patterns/header-default.php */
.header-bar {
    margin-top: 0;
    padding: 30px;
}

/* patterns/footer-default.php */
.footer-bar {
    margin-top: 0;
    padding: var(--wp--preset--spacing--small) 30px;
}

/* patterns/posts.php */
.entry-header .post-meta {
    margin-bottom: 30px;
    font-size: 18px;
}

/* patterns/comments.php */
.entry-comments {
    margin-top: var(--wp--preset--spacing--medium);
}

.entry-comments .comments-list {
    margin-bottom: var(--wp--preset--spacing--medium);
}

.entry-comments .comment-entry {
    margin-bottom: var(--wp--preset--spacing--small);
}

/* patterns/page-home.php */
.welcome {
    margin-top: 0;
    padding: 70px 30px var(--wp--preset--spacing--x-large);
}

.welcome .wp-block-heading {
    margin-bottom: 0;
    letter-spacing: -1px;
}

.welcome .wp-block-buttons {
    margin-top: 30px;
}

.home-band {
    margin-top: 0;
    padding: var(--wp--preset--spacing--x-large) 30px;
}

.features-intro {
    padding-bottom: var(--wp--preset--spacing--large);
}

.features-intro .wp-block-heading {
    letter-spacing: -1px;
}

.features-intro p {
    line-height: 1.5;
}

.features-row {
    margin-bottom: var(--wp--preset--spacing--large);
}

.button-roomy .wp-block-button__link {
    padding: var(--wp--preset--spacing--x-small) var(--wp--preset--spacing--medium);
}

/* -- Sidebar layout (page-subpages-sidebar template) -- */

@media (min-width: 782px) {
    .has-sidebar > .subpages-content {
        flex-basis: 66.66%;
        flex-grow: 0;
    }

    .has-sidebar > .sidebar.wp-block-column {
        flex-basis: 33.33%;
        flex-grow: 0;
    }
}

.has-sidebar {
    gap: var(--wp--preset--spacing--small) !important;

    & > .sidebar {
        & > .wp-block-query {
            position: sticky;
            top: var(--wp--preset--spacing--small);
        }

        li {
            margin-block-start: 0;
            border-bottom: 1px solid var(--wp--preset--color--light);

            &:first-child {
                border-top: 1px solid var(--wp--preset--color--light);
            }
        }

        .wp-block-post-title {
            font-size: var(--wp--preset--font-size--medium);
            margin: 0;
            padding-block: var(--wp--preset--spacing--xxx-small);
        }

        /* Current page in the section-nav list */
        .wp-block-post-title.is-current {
            font-weight: 700;

            a {
                color: var(--wp--preset--color--primary);
                text-decoration: none;
            }

            /* No link is rendered for the current post-title, but guard both. */
            &:not(:has(a)) {
                color: var(--wp--preset--color--primary);
            }
        }

        /* In-page H3 lists: current page (open <nav>) and siblings (<details>) */
        .section-nav__anchors {
            padding-block-end: var(--wp--preset--spacing--xxx-small);

            ol {
                list-style: none;
                margin: 0;
                padding-inline-start: var(--wp--preset--spacing--xx-small);
            }

            li {
                border: 0;
                margin: 0;
            }

            a {
                display: block;
                padding-block: var(--wp--preset--spacing--xxx-small);
                font-size: var(--wp--preset--font-size--small);
                text-decoration: none;

                &:hover,
                &:focus {
                    text-decoration: underline;
                }
            }
        }

        /* Sibling H3 lists: collapsed accordion under each non-current page */
        .section-nav__anchors--accordion {
            padding-block-end: var(--wp--preset--spacing--xxx-small);

            > summary {
                list-style: none;
                cursor: pointer;
                display: flex;
                align-items: center;
                gap: 0.4em;
                padding-block: var(--wp--preset--spacing--xxx-small);
                font-size: var(--wp--preset--font-size--small);
                opacity: 0.75;

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

                &::before {
                    content: "\25B8"; /* ▸ */
                    display: inline-block;
                    transition: transform 0.15s ease;
                }
            }

            &[open] > summary::before {
                transform: rotate(90deg);
            }
        }
    }
}

/* Section tree sidebar
---------------------------------------- */

/* templates/page-section-tree.html — the depth-capable sidebar.

   inc/section-tree.php renders only the current path, so the nesting that
   reaches this stylesheet is at most the depth of that path (never the whole
   tree), and the indent per level can stay legible without the column running
   out of width. Rows carry .is-parent / .is-redirect rather than the global
   .has-subpages / .np-redirect, because those rules absolutely position their
   icon for the card grids; the markers below mean the same things and sit
   inline instead. */

.has-sidebar > .sidebar > .wp-block-frost-section-tree {
    position: sticky;
    top: var(--wp--preset--spacing--small);

    /* A branch outgrows the viewport quickly — 18 links already fill 720px at
       depth 3, and the deepest branch on this site renders 28 — and a sticky box
       taller than the screen never sticks: it just scrolls away and takes the nav
       with it. Cap the height and let the tree scroll inside itself instead, so
       the nav stays put at any depth. */
    max-height: calc(100vh - (var(--wp--preset--spacing--small) * 2));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.section-tree {
    font-size: var(--wp--preset--font-size--small);

    a {
        display: block;
        text-decoration: none;

        &:hover,
        &:focus {
            text-decoration: underline;
        }
    }
}

.section-tree__root {
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 700;
    color: var(--wp--preset--color--primary);
    padding-block: var(--wp--preset--spacing--xxx-small);
    border-bottom: 1px solid var(--wp--preset--color--light);
}

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

/* Nested levels get a rail as well as an indent, so depth reads as structure
   rather than as text quietly drifting right. */
.section-tree__list .section-tree__list {
    margin-inline-start: 0.5rem;
    padding-inline-start: 0.6rem;
    border-inline-start: 1px solid var(--wp--preset--color--light);
}

.section-tree__item {
    margin: 0;
}

/* Separators run at the top level only: one per row at every depth turns a deep
   branch into a stack of lines and swamps the rail.

   Deliberately not scoped to `.has-sidebar > .sidebar`, so the block carries its
   own appearance wherever it is placed — a footer band or a full-width section,
   not just the column page-section-tree.html puts it in. It still has to settle
   with the sidebar's own blanket rules when it IS in that column, since those
   border every `li` they can reach and add a top border to the first; both
   selectors below include the `ul`/`li` types so they outweigh
   `.has-sidebar > .sidebar li:first-child` outright rather than relying on
   source order to break a tie. */
.section-tree ul.section-tree__list li.section-tree__item {
    border: 0;
}

.section-tree > ul.section-tree__list > li.section-tree__item {
    border-bottom: 1px solid var(--wp--preset--color--light);
}

.section-tree__link {
    padding-block: var(--wp--preset--spacing--xxx-small);
}

/* Three tiers, because in a deep tree bold alone stops meaning anything: plain
   rows, the ancestors forming the spine of the current path, and the page you
   are actually on. The current row takes a tint as well as weight — sky carries
   navy at 11.27:1, and without it "Fellowships" and "Pre-Fellowship" read as the
   same emphasis two rows apart. */
.section-tree__item.is-current > .section-tree__link {
    font-weight: 700;
    color: var(--wp--preset--color--primary);
    background-color: var(--wp--preset--color--sky);
    padding-inline: 0.4rem;
    margin-inline: -0.4rem;
}

.section-tree__item.is-ancestor > .section-tree__link {
    font-weight: 600;
}

/* Trailing markers: "more inside" and "leaves the site". */
.section-tree__item.is-parent > .section-tree__link::after,
.section-tree__item.is-redirect > .section-tree__link::after {
    content: '';
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    margin-inline-start: 0.4em;
    vertical-align: -0.1em;
    mask-size: contain;
    mask-repeat: no-repeat;
    background-color: currentColor;
    opacity: 0.55;
}

.section-tree__item.is-parent > .section-tree__link::after {
    mask-image: var(--icon-menu-levels);
}

.section-tree__item.is-redirect > .section-tree__link::after {
    mask-image: var(--icon-link);
}

.section-tree__item.is-parent > .section-tree__link:hover::after,
.section-tree__item.is-redirect > .section-tree__link:hover::after {
    opacity: 1;
}

/* Forced colours (Windows contrast themes) repaint backgrounds, which would
   turn the markers into the page colour; the dimming goes too, as it would
   cut the contrast those themes exist for. */
@media (forced-colors: active) {
    .section-tree__item.is-parent > .section-tree__link::after,
    .section-tree__item.is-redirect > .section-tree__link::after {
        background-color: LinkText;
        opacity: 1;
    }
}

/* Editor stand-in (blocks/section-tree-editor.js) — style.css is loaded into
   the editor via add_editor_style(), so this only ever renders there. */
.section-tree-placeholder {
    padding: var(--wp--preset--spacing--x-small);
    border: 1px dashed var(--wp--preset--color--neutral);
    font-size: var(--wp--preset--font-size--small);

    p {
        margin-block: 0.4em 0;
        opacity: 0.75;
    }
}

@media (max-width: 781px) {
    .has-sidebar > .sidebar {
        position: static;
        order: -1;
    }

    /* Stacked above the content, the tree is just a list — sticking it and
       capping its height would trap the nav in a short scrolling box at the top
       of every page. */
    .has-sidebar > .sidebar > .wp-block-frost-section-tree {
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    /* ...and it goes BELOW the content, unlike the flat sibling sidebar. The
       shared rule above hoists the sidebar with order:-1, which is right for the
       five links page-section-nav shows and wrong for a tree: the deepest branch
       renders 28, and putting all of them ahead of the article means scrolling
       past the whole section to reach the page you opened. */
    .has-sidebar > .sidebar.sidebar--tree {
        order: 1;
    }
}

/* Media Queries
---------------------------------------- */

@media only screen and (max-width: 600px) {

	/* -- Utility -- */

	.is-style-hidden-mobile {
		display: none !important;
	}

}

@media only screen and (max-width: 782px) {

	/* -- Columns -- */

	.is-style-columns-reverse {
		flex-direction: column-reverse;
	}

}

@media (min-width: 600px) {
    .wp-block-query .wp-block-post-template.is-flex-container.is-flex-container.columns-3>li {
        width: unset;
    }
}


/* -- Horizontal accordion (aa/accordion) --

   Panels rest at stepped widths and one expands. Only flex-grow transitions:
   it is a plain number, so it interpolates without touching width or height
   and without a layout read anywhere in the loop.

   Colour comes from --aa-acc-bg / --aa-acc-fg, set per variant class by
   inc/accordion.php. Everything inside the panel derives from that pair, so a
   new variant needs no rules here. */

.aa-accordion {
	--aa-acc-measure: min(30rem, 46vw);
	/* The titles' line height, following the theme's headings (1.1 here). Set on
	   the row because three rules derive a first-line centre from it — the two
	   star positions and the rail's clearance below the star — and none of those
	   elements sits inside the title. One definition is what stops those
	   calculations drifting from what the text actually does. */
	--aa-acc-title-line: var(--wp--custom--line-height--heading, 1.2);
	display: flex;
	gap: var(--aa-acc-gap, 6px);
	height: var(--aa-acc-height, 420px);
	overflow: hidden;
}

/* The outline is a border, not outline/box-shadow, so that border-box (set
   globally at style.css:21) keeps it inside the panel's own box: the coloured
   ground is inset by the border rather than the panel growing, which is what
   stops a thick outline from shifting the layout around it.

   Width does the switching. At the 0 default the border collapses whatever the
   colour resolves to, so there is no "none" colour to keep in sync — and the
   colour falls through --aa-acc-outline (set per row by a variant class) to
   --aa-acc-fg, the panel's own paired foreground, which is the safe default on
   every variant. Absolutely-positioned children use the padding box as their
   containing block, so .aa-accordion__inner and the trigger sit inside the
   border without any adjustment. */
.aa-accordion__panel {
	--w: 3;
	position: relative;
	flex: var(--w) 1 0;
	min-width: 0;
	overflow: hidden;
	background-color: var(--aa-acc-bg, #0C2A4E);
	color: var(--aa-acc-fg, #FFFFFF);
	border: var(--aa-acc-outline-width, 0) solid var(--aa-acc-outline, var(--aa-acc-fg, #FFFFFF));
	transition: flex-grow 0.55s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.aa-accordion__panel--w1 { --w: 1; }
.aa-accordion__panel--w2 { --w: 2; }
.aa-accordion__panel--w3 { --w: 3; }
.aa-accordion__panel--w4 { --w: 4; }
.aa-accordion__panel--w5 { --w: 5; }
.aa-accordion__panel--w6 { --w: 6; }

/* The rule that grows the open panel has to out-specify the rule that shrinks
   its siblings — both carry :has(), so without the trailing .is-open the
   clicked panel shrinks along with everything else and the bug reads as a
   design problem rather than a selector problem. */
.aa-accordion:has(.is-open) .aa-accordion__panel { flex-grow: calc(var(--w) * 0.4); }
/* 9 plus this panel's own collapsed share, so the row's total flex-grow is the
   same whichever panel is open (9 + 0.4 x the weights). With a flat 9 the total
   moved with the open panel's weight, so every *collapsed* panel resized on each
   switch — measured at 8.8px — and their stars, being centred, shuffled about
   5px with them. Now only the panel opening or closing moves. The rails variant
   below needs no such correction: its collapsed panels are a flat 1 each. */
.aa-accordion:has(.is-open) .aa-accordion__panel.is-open { flex-grow: calc(9 + var(--w) * 0.4); }

.aa-accordion--collapse-rails:has(.is-open) .aa-accordion__panel { flex-grow: 1; }
.aa-accordion--collapse-rails:has(.is-open) .aa-accordion__panel.is-open { flex-grow: 9; }

/* Open and collapsed states are two separate elements that cross-fade, not one
   element that flips: writing-mode cannot be transitioned, so a single label
   would jump halfway through the expansion. */
.aa-accordion__inner {
	position: absolute;
	inset: 0;
	padding: 28px;
	display: flex;
	flex-direction: column;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s linear;
}

.aa-accordion__panel.is-open .aa-accordion__inner {
	opacity: 1;
	pointer-events: auto;
	transition-delay: 0.18s;
}

.aa-accordion__title {
	margin: 0;
	font-size: var(--aa-acc-title-size, 1.35rem);
	line-height: var(--aa-acc-title-line);
	letter-spacing: -0.01em;
}

/* Title typography chosen on the row (the block's "Title" panel). Size falls
   back to 1.35rem above; family and weight apply only when chosen — render.php
   adds the class — so an accordion without them keeps the theme's heading font
   and weight instead of having a default forced over them.

   The rail follows the title's family and weight, and scales with its size;
   see .aa-accordion__rail-text for the cap that keeps a large rotated line
   inside a narrow rail. */
.aa-accordion--title-font :is(.aa-accordion__title, .aa-accordion__rail-text) {
	font-family: var(--aa-acc-title-font);
}

.aa-accordion--title-weight :is(.aa-accordion__title, .aa-accordion__rail-text) {
	font-weight: var(--aa-acc-title-weight);
}

/* Titles pick up the theme's link hover (style.css:133), including its timing.
   Keyed off the trigger rather than the panel, which makes the hot zone follow
   the trigger's own shape: the whole panel while collapsed, and just the title
   strip once open — so hovering the body or the CTA does not light the title
   up. :focus-visible is carried alongside so the keyboard path matches. */
.aa-accordion__title,
.aa-accordion__rail-text {
	transition: color 0.1s ease-in-out;
}

.aa-accordion__panel:has(.aa-accordion__hit:hover) .aa-accordion__title,
.aa-accordion__panel:has(.aa-accordion__hit:hover) .aa-accordion__rail-text,
.aa-accordion__panel:has(.aa-accordion__hit:focus-visible) .aa-accordion__title,
.aa-accordion__panel:has(.aa-accordion__hit:focus-visible) .aa-accordion__rail-text {
	color: var(--aa-acc-hover, var(--wp--preset--color--yellow, #FFA100));
}

.aa-accordion__body {
	margin-top: 18px;
	min-height: 0;
	overflow-y: auto;
}

/* Fixed measure so the paragraph does not re-wrap on every frame of the
   expansion — the panel's own width is still animating underneath it. */
.aa-accordion__body-inner {
	width: var(--aa-acc-measure);
}

.aa-accordion__body > * > :first-child { margin-top: 0; }

/* -- Auto height --

   The row takes its height from whichever panel's content is tallest. That
   only works if the content is in flow, so the overlay is dropped here and
   .aa-accordion__inner is given an explicit measure instead — every panel
   then reports the height its content occupies at the width it will actually
   be read at, open or collapsed, and flex's default stretch levels the rest.
   Without the fixed measure a collapsed 90px rail would wrap its paragraph to
   one word per line and win the height contest by a mile.

   min-height still applies: a two-line panel would otherwise leave a rail too
   short for its own rotated label, which is clipped rather than shrunk. */

.aa-accordion--auto {
	height: auto;
	min-height: var(--aa-acc-height, 420px);
}

.aa-accordion--auto .aa-accordion__inner {
	position: static;
	width: calc(var(--aa-acc-measure) + 56px); /* the 28px padding, both sides */
}

.aa-accordion--auto .aa-accordion__body {
	overflow: visible;
}

/* Links take the panel's paired foreground, like every other piece of panel
   text. The theme already says links inherit (style.css:372), but that rule and
   theme.json's link colour both weigh exactly one element, so the winner is
   whichever loads last — and that differs by context: the page loads global
   styles first, the editor canvas loads them after the theme stylesheet. The
   result was white links on a navy panel on the site and navy ones in the
   editor. One class of weight settles it the same way in both.

   Deliberately only one class: a link colour set on a block weighs the same and
   loads after this (core-block-supports), so an explicit choice still wins. */
.aa-accordion__panel a:where(:not(.wp-element-button)) {
	color: inherit;
}

/* Only the *default* button style is inverted to the panel's pairing. Any named
   style variation — core's outline, the theme's own registered styles — is
   excluded by selector rather than out-weighed, so it keeps its own treatment
   untouched. Outline then resolves to currentColor, which is already the
   panel's paired foreground, so it stays legible on every variant.

   Specificity has to be deliberate here. WordPress wraps its button rules in
   `:root :where(…)`, which is a single class of weight — so a rule that merely
   *ties* with them and loads later, as an earlier version of this did, silently
   beats every one of them and fills the outline style in. Matching only the
   default style is what keeps this safe, not the weight itself. Explicit colour
   choices need no guard: core's preset classes carry !important. */
:where(.aa-accordion__body) .wp-block-button:not([class*="is-style-"]) > .wp-block-button__link:not([class*="is-style-"]) {
	background-color: var(--aa-acc-fg, #FFFFFF);
	color: var(--aa-acc-bg, #0C2A4E);
	border-color: transparent;
}

/* The inverted fill is light, so hover follows the light-fill rule in
   Buttons: yellow fill, navy text. */
:where(.aa-accordion__body) .wp-block-button:not([class*="is-style-"]) > .wp-block-button__link:not([class*="is-style-"]):is(:hover, :focus-visible) {
	background-color: var(--wp--preset--color--yellow, #FFA100);
	color: var(--wp--preset--color--primary);
}

/* -- Collapsed rail -- */

.aa-accordion__rail {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 28px 0;
	pointer-events: none;
	transition: opacity 0.25s linear 0.15s;
	/* A size container, so the rotated title can cap its size against the
	   rail's own width (cqw, below). The rail is positioned by its insets, so
	   its width never came from its content and the containment costs nothing. */
	container-type: inline-size;
}

/* With the star marker the collapsed star sits at the top of the rail, so the
   label stops short of it instead of running underneath once a long title
   fills the rail: the star's top (the same first-line calc the star itself
   uses), its 26px, and a 14px gap. */
.aa-accordion--marker-star .aa-accordion__rail {
	padding-top: calc(28px + (var(--aa-acc-title-size, 1.35rem) * var(--aa-acc-title-line) - 26px) / 2 + 26px + 14px);
}

.aa-accordion__panel.is-open .aa-accordion__rail {
	opacity: 0;
	transition-delay: 0s;
}

/* vertical-rl plus the half turn reads bottom-to-top, the usual direction for
   a spine label in a left-to-right script. */
.aa-accordion__rail-text {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	max-height: 100%;
	overflow: hidden;
	/* A title too long for the rail ends in an ellipsis rather than a letter
	   cut through; in vertical writing the ellipsis falls at the top end. */
	text-overflow: ellipsis;
	/* Scales with the title at 0.85 of its size, which is the rail's old 18.4px
	   against the default 21.6px title, so an accordion with no size set looks
	   exactly as before. Capped at 60% of the rail's width: at the shared title
	   line height that keeps the rotated line inside about two-thirds of even a
	   narrow rail rather than spilling over its sides.

	   cqw, not cqi. Container query units follow the *element's* axes, and this
	   element is turned on its side, so cqi here is the rail's height — measured
	   at 90px where cqw was the correct 8.36px — and the cap never bit. cqw is
	   physical width whatever the writing mode. */
	font-size: min(calc(var(--aa-acc-title-size, 1.35rem) * 0.85), 60cqw);
	line-height: var(--aa-acc-title-line);
	font-weight: 700;
	letter-spacing: -0.01em;
	white-space: nowrap;
}

/* -- Trigger -- */

.aa-accordion__hit {
	position: absolute;
	inset: 0;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
	appearance: none;
}

/* Once open, the trigger shrinks to the title strip so the body and its button
   are reachable; it stays clickable there, which is how the panel closes.

   Horizontal only. The vertical trigger is a real button *inside* the heading,
   in flow, so a fixed height here does not shrink it — it stretches it, and a
   button centres its text, so an open vertical panel's trigger went from 26px
   to 84px with the title centred in it — 29px of new space above the text and
   29px below, the upper half reading as a gap opening over the heading as the
   panel dropped. The vertical reset below never set a height to counter it,
   and was a class lighter than this rule anyway, so scoping it away is the
   fix rather than out-weighing it there.

   The strip's height is the open panel's own head, measured by view.js and
   published as --aa-acc-strip. A fixed 84px suited one title size only: a
   larger title left its lower lines outside the strip, unclickable and never
   lit on hover, and a smaller one let the strip cover the top of the body and
   its links. 84px remains the fallback until the script has run. */
.aa-accordion:not(.aa-accordion--vertical) .aa-accordion__panel.is-open .aa-accordion__hit {
	inset: 0 0 auto 0;
	height: var(--aa-acc-strip, 84px);
}

.aa-accordion__hit:focus-visible {
	outline: 2px solid var(--aa-acc-fg, #FFFFFF);
	outline-offset: -6px;
}

.aa-accordion__hit .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* -- Title markers -- */

.aa-accordion__rule {
	display: block;
	width: 48px;
	height: 3px;
	margin-bottom: 16px;
	background-color: currentColor;
	opacity: 0.55;
	transition: width 0.45s cubic-bezier(0.2, 0.75, 0.2, 1) 0.2s;
}

.aa-accordion__panel.is-open .aa-accordion__rule { width: 96px; }

/* The path is filled with currentColor, so the mark follows the panel's paired
   foreground exactly as the keyline does — no per-variant rule needed. Height
   is left to the viewBox so the aspect ratio holds at any width. Full strength
   rather than the keyline's 0.55: this is a brand mark, and a faded one reads
   as a mistake rather than as restraint.

   Unlike the keyline it holds one size in both states: it is a mark with its
   own proportions rather than a rule whose length is the effect. What changes
   is where it sits, and horizontally that is handled by drawing it twice —
   see the note on the rail copy below. */
.aa-accordion__star {
	display: block;
	flex: none;
	width: 26px;
	height: auto;
	pointer-events: none;
}

/* Horizontally the star is anchored to the panel rather than carried in the
   head, so it survives .aa-accordion__inner fading out on collapse, and slides
   between centred and title-left.

   Both ends of that slide have to be *pixels*. Writing the collapsed end as
   `left: 50%` looks obvious and is the bug: the percentage resolves against the
   panel width, the panel width is animating at the same time, and early in the
   open it grows far faster than the interpolation pulls the star back — so the
   star kicks right, past the heading, before returning. No easing or duration
   fixes that; it is inherent to interpolating against a growing box. view.js
   measures the collapsed width and publishes the centred offset as
   --aa-acc-star-x, which makes both ends lengths and the slide monotonic.

   The fallback keeps the mark correctly centred before or without that script.
   The trigger button is a later sibling and paints above, so clicks still land
   on the button. */
.aa-accordion:not(.aa-accordion--vertical) .aa-accordion__star {
	position: absolute;
	/* Centred on the title's first line rather than pinned to its top: the title
	   starts at the 28px padding, its line box is --aa-acc-title-line x its size,
	   and the mark is 26px. */
	top: calc(28px + (var(--aa-acc-title-size, 1.35rem) * var(--aa-acc-title-line) - 26px) / 2);
	left: var(--aa-acc-star-x, calc(50% - 13px));
	transition: left 0.55s cubic-bezier(0.2, 0.75, 0.2, 1);
}

/* Opening, the mark settles in the 250ms the rail takes to fade out, rather
   than riding the panel's full 550ms. Those are one gesture — the collapsed
   presentation leaving — and the mark is what the eye follows through it.
   Sharing the panel's duration left the last pixels still moving after the
   title had faded in at 430ms, which reads as a late twitch on the narrowest
   panel, where the whole travel is only a few pixels. Closing keeps the 550ms
   from the rule above, so the mark drifts back with the panel rather than
   arriving ahead of it. */
.aa-accordion:not(.aa-accordion--vertical) .aa-accordion__panel.is-open .aa-accordion__star {
	left: 28px;
	transition: left 0.25s cubic-bezier(0.2, 0.75, 0.2, 1);
}

/* Clears the anchored star: 26px of mark from the 28px origin, plus a gap. */
.aa-accordion--marker-star:not(.aa-accordion--vertical) .aa-accordion__head {
	padding-left: 40px;
}

/* Vertical carries its star in flow instead, so the head becomes a row. */
.aa-accordion--vertical.aa-accordion--marker-star .aa-accordion__head {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

/* Suppresses transitions while view.js applies the target state to measure it.
   Without this the measurement reads whatever the in-flight animation is
   currently showing rather than where the layout is going to land. */
.aa-accordion--measuring,
.aa-accordion--measuring * {
	transition: none !important;
}

.aa-accordion__eyebrow {
	margin: 0 0 12px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.7;
}

.aa-accordion__ghost {
	position: absolute;
	right: 0.06em;
	bottom: -0.26em;
	margin: 0;
	font-size: clamp(5rem, 13vw, 11rem);
	font-weight: 800;
	line-height: 0.8;
	letter-spacing: -0.04em;
	white-space: nowrap;
	opacity: 0.14;
	pointer-events: none;
}

/* -- Stacked below the theme breakpoint --
   Every panel is open here, so the flex-grow rules above are reset at matching
   specificity rather than with !important, and view.js clears `inert`. */

@media only screen and (max-width: 782px) {

	.aa-accordion,
	.aa-accordion--auto {
		flex-direction: column;
		height: auto;
		min-height: 0;
	}

	.aa-accordion__panel,
	.aa-accordion:has(.is-open) .aa-accordion__panel,
	.aa-accordion:has(.is-open) .aa-accordion__panel.is-open,
	.aa-accordion--collapse-rails:has(.is-open) .aa-accordion__panel,
	.aa-accordion--collapse-rails:has(.is-open) .aa-accordion__panel.is-open {
		flex: 0 0 auto;
	}

	.aa-accordion__inner,
	.aa-accordion--auto .aa-accordion__inner {
		position: static;
		width: auto;
		opacity: 1;
		pointer-events: auto;
	}

	.aa-accordion__body-inner { width: auto; }

	/* Every panel reads as open here, but only one carries .is-open, so the rest
	   would keep the centred offset view.js published for their collapsed rail —
	   which, at full width, lands in the middle of the heading. Pin them all to
	   the title-left position. No transition: there is no rail to slide from. */
	.aa-accordion:not(.aa-accordion--vertical) .aa-accordion__star {
		left: 28px;
		transition: none;
	}

	/* Scoped away from vertical: that layout still collapses at every width, so
	   its trigger has to survive here. Only the horizontal row flattens out. */
	.aa-accordion:not(.aa-accordion--vertical) .aa-accordion__rail,
	.aa-accordion:not(.aa-accordion--vertical) .aa-accordion__hit,
	.aa-accordion:not(.aa-accordion--vertical) .aa-accordion__ghost {
		display: none;
	}

}

@media (prefers-reduced-motion: reduce) {

	.aa-accordion__panel,
	.aa-accordion__inner,
	.aa-accordion__rail,
	.aa-accordion__rule,
	.aa-accordion__star {
		transition-duration: 0.01ms;
	}

}


/* -- Vertical orientation --

   Same blocks, same colour pairings, same markers; the panels run down instead
   of across. Three things genuinely differ, and none of them is cosmetic:

   1. No rail. A collapsed panel is a full-width bar, so the title reads
      normally — the sideways label exists only because a collapsed *column* is
      too narrow for horizontal text.
   2. The panel is not the trigger. render.php emits a real header button inside
      the heading, and the ::after below stretches its hit area over the bar.
      A vertical header is as tall as its own content, so the fixed overlay
      strip the horizontal layout uses would break the moment a title wrapped.
   3. Height, not flex-grow, is what animates. There is no fixed track to
      distribute here — the row grows and shrinks with the open panel — so this
      reuses the interpolate-size approach already used for core's accordion at
      style.css:837 rather than introducing a second technique. Browsers without
      it get an instant open, exactly as they do there. */

.aa-accordion--vertical {
	flex-direction: column;
	height: auto;
	min-height: 0;
	overflow: visible;
}

.aa-accordion--vertical .aa-accordion__panel {
	flex: 0 0 auto;
	overflow: hidden;
}

.aa-accordion--vertical .aa-accordion__rail {
	display: none;
}

.aa-accordion--vertical .aa-accordion__head {
	position: relative;
	padding: 22px 28px;
}

.aa-accordion--vertical .aa-accordion__title {
	margin: 0;
}

.aa-accordion--vertical .aa-accordion__hit {
	position: static;
	width: auto;
	padding: 0;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
}

/* Stretches the button's hit area over the whole bar without putting flow
   content inside the button. */
.aa-accordion--vertical .aa-accordion__hit::after {
	content: "";
	position: absolute;
	inset: 0;
}

.aa-accordion--vertical .aa-accordion__hit:focus-visible {
	outline: 2px solid var(--aa-acc-fg, #FFFFFF);
	outline-offset: 4px;
}

/* -- Open/close arrow --

   Stacked only, and a separate setting from the title marker: this reports
   state rather than decorating, so it has to be able to sit alongside the star
   or the keyline instead of replacing one.

   A chevron from two borders rather than an SVG. It is two strokes, it inherits
   the panel's paired foreground through currentColor without a fill to keep in
   step, and rotating one box is what makes the flip continuous — 45deg points
   it down, -135deg is the same mark spun 180deg to point up, so there is no
   second arrow to cross-fade and no mid-flip frame that reads as neither. It
   turns over the 0.35s the body takes, so bar and arrow are one gesture.

   Horizontal rows never get one: below the breakpoint every panel is open and
   the trigger is hidden, so an arrow there would report a state that cannot
   change. */

.aa-accordion--vertical.aa-accordion--arrow {
	--aa-acc-arrow: calc(var(--aa-acc-title-size, 1.35rem) * 0.42);
}

/* Keeps a title that fills the bar from running under the mark. */
.aa-accordion--vertical.aa-accordion--arrow .aa-accordion__head {
	padding-right: calc(28px + var(--aa-acc-arrow) * 2 + 14px);
}

.aa-accordion--vertical.aa-accordion--arrow .aa-accordion__head::after {
	content: "";
	position: absolute;
	right: 28px;
	/* Centred on the title's first line the way the star is: the head's 22px of
	   padding, plus half of what the line box leaves over the mark. */
	top: calc(22px + (var(--aa-acc-title-size, 1.35rem) * var(--aa-acc-title-line) - var(--aa-acc-arrow)) / 2);
	width: var(--aa-acc-arrow);
	height: var(--aa-acc-arrow);
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: color 0.1s ease-in-out;
	pointer-events: none; /* The trigger's ::after covers the bar; let clicks through. */
}

/* The flip is opt-in rather than switched off in the reduced-motion block
   further up: these rules load after it, so an override there would be beaten
   on source order at equal specificity and the arrow would keep turning. The
   colour fade stays either way — that is not motion. */
@media (prefers-reduced-motion: no-preference) {

	.aa-accordion--vertical.aa-accordion--arrow .aa-accordion__head::after {
		transition: transform 0.35s cubic-bezier(0.2, 0.75, 0.2, 1),
		            color 0.1s ease-in-out;
	}

}

.aa-accordion--vertical.aa-accordion--arrow .aa-accordion__panel.is-open .aa-accordion__head::after {
	transform: rotate(-135deg);
}

/* Follows the title into the hover colour — the whole bar is one target. */
.aa-accordion--vertical.aa-accordion--arrow .aa-accordion__panel:has(.aa-accordion__hit:hover) .aa-accordion__head::after,
.aa-accordion--vertical.aa-accordion--arrow .aa-accordion__panel:has(.aa-accordion__hit:focus-visible) .aa-accordion__head::after {
	color: var(--aa-acc-hover, var(--wp--preset--color--yellow, #FFA100));
}

.aa-accordion--vertical .aa-accordion__body {
	height: 0;
	margin-top: 0;
	overflow: hidden;
	opacity: 0;
}

.aa-accordion--vertical .aa-accordion__panel.is-open .aa-accordion__body {
	height: auto;
	opacity: 1;
}

/* Padding lives inside the collapsing box so it collapses with it. */
.aa-accordion--vertical .aa-accordion__body-inner {
	width: auto;
	/* max-width: var(--aa-acc-measure); */
	padding: 0 28px 26px;
}

/* The vertical head is on screen whether the panel is open or shut, so there is
   no rail copy to cross-fade with — the one in the head does both states. */
/* Centred on the title's first line rather than on the whole head, so a title
   that wraps keeps the mark beside its opening words. */
.aa-accordion--vertical .aa-accordion__star {
	flex: none;
	width: 20px;
	margin-top: calc((var(--aa-acc-title-size, 1.35rem) * var(--aa-acc-title-line) - 20px) / 2);
}

.aa-accordion--vertical .aa-accordion__ghost {
	top: 50%;
	right: 24px;
	bottom: auto;
	transform: translateY(-50%);
	font-size: clamp(2.5rem, 7vw, 4.5rem);
}

@supports (interpolate-size: allow-keywords) {

	@media (prefers-reduced-motion: no-preference) {

		.aa-accordion--vertical .aa-accordion__body {
			interpolate-size: allow-keywords;
			transition: height 0.35s cubic-bezier(0.2, 0.75, 0.2, 1),
			            opacity 0.25s linear;
		}

	}

}
