/*
Theme Name: airtrain.ai
Theme URI: https://airtrain.ai/
Author: airtrain.ai
Description: News theme for airtrain.ai - AI news, reviews, research and analysis. A block theme built for speed and SEO.
Version: 0.3.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: airtrain-ai
Tags: news, magazine, blog, block-patterns, full-site-editing, block-styles, wide-blocks
*/

:root {
	--at-radius: 10px;
	--at-radius-sm: 6px;
	--at-ease: cubic-bezier(0.2, 0, 0, 1);
	--at-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
	--at-shadow-lg: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 10px 24px -4px rgba(15, 23, 42, 0.08);
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, .wp-block-post-title { text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--wp--preset--color--accent); color: #fff; }

a:focus-visible, button:focus-visible, input:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
	border-radius: 3px;
}

/* ==========================================================================
   Masthead
   ========================================================================== */

.at-masthead {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: saturate(1.8) blur(14px);
	-webkit-backdrop-filter: saturate(1.8) blur(14px);
}

.at-masthead .wp-block-site-title {
	font-size: 1.0625rem;
	letter-spacing: 0.01em;
}

.at-masthead .wp-block-navigation {
	gap: 1.75rem;
}

.at-masthead .wp-block-navigation a {
	font-size: 0.9375rem;
	transition: color 0.15s var(--at-ease);
}

.at-masthead .wp-block-navigation a:hover { color: var(--wp--preset--color--accent); }

/* Search affordance + subscribe button live in the right-hand cluster. */
.at-masthead .at-actions { gap: 1rem; align-items: center; }

.at-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 0;
	background: none;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	border-radius: var(--at-radius-sm);
	transition: background 0.15s var(--at-ease);
}

.at-search-toggle:hover { background: var(--wp--preset--color--surface-alt); }
.at-search-toggle svg { width: 18px; height: 18px; }

.at-subscribe-btn {
	display: inline-flex;
	align-items: center;
	background: var(--wp--preset--color--accent);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	padding: 0.5rem 1.05rem;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.15s var(--at-ease);
}

.at-subscribe-btn:hover { background: #1d4ed8; color: #fff; text-decoration: none; }

.at-searchbar { display: none; padding-top: 0.85rem; }
.at-searchbar.is-open { display: block; }

/* ==========================================================================
   Badges, eyebrows, meta
   ========================================================================== */

.at-badge,
.at-hero .wp-block-post-terms a {
	display: inline-block;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	padding: 0.3rem 0.6rem;
	border-radius: 5px;
	text-decoration: none;
}

.at-dot::before { content: "·"; margin: 0 0.4rem; color: var(--wp--preset--color--border); }

/* ==========================================================================
   Hero
   ========================================================================== */

.at-hero .wp-block-post-featured-image {
	position: relative;
	border-radius: var(--at-radius);
	overflow: hidden;
	margin: 0;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--ink);
}

.at-hero .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Text sits over the image, so darken the lower half enough to stay legible. */
.at-hero .wp-block-post-featured-image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(11, 18, 32, 0.55) 0%, rgba(11, 18, 32, 0.25) 38%, rgba(11, 18, 32, 0.9) 100%);
	pointer-events: none;
}

.at-hero .at-hero-inner {
	position: absolute;
	inset: auto 0 0 0;
	padding: clamp(1.25rem, 3vw, 2rem);
	z-index: 2;
}

.at-hero .at-hero-inner .wp-block-post-title,
.at-hero .at-hero-inner .wp-block-post-title a {
	color: #fff;
	font-size: clamp(1.5rem, 3.1vw, 2.35rem);
	line-height: 1.16;
	letter-spacing: -0.028em;
	margin: 0.7rem 0 0.6rem;
}

.at-hero .at-hero-inner .wp-block-post-excerpt,
.at-hero .at-hero-inner .wp-block-post-excerpt__excerpt {
	color: rgba(255, 255, 255, 0.88);
	font-size: 0.9375rem;
	line-height: 1.55;
	margin: 0;
}

.at-hero .at-hero-inner .at-badge {
	background: var(--wp--preset--color--accent);
	color: #fff;
}

.at-hero-wrap { position: relative; }

/* ==========================================================================
   Side cards - thumbnail left, text right
   ========================================================================== */

.at-sidecards .wp-block-post {
	display: grid;
	grid-template-columns: 116px 1fr;
	gap: 0.9rem;
	align-items: center;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--at-radius);
	padding: 0.75rem;
	background: var(--wp--preset--color--base);
	transition: box-shadow 0.2s var(--at-ease), border-color 0.2s var(--at-ease);
}

