/*
 * AnWP Grandstand - template CSS (front end + editor).
 *
 * Colours, fonts and the per-style knobs come from theme.json:
 *   --wp--preset--color--{bg|bg-alt|ink|muted|border|accent|on-accent|band|band-ink|band-muted}
 *   --wp--custom--gs--{radius|link|heading--*|header--*|footer--*}
 * A style variation (Club Kit styles, D13) changes those values, never this file.
 * Ported from the frozen Templates boards (grandstand.css, 2026-11-06).
 */

/* ---------- page frame ---------- */
body .wp-site-blocks { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body .wp-site-blocks > * { margin-block-start: 0; }
body .wp-site-blocks > main { flex: 1 0 auto; }
.gs-main { padding-block: var(--wp--preset--spacing--70) var(--wp--preset--spacing--80); }
.gs-main-full { padding-block: 0; }
.gs-main-full > .gs-full-content { margin-block-start: 0; }
:where(.gs-main, .gs-main-full) img { border-radius: var(--wp--custom--gs--radius); }
.gs-main-full :is(.wp-block-image, .wp-block-cover).alignfull img { border-radius: 0; }

/* ---------- small shared pieces ---------- */
.gs-kicker { margin: 0; font-size: 12px; font-weight: 700; line-height: 1.4; letter-spacing: 0.1em; text-transform: uppercase; }
.gs-kicker a { color: var(--wp--custom--gs--link); text-decoration: none; }
.gs-kicker a:hover { text-decoration: underline; }
.gs-kicker .wp-block-post-terms__separator,
.gs-kicker a ~ a { display: none; }

.gs-meta { gap: 0 6px; font-size: 14px; color: var(--wp--preset--color--muted); }
.gs-meta > * { margin: 0; }
.gs-meta > * + *::before { content: "\00B7"; margin-right: 6px; }
.gs-meta .wp-block-post-author-name,
.gs-meta .wp-block-comment-author-name { font-weight: 600; color: var(--wp--preset--color--ink); }
.gs-meta a { color: inherit; text-decoration: none; }
.gs-meta a:hover { text-decoration: underline; }

.wp-block-post-excerpt__more-text { display: none; }
.wp-block-post-excerpt__excerpt { margin: 0; }
.wp-block-post-featured-image { margin: 0; }
.wp-block-post-featured-image img { border-radius: var(--wp--custom--gs--radius); }
/* Colour behind the theme's own featured images while they load (not every image: a transparent PNG would show it) */
:where(.gs-lead__media, .gs-card__media, .gs-row__media, .gs-featured) img { background: var(--wp--preset--color--bg-alt); }
/* An image that fails to load falls back to its width attribute (3000px on AFL Stats) and pushes the page sideways (E47) */
:where(.gs-lead__media, .gs-card__media, .gs-row__media, .gs-featured) { max-width: 100%; }
/* ...and core's lazy `sizes="auto"` placeholder (3000x1500) makes it 1500px tall: the CSS width + aspect-ratio size these images anyway */
:is(.gs-lead__media, .gs-card__media, .gs-row__media, .gs-featured) img[sizes] { contain-intrinsic-size: none; }
/* AGS-BUG-007: a `sizes="auto"` image is size-contained (Chrome), so the figure of a Query Loop card takes the
 * smaller of the image's intrinsic height and its real one. With E47's `none` that is 0: the figure collapses to
 * one line and the image covers the title and excerpt. A fixed size can't fix it either - a broken image shows
 * that height raw. So the card is a size container and the intrinsic size is the card width in the image's
 * ratio (16:10 default, plus core's ratio presets): loaded or missing, the image is a box in the card's ratio.
 * Query Loop cards only - their width comes from the post-template track; static `gs-card` groups may sit in a
 * shrink-to-fit flex row. */
.wp-block-post > .gs-card { container-type: inline-size; }
.wp-block-post > .gs-card > .gs-card__media img[sizes] { contain-intrinsic-size: auto 100cqw auto 62.5cqw; }
.wp-block-post > .gs-card > .gs-card__media img[sizes][style*="aspect-ratio:1;"] { contain-intrinsic-size: auto 100cqw auto 100cqw; }
.wp-block-post > .gs-card > .gs-card__media img[sizes][style*="aspect-ratio:4/3;"] { contain-intrinsic-size: auto 100cqw auto 75cqw; }
.wp-block-post > .gs-card > .gs-card__media img[sizes][style*="aspect-ratio:3/4;"] { contain-intrinsic-size: auto 100cqw auto 133.333cqw; }
.wp-block-post > .gs-card > .gs-card__media img[sizes][style*="aspect-ratio:3/2;"] { contain-intrinsic-size: auto 100cqw auto 66.667cqw; }
.wp-block-post > .gs-card > .gs-card__media img[sizes][style*="aspect-ratio:2/3;"] { contain-intrinsic-size: auto 100cqw auto 150cqw; }
.wp-block-post > .gs-card > .gs-card__media img[sizes][style*="aspect-ratio:16/9;"] { contain-intrinsic-size: auto 100cqw auto 56.25cqw; }
.wp-block-post > .gs-card > .gs-card__media img[sizes][style*="aspect-ratio:9/16;"] { contain-intrinsic-size: auto 100cqw auto 177.778cqw; }
.wp-block-post > .gs-card > .gs-card__media img[sizes][style*="aspect-ratio:2;"] { contain-intrinsic-size: auto 100cqw auto 50cqw; }
.gs-card { min-width: 0; }

.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--ink);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--border);
}
.wp-block-search__input {
	font: inherit;
	font-size: 16px;
	padding: 10px 14px;
	border: 1px solid #8a8f9a;
	border-radius: var(--wp--custom--gs--radius);
	background: var(--wp--preset--color--bg);
	color: var(--wp--preset--color--ink);
}
.wp-block-search__button { margin-left: 8px; }

