/**
 * AI Visibility — global styles supplementing theme.json.
 * Keep this file small: tokens and block defaults live in theme.json.
 */

/*
 * WordPress sanitizes numeric spacing slugs for CSS custom properties
 * (e.g. theme.json slug `3xl` → `--wp--preset--spacing--3-xl`).
 * Alias the unhyphenated names used in theme CSS / theme.json literals.
 */
:root {
	--wp--preset--spacing--2xs: var(--wp--preset--spacing--2-xs);
	--wp--preset--spacing--2xl: var(--wp--preset--spacing--2-xl);
	--wp--preset--spacing--3xl: var(--wp--preset--spacing--3-xl);
	--wp--preset--spacing--4xl: var(--wp--preset--spacing--4-xl);

	/*
	 * Concrete layout widths for Django (theme.json is gone).
	 * Do not alias these back to each other — that creates a circular
	 * custom-property reference and drops max-width entirely.
	 */
	--av-site-max: 1120px;
	--av-reading-max: 720px;
	--av-intro-max: 780px;
	--wp--style--global--wide-size: 1120px;
	--wp--style--global--content-size: 720px;
}

/* --- Document --- */

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	overflow-x: clip;
	padding-left: var(--wp--style--root--padding-left, var(--av-gutter, 1rem));
	padding-right: var(--wp--style--root--padding-right, var(--av-gutter, 1rem));
}

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

/* --- Layout width system ---
 *
 * Site/Wide (~1120px): structural page composition (header, footer,
 * landings, archives). Centered in the viewport; children left-anchored.
 *
 * Reading (~720px): long-form prose. Left-anchored inside the site grid —
 * never independently centered as a page shell.
 *
 * Intro (~780px): page kickers/H1/lead copy. Same left edge as the site
 * grid; narrower max-width only.
 */

.av-site-container {
	box-sizing: border-box;
	margin-left: auto;
	margin-right: auto;
	max-width: var(--av-site-max);
	width: 100%;
}

.av-reading-container {
	box-sizing: border-box;
	margin-left: 0;
	margin-right: 0;
	max-width: var(--av-reading-max);
	width: 100%;
}

.av-intro-measure {
	box-sizing: border-box;
	margin-left: 0;
	margin-right: 0;
	max-width: var(--av-intro-max);
	width: 100%;
}

.av-intro-measure > *,
.av-reading-container > * {
	margin-left: 0;
	margin-right: 0;
	text-align: left;
}

/* Full-bleed chrome shells share root gutters with constrained <main>. */
.av-site-header.alignfull,
.av-site-footer.alignfull,
.av-site-header,
.av-site-footer {
	margin-left: calc(-1 * var(--wp--style--root--padding-left, var(--av-gutter, 1rem)));
	margin-right: calc(-1 * var(--wp--style--root--padding-right, var(--av-gutter, 1rem)));
	padding-left: var(--wp--style--root--padding-left, var(--av-gutter, 1rem));
	padding-right: var(--wp--style--root--padding-right, var(--av-gutter, 1rem));
}

/* --- Site shell (Phase 3) --- */

.av-site-header {
	background-color: var(--wp--preset--color--base);
}

.av-site-header .av-site-identity .wp-block-site-title {
	font-family: var(--wp--preset--font-family--sans);
	font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
	max-width: min(100%, 18rem);
	overflow-wrap: anywhere;
}

.av-site-header .av-site-identity .wp-block-site-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.av-site-header .av-site-identity .wp-block-site-title a:hover {
	color: var(--wp--preset--color--accent);
}

.av-primary-nav {
	font-family: var(--wp--preset--font-family--sans);
}

.av-primary-nav .wp-block-navigation-item__content {
	align-items: center;
	color: var(--wp--preset--color--muted);
	display: inline-flex;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.01em;
	min-height: 2.75rem;
	padding: 0.35rem 0.2rem;
	text-decoration: none;
}

.av-primary-nav .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--contrast);
}

.av-primary-nav .wp-block-navigation__responsive-container-open,
.av-primary-nav .wp-block-navigation__responsive-container-close {
	min-height: 2.75rem;
	min-width: 2.75rem;
}

.av-site-footer .av-site-container.is-layout-flow > * + * {
	margin-top: var(--wp--preset--spacing--sm);
}