.at-sidecards .wp-block-post:hover {
	box-shadow: var(--at-shadow);
	border-color: #cbd5e1;
}

.at-sidecards .wp-block-post-featured-image {
	margin: 0;
	border-radius: var(--at-radius-sm);
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: var(--wp--preset--color--surface-alt);
}

.at-sidecards .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.at-sidecards .wp-block-post-terms { margin-bottom: 0.25rem; }

.at-sidecards .wp-block-post-terms a {
	color: var(--wp--preset--color--accent);
	font-size: 0.625rem;
	letter-spacing: 0.08em;
}

.at-sidecards .wp-block-post-title {
	font-size: 0.9375rem;
	line-height: 1.35;
	margin: 0 0 0.3rem;
}

/* ==========================================================================
   Section filter pills
   ========================================================================== */

.at-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.at-filters a {
	display: inline-block;
	padding: 0.45rem 1rem;
	border-radius: 999px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--wp--preset--color--body);
	text-decoration: none;
	transition: background 0.15s var(--at-ease), color 0.15s var(--at-ease);
}

.at-filters a:hover { background: var(--wp--preset--color--surface-alt); text-decoration: none; }

.at-filters a.is-active {
	background: var(--wp--preset--color--accent);
	color: #fff;
	font-weight: 600;
}

/* ==========================================================================
   Story grid
   ========================================================================== */

.at-grid .wp-block-post-featured-image {
	border-radius: var(--at-radius);
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--surface-alt);
	margin-bottom: 0.85rem;
}

.at-grid .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s var(--at-ease);
}

.at-grid .wp-block-post:hover .wp-block-post-featured-image img { transform: scale(1.04); }

.at-grid .wp-block-post-terms { margin-bottom: 0.4rem; }

.at-grid .wp-block-post-title {
	font-size: 1.1875rem;
	line-height: 1.3;
	margin: 0 0 0.5rem;
}

.at-grid .wp-block-post-excerpt { margin-bottom: 0.85rem; }

/* ==========================================================================
   Sidebar widgets
   ========================================================================== */

.at-widget-title {
	font-size: 1.0625rem;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: var(--wp--preset--color--contrast);
	margin: 0 0 1rem;
}

/* Trending: big ghosted rank numbers beside each headline. */
.at-trending { counter-reset: at-rank; list-style: none; margin: 0; padding: 0; }

.at-trending li {
	counter-increment: at-rank;
	display: grid;
	grid-template-columns: 1.5rem 1fr;
	gap: 0.75rem;
	padding-block: 0.8rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.at-trending li:last-child { border-bottom: 0; }

.at-trending li::before {
	content: counter(at-rank);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.25;
	color: #cbd5e1;
}

.at-trending a {
	display: block;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	margin-bottom: 0.2rem;
}

.at-trending a:hover { color: var(--wp--preset--color--accent); text-decoration: none; }

/* Both the headline and the date belong in the second column - without this the
   date becomes a third grid item and wraps into the 1.5rem rank column. */
.at-trending li > a,
.at-trending li > time { grid-column: 2; }

.at-trending time {
	display: block;
	font-size: 0.75rem;
	color: var(--wp--preset--color--muted);
}

/* Newsletter card */
.at-newsletter {
	background: var(--wp--preset--color--accent-soft);
	border-radius: var(--at-radius);
	padding: 1.75rem 1.5rem;
	text-align: center;
}

.at-newsletter .at-newsletter-icon {
	display: inline-flex;
	color: var(--wp--preset--color--accent);
	margin-bottom: 0.6rem;
}

.at-newsletter .at-newsletter-icon svg { width: 26px; height: 26px; }

.at-newsletter h3 {
	font-size: 1.0625rem;
	font-weight: 700;
	margin: 0 0 0.4rem;
	color: var(--wp--preset--color--contrast);
}

.at-newsletter p {
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--wp--preset--color--body);
	margin: 0 0 1rem;
}

.at-newsletter input[type="email"] {
	width: 100%;
	padding: 0.6rem 0.85rem;
	border: 1px solid #dbe3ef;
	border-radius: 8px;
	background: #fff;
	font: inherit;
	font-size: 0.875rem;
	margin-bottom: 0.6rem;
}

