/* Ba Gua 2026 — what theme.json cannot express. Loaded on the site and in the editor. */

/* ---------- Page structure ---------- */

/* Template parts and full-width sections sit flush; spacing comes from each section's padding. */
.wp-site-blocks > * + *,
.bg-front > .alignfull,
.bg-front > .alignfull + * {
	margin-block-start: 0;
}

.bg-front > .alignfull:last-child {
	margin-block-end: 0;
}

/* Short pages (404, empty blog) keep the footer at the bottom of the window. */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.wp-site-blocks > main {
	flex-grow: 1;
}

:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--green);
	outline-offset: 3px;
}

/* ---------- Header ---------- */

.bg-header {
	position: relative;
	z-index: 20;
}

.bg-brand .wp-block-site-logo img {
	display: block;
}

.bg-brand-sub {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--wp--preset--color--stone);
}

.bg-header .wp-block-navigation a:where(:not(.wp-element-button)) {
	text-decoration: none;
	color: var(--wp--preset--color--navy);
}

.bg-header .wp-block-navigation a:where(:not(.wp-element-button)):hover,
.bg-header .wp-block-navigation .current-menu-item > a {
	color: var(--wp--preset--color--green);
}

.bg-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--line) !important;
	background: var(--wp--preset--color--white) !important;
	padding: 0.5rem 0;
	min-width: 13rem !important;
	box-shadow: 0 12px 28px rgb(0 33 63 / 0.1);
}

.bg-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.55rem 1.25rem !important;
	text-transform: none;
	letter-spacing: 0;
	font-size: 1rem;
	font-weight: 600;
}

.bg-header .wp-block-button__link {
	padding: 0.7em 1.2em;
	font-size: 0.8125rem;
}

/* Mobile menu overlay */
.bg-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--haze) !important;
	padding: 1.5rem clamp(1.25rem, 6vw, 3rem);
}

.bg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 3.5rem;
	gap: 1.1rem;
}

.bg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 2rem;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

.bg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border: 0 !important;
	box-shadow: none;
	background: transparent !important;
	padding: 0.25rem 0 0 1rem;
}

.bg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 1.375rem;
	padding: 0.25rem 0 !important;
}

.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
	width: 30px;
	height: 30px;
}

/* Tablets: the menu takes the Join us button's room so its labels stay on one line. */
@media (max-width: 1023px) {
	.bg-header .bg-header-cta {
		display: none;
	}
}

@media (min-width: 782px) {
	.bg-header .wp-block-navigation__container > li > a {
		white-space: nowrap;
	}
}

@media (max-width: 480px) {
	.bg-brand .wp-block-site-logo img {
		width: 44px !important;
		height: auto;
	}

	.bg-brand .wp-block-site-title {
		font-size: 1.5rem;
	}

	.bg-brand-sub {
		font-size: 0.625rem;
		letter-spacing: 0.12em;
	}
}

/* ---------- Type helpers ---------- */

.is-style-eyebrow {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--wp--preset--color--green);
	margin-bottom: 0.75rem;
}

.is-style-eyebrow + :where(h1, h2, h3) {
	margin-block-start: 0;
}

:where([class*="is-style-section-navy"], .is-style-section-charcoal) .is-style-eyebrow {
	color: var(--wp--preset--color--mist);
}

.bg-lead {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
	color: var(--wp--preset--color--ink);
}

.bg-center-narrow {
	max-width: 42rem;
	margin-inline: auto !important;
}

.bg-more a {
	font-weight: 700;
	font-size: 0.875rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 1.5px solid currentColor;
	padding-bottom: 2px;
}

.bg-more a::after {
	content: " →";
}

/* Outline buttons follow the text colour of their section (white on navy, navy on light). */
.wp-block-button.is-style-outline > .wp-block-button__link:not(:hover) {
	background: transparent;
	color: currentColor;
	border-color: currentColor;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--navy);
}