.av-site-footer .av-site-container .av-footer-nav {
	margin-top: var(--wp--preset--spacing--xs);
}

.av-footer-identity {
	font-weight: 600;
	margin: 0;
}

.av-footer-identity .wp-block-site-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.av-footer-nav .wp-block-navigation-item__content {
	min-height: 2.75rem;
	padding: 0.25rem 0;
	text-decoration: none;
}

.av-footer-nav .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--accent);
}

.av-footer-nav .wp-block-navigation__container {
	align-items: center;
	flex-wrap: wrap;
	gap: 0;
}

.av-footer-nav .wp-block-navigation-item + .wp-block-navigation-item .wp-block-navigation-item__content::before {
	color: var(--wp--preset--color--subtle);
	content: "·";
	margin-inline-end: 0.65rem;
	pointer-events: none;
}

.av-copyright {
	color: var(--wp--preset--color--subtle);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	margin: var(--wp--preset--spacing--xs) 0 0;
}

.av-site-main :where(.alignwide) {
	max-width: var(--av-site-max);
}

.av-site-main :where(.alignfull) {
	max-width: none;
}

/* --- Homepage (Phase 4 + Visual Refinement 1.1.1 grid repair) --- */

/**
 * Homepage sections reuse .av-site-container / alignwide (1120px)
 * with layout:default so children share one left edge.
 */
.av-home > .av-home-section.alignwide {
	box-sizing: border-box;
	margin-left: auto;
	margin-right: auto;
	max-width: var(--av-site-max);
	width: 100%;
}

.av-home .av-home-section + .av-home-section {
	border-top: 1px solid var(--wp--preset--color--border);
}

/* Hero text column: intro measure, same left edge as wide grid */
.av-home-hero .av-hero-inner {
	box-sizing: border-box;
	max-width: var(--av-intro-max);
	width: 100%;
}

.av-home-hero .av-hero-inner > * {
	margin-left: 0;
	margin-right: 0;
}

.av-home-hero.av-home-section {
	padding-bottom: var(--wp--preset--spacing--3xl);
	padding-top: var(--wp--preset--spacing--2xl);
}

.av-home-explore.av-home-section {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--wp--preset--spacing--xl);
	padding-bottom: var(--wp--preset--spacing--xl);
	padding-top: var(--wp--preset--spacing--2xl);
}

.av-home-research.av-home-section {
	padding-bottom: var(--wp--preset--spacing--3xl);
	padding-top: var(--wp--preset--spacing--xl);
}

.av-home-news.av-home-section,
.av-home-learn.av-home-section,
.av-home-about.av-home-section {
	padding-bottom: var(--wp--preset--spacing--3xl);
	padding-top: var(--wp--preset--spacing--3xl);
}

.av-home-hero .av-hero-kicker {
	letter-spacing: 0.12em;
	margin: 0 0 var(--wp--preset--spacing--lg);
	text-align: left;
}

.av-home-hero .av-hero-title {
	font-size: clamp(2rem, 1.65rem + 1.4vw, 3rem);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.12;
	margin: 0 0 var(--wp--preset--spacing--lg);
	max-width: 22ch;
	text-align: left;
}

.av-home-hero .av-hero-lede {
	color: var(--wp--preset--color--muted);
	font-size: clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem);
	line-height: 1.6;
	margin: 0 0 var(--wp--preset--spacing--2xl);
	max-width: 38rem;
	text-align: left;
}

.av-hero-actions {
	justify-content: flex-start;
	margin: 0;
}

.av-hero-actions .wp-block-button__link {
	border-radius: 0.15rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.01em;
	min-height: 2.75rem;
	padding: 0.5rem 1rem;
}

.av-hero-actions .av-link-primary .wp-block-button__link {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--surface);
}

.av-hero-actions .av-link-primary .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--contrast);
}

.av-hero-actions .av-link-secondary .wp-block-button__link {
	background: transparent;
	border: 1px solid var(--wp--preset--color--border-strong);
	color: var(--wp--preset--color--contrast);
}

.av-hero-actions .av-link-secondary .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

.av-section-link {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	margin-bottom: 0;
}

.av-section-link a {
	text-decoration: none;
}

.av-section-link a:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* Explore — editorial destinations (not feature cards) */

