/* WordPress wrappers and progressive enhancement for the approved UI. */
.wp-site-blocks {
	margin: 0;
	padding: 0;
}

.wp-site-blocks > * {
	margin-block-start: 0;
}

.wp-block-image.is-style-wce-frame img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--wce-card-ratio, 4 / 3);
	object-fit: contain;
	background: var(--cream);
}

.site-header .wce-language select {
	width: 100%;
	max-width: 170px;
}

.site-header [hidden],
.home-hero [hidden] {
	display: none !important;
}

.site-header[data-wce-menu-ready] .navitem:not(.open) > .mega {
	display: none;
}

.site-header[data-wce-menu-ready] .navitem.open > .mega,
.site-header:not([data-wce-menu-ready]) .navitem:focus-within > .mega {
	display: grid;
}

.site-header:not([data-wce-menu-ready]) :is(.navtoggle, .hamburger) {
	display: none;
}

html[lang|="en"] .site-header .navitem > a {
	overflow-wrap: normal;
}

body .wp-site-blocks :focus-visible,
body a.skip-link:focus {
	outline: 2px solid #087489;
	outline-offset: 3px;
	box-shadow: 0 0 0 3px #fff;
}

@media (max-width: 1100px) {
	.site-header .navtoggle {
		min-inline-size: 24px;
		min-block-size: 24px;
	}

	.site-header[data-wce-menu-ready] .mainnav:not(.open) {
		display: none;
	}

	.site-header:not([data-wce-menu-ready]) .mainnav {
		display: block;
	}
}

@media (prefers-reduced-motion: reduce) {
	.home-hero [data-wce-slider-ready],
	.home-hero .slide {
		animation: none;
		transition: none;
	}
}

/* Template content and pattern fallbacks. */
.wce-standard {
	padding-block: 50px;
}

.wce-standard .wp-block-query,
.wce-standard .wce-site-search {
	margin-block-start: 24px;
}

.wce-reading-full {
	grid-template-columns: minmax(0, 1fr);
}

.v2-article-intro > .v2-article-title:only-child {
	grid-column: 1 / -1;
}

.v2-article-title > .wp-block-post-excerpt > p {
	font-size: 21px;
	line-height: 1.75;
}

.wce-detail-featured {
	margin: 0;
}

.wce-detail-featured img,
.card-image.wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--wce-card-ratio, 4 / 3);
	object-fit: contain;
}

.wce-detail-cover:has(.wce-detail-featured img) .wce-detail-cover-fallback,
.wce-hero-slot:has(.home-hero:not(.wce-hero-fallback .home-hero), .wp-block-wce-hero-slider .slide:not(.wce-hero-fallback .slide)) > .wce-hero-fallback {
	display: none;
}

.wce-hero-fallback .home-hero:not([data-wce-slider-ready]) .slider-controls {
	display: none;
}

.wce-sponsor-placement.wce-sponsor-in-article .wce-sponsor-section {
	padding-inline: 0;
}

@media (max-width: 600px) {
	.v2-article-title > .wp-block-post-excerpt > p {
		font-size: 17px;
	}
}

/* Region links can be nested in paragraphs styled for the dark band. */
.wp-site-blocks .region-links a {
	color: var(--navy);
}

/* Keep the reference button on the link, inside a neutral WordPress wrapper. */
.wp-site-blocks .wp-block-button.button:is(.gold, .light) {
	display: inline-flex;
	min-height: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.wp-site-blocks .wp-block-button.button:is(.gold, .light) > .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 21px;
	border: 1px solid transparent;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 750;
	line-height: 1.4;
	text-decoration: none;
}

.wp-site-blocks .wp-block-button.button:is(.gold, .light) > .wp-block-button__link:hover {
	box-shadow: 0 6px 18px #10344a13;
}