/* On navy, land on the same hover colours as the section's filled button (styles/section-navy.json). This has to stay
   after the rule above: :where() adds no specificity, so the later rule wins. */
:where([class*="is-style-section-navy"]) .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--mist);
	color: var(--wp--preset--color--navy-deep);
	border-color: var(--wp--preset--color--mist);
}

/* ---------- Home ---------- */

.bg-hero {
	overflow: hidden;
	padding-inline: var(--wp--style--root--padding-left) var(--wp--style--root--padding-right);
}

/* The photo is under 1000px wide, so it stays at close to its real size on navy, not stretched across the banner:
   beside the text on larger screens, under it on phones. The tint takes the glare off its white sky. */
.bg-hero {
	background-color: #0a2540;
}

.bg-hero .wp-block-cover__background {
	background: rgb(10 37 64 / 0.12) !important;
}

@media (min-width: 782px) {
	.bg-hero {
		--bg-hero-text: 640px;
		--bg-hero-text-end: calc(max(var(--wp--style--root--padding-left), (100% - 1200px) / 2) + var(--bg-hero-text));
	}

	.bg-hero .wp-block-cover__image-background {
		left: auto;
		right: 0;
		width: min(100% - var(--bg-hero-text-end) + 140px, 1100px);
		mask-image: linear-gradient(90deg, transparent 0, rgb(0 0 0 / 0.08) 140px, #000 360px);
	}

	.bg-hero .wp-block-cover__inner-container > .wp-block-group > * {
		max-width: var(--bg-hero-text) !important;
	}
}

/* Tablets: a narrower text column leaves room for the photo. */
@media (min-width: 782px) and (max-width: 1199px) {
	.bg-hero {
		--bg-hero-text: 440px;
	}

	.bg-hero .wp-block-buttons.bg-main-links {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	.bg-hero .wp-block-cover__image-background {
		object-position: 38% 50% !important;
		mask-image: linear-gradient(90deg, transparent 0, rgb(0 0 0 / 0.08) 140px, #000 260px);
	}
}

.bg-hero h1 {
	color: var(--wp--preset--color--white);
	text-wrap: balance;
	margin-block-start: 0.25rem;
}

.bg-hero .wp-block-cover__inner-container > .wp-block-group > p:not(.is-style-eyebrow) {
	color: rgb(255 255 255 / 0.9);
}

/* The site's four main sections, equal in size, so nobody has to find the menu to reach them: two by two in the
   "Find out more" column and on phones, one row in the hero on larger screens. */
.wp-block-buttons.bg-main-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin-block-start: var(--wp--preset--spacing--40);
}

@media (min-width: 782px) {
	.bg-hero .wp-block-buttons.bg-main-links {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.bg-main-links .wp-block-button {
	width: auto;
	margin: 0;
}

.bg-main-links .wp-block-button__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 3.25rem;
	padding: 0.5rem;
	text-align: center;
}

@media (max-width: 781px) {
	.bg-hero {
		padding-bottom: calc(72vw + 1rem);
	}

	.bg-hero .wp-block-cover__image-background {
		top: auto;
		bottom: 0;
		height: 72vw;
		object-position: 50% 100% !important;
		mask-image: linear-gradient(180deg, transparent 0, #000 14%);
	}

	/* The header already carries the name: give the line to the buttons so all four stay on the first screen. */
	.bg-hero .is-style-eyebrow {
		display: none;
	}

	/* Buttons sit straight under the title: lower down, the cookie notice covers them on a first visit. */
	.bg-hero .wp-block-cover__inner-container > .wp-block-group {
		display: flex;
		flex-direction: column;
	}

	.bg-hero .wp-block-cover__inner-container > .wp-block-group > * {
		width: 100%;
		margin-inline: 0;
	}

	.bg-hero .wp-block-cover__inner-container > .wp-block-group > p {
		order: 1;
	}

	.bg-main-links .wp-block-button__link {
		min-height: 3.5rem;
		font-size: 1rem;
	}
}

.bg-seal img {
	filter: drop-shadow(0 18px 30px rgb(0 33 63 / 0.18));
}

.bg-virtues {
	margin-top: var(--wp--preset--spacing--50) !important;
}

.bg-virtue {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: 1.75rem;
	text-align: center;
}

/* The four characters are the association's own calligraphy, photographed as black ink on transparent.
   They are normalised to one height, so a fixed block height lines the baselines up across the row. */
.bg-virtue .bg-char img {
	display: block;
	height: 7.5rem;
	width: auto;
	margin-inline: auto;
	border-radius: 0;
}

.bg-virtue .bg-char {
	margin-block: 0 1rem !important;
}

@media (max-width: 781px) {
	.wp-block-columns.bg-virtues {
		flex-wrap: wrap !important;
		column-gap: 1.25rem;
	}

	.wp-block-columns.bg-virtues > .bg-virtue {
		flex-basis: calc(50% - 0.625rem) !important;
		flex-grow: 0;
	}

	.bg-virtue .bg-char img {
		height: 5.5rem;
	}
}

.bg-virtue h3 {
	margin-block: 0.5rem 0;
}

.bg-pinyin {
	margin-top: 0.25rem !important;
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-size: 1.25rem;
	color: var(--wp--preset--color--stone);
}

.bg-path h3 {
	margin-block-start: 1.5rem;
}

.bg-path .wp-block-image img,
.wp-block-media-text__media img {
	border-radius: 2px;
}

/* ---------- Media & text ---------- */

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

.alignfull > .wp-block-media-text:only-child {
	margin-block: 0;
}

/* Text keeps to the page grid on its outer edge; the gap sits between text and image. */
.wp-block-media-text > .wp-block-media-text__content {
	padding-inline: clamp(1.5rem, 5vw, 4.5rem) 0;
}

.wp-block-media-text.has-media-on-the-right > .wp-block-media-text__content {
	padding-inline: 0 clamp(1.5rem, 5vw, 4.5rem);
}

@media (max-width: 600px) {
	.wp-block-media-text > .wp-block-media-text__content {
		padding: 1.75rem 0 0;
	}
}

/* ---------- Inner pages ---------- */

.bg-title-band .wp-block-post-title::before,
.bg-title-band h1::before {
	content: "";
	display: block;
	width: 3rem;
	height: 3px;
	margin-bottom: 1.25rem;
	background: var(--wp--preset--color--green);
}

.bg-title-band > * {
	margin-block: 0;
}

.bg-title-band > * + * {
	margin-block-start: 0.75rem;
}

.bg-trinity {
	margin-block: var(--wp--preset--spacing--60) !important;
}

.bg-trinity-item {
	background: var(--wp--preset--color--haze);
	padding: 1.75rem 1rem;
	border-top: 3px solid var(--wp--preset--color--green);
}

.bg-trinity-item .wp-block-icon {
	color: var(--wp--preset--color--navy);
}

.bg-trinity-item h3 {
	margin: 0;
}

.bg-schedule-panel {
	border-left: 3px solid var(--wp--preset--color--green);
}

.bg-contact-list p {
	margin: 0;
}

.bg-contact-list .wp-block-icon {
	color: var(--wp--preset--color--navy);
	flex-shrink: 0;
}

.bg-post-card {
	padding-bottom: var(--wp--preset--spacing--50);
	margin-bottom: var(--wp--preset--spacing--50);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/* ---------- Block styles ---------- */

.wp-block-group.is-style-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 2px;
	padding: clamp(1.5rem, 4vw, 2.75rem);
	margin-block: var(--wp--preset--spacing--50);
}

.wp-block-group.is-style-card > :first-child {
	margin-block-start: 0;
}

.wp-block-list.is-style-plain {
	list-style: none;
	padding-left: 0;
}

.wp-block-list.is-style-plain li + li {
	margin-top: 0.45rem;
}

/* ---------- Call to action and footer ---------- */

.bg-cta-email {
	opacity: 0.85;
}

.bg-footer-name {
	margin: 1rem 0 0.25rem;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.75rem;
	font-weight: 600;
	line-height: 1;
}

[class*="is-style-section-navy-deep"] {
	font-size: var(--wp--preset--font-size--small);
}

[class*="is-style-section-navy-deep"] a {
	text-decoration: none;
	color: var(--wp--preset--color--mist);
}

[class*="is-style-section-navy-deep"] a:hover {
	color: var(--wp--preset--color--white);
	text-decoration: underline;
}

.bg-footer-rule {
	margin-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--30) !important;
	border-color: rgb(255 255 255 / 0.16) !important;
	background: rgb(255 255 255 / 0.16) !important;
	color: rgb(255 255 255 / 0.16) !important;
}

.bg-footer-legal p {
	margin: 0;
	opacity: 0.75;
}

/* ---------- Pelican form embeds (pelican-forms plugin) ---------- */

/* Pelican's form page pads its body by 16px; widen the iframe by that much so the fields line up with the
   card heading. The plugin sets width:100% inline and constrained layouts force auto side margins with
   !important, hence the doubled class and !important here. */
.wp-block-group .pelican-form-frame.pelican-form-frame {
	display: block;
	width: calc(100% + 32px) !important;
	max-width: none !important;
	margin-inline: -16px !important;
}

/* ---------- Most read and the band that ends each article ---------- */

.bg-most-read {
	margin-block-end: var(--wp--preset--spacing--60);
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--haze);
	border-radius: 2px;
}

.bg-most-read .is-style-eyebrow {
	margin-block: 0 0.75rem;
	font-family: var(--wp--preset--font-family--sans);
}

.bg-most-read ol {
	margin: 0;
	padding-inline-start: 1.5rem;
}

.bg-most-read li {
	padding-block: 0.3rem;
}

.bg-most-read li::marker {
	color: var(--wp--preset--color--stone);
	font-weight: 700;
}

.bg-post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 2.5rem;
}

.bg-post-nav > * {
	margin: 0;
}

.bg-post-nav .post-navigation-link-next {
	grid-column: 2;
	text-align: right;
}

.bg-post-nav .post-navigation-link__label {
	display: block;
	margin-block-end: 0.4rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--wp--preset--color--green);
}