/* g-blocks site header (plugin or bundled add-on) coloured from the theme tokens */
.anwp-g-header {
	--anwp-g-header-bg: var(--wp--custom--gs--header--bg);
	--anwp-g-header-border: var(--wp--custom--gs--header--line);
	--anwp-g-header-max-width: var(--wp--style--global--wide-size);
	--anwp-g-header-nav-color: var(--wp--custom--gs--header--ink);
	--anwp-g-header-nav-hover-color: var(--wp--custom--gs--header--ink);
	--anwp-g-header-active-border: var(--wp--preset--color--accent);
	--anwp-g-header-logo-color: var(--wp--custom--gs--header--ink);
	--anwp-g-header-logo-sub-color: var(--wp--custom--gs--header--muted);
	--anwp-g-header-monogram-bg: var(--wp--custom--gs--header--ink);
	--anwp-g-header-monogram-color: var(--wp--custom--gs--header--bg);
	--anwp-g-header-btn-bg: var(--wp--preset--color--accent);
	--anwp-g-header-btn-color: var(--wp--preset--color--on-accent);
	--anwp-g-header-btn-hover-color: var(--wp--custom--gs--header--ink);
	--anwp-g-header-btn-ghost-color: var(--wp--custom--gs--header--ink);
	--anwp-g-header-icon-border: var(--wp--custom--gs--header--line);
	--anwp-g-header-icon-color: var(--wp--custom--gs--header--ink);
	--anwp-g-header-icon-hover-color: var(--wp--preset--color--accent);
	--anwp-g-header-display-font: var(--wp--preset--font-family--heading);
	--anwp-g-header-drawer-bg: var(--wp--preset--color--bg);
	--anwp-g-header-drawer-color: var(--wp--preset--color--ink);
	/* Dark mode switch (g-blocks): accent-filled "on" state per board 03. */
	--anwp-g-color-switch-accent: var(--wp--preset--color--accent);
	--anwp-g-color-switch-on-accent: var(--wp--preset--color--on-accent);
	--anwp-g-color-switch-muted: var(--wp--preset--color--muted);
	--anwp-g-color-switch-line: var(--wp--preset--color--border);
}

/* Football Leagues reads these theme-facing variables (defined on :root by FL).
   bg-light + bg-gray-light colour FL's classic panels: left at FL's near-white they hide light ink in dark mode. */
body {
	--fl-border-light: var(--wp--preset--color--border);
	--fl-bg-secondary: var(--wp--preset--color--bg-alt);
	--fl-bg-light: var(--wp--preset--color--bg-alt);
	--fl-bg-gray-light: var(--wp--preset--color--border);
}

/* Kadence palette bridge, light (E49): Kadence blocks left in content and plugins built on Kadence's
 * `--global-palette*` take Grandstand's palette (a migrated site's brand colours). Kadence Blocks prints
 * its own defaults on :root; `:root:root` outranks it, and the dark blocks below come later. Same map as
 * AnWP_Grandstand_Kadence_Migrator::PALETTE_MAP. */
:root:root {
	--global-palette1: var(--wp--preset--color--accent);
	--global-palette2: var(--wp--preset--color--accent);
	--global-palette3: var(--wp--preset--color--ink);
	--global-palette4: var(--wp--preset--color--ink);
	--global-palette5: var(--wp--preset--color--muted);
	--global-palette6: var(--wp--preset--color--muted);
	--global-palette7: var(--wp--preset--color--border);
	--global-palette8: var(--wp--preset--color--bg-alt);
	--global-palette9: var(--wp--preset--color--bg);
	--global-gray-400: var(--wp--preset--color--border);
	--global-gray-500: var(--wp--preset--color--muted);
}

/* ---------- dark mode (D21-D23) ----------
 * g-blocks prints the site default (light | dark | system) as `data-anwp-color-mode` on <html>;
 * its head script swaps in the visitor's own choice before paint. The theme only skins it: the
 * 10 palette slugs take the style's dark values (`settings.custom.gs.dark`, Clean Dark = D21),
 * and everything built on the slugs (header, footer, FL tokens) follows. "system" needs no JS.
 */
:root[data-anwp-color-mode="dark"] {
	color-scheme: dark;
	--wp--preset--color--bg: var(--wp--custom--gs--dark--bg);
	--wp--preset--color--bg-alt: var(--wp--custom--gs--dark--bg-alt);
	--wp--preset--color--ink: var(--wp--custom--gs--dark--ink);
	--wp--preset--color--muted: var(--wp--custom--gs--dark--muted);
	--wp--preset--color--border: var(--wp--custom--gs--dark--border);
	--wp--preset--color--accent: var(--wp--custom--gs--dark--accent);
	--wp--preset--color--on-accent: var(--wp--custom--gs--dark--on-accent);
	--wp--preset--color--band: var(--wp--custom--gs--dark--band);
	--wp--preset--color--band-ink: var(--wp--custom--gs--dark--band-ink);
	--wp--preset--color--band-muted: var(--wp--custom--gs--dark--band-muted);
	/* Kadence palette bridge (E29): plugins built on Kadence's `--global-palette*` (Sports API Hub
	 * prints its own light values on :root) follow dark mode. The attribute selector outranks :root. */
	--global-palette1: var(--wp--custom--gs--dark--accent);
	--global-palette2: var(--wp--custom--gs--dark--accent);
	--global-palette3: var(--wp--custom--gs--dark--ink);
	--global-palette4: var(--wp--custom--gs--dark--ink);
	--global-palette5: var(--wp--custom--gs--dark--muted);
	--global-palette6: var(--wp--custom--gs--dark--muted);
	--global-palette7: var(--wp--custom--gs--dark--border);
	--global-palette8: var(--wp--custom--gs--dark--bg-alt);
	--global-palette9: var(--wp--custom--gs--dark--bg);
	--global-gray-400: var(--wp--custom--gs--dark--border);
	--global-gray-500: var(--wp--custom--gs--dark--muted);
}
/* g-blocks sets data-anwp-color-mode-updating on <html> for ~300 ms around a switch: colours ease
 * only then, never on load, hover or a device change. Off for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
	:root[data-anwp-color-mode-updating],
	:root[data-anwp-color-mode-updating] *,
	:root[data-anwp-color-mode-updating] *::before,
	:root[data-anwp-color-mode-updating] *::after {
		transition: background-color .3s ease, border-color .3s ease, color .3s ease, fill .3s ease, stroke .3s ease !important;
		transition-delay: 0s !important;
	}
}
@media (prefers-color-scheme: dark) {
	:root[data-anwp-color-mode="system"] {
		color-scheme: dark;
		--wp--preset--color--bg: var(--wp--custom--gs--dark--bg);
		--wp--preset--color--bg-alt: var(--wp--custom--gs--dark--bg-alt);
		--wp--preset--color--ink: var(--wp--custom--gs--dark--ink);
		--wp--preset--color--muted: var(--wp--custom--gs--dark--muted);
		--wp--preset--color--border: var(--wp--custom--gs--dark--border);
		--wp--preset--color--accent: var(--wp--custom--gs--dark--accent);
		--wp--preset--color--on-accent: var(--wp--custom--gs--dark--on-accent);
		--wp--preset--color--band: var(--wp--custom--gs--dark--band);
		--wp--preset--color--band-ink: var(--wp--custom--gs--dark--band-ink);
		--wp--preset--color--band-muted: var(--wp--custom--gs--dark--band-muted);
		--global-palette1: var(--wp--custom--gs--dark--accent);
		--global-palette2: var(--wp--custom--gs--dark--accent);
		--global-palette3: var(--wp--custom--gs--dark--ink);
		--global-palette4: var(--wp--custom--gs--dark--ink);
		--global-palette5: var(--wp--custom--gs--dark--muted);
		--global-palette6: var(--wp--custom--gs--dark--muted);
		--global-palette7: var(--wp--custom--gs--dark--border);
		--global-palette8: var(--wp--custom--gs--dark--bg-alt);
		--global-palette9: var(--wp--custom--gs--dark--bg);
		--global-gray-400: var(--wp--custom--gs--dark--border);
		--global-gray-500: var(--wp--custom--gs--dark--muted);
	}
}
/* Core Site Logo (footer patterns): the header's logo for dark backgrounds, printed next to the
 * site logo only when it is the site logo's twin (D32). Nothing to swap to = the logo as it is. */