.av-home-explore .av-explore-heading,
.av-home-explore h2.wp-block-heading.av-explore-heading {
	align-self: flex-start;
	font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.75rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
	margin: 0;
	margin-inline: 0 !important;
	max-width: none;
	text-align: left !important;
	width: auto;
}

.av-explore-grid {
	align-items: stretch;
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: none;
	width: 100%;
}

.av-explore-item {
	display: flex;
	flex-direction: column;
	margin: 0;
	min-width: 0;
	padding: 0;
}

.av-explore-index {
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1;
	margin: 0 0 var(--wp--preset--spacing--md);
}

.av-explore-title {
	font-size: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.25;
	margin: 0 0 var(--wp--preset--spacing--sm);
}

.av-explore-desc {
	color: var(--wp--preset--color--muted);
	flex: 1 1 auto;
	font-size: 1rem;
	line-height: 1.55;
	margin: 0 0 var(--wp--preset--spacing--lg);
}

.av-explore-link {
	margin: 0;
}

.av-explore-link a {
	align-items: center;
	color: var(--wp--preset--color--accent);
	display: inline-flex;
	min-height: 2.75rem;
}

.av-explore-link a:hover {
	color: var(--wp--preset--color--contrast);
}

/* Legacy class kept harmless if cached markup remains */
.av-explore-card {
	border-top: 0;
	padding-top: 0;
}

.av-explore-card .wp-block-heading {
	margin-top: 0;
}

.av-content-list .av-list-item {
	border-top: 1px solid var(--wp--preset--color--border);
}