/* Inside the band the list sits under Previous and Next, on the band's own background. */
.bg-read-next .bg-most-read {
	margin-block: var(--wp--preset--spacing--50) 0;
	padding: var(--wp--preset--spacing--50) 0 0;
	background: none;
	border-top: 1px solid var(--wp--preset--color--line);
	border-radius: 0;
}

/* ---------- Find a Class ---------- */

.bg-instructors {
	margin-block-end: var(--wp--preset--spacing--60);
}

@media (min-width: 782px) {
	.bg-instructors {
		column-count: 2;
		column-gap: var(--wp--preset--spacing--60);
	}
}

.bg-instructors > *,
.bg-instructor {
	break-inside: avoid;
}

.bg-instructors > .wp-block-group,
.bg-instructor-state > .wp-block-group {
	margin-block: 0;
}

.bg-instructor-state {
	padding-block-end: var(--wp--preset--spacing--40);
}

.bg-instructor {
	padding-block-end: 1.25rem;
}

.bg-instructor-state > .is-style-eyebrow {
	margin-block: 0 0.75rem;
	padding-block-end: 0.4rem;
	font-family: var(--wp--preset--font-family--sans);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.bg-instructor h4 {
	margin-block: 0 0.3rem;
}

.bg-instructor p {
	margin-block: 0;
	line-height: 1.6;
}

/* ---------- Association marks ---------- */

/* The seal carries its own white disc, so it needs no plate behind it on light backgrounds. */
.bg-crest img {
	border-radius: 0;
}

.bg-crest-light img {
	border-radius: 0;
	filter: drop-shadow(0 10px 24px rgb(0 20 40 / 0.35));
}

/* ---------- Lineage ---------- */

/* Teacher to student, down the page: a rule on the left with a node at each name. */
.bg-lineage {
	--bg-lineage-rule: var(--wp--preset--color--line);
	list-style: none;
	padding-left: 0;
	margin-left: 0.5rem;
	border-left: 2px solid var(--bg-lineage-rule);
}

.bg-lineage > li {
	position: relative;
	padding: 0 0 2rem 2rem;
}

.bg-lineage > li:last-child {
	padding-bottom: 0;
}

.bg-lineage > li::before {
	content: "";
	position: absolute;
	left: -0.4375rem;
	top: 0.45rem;
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 50%;
	background: var(--wp--preset--color--green);
}

.bg-lineage .bg-lineage-name {
	display: block;
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	line-height: 1.2;
	color: var(--wp--preset--color--navy);
}

.bg-lineage .bg-lineage-role {
	margin: 0.2rem 0 0;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--stone);
}