.wp-block-site-logo img.anwp-grandstand-logo-dark { display: none; }
:root[data-anwp-color-mode="dark"] .wp-block-site-logo img.anwp-grandstand-logo-light { display: none; }
:root[data-anwp-color-mode="dark"] .wp-block-site-logo img.anwp-grandstand-logo-dark { display: inline; }
@media (prefers-color-scheme: dark) {
	:root[data-anwp-color-mode="system"] .wp-block-site-logo img.anwp-grandstand-logo-light { display: none; }
	:root[data-anwp-color-mode="system"] .wp-block-site-logo img.anwp-grandstand-logo-dark { display: inline; }
}

/* ---------- home ---------- */
.gs-lead-list { margin: 0; }
.gs-lead {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 40px;
	align-items: center;
	padding-bottom: 56px;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.gs-lead > * { margin-block-start: 0; }
.gs-lead__body { gap: 16px; }
.gs-lead__body > * { margin: 0; }
.gs-lead__title { font-size: clamp(32px, 3.6vw, 44px); }
.gs-lead__ex { font-size: 19px; }

.gs-sectionhead { margin-block: 56px 24px; font-size: 28px; }
.gs-grid { margin-block-start: 0; row-gap: 40px; }
.gs-card { gap: 12px; }
.gs-card > * { margin: 0; }
.gs-card .wp-block-post-featured-image { align-self: stretch; }
.gs-card__title { font-size: 21px; line-height: 1.25; }
.gs-card__ex { font-size: 15px; }
.gs-card .wp-block-post-date { font-size: 14px; }

/* ---------- single ---------- */
.gs-entry-head { gap: 18px; }
.gs-entry-head > * { margin: 0; }
.gs-standfirst { font-size: 21px; line-height: 1.5; }
.gs-byline { gap: 12px; }
.gs-byline > * { margin: 0; }
.wp-block-avatar img { border-radius: 50%; }
.gs-featured { margin-block-start: 40px; }
.gs-content { margin-block-start: 48px; font-size: 18px; line-height: 1.7; }
.gs-content h2 { font-size: 30px; margin-block-start: 40px; }
.gs-content figcaption { font-size: 14px; color: var(--wp--preset--color--muted); }
.gs-content .wp-block-quote p { font-family: var(--wp--preset--font-family--heading); font-size: 28px; line-height: 1.3; font-weight: var(--wp--custom--gs--heading--weight); text-transform: var(--wp--custom--gs--heading--case); }
.gs-content .wp-block-quote cite { display: block; margin-top: 10px; font-size: 15px; font-style: normal; color: var(--wp--preset--color--muted); }

.gs-entry-foot { margin-block-start: 56px; gap: 32px; }
.gs-entry-foot > * { margin: 0; }
.gs-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.gs-tags .wp-block-post-terms__prefix { font-weight: 700; margin-right: 4px; }
.gs-tags a {
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--wp--preset--color--bg-alt);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--border);
}
.gs-authorbox { gap: 20px; padding: 28px; background: var(--wp--preset--color--bg-alt); border-radius: var(--wp--custom--gs--radius); }
.gs-authorbox__name { font-family: var(--wp--preset--font-family--heading); font-size: 20px; font-weight: var(--wp--custom--gs--heading--weight); }
.gs-authorbox .wp-block-post-author-biography { margin-top: 6px; font-size: 15px; color: var(--wp--preset--color--muted); }
.gs-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 24px; border-top: 1px solid var(--wp--preset--color--border); }
.gs-postnav > * { margin: 0; }
.gs-postnav a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--wp--preset--color--ink); font-family: var(--wp--preset--font-family--heading); font-weight: var(--wp--custom--gs--heading--weight); text-transform: var(--wp--custom--gs--heading--case); font-size: 19px; line-height: 1.3; }
.gs-postnav .post-navigation-link__label { font-family: var(--wp--preset--font-family--body); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--wp--preset--color--muted); }
.gs-postnav .post-navigation-link-next { text-align: right; grid-column: 2; }
.gs-comments { margin-block-start: 32px; }
.gs-comments .wp-block-comment-template { padding: 0; list-style: none; }
.gs-comment { gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--wp--preset--color--border); }
.gs-comment .wp-block-comment-content p { margin: 6px 0 0; font-size: 16px; }
.gs-comments :where(input[type="text"], input[type="email"], input[type="url"], textarea) {
	font: inherit;
	font-size: 16px;
	padding: 10px 14px;
	border: 1px solid #8a8f9a;
	border-radius: var(--wp--custom--gs--radius);
	background: var(--wp--preset--color--bg);
	color: var(--wp--preset--color--ink);
	width: 100%;
}

/* ---------- breadcrumbs (D45: core/breadcrumbs or an SEO plugin's trail) ---------- */
.gs-crumbs { font-size: 14px; line-height: 1.5; color: var(--wp--preset--color--muted); overflow-wrap: anywhere; }
.gs-crumbs p { margin: 0; }
.gs-crumbs a { color: inherit; text-decoration: none; }
.gs-crumbs a:hover,
.gs-crumbs a:focus-visible { color: var(--wp--custom--gs--link); text-decoration: underline; }
.gs-crumbs [aria-current="page"],
.gs-crumbs .breadcrumb_last,
.gs-crumbs .last { color: var(--wp--preset--color--ink); }
/* A trail right above the title sits closer to it than the block gap. */
.gs-main > .gs-crumbs + *,
.gs-withside__main > .gs-crumbs + * { margin-block-start: 12px; }

/* ---------- page / wide / full ---------- */
.gs-pagehead { font-size: clamp(36px, 4.4vw, 52px); }
.gs-wide-content > :first-child { margin-block-start: 0; }