.wp-site-blocks .wp-block-button.button.gold > .wp-block-button__link {
	background: linear-gradient(115deg,#f2d690,#c79a43);
	color: #182837;
}

.wp-site-blocks .wp-block-button.button.light > .wp-block-button__link {
	background: white;
	color: var(--navy);
}

/* Keep the reference 15px crumb inside WordPress' extra paragraph. */
.inner-hero .hero-copy .crumb p {
	margin: 0;
	color: inherit;
	font: inherit;
}

.wp-site-blocks .section-head {
	margin-block-end: 36px;
}

.section-head > p:has(> .eyebrow:only-child) {
	display: contents;
}

.wce-explorer .archive-controls > :is(input, select) {
	min-width: 0;
}

.wce-explorer .archive-meta > div {
	flex-wrap: wrap;
}

.wce-explorer .archive-meta a.selected,
.wce-explorer .archive-pages a.current {
	background: var(--navy);
	color: var(--white);
}

.wce-explorer .archive-pages {
	flex-wrap: wrap;
}

.wce-explorer .archive-pages > :is(a, span) {
	padding: 8px 16px;
	border: 1px solid var(--line);
	border-radius: 6px;
}

.wce-sponsor-section .wce-sponsor-slide.wce-sponsor-empty {
	grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 800px) {
	.wce-sponsor-section .wce-sponsor-slide.wce-sponsor-empty {
		grid-template-columns: minmax(0, 1fr);
	}

	.wce-sponsor-section .wce-sponsor-empty .wce-sponsor-link {
		grid-column: 1;
		justify-self: start;
	}
}

@media (max-width: 600px) {
	.wp-site-blocks .section-head {
		margin-block-end: 22px;
	}
}

/* Keep the reference rhythm when WordPress adds flow layout to the home groups. */
.wp-site-blocks .section-head.wce-home-section-head > h2 {
	margin: 7px 0 0;
	line-height: 1.35;
}

.wp-site-blocks .section-head.wce-home-section-head > h2 + p {
	margin-block-start: 0;
	margin-block-end: 0;
	line-height: 1.75;
}

.wp-site-blocks .section-head.wce-home-section-head + :is(.cards, .v2-atlas) {
	margin-block-start: 0;
}

/* Match the direct image in the design when WordPress adds an image figure. */
.wp-site-blocks .support-grid > figure.wp-block-image {
	width: 100%;
	min-width: 0;
	margin: 0;
}

.wp-site-blocks .support-grid > figure.wp-block-image > img {
	display: block;
	width: 100%;
	height: auto;
	max-height: none;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	object-position: center;
}

/* Preserve the hidden honeypot against the theme's form label display rule. */
.wp-site-blocks form label[hidden][aria-hidden="true"]:has(> input[name="website"]) {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	display: none;
}

/* Match the four-track link row on imported numbered lists. */
.wp-site-blocks .v2-rows > .wp-block-group:has(> p > a > .v2-index) {
	position: relative;
	display: grid;
	grid-template-columns: 36px minmax(0, 23%) minmax(0, 1fr) 24px;
	gap: 22px;
	min-width: 0;
	align-items: center;
	padding: 17px 20px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: white;
	transition: background .2s, transform .2s;
}

.wp-site-blocks .v2-rows > .wp-block-group:has(> p > a > .v2-index) > :is(p, figure, div) {
	min-width: 0;
	margin: 0;
}

.wp-site-blocks .v2-rows > .wp-block-group > div > p:has(> .v2-kicker:only-child),
.wp-site-blocks .v2-flow > .wp-block-group > p:has(> :is(.v2-flow-icon, b):only-child) {
	display: contents;
}

.wp-site-blocks .v2-rows > .wp-block-group:has(> p > a > .v2-index) > div > h3 {
	margin-block: 0;
}

.wp-site-blocks .v2-rows > .wp-block-group:has(> p > a > .v2-index) > div > h3 + p {
	margin-block: 5px 0;
}

.wp-site-blocks .v2-rows > .wp-block-group:has(> p > a:hover > .v2-index),
.wp-site-blocks .v2-rows > .wp-block-group:has(> p > a:focus-visible > .v2-index) {
	background: var(--editorial-soft);
	box-shadow: 0 6px 16px #10344a13;
	transform: translateY(-2px);
}

.wp-site-blocks .v2-rows > .wp-block-group:has(> p > a > .v2-index) > p > a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.wp-site-blocks .v2-rows > .wp-block-group:has(> p > a:focus-visible > .v2-index) > p > a::after {
	outline: 2px solid #087489;
	outline-offset: 3px;
	border-radius: 14px;
}

.wp-site-blocks .v2-topic > figure.wp-block-image {
	margin: 0;
}

.wp-site-blocks .v2-topic > figure.wp-block-image > img {
	display: block;
	width: 100%;
	height: auto;
	max-height: none;
	aspect-ratio: 4 / 3;
	object-fit: contain;
}

.wp-site-blocks .v2-research aside.wp-block-group > p:has(> a) {
	margin: 0;
}

.wp-site-blocks .v2-research aside.wp-block-group > p > a {
	display: block;
	padding: 12px 0;
	border-bottom: 1px solid #c8d8e2;
	font-weight: 700;
}

.wp-site-blocks .inner-hero .hero-copy > p:has(> .eyebrow:only-child) {
	display: contents;
}

.wp-site-blocks .inner-hero .hero-copy > h1 {
	margin: 12px 0 0;
	line-height: 1.3;
}

.wp-site-blocks .support-grid > .wp-block-group:last-child > .wp-block-buttons {
	gap: 8px;
}

@media (max-width: 900px) {
	.wp-site-blocks .v2-rows > .wp-block-group:has(> p > a > .v2-index) {
		gap: 15px;
	}
}

@media (max-width: 580px) {
	.wp-site-blocks .v2-rows > .wp-block-group:has(> p > a > .v2-index) {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
		padding: 15px;
	}
}

@media (min-width: 601px) and (max-width: 781px) {
	.wp-site-blocks .wp-block-columns.cards.cols-2.v2-institution-cards {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wp-site-blocks .split.reverse:has(.split-copy) {
		display: grid;
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
		gap: 42px;
		align-items: center;
	}

	.wp-site-blocks .split.reverse > :is(.split-image, .wp-block-column:has(> .split-image)) {
		order: 2;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wp-site-blocks .v2-rows > .wp-block-group:has(> p > a > .v2-index) {
		transition: none;
		transform: none;
	}
}

.wce-sponsor-related > .card {
	position: relative;
}

.wce-sponsor-related .wp-block-image {
	margin: 0;
}

.wce-sponsor-related .wp-block-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.wce-sponsor-related h3 > a::after {
	position: absolute;
	inset: 0;
	content: "";
}

.wce-sponsor-related h3 > a:focus-visible::after {
	outline: 2px solid var(--gold);
	outline-offset: -3px;
	border-radius: var(--radius);
}

.wp-site-blocks .wce-sponsor-learning-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	max-width: 480px;
}

.wp-site-blocks :is(.wce-sponsor-learning-actions, .page-article .feature-note:has(> .wp-block-buttons > .wp-block-button.gold):has(> .wp-block-buttons > .wp-block-button.outline) > .wp-block-buttons) > .wp-block-button.button {
	display: flex;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.wp-site-blocks :is(.wce-sponsor-learning-actions, .page-article .feature-note:has(> .wp-block-buttons > .wp-block-button.gold):has(> .wp-block-buttons > .wp-block-button.outline) > .wp-block-buttons) > .wp-block-button.button > .wp-block-button__link {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 16px;
	border: 1px solid transparent;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 750;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
}

.wp-site-blocks :is(.wce-sponsor-learning-actions, .page-article .feature-note:has(> .wp-block-buttons > .wp-block-button.gold):has(> .wp-block-buttons > .wp-block-button.outline) > .wp-block-buttons) > .wp-block-button.outline > .wp-block-button__link {
	border-color: #b9c9d0;
	background: white;
	color: var(--navy);
}

@media (max-width: 600px) {
	.wp-site-blocks .wce-sponsor-learning-actions {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Core places an inline table of contents inside the full-width article. */
.v2-article-body > nav.v2-toc {
	position: static;
}

.page-article > .inner-section > .section-head.right + .v3-explanation {
	text-align: right;
}

@media (max-width: 600px) {
	.page-article > .inner-section > .section-head.right + .v3-explanation {
		margin-inline: 0;
		text-align: left;
	}
}

/* Center the final unpaired resource card at the width of one column. */
@media (width > 580px) {
	#archive > .v2-explorer-cards > .card:last-child:nth-child(odd):not(:only-child) {
		grid-column: 1 / -1;
		inline-size: calc((100% - var(--wce-explorer-column-gap, 26px)) / 2);
		justify-self: center;
	}
}

@media (580px < width <= 600px) {
	#archive > .v2-explorer-cards {
		--wce-explorer-column-gap: 20px;
	}
}

/* Related cards from imported WP groups, with the original links preserved. */
.page-article .article-list:has(> .wp-block-group > .wp-block-image) {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 26px;
}

.page-article .article-list:has(> .wp-block-group:only-child > .wp-block-image) {
	grid-template-columns: minmax(0, 1fr);
}

.page-article .article-list > .wp-block-group:has(> .wp-block-image) {
	position: relative;
	min-width: 0;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	background: white;
	box-shadow: var(--shadow);
}

.page-article .article-list > .wp-block-group > .wp-block-image {
	margin: 0;
}

.page-article .article-list > .wp-block-group > .wp-block-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.page-article .article-list > .wp-block-group > .wp-block-image a::after {
	position: absolute;
	inset: 0;
	content: "";
}

.page-article .article-list > .wp-block-group > .wp-block-image a:focus-visible::after {
	outline: 2px solid var(--gold);
	outline-offset: -3px;
	border-radius: var(--radius);
}

.page-article .article-list > .wp-block-group > .wp-block-group {
	padding: 20px;
}

.page-article .article-list > .wp-block-group > .wp-block-group p {
	display: block;
}

.page-article .article-list > .wp-block-group > p:has(> .arr) {
	display: none;
}

@media (max-width: 600px) {
	.page-article .article-list:has(> .wp-block-group > .wp-block-image) {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Older pages group the two learning buttons separately. */
.wp-site-blocks .page-article .feature-note:has(> .wp-block-buttons > .wp-block-button.gold):has(> .wp-block-buttons > .wp-block-button.outline):not(:has(> .wce-sponsor-learning-actions)) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 234px));
	gap: 0 12px;
}

.wp-site-blocks .page-article .feature-note:has(> .wp-block-buttons > .wp-block-button.gold):has(> .wp-block-buttons > .wp-block-button.outline):not(:has(> .wce-sponsor-learning-actions)) > :not(.wp-block-buttons) {
	grid-column: 1 / -1;
}

.wp-site-blocks .page-article .feature-note:has(> .wp-block-buttons > .wp-block-button.gold):has(> .wp-block-buttons > .wp-block-button.outline):not(:has(> .wce-sponsor-learning-actions)) > .wp-block-buttons {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 600px) {
	.wp-site-blocks .page-article .feature-note:has(> .wp-block-buttons > .wp-block-button.gold):has(> .wp-block-buttons > .wp-block-button.outline):not(:has(> .wce-sponsor-learning-actions)) {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 12px;
	}

	.wp-site-blocks .page-article .feature-note:has(> .wp-block-buttons > .wp-block-button.gold):has(> .wp-block-buttons > .wp-block-button.outline):not(:has(> .wce-sponsor-learning-actions)) > p {
		margin-block-end: 8px;
	}
}

.wce-sponsor-placement:not(:has(.wce-sponsor-section)) {
	display: none;
}

/* The English home uses group blocks for the small editorial cards. */
@media (min-width: 1024px) {
	.wce-english-home :is(.v2-atlas, .editorial-grid) {
		align-items: start;
	}

	.wce-english-home .v2-atlas > :is(div, .v2-feature),
	.wce-english-home .v2-atlas .v2-rows {
		height: auto;
	}

	.wce-english-home :is(.v2-rows, .article-list) > .wp-block-group:has(> figure.wp-block-image) {
		display: grid;
		grid-template-columns: minmax(0, 32%) minmax(0, 1fr) auto;
		gap: 12px;
		align-items: center;
	}

	.wce-english-home :is(.v2-rows, .article-list) > .wp-block-group:has(> figure.wp-block-image) > :is(figure, div, p) {
		margin-block: 0;
	}

	html:lang(en) .wp-site-blocks .wce-sponsor-learning-actions {
		max-width: 652px;
	}

	html:lang(en) .wp-site-blocks .page-article .feature-note:has(> .wp-block-buttons > .wp-block-button.gold):has(> .wp-block-buttons > .wp-block-button.outline):not(:has(> .wce-sponsor-learning-actions)) {
		grid-template-columns: repeat(2, minmax(0, 320px));
	}
}