.bg-lineage p:not(.bg-lineage-name):not(.bg-lineage-role) {
	margin-top: 0.6rem;
}

.bg-lineage .bg-lineage-note {
	display: block;
	margin-top: 0.4rem;
}

a.bg-lineage-name {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a.bg-lineage-name:hover {
	text-decoration-thickness: 2px;
}

:where([class*="is-style-section-navy"], .is-style-section-charcoal) .bg-lineage {
	--bg-lineage-rule: rgb(255 255 255 / 0.25);
}

:where([class*="is-style-section-navy"], .is-style-section-charcoal) .bg-lineage .bg-lineage-name {
	color: var(--wp--preset--color--white);
}

:where([class*="is-style-section-navy"], .is-style-section-charcoal) .bg-lineage > li::before {
	background: var(--wp--preset--color--white);
}

:where([class*="is-style-section-navy"], .is-style-section-charcoal) .bg-lineage .bg-lineage-role {
	color: var(--wp--preset--color--mist);
}

/* ---------- Reading pages ---------- */

/* Interior pages run as one column with images set into the text, so a short passage never sits beside a tall
   picture. Images keep their own size up to the limit: most are small archival scans that blur when stretched. */
.bg-prose::after {
	content: "";
	display: block;
	clear: both;
}

.bg-prose > .wp-block-image.bg-inset {
	display: block;
	max-width: min(40%, 18rem);
	margin-block: 1rem 1.5rem;
}

.bg-prose > .wp-block-image.bg-inset:first-child {
	margin-block-start: 0.4rem;
}

.bg-prose h2 {
	margin-block: 2.5rem 0.75rem;
	font-size: var(--wp--preset--font-size--x-large);
}

.bg-prose > .wp-block-image.bg-inset.alignright {
	float: right;
	margin-inline: 2.5rem 0;
}

.bg-prose > .wp-block-image.bg-inset.alignleft {
	float: left;
	margin-inline: 0 2.5rem;
}

.bg-inset img {
	display: block;
	width: 100%;
	height: auto;
}

/* Core sets floated captions to table-caption, which shrinks them to a column a few letters wide. */
.bg-prose > .wp-block-image.bg-inset > figcaption {
	display: block;
	margin-block-start: 0.6rem;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--wp--preset--color--stone);
	text-align: left;
}