/* ---------- archive / search ---------- */
.gs-archivehead { gap: 10px; padding-bottom: 32px; margin-bottom: 40px; border-bottom: 1px solid var(--wp--preset--color--border); }
.gs-archivehead > * { margin: 0; }
.gs-archivehead .wp-block-query-title { font-size: clamp(34px, 4vw, 48px); }
.gs-archivehead .wp-block-term-description { color: var(--wp--preset--color--muted); max-width: 680px; }
.gs-archivehead .gs-searchbar { width: 100%; max-width: 640px; }
/* The Layout card "Space next to the sidebar" sets --gs-side-gap; Auto = 56 / 32 boxed / 40 entity. */
.gs-withside { gap: var(--gs-side-gap, 56px); }
.gs-list { display: flex; flex-direction: column; gap: 32px; }
.gs-search-query { max-width: 920px; }
/* A list page without a sidebar (Layout card: Archives / Search results = No sidebar): the column was dropped, keep the search list's reading width. */
.gs-withside > .gs-withside__main:only-child { max-width: 920px; }
.gs-row { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
.gs-row > * { margin: 0; }
/* No featured image (post-featured-image prints nothing): the body takes the whole row, not the 280px image column (AGS-BUG-009). */
.gs-row > .gs-row__body:only-child { grid-column: 1 / -1; }
.gs-row__body { gap: 10px; }
.gs-row__body > * { margin: 0; }
.gs-row__title { font-size: 26px; line-height: 1.2; }
.gs-row__ex { font-size: 16px; }
.gs-empty { gap: 16px; max-width: 640px; }
.gs-empty > * { margin: 0; }

.gs-side { gap: 40px; }
.gs-side > * { margin: 0; align-self: stretch; }
/* The search input's own width (~20 characters) plus the button pushed the sidebar past a 320px phone; flex: 1 fills the row instead. */
.gs-side .wp-block-search__input { width: 0; min-width: 0; }
.gs-widget__title {
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}
.gs-links { margin: 0; padding: 0; list-style: none; }
.gs-links li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--wp--preset--color--border); font-size: 15px; color: var(--wp--preset--color--muted); }
.gs-links a { color: var(--wp--preset--color--ink); text-decoration: none; }
.gs-mini { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.gs-mini li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; }
.gs-mini .wp-block-latest-posts__featured-image { margin: 0; float: none; }
.gs-mini .wp-block-latest-posts__featured-image img { width: 72px; height: 54px; object-fit: cover; border-radius: var(--wp--custom--gs--radius); }
.gs-mini .wp-block-latest-posts__post-title { font-size: 15px; line-height: 1.35; font-weight: 600; color: var(--wp--preset--color--ink); text-decoration: none; }
/* The sidebar's Latest is a Query Loop (gs-latest-query), so a single page can leave itself out. */
.gs-mini > li > * { margin: 0; }
.gs-mini .gs-mini__media img { border-radius: var(--wp--custom--gs--radius); }
.gs-mini .gs-mini__t { font-family: var(--wp--preset--font-family--body); font-size: 15px; line-height: 1.35; font-weight: 600; text-transform: none; letter-spacing: normal; }
.gs-mini .gs-mini__t a { color: var(--wp--preset--color--ink); text-decoration: none; }
.gs-mini li > .gs-mini__t:first-child { grid-column: 1 / -1; }

.gs-pager { margin-block-start: 56px; gap: 6px; }
.gs-pager a,
.gs-pager .page-numbers {
	box-sizing: border-box; /* number tiles = 44px squares; padding only widens Prev / Next */
	min-width: 44px;
	white-space: nowrap;
	min-height: 44px;
	/* flex, not grid: core prints "Next" + an arrow <span>, which a grid stacks into two rows */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 12px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--gs--radius);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--border);
}
/* Current page = the chosen-state look of the footer Light / Dark / Auto control (D24): 10% ink tint + 1px ink ring. */
.gs-pager .page-numbers.current { background: color-mix(in srgb, var(--wp--preset--color--ink) 10%, transparent); box-shadow: inset 0 0 0 1px var(--wp--preset--color--ink); }
.gs-pager .page-numbers.dots { box-shadow: none; }

/* ---------- 404 ---------- */
.gs-404 { gap: 64px; }
.gs-404__code { margin: 0; font-family: var(--wp--preset--font-family--heading); font-weight: var(--wp--custom--gs--heading--weight); font-size: clamp(96px, 12vw, 160px); line-height: 0.85; color: var(--wp--preset--color--accent); }
.gs-404 h1 { margin-block-start: 24px; font-size: clamp(36px, 4.4vw, 52px); }
.gs-404__text { font-size: 19px; color: var(--wp--preset--color--muted); }
.gs-404 .gs-searchbar { max-width: 560px; margin-block-start: 28px; }

/* ---------- footer ---------- */
.gs-footer {
	background: var(--wp--custom--gs--footer--bg);
	color: var(--wp--custom--gs--footer--ink);
	border-top: 1px solid var(--wp--custom--gs--footer--line);
}
.gs-footer a { color: inherit; text-decoration: none; }
.gs-footer a:hover { text-decoration: underline; }
.gs-footer__cols { display: grid; gap: 40px; padding-block: 64px 48px; }
.gs-footer__cols > * { margin: 0; }
.gs-footer--four .gs-footer__cols { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); }
.gs-footer--three .gs-footer__cols { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); }
.gs-footer--inline .gs-footer__cols { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding-block: 40px; }
.gs-footer--centered .gs-footer__cols { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding-block: 56px 32px; gap: 28px; }
.gs-brand { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.gs-brand > * { margin: 0; }
.gs-footer--centered .gs-brand { align-items: center; }
.gs-brand__id { gap: 12px; }
.gs-brand__id > * { margin: 0; }
.gs-footer .wp-block-site-title { margin: 0; font-family: var(--wp--preset--font-family--heading); font-weight: var(--wp--custom--gs--heading--weight); text-transform: var(--wp--custom--gs--heading--case); font-size: 22px; line-height: 1.1; }
.gs-brand__about { font-size: 15px; color: var(--wp--custom--gs--footer--muted); max-width: 340px; }
.gs-fcol__title {
	margin: 0 0 14px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--custom--gs--footer--muted);
}
.gs-fcol__nav { gap: 10px; font-size: 15px; }
.gs-inline-nav { gap: 12px 28px; font-size: 15px; font-weight: 600; }
.gs-social { gap: 10px; font-size: 18px; }
.gs-social.wp-block-social-links .wp-social-link {
	background: transparent;
	color: var(--wp--custom--gs--footer--ink);
	box-shadow: inset 0 0 0 1px var(--wp--custom--gs--footer--line);
	border-radius: 50%;
}
.gs-social.wp-block-social-links .wp-social-link a { padding: 11px; }
.gs-footer__bar {
	gap: 16px;
	padding-block: 20px;
	border-top: 1px solid var(--wp--custom--gs--footer--line);
	font-size: 14px;
	color: var(--wp--custom--gs--footer--muted);
}
.gs-footer__bar > * { margin: 0; }
.gs-footer__bar a { text-decoration: underline; }
.gs-footer__legal { gap: 20px; }
/* g-blocks Dark Mode Switch (D24, board 05) - between the copyright line and the legal links.
   Coloured from the footer knobs, not the page palette, so it reads on a band footer too;
   the focus ring is the footer ink, since the light accent on the band is only 2.59:1. */
.gs-footer {
	--anwp-g-color-switch-ink: var(--wp--custom--gs--footer--ink);
	--anwp-g-color-switch-muted: var(--wp--custom--gs--footer--muted);
	--anwp-g-color-switch-line: var(--wp--custom--gs--footer--line);
	--anwp-g-color-switch-accent: var(--wp--custom--gs--footer--ink);
}
.gs-footer__bar .anwp-g-color-switch-seg button { height: 38px; }
.gs-footer--centered .gs-footer__bar { justify-content: center; }