.av-content-list .av-list-item:last-child {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.av-list-item .wp-block-heading {
	margin-top: 0;
	margin-bottom: 0;
}

.av-list-item .wp-block-heading a {
	color: inherit;
	text-decoration: none;
}

.av-list-item .wp-block-heading a:hover {
	color: var(--wp--preset--color--accent);
}

.av-list-type {
	color: var(--wp--preset--color--accent);
	font-weight: 600;
}

.av-learn-topic {
	border-left: 2px solid var(--wp--preset--color--border);
	padding-left: var(--wp--preset--spacing--lg);
}

.av-learn-topic .wp-block-heading {
	margin-top: 0;
}

.av-learn-topic .wp-block-heading a {
	color: inherit;
	text-decoration: none;
}

.av-learn-topic .wp-block-heading a:hover {
	color: var(--wp--preset--color--accent);
}

.av-home-about {
	margin-top: 0;
}

/* --- Learn / curriculum (Phase 5) --- */

.av-learn-landing > .av-learn-intro.alignwide,
.av-learn-landing > .av-learn-curriculum-wrap.alignwide {
	box-sizing: border-box;
	margin-left: auto;
	margin-right: auto;
	max-width: var(--av-site-max);
	width: 100%;
}

/* Learn curriculum map (Section → Chapter → Part) */

.av-curriculum-map {
	max-width: none;
	width: 100%;
}

.av-curriculum-map__sections,
.av-curriculum-map__chapters,
.av-curriculum-map__parts {
	list-style: none;
	margin: 0;
	padding: 0;
}

.av-curriculum-map__section-item {
	border-top: 1px solid var(--wp--preset--color--border);
}

.av-curriculum-map__section-item:last-child {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.av-curriculum-map__section {
	display: block;
}

.av-curriculum-map__section-summary {
	align-items: baseline;
	cursor: pointer;
	display: grid;
	gap: 0.35rem 1rem;
	grid-template-columns: auto 1fr auto auto;
	list-style: none;
	padding: var(--wp--preset--spacing--lg) 0;
}

.av-curriculum-map__section-summary::-webkit-details-marker,
.av-curriculum-map__chapter-toggle::-webkit-details-marker {
	display: none;
}

.av-curriculum-map__section-summary::marker,
.av-curriculum-map__chapter-toggle::marker {
	content: "";
}

.av-curriculum-map__section-title {
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	line-height: 1.35;
}

.av-curriculum-map__num {
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	font-size: var(--wp--preset--font-size--small);
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
}

.av-curriculum-map__meta {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	white-space: nowrap;
}

.av-curriculum-map__disclosure {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	font-size: var(--wp--preset--font-size--medium);
	justify-self: end;
	line-height: 1;
	min-width: 1.25rem;
	text-align: center;
}

.av-curriculum-map__sign--open {
	display: none;
}

.av-curriculum-map__section[open] .av-curriculum-map__sign--closed,
.av-curriculum-map__chapter-parts[open] .av-curriculum-map__sign--closed {
	display: none;
}

.av-curriculum-map__section[open] .av-curriculum-map__sign--open,
.av-curriculum-map__chapter-parts[open] .av-curriculum-map__sign--open {
	display: inline;
}

.av-curriculum-map__section-summary:focus-visible,
.av-curriculum-map__chapter-toggle:focus-visible,
.av-curriculum-map__chapter-title:focus-visible,
.av-curriculum-map__part-title:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.av-curriculum-map__section-body {
	padding-bottom: var(--wp--preset--spacing--lg);
	padding-left: 0;
}

.av-curriculum-map__section-desc {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.55;
	margin: 0 0 var(--wp--preset--spacing--lg);
	max-width: 40rem;
}

.av-curriculum-map__chapter-item {
	align-items: start;
	border-top: 1px solid var(--wp--preset--color--border);
	display: grid;
	gap: 0.35rem 1rem;
	grid-template-columns: auto 1fr auto;
	padding: var(--wp--preset--spacing--md) 0;
	padding-left: 1.5rem;
	position: relative;
}

.av-curriculum-map__chapter-item:has(.av-curriculum-map__chapter-parts[open]) {
	padding-bottom: var(--wp--preset--spacing--md);
}

.av-curriculum-map__chapter-item > .av-curriculum-map__num {
	grid-column: 1;
	grid-row: 1;
}

.av-curriculum-map__chapter-title {
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	grid-column: 2;
	grid-row: 1;
	line-height: 1.4;
	text-decoration: none;
}

.av-curriculum-map__chapter-title:hover {
	color: var(--wp--preset--color--accent);
}

.av-curriculum-map__chapter-parts {
	grid-column: 3;
	grid-row: 1;
}

.av-curriculum-map__chapter-parts[open] .av-curriculum-map__parts-wrap {
	left: 1.5rem;
	position: absolute;
	right: 0;
	top: 100%;
}

.av-curriculum-map__chapter-toggle {
	cursor: pointer;
	display: inline-flex;
	justify-self: end;
	list-style: none;
	margin: 0;
	padding: 0.25rem 0.5rem;
}

.av-curriculum-map__parts {
	margin: 0 0 var(--wp--preset--spacing--sm);
	padding-left: 2.5rem;
}

.av-curriculum-map__part {
	display: grid;
	gap: 0.25rem 0.75rem;
	grid-template-columns: auto 1fr;
	padding: 0.35rem 0;
}

.av-curriculum-map__part-title {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.45;
	text-decoration: none;
}

.av-curriculum-map__part-title:hover {
	color: var(--wp--preset--color--accent);
}

.av-curriculum-map__read {
	margin: var(--wp--preset--spacing--sm) 0 0;
	padding-left: 2.5rem;
}

.av-curriculum-map__read a {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}

.av-curriculum-map__read a:hover {
	color: var(--wp--preset--color--accent);
}

@media (max-width: 480px) {
	.av-curriculum-map__section-summary {
		grid-template-columns: auto 1fr auto;
	}

	.av-curriculum-map__section-summary .av-curriculum-map__meta {
		grid-column: 2;
		white-space: normal;
	}

	.av-curriculum-map__section-summary .av-curriculum-map__disclosure {
		grid-column: 3;
		grid-row: 1 / span 2;
		align-self: center;
	}

	.av-curriculum-map__chapter-item {
		grid-template-columns: auto 1fr auto;
		padding-left: 0.75rem;
	}

	.av-curriculum-map__parts,
	.av-curriculum-map__read {
		padding-left: 1.25rem;
	}
}

.av-breadcrumbs,
.av-lesson-context {
	margin-bottom: var(--wp--preset--spacing--md);
}

.av-breadcrumbs__list,
.av-lesson-context__list {
	align-items: center;
	color: var(--wp--preset--color--muted);
	display: flex;
	flex-wrap: wrap;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	gap: 0.35rem 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.av-breadcrumbs a,
.av-lesson-context a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.av-breadcrumbs a:hover,
.av-lesson-context a:hover {
	color: var(--wp--preset--color--accent);
}

.av-breadcrumbs [aria-current="page"],
.av-lesson-context [aria-current="page"] {
	color: var(--wp--preset--color--contrast);
}

.av-lesson-intro {
	margin-bottom: var(--wp--preset--spacing--xl);
}

.av-lesson-nav {
	border-top: 1px solid var(--wp--preset--color--border);
	margin-top: var(--wp--preset--spacing--3xl);
	padding-top: var(--wp--preset--spacing--2xl);
}

.av-lesson-nav__adjacent {
	display: grid;
	gap: var(--wp--preset--spacing--lg);
	grid-template-columns: 1fr 1fr;
	margin-bottom: var(--wp--preset--spacing--xl);
}

.av-lesson-nav__prev,
.av-lesson-nav__next {
	color: inherit;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--2xs);
	min-height: 2.75rem;
	text-decoration: none;
}

.av-lesson-nav__next {
	text-align: right;
}

.av-lesson-nav__title {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
}

.av-lesson-nav__prev:hover .av-lesson-nav__title,
.av-lesson-nav__next:hover .av-lesson-nav__title {
	color: var(--wp--preset--color--accent);
}

.av-learn-topics--dynamic {
	display: grid;
	gap: var(--wp--preset--spacing--xl);
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.av-learn-topics--dynamic .av-learn-topic {
	border-left: 2px solid var(--wp--preset--color--border);
	margin: 0;
	padding-left: var(--wp--preset--spacing--lg);
}

.av-learn-topic__title {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.25;
	margin: 0 0 var(--wp--preset--spacing--sm);
}

.av-learn-topic__title a {
	color: inherit;
	text-decoration: none;
}

.av-learn-topic__title a:hover {
	color: var(--wp--preset--color--accent);
}

.av-learn-topic__excerpt {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	margin: 0;
}

.av-lesson .wp-block-post-excerpt:not(:has(.wp-block-post-excerpt__excerpt:not(:empty))) {
	display: none;
}

@media (max-width: 781px) {
	.av-home-hero .av-hero-title {
		max-width: none;
	}

	.av-explore-grid {
		flex-direction: column !important;
		gap: 0 !important;
	}

	.av-explore-item {
		border-top: 1px solid var(--wp--preset--color--border);
		padding: var(--wp--preset--spacing--xl) 0;
	}

	.av-explore-item:first-child {
		border-top: 0;
		padding-top: 0;
	}

	.av-explore-item:last-child {
		padding-bottom: 0;
	}

	.av-learn-topic,
	.av-learn-topics--dynamic .av-learn-topic {
		border-left: none;
		border-top: 2px solid var(--wp--preset--color--border);
		padding-left: 0;
		padding-top: var(--wp--preset--spacing--lg);
	}

	.av-learn-topics--dynamic {
		grid-template-columns: 1fr;
	}

	.av-lesson-nav__adjacent {
		grid-template-columns: 1fr;
	}

	.av-lesson-nav__next {
		text-align: left;
	}

	.av-hero-actions {
		width: 100%;
	}

	.av-hero-actions .wp-block-button {
		flex: 1 1 auto;
	}

	.av-hero-actions .wp-block-button__link {
		width: 100%;
	}
}

@media (min-width: 782px) {
	.av-explore-grid {
		gap: 0 !important;
	}

	.av-explore-item {
		padding-inline: var(--wp--preset--spacing--xl);
	}

	.av-explore-item:first-child {
		padding-inline-start: 0;
	}

	.av-explore-item:last-child {
		padding-inline-end: 0;
	}

	.av-explore-item + .av-explore-item {
		border-inline-start: 1px solid var(--wp--preset--color--border);
	}
}

/* Very small screens (~320px): keep readability without shrinking everything. */
@media (max-width: 360px) {
	.av-site-header .av-site-identity .wp-block-site-title {
		max-width: 11.5rem;
	}

	.av-home-hero .av-hero-title,
	.av-article__body .wp-block-post-title,
	.av-page .wp-block-post-title {
		font-size: clamp(1.75rem, 1.55rem + 1.2vw, 2.25rem);
		line-height: 1.15;
		overflow-wrap: anywhere;
	}

	.av-curriculum-map__chapter-title,
	.av-curriculum-map__part-title,
	.av-lesson-nav__title {
		overflow-wrap: anywhere;
	}
}

/* Large screens: preserve reading measure; avoid sparse “lost” layout. */
@media (min-width: 1280px) {
	.av-site-main.av-article,
	.av-site-main.av-page {
		padding-block-start: var(--wp--preset--spacing--3xl);
	}
}

.av-404__links {
	font-family: var(--wp--preset--font-family--sans);
	list-style: none;
	margin: var(--wp--preset--spacing--lg) 0 0;
	padding: 0;
}

.av-404__links li {
	border-top: 1px solid var(--wp--preset--color--border);
	margin: 0;
}

.av-404__links a {
	align-items: center;
	color: var(--wp--preset--color--contrast);
	display: flex;
	min-height: 2.75rem;
	text-decoration: none;
}

.av-404__links a:hover {
	color: var(--wp--preset--color--accent);
}

.av-pagination .page-numbers {
	align-items: center;
	display: inline-flex;
	min-height: 2.75rem;
	min-width: 2.25rem;
	padding: 0 0.35rem;
}

.av-pagination .page-numbers.current {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}

::selection {
	background-color: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--contrast);
}

/* --- Focus (accessibility) --- */

:where(a, button, input, textarea, select, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

.wp-block-button__link:focus-visible {
	outline-offset: 4px;
}

/* --- Long-form prose helpers --- */

.av-prose {
	max-width: var(--av-reading-max, var(--wp--style--global--content-size));
}

.av-prose-wide {
	max-width: var(--av-site-max, var(--wp--style--global--wide-size));
}

.av-meta {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

.is-style-intro {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
}

.av-kicker {
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
}

.av-callout,
.wp-block-group.is-style-callout {
	background-color: var(--wp--preset--color--accent-soft);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--border--radius--sm, 0.25rem);
	padding: var(--wp--preset--spacing--lg);
}

.av-callout > :first-child,
.wp-block-group.is-style-callout > :first-child {
	margin-top: 0;
}

.av-callout > :last-child,
.wp-block-group.is-style-callout > :last-child {
	margin-bottom: 0;
}

/* --- Tables (responsive scroll on small screens) --- */

.wp-block-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.wp-block-table table {
	border-collapse: collapse;
	min-width: 100%;
	width: max-content;
	max-width: 100%;
}

.wp-block-table th,
.wp-block-table td {
	border: 1px solid var(--wp--preset--color--border);
	padding: 0.5rem 0.75rem;
	vertical-align: top;
}

.wp-block-table th {
	background-color: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-align: left;
}

.wp-block-table figcaption {
	margin-top: var(--wp--preset--spacing--sm);
}

/* --- Code inline --- */

:not(pre) > code {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.2rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.9em;
	padding: 0.1em 0.35em;
}

/* --- Images --- */

.wp-block-image img {
	height: auto;
	max-width: 100%;
}

/* --- Skip link (block theme default) --- */

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--surface);
	border: 2px solid var(--wp--preset--color--accent);
	clip: auto;
	color: var(--wp--preset--color--contrast);
	display: block;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	height: auto;
	left: var(--wp--preset--spacing--md);
	line-height: 1.5;
	padding: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--md);
	position: absolute;
	top: var(--wp--preset--spacing--md);
	width: auto;
	z-index: 100000;
}