/* Media & Text inside the reading column. Older posts carry alignwide, which pushed the image out past the text,
   and core stretches every image to fill its column, so a 115px GIF rendered at 240px. */
.wp-block-post-content .wp-block-media-text.alignwide {
	max-width: var(--wp--style--global--content-size) !important;
	margin-inline: auto !important;
}

.wp-block-post-content .wp-block-media-text {
	grid-template-columns: minmax(0, 12rem) minmax(0, 1fr) !important;
	column-gap: 2.5rem;
	margin-block: var(--wp--preset--spacing--50);
}

.wp-block-post-content .wp-block-media-text.has-media-on-the-right {
	grid-template-columns: minmax(0, 1fr) minmax(0, 12rem) !important;
}

.wp-block-post-content .wp-block-media-text .wp-block-media-text__content {
	padding: 0;
}

.wp-block-post-content .wp-block-media-text .wp-block-media-text__media img {
	width: auto;
	max-width: 100%;
	height: auto;
	margin-inline: auto;
}

/* The Motto page: the brush character, then its word and text. */
.wp-block-post-content .wp-block-media-text.bg-virtue-row {
	grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) !important;
}

.wp-block-post-content .bg-virtue-row .wp-block-media-text__media img {
	max-height: 9rem;
}

.bg-virtue-row h2 {
	margin-block: 0 0.5rem;
}