/* ---------- block patterns (D30, boards 2026-11-13) ---------- */

/* Section styles (styles/sections/*.json set each style's own ground + text; this swaps the palette
 * slugs for everything inside, so muted text, links, buttons, cards and hairlines follow with no
 * per-block colour. Children, not the section: a custom property can't read its parent's value of
 * a name it redefines on the same element. */
.is-style-section-alt { --gs-s-bg: var(--wp--preset--color--bg-alt); --gs-s-alt: var(--wp--preset--color--bg); }
.is-style-section-alt > * { --wp--preset--color--bg: var(--gs-s-bg); --wp--preset--color--bg-alt: var(--gs-s-alt); }
.is-style-section-band { --gs-s-bg: var(--wp--preset--color--band); --gs-s-ink: var(--wp--preset--color--band-ink); --gs-s-muted: var(--wp--preset--color--band-muted); }
.is-style-section-band > * {
	--wp--preset--color--bg: var(--gs-s-bg);
	--wp--preset--color--bg-alt: color-mix(in srgb, var(--gs-s-ink) 8%, var(--gs-s-bg));
	--wp--preset--color--ink: var(--gs-s-ink);
	--wp--preset--color--muted: var(--gs-s-muted);
	--wp--preset--color--border: color-mix(in srgb, var(--gs-s-ink) 18%, var(--gs-s-bg));
	--wp--preset--color--accent: var(--gs-s-ink);
	--wp--preset--color--on-accent: var(--gs-s-bg);
	--wp--custom--gs--link: var(--gs-s-ink);
}
.is-style-section-accent { --gs-s-bg: var(--wp--preset--color--accent); --gs-s-ink: var(--wp--preset--color--on-accent); }
.is-style-section-accent > * {
	--wp--preset--color--bg: var(--gs-s-bg);
	--wp--preset--color--bg-alt: color-mix(in srgb, var(--gs-s-ink) 10%, var(--gs-s-bg));
	--wp--preset--color--ink: var(--gs-s-ink);
	--wp--preset--color--muted: color-mix(in srgb, var(--gs-s-ink) 85%, var(--gs-s-bg));
	--wp--preset--color--border: color-mix(in srgb, var(--gs-s-ink) 28%, var(--gs-s-bg));
	--wp--preset--color--accent: var(--gs-s-ink);
	--wp--preset--color--on-accent: var(--gs-s-bg);
	--wp--custom--gs--link: var(--gs-s-ink);
}

/* Full-width sections stack with no gap; text before / after one keeps a real gap */
:where(.gs-content, .gs-full-content) > .alignfull.gs-section { margin-block-start: var(--wp--preset--spacing--70); }
:where(.gs-content, .gs-full-content) > .alignfull.gs-section:first-child,
:where(.gs-content, .gs-full-content) > .alignfull.gs-section + .alignfull.gs-section { margin-block-start: 0; }
:where(.gs-content, .gs-full-content) > .alignfull.gs-section + * { margin-block-start: var(--wp--preset--spacing--70); }
.gs-content :where(.gs-section, .gs-box) h2 { margin-block-start: 0; }
.gs-box { border-radius: var(--wp--custom--gs--radius); }
.gs-box > :first-child { margin-block-start: 0; }

/* A page that ends with a full-width section meets the footer: cancel .gs-main's bottom padding (no :has()) */
.gs-main .gs-content > .alignfull.gs-section:last-child { margin-block-end: calc(-1 * var(--wp--preset--spacing--80)); }

/* "More" link: a text link with an arrow, used under sections */
.gs-more a { font-weight: 600; text-decoration: none; }
.gs-more a::after { content: " \2192"; }
.gs-more a:hover { text-decoration: underline; }

/* Numbers row */
.gs-stat > * { margin: 0; }
.gs-stat__num { font-family: var(--wp--preset--font-family--heading); font-weight: var(--wp--custom--gs--heading--weight); letter-spacing: -0.03em; font-size: clamp(40px, 5vw, 64px); line-height: 1; }
.gs-stat { padding-top: 18px; border-top: 1px solid var(--wp--preset--color--border); }

/* Logo wall: each logo on the "other" ground (white inside an Alt section) */
.gs-logos > .gs-logo { margin: 0; }
.gs-logo img { display: block; width: 100%; height: 96px; box-sizing: border-box; padding: 22px 26px; object-fit: contain; background: var(--wp--preset--color--bg-alt); }

/* Cover sections (Cover with heading, the Tickets photo band): edge to edge, so no image corners */
.wp-block-cover.gs-section > .wp-block-cover__image-background { border-radius: 0; }

/* Principal partner: the logo on its own tile, so the card reads full before a real logo goes in */
.gs-principal > .gs-principal__logo { flex: 0 1 380px; margin: 0; }
.gs-principal__logo img { display: block; width: 100%; height: 200px; box-sizing: border-box; padding: 40px 48px; object-fit: contain; background: var(--wp--preset--color--bg); }

/* People */
.gs-person__photo { margin: 0 0 10px; align-self: stretch; }
.gs-person > .gs-person__photo { margin-bottom: 10px; }
.gs-person__photo img { width: 100%; background: var(--wp--preset--color--bg-alt); }
.gs-person__name { font-size: 19px; }

/* FAQ (core Details) */
.gs-faq { border-top: 1px solid var(--wp--preset--color--border); }
.gs-faq > * { margin-block-start: 0; }
.gs-faq .wp-block-details { margin: 0; padding: 0; border-bottom: 1px solid var(--wp--preset--color--border); }
.gs-faq summary {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding: 20px 0; cursor: pointer; list-style: none;
	font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 19px; line-height: 1.35;
}
.gs-faq summary::-webkit-details-marker { display: none; }
.gs-faq summary::after { content: "+"; flex: none; font-size: 26px; font-weight: 400; line-height: 1; color: var(--wp--preset--color--muted); }
.gs-faq details[open] > summary::after { content: "\2212"; }
.gs-faq summary:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 2px; }
.gs-faq .wp-block-details > :not(summary) { margin: 0 0 22px; max-width: 640px; }

/* Timeline (History) */
.gs-timeline { border-left: 2px solid var(--wp--preset--color--border); padding-left: 28px; }
.gs-timeline > * { margin-block-start: 0; }
.gs-tl-row { position: relative; padding-bottom: 32px; }
.gs-tl-row::before { content: ""; position: absolute; left: -36px; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: var(--wp--preset--color--accent); box-shadow: 0 0 0 4px var(--wp--preset--color--bg); }
.gs-tl-row > * { margin: 0; }
.gs-tl-year { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; color: var(--wp--preset--color--accent); }
.gs-tl-row h3 { margin-block-start: 4px; font-size: 21px; }
.gs-tl-row p:last-child { margin-block-start: 6px; color: var(--wp--preset--color--muted); }