.at-newsletter input[type="email"]::placeholder { color: #94a3b8; }

.at-newsletter button {
	width: 100%;
	padding: 0.65rem 1rem;
	border: 0;
	border-radius: 8px;
	background: var(--wp--preset--color--accent);
	color: #fff;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s var(--at-ease);
}

.at-newsletter button:hover { background: #1d4ed8; }

.at-newsletter .at-fineprint {
	font-size: 0.6875rem;
	color: var(--wp--preset--color--muted);
	margin: 0.65rem 0 0;
}

/* ==========================================================================
   Single post
   ========================================================================== */

.at-breadcrumb {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
	margin-bottom: 0.9rem;
}

.at-breadcrumb a { color: var(--wp--preset--color--muted); text-decoration: none; }
.at-breadcrumb a:hover { color: var(--wp--preset--color--accent); }
.at-breadcrumb .sep { margin: 0 0.45rem; color: #cbd5e1; }

/* h1 only - a bare .single-post .wp-block-post-title would also hit the
   headlines inside the sidebar and the "More Stories" band. */
.single-post h1.wp-block-post-title {
	font-size: clamp(1.875rem, 3.6vw, 2.625rem);
	line-height: 1.16;
	letter-spacing: -0.028em;
	margin: 0.75rem 0 0.9rem;
}

.at-deck {
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--wp--preset--color--body);
	margin: 0 0 1.5rem;
}

.at-byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1rem;
	border-top: 1px solid var(--wp--preset--color--border);
	border-bottom: 1px solid var(--wp--preset--color--border);
	margin-bottom: 1.75rem;
}

.at-byline .at-author { display: flex; align-items: center; gap: 0.65rem; }
.at-byline .at-author img { width: 40px; height: 40px; border-radius: 50%; }
.at-byline .at-author strong { display: block; font-size: 0.875rem; color: var(--wp--preset--color--contrast); }
.at-byline .at-author span { font-size: 0.8125rem; color: var(--wp--preset--color--muted); }

.at-byline .at-stats {
	display: flex;
	align-items: center;
	gap: 1.1rem;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
}

.at-byline .at-stats svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 0.3rem; }

/* The figure lives inside the text column, so it is bounded by that column's
   width rather than the page's. */
.at-figure { margin: 0 0 1.75rem; }

.at-figure .wp-block-post-featured-image {
	border-radius: var(--at-radius);
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--ink);
	margin: 0;
	max-width: 100%;
}

.at-figure .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.at-caption {
	font-size: 0.75rem;
	color: var(--wp--preset--color--muted);
	text-align: center;
	margin: 0.6rem 0 0;
}

/* Two-column article shell. The article column is capped at a comfortable
   measure; the sidebar takes whatever is left rather than a fixed width, so
   the pair stays flush with the page edges. */
.at-article-shell {
	display: grid;
	grid-template-columns: minmax(0, 740px) minmax(280px, 1fr);
	gap: clamp(2rem, 4vw, 3.5rem);
	align-items: start;
}

.at-article { min-width: 0; }

.at-article-shell .at-aside { position: sticky; top: 5.5rem; }

.single-post .wp-block-post-content {
	font-size: 0.9375rem;
	line-height: 1.75;
	color: var(--wp--preset--color--body);
}

.single-post .wp-block-post-content h2 {
	font-size: 1.25rem;
	margin-top: 2em;
	margin-bottom: 0.6em;
}

.single-post .wp-block-post-content h3 {
	font-size: 1.0625rem;
	margin-top: 1.75em;
	margin-bottom: 0.5em;
}

.single-post .wp-block-post-content a {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.single-post .wp-block-post-content li { margin-bottom: 0.4em; }

.single-post .wp-block-post-content blockquote {
	border-left: 3px solid var(--wp--preset--color--accent);
	padding-left: 1.1rem;
	margin: 1.75rem 0;
	font-style: italic;
	color: var(--wp--preset--color--body);
}

/* Tag pills */
.at-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 2rem 0 0; }

.at-tags a {
	display: inline-block;
	padding: 0.3rem 0.7rem;
	border-radius: 5px;
	background: var(--wp--preset--color--surface-alt);
	color: var(--wp--preset--color--muted);
	font-size: 0.75rem;
	text-decoration: none;
	transition: background 0.15s var(--at-ease), color 0.15s var(--at-ease);
}

.at-tags a:hover { background: var(--wp--preset--color--accent-soft); color: var(--wp--preset--color--accent); }

/* Author bio */
.at-bio {
	display: flex;
	gap: 1rem;
	background: var(--wp--preset--color--surface);
	border-radius: var(--at-radius);
	padding: 1.25rem;
	margin-top: 1.75rem;
}