@media (max-width: 600px) {
	.bg-prose > .wp-block-image.bg-inset.alignleft,
	.bg-prose > .wp-block-image.bg-inset.alignright {
		float: none;
		width: fit-content;
		max-width: min(100%, 22rem);
		margin-inline: auto;
		margin-block: 1.5rem;
	}

	/* Several archival portraits are more than twice as tall as they are wide: keep each within one screen. */
	.bg-inset img {
		width: auto;
		max-width: 100%;
		max-height: 70vh;
		margin-inline: auto;
	}

	.wp-block-post-content .wp-block-media-text,
	.wp-block-post-content .wp-block-media-text.has-media-on-the-right,
	.wp-block-post-content .wp-block-media-text.bg-virtue-row {
		grid-template-columns: minmax(0, 1fr) !important;
		row-gap: 1rem;
	}

	.wp-block-post-content .wp-block-media-text .wp-block-media-text__media {
		grid-column: 1;
		grid-row: 1;
	}

	.wp-block-post-content .wp-block-media-text .wp-block-media-text__content {
		grid-column: 1;
		grid-row: 2;
	}
}

/* ---------- Section index cards ---------- */

/* The home page's Combat and Qi Gong cards, and the cards that end a page (.bg-page-end). */
.bg-index-card {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-top: 3px solid var(--wp--preset--color--green);
	border-radius: 2px;
	padding: clamp(1.5rem, 3vw, 2rem);
}

.bg-index-card h3 {
	margin-block: 0 0.5rem;
}

.bg-index-card p {
	margin-block-start: 0;
}

.bg-index-card .bg-more {
	margin-top: auto;
	padding-top: 1rem;
}

/* ---------- End of a page: cards to the next page ---------- */

/* The haze band runs straight into the navy call to action. */
.wp-block-post-content:has(> .bg-page-end:last-child) {
	padding-bottom: 0 !important;
}

.wp-block-post-content > .bg-page-end {
	margin-block-start: var(--wp--preset--spacing--60) !important;
}

.bg-page-end .bg-index-card {
	position: relative;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bg-page-end .bg-index-card h2 {
	margin-block: 0 0.5rem;
}

.bg-page-end .bg-index-card p {
	margin-block-end: 0;
}

/* The link covers the whole card, so a tap anywhere on it works. */
.bg-page-end .bg-more a::before {
	content: "";
	position: absolute;
	inset: 0;
}

.bg-page-end .bg-index-card:hover,
.bg-page-end .bg-index-card:focus-within {
	border-color: var(--wp--preset--color--green);
	box-shadow: 0 6px 18px rgb(0 0 0 / 0.08);
}

/* ---------- Header at small widths ---------- */

@media (max-width: 900px) {
	.bg-header .wp-block-site-title {
		font-size: 1.25rem;
	}
}

@media (max-width: 480px) {
	.bg-brand .wp-block-image img {
		width: 42px !important;
		height: auto;
	}

	.bg-header .wp-block-site-title {
		font-size: 1.125rem;
	}

	.bg-brand-sub {
		font-size: 0.5625rem;
		letter-spacing: 0.1em;
	}
}

/* The hero photo needs height to read as one on a phone. */
@media (max-width: 781px) {
	.bg-hero {
		min-height: 62vh !important;
	}
}