/* Tables (honours, prices) */
.gs-table { margin: 0; }
.gs-table table { border-collapse: collapse; width: 100%; font-size: 16px; }
.gs-table th, .gs-table td { padding: 12px 14px 12px 0; border: 0; border-bottom: 1px solid var(--wp--preset--color--border); text-align: left; vertical-align: top; }
.gs-table thead th { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--muted); border-bottom: 2px solid var(--wp--preset--color--ink); }

/* Price cards (Tickets) */
.gs-price { font-family: var(--wp--preset--font-family--heading); font-weight: var(--wp--custom--gs--heading--weight); font-size: 44px; line-height: 1; letter-spacing: -0.03em; }
.gs-step__num { font-family: var(--wp--preset--font-family--heading); font-weight: var(--wp--custom--gs--heading--weight); font-size: 40px; line-height: 1; color: var(--wp--preset--color--muted); }

@media (max-width: 781px) {
	.gs-logo img { height: 80px; padding: 18px; }
	.gs-principal > .gs-principal__logo { flex-basis: 100%; }
	.gs-principal__logo img { height: 150px; padding: 32px; }
	.gs-timeline { padding-left: 22px; }
	.gs-tl-row::before { left: -30px; }
}

/* Media + text stacked on phones: core keeps 8% side padding, so the text sat indented and touched the image */
@media (max-width: 600px) {
	.gs-media.is-stacked-on-mobile > .wp-block-media-text__content { padding: 24px 0 0; }
}

/* ---------- hook slot (editor only: the front end prints just the hook output) ---------- */
.gs-hook-slot-editor {
	padding: 5px 12px;
	background: #fff6d6;
	border: 1px dashed #b08600;
	font: 600 12px/1.4 ui-monospace, "SFMono-Regular", Menlo, monospace;
	color: #6b4e00;
}

/* ---------- phones + small tablets ---------- */
@media (max-width: 781px) {
	.gs-lead { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-bottom: 32px; }
	.gs-sectionhead { margin-block: 36px 18px; }
	.gs-grid { row-gap: 32px; }
	.gs-standfirst { font-size: 18px; }
	.gs-featured { margin-block-start: 28px; }
	.gs-content { margin-block-start: 32px; font-size: 17px; }
	.gs-content h2 { font-size: 25px; }
	.gs-content .wp-block-quote p { font-size: 23px; }
	.gs-postnav { grid-template-columns: minmax(0, 1fr); }
	.gs-postnav .post-navigation-link-next { grid-column: auto; text-align: left; }
	.gs-authorbox { padding: 20px; }
	.gs-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.gs-footer--four .gs-footer__cols,
	.gs-footer--three .gs-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 44px 32px; gap: 32px 24px; }
	.gs-footer--inline .gs-footer__cols { grid-template-columns: minmax(0, 1fr); }
	.gs-brand { grid-column: 1 / -1; }
	.gs-footer__bar { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- own-site readiness (boards 2026-11-15): sidebar templates, Read next, Scroll to Top ----------
   At the end of the file, as the boards were rendered: these beat the phone rules above. */

/* With-sidebar templates: main column + the sidebar part (core columns).
   The column is `var(--gs-side-w, 320px)` wide; the Layout card sets the variable on :root.
   Under 1024px the sidebar goes under the content (core stacks only under 782px, which left
   tablets a ~400px text column); "On phones: Hidden" (body class gs-side-phone-hidden) drops it
   under 782px. !important: core's columns rules and the column's inline flex-basis use it / win. */
@media (max-width: 1023px) {
	.wp-block-columns.gs-withside { flex-wrap: wrap !important; }
	.wp-block-columns.gs-withside > .wp-block-column { flex-basis: 100% !important; flex-grow: 1; }
}

@media (max-width: 781px) {
	.gs-side-phone-hidden .gs-withside > .gs-withside__side { display: none; }
}

.gs-withside--single .gs-featured { margin-block-start: 32px; }
.gs-withside--single .gs-content,
.gs-withside--page .gs-content { margin-block-start: 40px; }
.gs-withside--page .gs-pagehead { margin: 0; }
.gs-withside--single .gs-entry-head .wp-block-post-title { font-size: clamp(34px, 3.6vw, 46px); }
.gs-withside--entity { gap: var(--gs-side-gap, 40px); }

/* Sticky sidebar (`gs-side--sticky`, Kadence "sticky last widget"): the column, the part and the
   aside stretch to the row's height so the last block has room to follow the reader. The offset
   reads the g-blocks sticky header height when g-blocks sets one (0 until then). Wide screens only.
   Layout card "Keep the last block in view" off = body class gs-side-static. */
@media (min-width: 1024px) {
	.gs-withside__side { display: flex; flex-direction: column; }
	.gs-side-part { display: flex; flex-direction: column; flex-grow: 1; }
	.gs-side--sticky { flex-grow: 1; }
	body:not(.gs-side-static) .gs-side--sticky > :last-child { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--anwp-g-header-sticky-h, 0px) + 24px); }
}

/* Page, no title: the content starts right under the header. */
.gs-content.gs-content--notitle { margin-block-start: 0; }

/* ---------- page settings panel (Phase D3, boards 2026-11-15) ---------- */

/* Featured image on pages (opt-in, "Shown"): first under the header in the no-title templates,
   edge to edge in Full width. */
.gs-featured.gs-featured--top,
.gs-featured.gs-featured--full { margin-block-start: 0; }
.gs-featured--top + .gs-content.gs-content--notitle { margin-block-start: 40px; }
.gs-main-full .gs-featured--full img { border-radius: 0; }
.gs-main-full > .gs-featured--full + .gs-full-content { margin-block-start: 48px; }

@media (max-width: 781px) {
	.gs-featured--top + .gs-content.gs-content--notitle { margin-block-start: 32px; }
	.gs-main-full > .gs-featured--full + .gs-full-content { margin-block-start: 32px; }
}

/* Single, wide: the single article at the wide size (one variable, the template is shared). */
.gs-main--wide-single { --wp--style--global--content-size: var(--wp--style--global--wide-size); }

/* Spacing: the page drops the main area's top / bottom space (body class from the panel). */
:is(.gs-space-notop, .gs-space-none) .gs-main { padding-block-start: 0; }
:is(.gs-space-nobottom, .gs-space-none) .gs-main { padding-block-end: 0; }
:is(.gs-space-nobottom, .gs-space-none) .gs-main .gs-content > .alignfull.gs-section:last-child { margin-block-end: 0; }

/* Header "Transparent" (E13): the g-blocks header lies over the first block (body class from g-blocks).
   No trail, the page title kept for screen readers only, no top space above the first block. */