/* --- Research (Phase 6) --- */

.av-research-filters__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--lg);
	list-style: none;
	margin: 0 0 var(--wp--preset--spacing--xl);
	padding: 0;
}

.av-research-filters__link {
	align-items: center;
	border-bottom: 2px solid transparent;
	color: var(--wp--preset--color--muted);
	display: inline-flex;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	min-height: 2.75rem;
	padding: 0.25rem 0;
	text-decoration: none;
}

.av-research-filters__link:hover,
.av-research-filters__link.is-current {
	border-bottom-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.av-research-item {
	border-top: 1px solid var(--wp--preset--color--border);
	display: grid;
	gap: var(--wp--preset--spacing--lg);
	grid-template-columns: 1fr;
	margin: 0;
	padding: var(--wp--preset--spacing--xl) 0;
}

.av-content-list--research .av-research-item:last-child {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.av-research-item__media {
	display: block;
	max-width: 14rem;
}

.av-research-item__media img {
	display: block;
	height: auto;
	max-width: 100%;
}

.av-research-item__title {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.2;
	margin: 0 0 var(--wp--preset--spacing--sm);
}

.av-research-item__title a {
	color: inherit;
	text-decoration: none;
}

.av-research-item__title a:hover {
	color: var(--wp--preset--color--accent);
}

.av-research-item__excerpt {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.55;
	margin: 0;
	max-width: 40rem;
}

.av-list-type {
	color: var(--wp--preset--color--accent);
	font-weight: 600;
	text-decoration: none;
}

.av-list-type:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.av-research-type a {
	color: inherit;
	text-decoration: none;
}

.av-research-type a:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.av-research-intro {
	margin-bottom: 0;
}

.av-research-single .wp-block-post-excerpt:not(:has(.wp-block-post-excerpt__excerpt:not(:empty))) {
	display: none;
}

.av-research-single .wp-block-post-featured-image:not(:has(img)) {
	display: none;
}

.av-related-research {
	border-top: 1px solid var(--wp--preset--color--border);
	margin-top: var(--wp--preset--spacing--3xl);
	padding-top: var(--wp--preset--spacing--2xl);
}

.av-related-research__heading {
	font-size: var(--wp--preset--font-size--x-large);
	margin: 0 0 var(--wp--preset--spacing--lg);
}

.av-pagination {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	margin-top: var(--wp--preset--spacing--2xl);
}

.av-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--md);
	justify-content: space-between;
}