.at-bio img { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.at-bio strong { display: block; font-size: 0.9375rem; color: var(--wp--preset--color--contrast); margin-bottom: 0.3rem; }
.at-bio p { font-size: 0.8125rem; line-height: 1.55; color: var(--wp--preset--color--body); margin: 0; }

/* More stories band */
.at-band {
	background: var(--wp--preset--color--surface);
	margin-top: 3.5rem;
	padding-block: 3rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.at-footer {
	background: var(--wp--preset--color--ink);
	color: #94a3b8;
	padding-block: 3.5rem 1.75rem;
}

.at-footer .wp-block-site-title,
.at-footer .wp-block-site-title a { color: #fff; font-size: 1.0625rem; }

.at-footer h3 {
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	margin: 0 0 0.9rem;
	letter-spacing: 0;
}

.at-footer p { font-size: 0.8125rem; line-height: 1.6; color: #94a3b8; }

.at-footer ul { list-style: none; margin: 0; padding: 0; }
.at-footer li { margin-bottom: 0.55rem; }

.at-footer a { color: #94a3b8; font-size: 0.8125rem; text-decoration: none; transition: color 0.15s var(--at-ease); }
.at-footer a:hover { color: #fff; text-decoration: none; }

.at-footer-cols {
	display: grid;
	grid-template-columns: 1.6fr repeat(3, 1fr);
	gap: 2.5rem;
}

.at-footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(148, 163, 184, 0.18);
	font-size: 0.75rem;
}

.at-social { display: flex; gap: 1rem; align-items: center; }
.at-social a { display: inline-flex; }
.at-social svg { width: 17px; height: 17px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	.at-article-shell { grid-template-columns: 1fr; }
	.at-article-shell .at-aside { position: static; }
	.at-footer-cols { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 781px) {
	.at-masthead { position: static; }
	.at-sidecards .wp-block-post { grid-template-columns: 96px 1fr; }
	.at-footer-cols { grid-template-columns: 1fr; }
	.at-byline { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ==========================================================================
   Wiring for the block wrappers WordPress emits
   ========================================================================== */

/* The hero overlay is positioned against each post wrapper, not the query. */
.at-hero .wp-block-post { position: relative; }
.at-hero .wp-block-post > * { margin: 0; }

/* Category terms rendered as a pill on single posts. */
.at-badge-terms a {
	display: inline-block;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent);
	padding: 0.3rem 0.6rem;
	border-radius: 5px;
	text-decoration: none;
}

/* post-excerpt renders an inner div; the class lands on the wrapper. */
.at-deck,
.at-deck .wp-block-post-excerpt__excerpt {
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--wp--preset--color--body);
	margin: 0 0 1.5rem;
}

.at-deck p { margin: 0; }
.at-deck .wp-block-post-excerpt__more-text { display: none; }

/* Grid cards: keep the author row pinned under the excerpt. */
.at-grid .wp-block-post {
	display: flex;
	flex-direction: column;
}

.at-grid .wp-block-post-date { margin-top: auto; }
.at-grid .wp-block-post-author-name { font-size: 0.8125rem; }


/* Side cards put the image first in source order; grid places it left. */
.at-sidecards .wp-block-post > .wp-block-group { min-width: 0; }

.at-band .wp-block-heading { letter-spacing: -0.025em; }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ==========================================================================
   Hero on narrow screens
   Overlaid text needs the image to be taller than the copy. Below 600px it
   never is, so the hero stops being an overlay and becomes a stacked card:
   image on top, text beneath it on the same dark ground.
   ========================================================================== */

@media (max-width: 600px) {
	.at-hero .wp-block-post {
		background: var(--wp--preset--color--ink);
		border-radius: var(--at-radius);
		overflow: hidden;
	}

	.at-hero .wp-block-post-featured-image {
		border-radius: 0;
		aspect-ratio: 16 / 10;
	}

	.at-hero .wp-block-post-featured-image::after {
		background: linear-gradient(180deg, rgba(11, 18, 32, 0.1) 0%, rgba(11, 18, 32, 0.45) 100%);
	}

	.at-hero .at-hero-inner {
		position: static;
		padding: 1.1rem 1.15rem 1.4rem;
	}

	.at-hero .at-hero-inner .wp-block-post-title,
	.at-hero .at-hero-inner .wp-block-post-title a {
		font-size: 1.4rem;
		margin: 0.6rem 0 0.5rem;
	}

	.at-hero .at-hero-inner .wp-block-post-excerpt__excerpt { font-size: 0.875rem; }

	.at-filters { gap: 0.35rem; }
	.at-filters a { padding: 0.4rem 0.8rem; font-size: 0.8125rem; }
}

/* ==========================================================================
   Brand
   ========================================================================== */

.at-masthead .wp-block-site-logo { line-height: 0; }

.at-masthead .wp-block-site-logo img {
	width: auto;
	height: 36px;
	max-width: none;
	display: block;
}

@media (max-width: 781px) {
	.at-masthead .wp-block-site-logo img { height: 30px; }
}

/* The footer keeps the wordmark as live text: the supplied logo sets AIRTRAIN
   in near-black, which disappears on the dark ground, and recolouring it in the
   file would have to repaint the symbol's own shadows too. */
.at-footer .wp-block-site-title,
.at-footer .wp-block-site-title a {
	font-weight: 800;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

/* Byline without an avatar: the beat label sits on the baseline of the stats
   row rather than stacking as a two-line author block. */
.at-byline .at-beat {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

/* ==========================================================================
   Mobile masthead
   Source order is logo, nav, actions - which strands the hamburger in the
   middle. On narrow screens reorder to: toggle, logo, actions.
   ========================================================================== */

@media (max-width: 781px) {
	.at-masthead .alignwide {
		flex-wrap: nowrap;
		gap: 0.5rem;
	}

	.at-masthead .wp-block-navigation { order: 1; flex: none; }

	.at-masthead .wp-block-site-logo {
		order: 2;
		margin-right: auto;
		min-width: 0;
	}

	.at-masthead .at-actions { order: 3; gap: 0.35rem; }

	.at-subscribe-btn {
		padding: 0.42rem 0.75rem;
		font-size: 0.8125rem;
	}

	/* The toggle is a 24px glyph by default - too small a tap target. */
	.at-masthead .wp-block-navigation__responsive-container-open {
		padding: 0.4rem;
		min-width: 40px;
		min-height: 40px;
		display: flex;
		align-items: center;
		justify-content: center;
	}
}

@media (max-width: 420px) {
	.at-masthead .wp-block-site-logo img { height: 24px; }
	.at-subscribe-btn { padding: 0.4rem 0.6rem; font-size: 0.75rem; }
	.at-search-toggle { width: 30px; height: 30px; }
}

/* ==========================================================================
   Overlay menu
   Written standalone rather than as tweaks on top of core's navigation
   stylesheet: that sheet is not being enqueued here, which left the open
   container 69px tall with its contents pushed to y:-40 - a menu that opened
   but showed one item over the live page. Everything the overlay needs is
   declared below, so it no longer depends on core styles arriving.
   ========================================================================== */

.wp-block-navigation__responsive-container.is-menu-open {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	height: 100dvh;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base);
	padding: 1.25rem var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__responsive-container-content {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	margin: 0;
	padding-top: 3.25rem;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	gap: 0;
	margin: 0;
	padding: 0;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	font-size: 1.375rem;
	font-weight: 700;
	letter-spacing: -0.022em;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	padding-block: 0.95rem;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--accent);
}

.wp-block-navigation__responsive-container-close {
	position: absolute;
	top: 1.15rem;
	right: var(--wp--preset--spacing--30);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 0.4rem;
	color: var(--wp--preset--color--contrast);
}

/* Stop the page behind the overlay from scrolling. */
body.has-modal-open { overflow: hidden; }

/* ==========================================================================
   Lead column height
   The hero's 16:9 image was setting the column height, so the lead block ran
   past the bottom of the three-card rail beside it. Let the rail set the
   height instead: the column becomes a flex stack, the byline keeps its
   natural size, and the hero takes whatever is left.
   ========================================================================== */

@media (min-width: 782px) {
	.at-lead-col {
		display: flex;
		flex-direction: column;
	}

	/* flex-basis:0 is the important part. With `flex:1` the hero still starts
	   from its intrinsic height, and an image told height:100% inside a box of
	   undetermined height falls back to the file's own 16:9 - which is what was
	   overshooting the rail. From a zero basis it simply grows into whatever the
	   rail leaves. */
	.at-lead-col .at-hero {
		flex: 1 1 0;
		min-height: 300px;
		position: relative;
	}

	/* Taken out of flow so nothing inside can push the column taller. */
	.at-lead-col .at-hero .wp-block-post {
		position: absolute;
		inset: 0;
	}

	.at-lead-col .at-hero .wp-block-post-featured-image {
		position: absolute;
		inset: 0;
		aspect-ratio: auto;
		height: auto;
	}

	.at-lead-col .at-hero .wp-block-post-featured-image img { height: 100%; }

}