body.anwp-g-header-overlay .gs-crumbs { display: none; }
body.anwp-g-header-overlay .gs-pagehead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body.anwp-g-header-overlay .gs-main { padding-block-start: 0; }
body.anwp-g-header-overlay :is(.gs-main, .gs-withside__main) > :is(.gs-pagehead, .gs-title-hidden) + * { margin-block-start: 0; }

/* Read next (pattern read-next) */
.gs-related { padding-top: 32px; border-top: 1px solid var(--wp--preset--color--border); }
.gs-related__title {
	margin: 0 0 24px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}
.gs-related .gs-grid { row-gap: 28px; }
.gs-related__t { font-size: 18px; line-height: 1.3; }
.gs-related .wp-block-post-date { font-size: 14px; color: var(--wp--preset--color--muted); }

/* Core's grid Query Loop (minimumColumnWidth) sets container-type: inline-size. Inside core/columns on a
   phone, Chrome then sizes the column with a stale height and the sidebar below overlaps the last card. */
.gs-related .wp-block-post-template { container-type: normal; }

/* Scroll to Top (AnWP_Grandstand_Scroll_Top): hidden until the script marks it visible.
   The base rule = the default button (bottom right, round, filled, 48px, 24px in); the settings
   page adds gs-totop--{left|rounded|square|outline|ink|desktop} and --gs-totop-size / -offset. */