.av-pagination a {
	min-height: 2.75rem;
	text-decoration: none;
}

.av-pagination a:hover {
	color: var(--wp--preset--color--accent);
}

@media (min-width: 782px) {
	.av-research-item:has(.av-research-item__media) {
		grid-template-columns: 14rem minmax(0, 1fr);
	}
}

/* --- News (Phase 7) — denser than Research --- */

.av-news-filters__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.15rem var(--wp--preset--spacing--md);
	list-style: none;
	margin: 0 0 var(--wp--preset--spacing--lg);
	padding: 0;
}

.av-news-filters__link {
	align-items: center;
	border-bottom: 2px solid transparent;
	color: var(--wp--preset--color--muted);
	display: inline-flex;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	min-height: 2.5rem;
	padding: 0.2rem 0;
	text-decoration: none;
}

.av-news-filters__link:hover,
.av-news-filters__link.is-current {
	border-bottom-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.av-news-item {
	border-top: 1px solid var(--wp--preset--color--border);
	margin: 0;
	padding: var(--wp--preset--spacing--md) 0;
}

.av-content-list--news .av-news-item:last-child {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.av-news-item__meta {
	margin-bottom: var(--wp--preset--spacing--2xs);
}

.av-news-item__topic {
	color: var(--wp--preset--color--accent);
	font-weight: 600;
	text-decoration: none;
}

.av-news-item__topic:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.av-news-item__title {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.25;
	margin: 0 0 var(--wp--preset--spacing--2xs);
}

.av-home-news .av-news-item__title {
	font-size: var(--wp--preset--font-size--medium);
}

.av-news-item__title a {
	color: inherit;
	text-decoration: none;
}

.av-news-item__title a:hover {
	color: var(--wp--preset--color--accent);
}

.av-news-item__excerpt {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	margin: 0;
	max-width: 42rem;
}

.av-news-topic a {
	color: inherit;
	text-decoration: none;
}

.av-news-topic a:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.av-news-intro {
	margin-bottom: 0;
}

.av-news-single .wp-block-post-excerpt:not(:has(.wp-block-post-excerpt__excerpt:not(:empty))) {
	display: none;
}

.av-news-single .wp-block-post-featured-image:not(:has(img)) {
	display: none;
}

.av-related-news {
	border-top: 1px solid var(--wp--preset--color--border);
	margin-top: var(--wp--preset--spacing--2xl);
	padding-top: var(--wp--preset--spacing--xl);
}

.av-related-news__heading {
	font-size: var(--wp--preset--font-size--large);
	margin: 0 0 var(--wp--preset--spacing--md);
}

/* --- Pages / About (Phase 8) --- */

.av-page .wp-block-post-title {
	margin-bottom: var(--wp--preset--spacing--lg);
}

.page-about .av-page .wp-block-heading a {
	color: inherit;
	text-decoration: none;
}

.page-about .av-page .wp-block-heading a:hover {
	color: var(--wp--preset--color--accent);
}

/*
 * Future portrait: add an Image block after the opening intro in Pages → About
 * (within the 720px measure). Do not leave an empty public placeholder.
 */