.gs-totop {
	--gs-totop-in: var(--gs-totop-offset, 24px);
	position: fixed;
	right: var(--gs-totop-in);
	bottom: var(--gs-totop-in);
	z-index: 40;
	display: grid;
	place-items: center;
	width: var(--gs-totop-size, 48px);
	height: var(--gs-totop-size, 48px);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.gs-totop svg { width: calc(var(--gs-totop-size, 48px) * 0.46); height: calc(var(--gs-totop-size, 48px) * 0.46); }
.gs-totop.is-visible { opacity: 1; visibility: visible; transform: none; }
.gs-totop:hover { filter: brightness(1.1); }
.gs-totop:focus-visible { outline: 2px solid var(--wp--preset--color--ink); outline-offset: 3px; }
.gs-totop--left { right: auto; left: var(--gs-totop-in); }
.gs-totop--rounded { border-radius: var(--wp--custom--gs--radius); }
.gs-totop--square { border-radius: 0; }
/* Outline: accent ring and icon on the page colour; Dark (ink): the text colour, so light in dark mode. */
.gs-totop--outline { background: var(--wp--preset--color--bg); color: var(--wp--preset--color--accent); box-shadow: inset 0 0 0 2px var(--wp--preset--color--accent), 0 6px 18px rgb(0 0 0 / 0.12); }
.gs-totop--outline:hover { filter: none; background: var(--wp--preset--color--bg-alt); }
.gs-totop--ink { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--bg); }
.gs-totop--ink:hover { filter: none; opacity: 0.88; }
.gs-totop--ink:focus-visible { outline-color: var(--wp--preset--color--accent); }
/* Phones: at most 16px from the edges, 4px smaller (44px by default). */
@media (max-width: 781px) {
	.gs-totop { --gs-totop-in: min(var(--gs-totop-offset, 24px), 16px); width: calc(var(--gs-totop-size, 48px) - 4px); height: calc(var(--gs-totop-size, 48px) - 4px); }
	.gs-totop--desktop { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.gs-totop { transition: none; }
}
@media print {
	.gs-totop { display: none; }
}

/* ---------- boxed content style (E32, nba-stats prototype approved 2026-11-15) ----------
   Layout card "Content style" or the editor Layout panel's "Content" row = body class gs-boxed
   (AnWP_Grandstand_Page_Settings: pages and posts whose template has the gs-main area, so never
   Full width). The page takes bg-alt and the content a bg box; dark mode swaps the two.
   Without a sidebar <main> is the box (content width + padding; the Wide templates get a wide
   box). With one (gs-boxed--side) only the content column is the box and the sidebar stays on
   the page colour. The editor adds the same body classes to its canvas (assets/js/editor-boxed.js).
   The widths resolve on :root, because the box redefines the wide size for its own content. */
:root {
	--gs-box-page: var(--wp--preset--color--bg-alt);
	--gs-box-bg: var(--wp--preset--color--bg);
	/* What bg-alt becomes inside the box (light: unchanged). */
	--gs-box-alt: var(--wp--preset--color--bg-alt);
	--gs-box-pad: var(--wp--preset--spacing--60);
	--gs-box-gutter: var(--wp--preset--spacing--50);
	--gs-box-content: var(--wp--style--global--content-size);
	--gs-box-wide: var(--wp--style--global--wide-size);
	/* Layout card "Box corners" sets it on :root (AnWP_Grandstand_Layout); images and buttons keep the token. */
	--gs-box-radius: var(--wp--custom--gs--radius);
}
/* Dark: page bg, box bg-alt. Panels inside the box that sit on bg-alt (author box, tags, plugin
   panels: FL --fl-bg-*, Sports API Hub --ahub-bg-alt, Kadence palette8) take one step lighter,
   or they would melt into the box. 5% keeps the accent at 4.68:1 (7% fell to 4.38). */
:root[data-anwp-color-mode="dark"] {
	--gs-box-page: var(--wp--preset--color--bg);
	--gs-box-bg: var(--wp--preset--color--bg-alt);
	--gs-box-alt: color-mix(in srgb, var(--wp--custom--gs--dark--bg-alt), var(--wp--custom--gs--dark--ink) 5%);
}
@media (prefers-color-scheme: dark) {
	:root[data-anwp-color-mode="system"] {
		--gs-box-page: var(--wp--preset--color--bg);
		--gs-box-bg: var(--wp--preset--color--bg-alt);
		--gs-box-alt: color-mix(in srgb, var(--wp--custom--gs--dark--bg-alt), var(--wp--custom--gs--dark--ink) 5%);
	}
}

body.gs-boxed { background-color: var(--gs-box-page); }

.gs-boxed:not(.gs-boxed--side) .gs-main,
.gs-boxed--side .gs-withside__main {
	box-sizing: border-box;
	padding: var(--gs-box-pad);
	background: var(--gs-box-bg);
	border-radius: var(--gs-box-radius);
	/* Inside the box the content fills its inner width: no root padding, wide = 100%. */
	--wp--style--root--padding-left: 0px;
	--wp--style--root--padding-right: 0px;
	--wp--style--global--wide-size: 100%;
	--wp--preset--color--bg-alt: var(--gs-box-alt);
	--global-palette8: var(--gs-box-alt);
	--ahub-bg-alt: var(--gs-box-alt);
	--fl-bg-secondary: var(--gs-box-alt);
	--fl-bg-light: var(--gs-box-alt);
}

/* The box edge already separates the content from the sidebar: a smaller gap than plain's 56px. */
.gs-boxed--side .gs-withside { gap: var(--gs-side-gap, 32px); }

.gs-boxed:not(.gs-boxed--side) .gs-main {
	width: min(calc(var(--gs-box-content) + 2 * var(--gs-box-pad)), calc(100% - 2 * var(--gs-box-gutter)));
	margin-inline: auto;
	margin-block: var(--wp--preset--spacing--60);
}
.gs-boxed:not(.gs-boxed--side) :is(.gs-main-wide, .gs-main--wide-single) {
	width: min(calc(var(--gs-box-wide) + 2 * var(--gs-box-pad)), calc(100% - 2 * var(--gs-box-gutter)));
}
/* The Wide templates set their 1200px content size on the group itself: fill the box instead. */
.gs-boxed:not(.gs-boxed--side) .gs-main-wide > * { max-width: none; }

/* Full-width blocks reach the box edges; a last full-width section meets the box bottom. */
.gs-boxed :is(.gs-main, .gs-withside__main) .gs-content > .alignfull { margin-inline: calc(-1 * var(--gs-box-pad)); }
.gs-boxed .gs-main .gs-content > .alignfull.gs-section:last-child { margin-block-end: calc(-1 * var(--gs-box-pad)); }

/* Page settings "Spacing": the box keeps its own padding, the space around it goes. */
:is(.gs-space-notop, .gs-space-none).gs-boxed:not(.gs-boxed--side) .gs-main { margin-block-start: 0; padding-block-start: var(--gs-box-pad); }
:is(.gs-space-nobottom, .gs-space-none).gs-boxed:not(.gs-boxed--side) .gs-main { margin-block-end: 0; padding-block-end: var(--gs-box-pad); }

@media (max-width: 781px) {
	.gs-boxed { --gs-box-pad: 20px; --gs-box-gutter: 12px; }
	.gs-boxed:not(.gs-boxed--side) .gs-main { margin-block: 12px; }
	/* With a sidebar the row keeps the root padding: let the box use half of it. */
	.gs-boxed--side .gs-withside__main { margin-inline: -6px; }
}
/* Small phones: a 16px padding keeps ~334px of text at 390px (20px left ~326px). */
@media (max-width: 479px) {
	.gs-boxed { --gs-box-pad: 16px; }
}

/* ---------- Archives card (D51, boards 01-04, 2026-11-16): title band + Grid / Lead + grid ----------
   AnWP_Grandstand_Archives builds the markup at render. At the end of the file: these beat the archive + phone rules above. */
/* Title band: the head on a full-width section-style ground right under the header. */
.gs-archive-band .gs-main { padding-block-start: 0; }
.gs-archivehead--band { padding-block: 56px 48px; margin-block: 0 48px; border-bottom: 0; }
/* No description under the title: a tighter band. */
.gs-archivehead--short { padding-block: 40px 36px; }
.gs-archivehead__in { gap: 10px; }
.gs-archivehead__in > * { margin: 0; }
.gs-archivehead--band .wp-block-query-title { font-size: clamp(34px, 4vw, 52px); }
.gs-archivehead--band .wp-block-term-description { color: var(--wp--preset--color--muted); max-width: 680px; font-size: 18px; }
.gs-archivehead--band .wp-block-term-description p { margin: 0; }
.gs-archivehead--band .gs-crumbs + * { margin-block-start: 12px; }

/* Grid cards. */
.gs-agrid { row-gap: 40px; }
.gs-agrid .gs-card { gap: 16px; }
.gs-agrid .gs-card__body { gap: 10px; }
.gs-agrid .gs-card__body > * { margin: 0; }
.gs-agrid .gs-card__title { font-size: 22px; line-height: 1.25; }
.gs-agrid .gs-card__ex { font-size: 15px; color: var(--wp--preset--color--muted); }
/* No sidebar: a card grid takes the wide width (the list keeps its 920px reading width). */
.gs-withside > .gs-withside__main:only-child:has(.gs-agrid) { max-width: none; }

/* Lead + grid: the newest post spans the row beside its image, on page 1 only.
   Its image is 3/5 of the card, so the card-wide intrinsic size (AGS-BUG-007) would cover the text. */
body:not(.paged) .gs-agrid--lead > .wp-block-post:first-child { grid-column: 1 / -1; }
body:not(.paged) .gs-agrid--lead > .wp-block-post:first-child > .gs-card { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; align-items: center; padding-bottom: 40px; border-bottom: 1px solid var(--wp--preset--color--border); }
body:not(.paged) .gs-agrid--lead > .wp-block-post:first-child > .gs-card > .gs-card__media img[sizes] { contain-intrinsic-size: auto 60cqw auto 37.5cqw; }
body:not(.paged) .gs-agrid--lead > .wp-block-post:first-child .gs-card__body { gap: 14px; }
body:not(.paged) .gs-agrid--lead > .wp-block-post:first-child .gs-card__title { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; }
body:not(.paged) .gs-agrid--lead > .wp-block-post:first-child .gs-card__ex { font-size: 17px; }

@media (max-width: 781px) {
	.gs-archivehead--band { padding-block: 32px 28px; margin-block-end: 32px; }
	.gs-archivehead--short { padding-block: 28px 24px; }
	.gs-agrid { row-gap: 32px; }
	body:not(.paged) .gs-agrid--lead > .wp-block-post:first-child > .gs-card { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-bottom: 32px; }
	body:not(.paged) .gs-agrid--lead > .wp-block-post:first-child > .gs-card > .gs-card__media img[sizes] { contain-intrinsic-size: auto 100cqw auto 62.5cqw; }
}

/* ---------- Privacy card (D50, boards 05-06, 2026-11-16): YouTube "Click to load" ----------
   AnWP_Grandstand_Privacy prints the still + Play button; assets/js/youtube.js swaps in the no-cookie player. */
.gs-yt__box { position: relative; aspect-ratio: 16 / 9; border-radius: var(--wp--custom--gs--radius); overflow: hidden; background: #16181d; }
.gs-yt__box > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gs-yt__btn { all: unset; position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.gs-yt__btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; }
.gs-yt__btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 12, 16, .78), rgba(10, 12, 16, 0) 45%); }
.gs-yt__play { position: relative; z-index: 1; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--wp--preset--color--bg); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); transition: transform .15s; }
.gs-yt__play::after { content: ""; margin-left: 5px; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent var(--wp--preset--color--ink); }
.gs-yt__btn:hover .gs-yt__play { transform: scale(1.06); }
.gs-yt__btn:focus-visible .gs-yt__play { outline: 3px solid var(--wp--preset--color--bg); outline-offset: 4px; }
.gs-yt__note { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 16px; margin: 0; font-size: 14px; line-height: 1.4; color: #ffffff; pointer-events: none; }
.gs-yt__note a { color: #ffffff; text-decoration: underline; pointer-events: auto; }
@media (max-width: 781px) {
	.gs-yt__play { width: 60px; height: 60px; }
	.gs-yt__note { left: 14px; right: 14px; bottom: 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
	.gs-yt__play { transition: none; }
}
