/*
 * UNBC Intramurals design system layer (theme 1.0.2).
 *
 * Loaded after assets/css/theme.css. It does not introduce a new look: it
 * normalises the existing green/gold/cream identity into shared tokens and
 * applies them consistently to every page template, saved block pattern and
 * LeagueFlow surface. Selectors only target classes that already exist in
 * saved content, so no page content has to change. See docs/DESIGN-SYSTEM.md.
 */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
	--unbc-gold-ink: #7d5f17; /* Gold text on light surfaces (>= 4.5:1 on cream/paper). */
	--unbc-line: rgba(15, 58, 45, 0.16);
	--unbc-line-strong: rgba(15, 58, 45, 0.32);
	--unbc-muted: rgba(20, 36, 28, 0.74);
	--unbc-shadow: 0 12px 28px rgba(15, 58, 45, 0.1);

	--unbc-wide: 1200px;
	--unbc-gutter: clamp(20px, 4.4vw, 48px);
	--unbc-section-space: clamp(56px, 7vw, 88px);
	--unbc-card-pad: clamp(20px, 2.4vw, 32px);
	--unbc-radius: 2px;

	--unbc-h1: clamp(40px, 7.2vw, 104px);
	--unbc-h2: clamp(38px, 5.4vw, 64px);
	--unbc-h3: clamp(24px, 2.6vw, 32px);
	--unbc-h4: clamp(16px, 1.4vw, 18px);
	--unbc-script-scale: 0.66em;

	/* Surface context tokens. Every surface sets the full set so text, outline
	 * buttons and their hover states always pair a fill with a contrasting ink.
	 * Default: light surfaces (cream, cream-soft, paper and the plain page). */
	--unbc-accent-text: var(--unbc-gold-ink);
	--unbc-heading: var(--unbc-green-deep);
	--unbc-focus-ring: var(--unbc-green-deep);
	--unbc-button-fill: var(--unbc-gold);
	--unbc-button-ink: var(--unbc-green-deep);
	--unbc-button-hover-fill: var(--unbc-gold-bright);
	--unbc-button-hover-ink: var(--unbc-green-deep);
	--unbc-outline-ink: var(--unbc-green-deep);
	--unbc-outline-hover-fill: var(--unbc-green-deep);
	--unbc-outline-hover-ink: var(--unbc-cream);
}

/* Dark surfaces: green sections, heroes, the register band, champions, footer
 * and editor-made groups with a green background. */
.unbc-section.green,
.unbc-hero,
.unbc-page-hero,
.unbc-inner-hero,
.unbc-sport-hero,
.unbc-register,
.unbc-champions,
.unbc-site-header,
.unbc-footer,
.unbc-sports-panel:not(.gold):not(.cream),
:is(.wp-block-group, .wp-block-column, .wp-block-cover).has-green-deep-background-color,
:is(.wp-block-group, .wp-block-column, .wp-block-cover).has-green-background-color {
	--unbc-accent-text: var(--unbc-gold-bright);
	--unbc-heading: var(--unbc-cream);
	--unbc-focus-ring: var(--unbc-gold-bright);
	--unbc-button-fill: var(--unbc-gold);
	--unbc-button-ink: var(--unbc-green-deep);
	--unbc-button-hover-fill: var(--unbc-gold-bright);
	--unbc-button-hover-ink: var(--unbc-green-deep);
	--unbc-outline-ink: var(--unbc-cream);
	--unbc-outline-hover-fill: var(--unbc-cream);
	--unbc-outline-hover-ink: var(--unbc-green-deep);
}

/* Gold surfaces (gold sections, per-sport gold panels, the sport hero card and
 * editor-made gold groups): green accents and green buttons, never gold text or
 * gold buttons on gold. */
.unbc-section.gold,
.unbc-sports-panel.gold,
.unbc-sport-hero-card,
:is(.wp-block-group, .wp-block-column, .wp-block-cover).has-gold-background-color,
:is(.wp-block-group, .wp-block-column, .wp-block-cover).has-gold-bright-background-color {
	--unbc-accent-text: var(--unbc-green-deep);
	--unbc-heading: var(--unbc-green-deep);
	--unbc-focus-ring: var(--unbc-green-deep);
	--unbc-button-fill: var(--unbc-green-deep);
	--unbc-button-ink: var(--unbc-cream);
	--unbc-button-hover-fill: var(--unbc-green);
	--unbc-button-hover-ink: var(--unbc-cream);
	--unbc-outline-ink: var(--unbc-green-deep);
	--unbc-outline-hover-fill: var(--unbc-green-deep);
	--unbc-outline-hover-ink: var(--unbc-cream);
}

/* Light cards and light sections placed on dark surfaces switch back to the
 * light-surface set. */
.unbc-section.cream,
.unbc-section.paper,
.unbc-section.green .unbc-referee-card,
.unbc-section.green .unbc-sport-notice,
.unbc-register .has-cream-background-color,
.unbc-sports-panel .unbc-sport-panel,
.unbc-sports-panel .unbc-sport-notice,
.unbc-hero-feature-card,
:is(.wp-block-group, .wp-block-column, .wp-block-cover):is(.has-cream-background-color, .has-cream-soft-background-color, .has-paper-background-color) {
	--unbc-accent-text: var(--unbc-gold-ink);
	--unbc-heading: var(--unbc-green-deep);
	--unbc-focus-ring: var(--unbc-green-deep);
	--unbc-button-fill: var(--unbc-gold);
	--unbc-button-ink: var(--unbc-green-deep);
	--unbc-button-hover-fill: var(--unbc-gold-bright);
	--unbc-button-hover-ink: var(--unbc-green-deep);
	--unbc-outline-ink: var(--unbc-green-deep);
	--unbc-outline-hover-fill: var(--unbc-green-deep);
	--unbc-outline-hover-ink: var(--unbc-cream);
}

/* 2. Page frame -------------------------------------------------------------- */
/* Twenty Twenty-Five adds a root block gap between header, main and footer, which
 * showed as a 19px cream strip above green heroes and below the portal band. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}
body.home .wp-site-blocks > .wp-block-post-content {
	padding-block: clamp(12px, 1.6vw, 20px);
}

/* One content grid: every section aligns its content to the 1200px footer grid. */
body:not(.home) .unbc-page-body .unbc-section,
.unbc-sport-page .unbc-section {
	padding-left: var(--unbc-gutter) !important;
	padding-right: var(--unbc-gutter) !important;
}
.unbc-sport-page .unbc-container,
body:not(.home) .unbc-page-body .unbc-section > .unbc-container:has(> .unbc-sports-tabs) {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--unbc-wide) + 2 * var(--unbc-gutter));
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--unbc-gutter) !important;
	padding-right: var(--unbc-gutter) !important;
}
.unbc-sport-page .unbc-section > .unbc-container,
body:not(.home) .unbc-page-body .unbc-section > .unbc-container:has(> .unbc-sports-tabs) {
	padding-left: 0 !important;
	padding-right: 0 !important;
	max-width: var(--unbc-wide);
}
/* Sports index (and any inner page reusing the sports tabs component): the
 * section uses the shared section rhythm. Keyed to the component, not a post ID. */
body:not(.home) .unbc-page-body .unbc-section:has(> .unbc-container > .unbc-sports-tabs) {
	padding-top: var(--unbc-section-space) !important;
	padding-bottom: var(--unbc-section-space) !important;
}
.unbc-footer {
	padding-left: var(--unbc-gutter);
	padding-right: var(--unbc-gutter);
}
/* Short pages: theme.css keeps the footer at the bottom of the window by letting
 * <main> grow (.wp-site-blocks is a 100vh flex column). The grown part of <main>
 * showed the cream body colour as a strip under a paper or green last section
 * (37px on an empty Newsroom at 1440x900). The footer now takes up that slack
 * instead, so the last section always meets the footer directly. */
.wp-site-blocks > main {
	flex-grow: 0;
}
.wp-site-blocks > footer.wp-block-template-part:last-child {
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
}
.wp-site-blocks > footer.wp-block-template-part:last-child > .unbc-footer {
	flex: 1 0 auto;
}

/* The registration band is a full content-width component on every page, not
 * just the homepage (inner pages squeezed it into the 780px prose column).
 * The :not() chain repeats the legacy theme.css prose rule so this selector
 * outranks it (0,7,1 vs 0,6,1); both use !important. */
body:not(.home) .unbc-page-body > .wp-block-post-content > .unbc-register:not(.unbc-section):not(.unbc-sport-page):not(.alignfull) {
	width: min(var(--unbc-wide), calc(100% - 2 * var(--unbc-gutter))) !important;
	max-width: var(--unbc-wide) !important;
	margin-top: 0 !important;
	margin-bottom: var(--unbc-section-space) !important;
}

/* Homepage cards keep their boxed look with equal gutters on both sides. */
.home .wp-block-post-content > .unbc-hero,
.home .wp-block-post-content > .unbc-section,
.home .wp-block-post-content > .unbc-stats-pair,
.home .wp-block-post-content > .unbc-stats,
.home .wp-block-post-content > .unbc-register {
	width: min(var(--unbc-wide), calc(100% - 2 * var(--unbc-gutter))) !important;
	box-sizing: border-box;
}
@media (max-width: 600px) {
	/* On phones the boxed cards go edge to edge instead of leaving 8px slivers. */
	.home .wp-block-post-content > .unbc-hero,
	.home .wp-block-post-content > .unbc-section,
	.home .wp-block-post-content > .unbc-stats-pair,
	.home .wp-block-post-content > .unbc-stats,
	.home .wp-block-post-content > .unbc-register {
		width: 100% !important;
		padding-left: var(--unbc-gutter) !important;
		padding-right: var(--unbc-gutter) !important;
	}
}

/* Direct paragraph children of constrained sections (e.g. the match centre
 * eyebrow) must take part in the constrained width instead of hugging the edge. */
.unbc-section > .u-eyebrow {
	display: flex;
}

/* 3. Typography -------------------------------------------------------------- */
.u-eyebrow {
	color: var(--unbc-accent-text);
	flex-wrap: wrap;
	white-space: normal;
	line-height: 1.35;
	row-gap: 4px;
}
.u-eyebrow::before {
	flex: 0 0 32px;
	background: currentColor;
}
.unbc-section-head h2 .script,
.unbc-sport-panel__head h2 .script,
.unbc-sport-panel__head h4 .script,
.unbc-sport-tab-page .unbc-sport-panel__head h4 .script,
.unbc-sport-hero h1 .script,
.unbc-register h2 .script,
.unbc-hero h1 .script,
h1 .script,
h2 .script {
	color: var(--unbc-accent-text);
}
.unbc-section-head h2,
.unbc-sport-panel__head h2,
.unbc-sport-panel__head h4,
.unbc-sport-notice h2 {
	font-size: var(--unbc-h2);
	line-height: 0.95;
	overflow-wrap: break-word;
}
.unbc-section-head h2 .script,
.unbc-sport-panel__head .script {
	font-size: var(--unbc-script-scale);
	margin-right: 0.18em;
}
.unbc-section-head {
	gap: 12px 24px;
	margin-bottom: clamp(24px, 3vw, 36px);
}
.unbc-section-head > .wp-block-group > p:not(.u-eyebrow) {
	max-width: 62ch;
	margin-top: 14px;
	font-size: clamp(16px, 1.3vw, 18px);
	line-height: 1.55;
}
.unbc-section-head .u-condensed a {
	color: inherit;
	text-underline-offset: 4px;
}

/* Sport hero titles scale with the viewport so long sport names never break mid-word. */
.unbc-sport-hero h1,
.unbc-page-hero h1,
.unbc-inner-hero h1 {
	font-size: var(--unbc-h1);
	overflow-wrap: break-word;
	word-break: normal;
	hyphens: manual;
}
.unbc-sport-hero h1 .script {
	display: block;
	margin-bottom: 0.12em;
	font-size: clamp(30px, 0.42em, 64px);
	line-height: 1;
}

/* Homepage hero: below 900px the script line overlapped the INTRA/MURALS title. */
@media (max-width: 900px) {
	.unbc-hero h1 .script {
		margin-bottom: 0.14em !important;
		line-height: 1 !important;
	}
}

/* 4. Buttons and links ------------------------------------------------------- */
/* Brand defaults for content buttons, scoped to page content so the header CTA
 * and mobile menu keep their verified 1.0.1 styling. No !important: WordPress
 * preset classes (has-*-color, has-*-font-size, has-*-font-family, ...) and the
 * inline styles saved by the Button block's colour, typography, spacing, border
 * and shadow controls take precedence, so an edited button keeps its settings. */
:is(main, .wp-block-post-content) :is(.wp-block-button__link, .wp-element-button) {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 24px;
	border: 2px solid transparent;
	border-radius: var(--unbc-radius);
	box-shadow: none;
	font-family: var(--font-condensed);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
/* Fill and outline styles repeat the spacing at block-style specificity so core's
 * is-style-outline padding does not reintroduce a second button size. */
:is(main, .wp-block-post-content) .wp-block-button:not(.is-style-outline) > .wp-block-button__link {
	padding: 12px 24px;
	border-width: 2px;
	background: var(--unbc-button-fill);
	color: var(--unbc-button-ink);
}
:is(main, .wp-block-post-content) .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
	background: var(--unbc-button-hover-fill);
	color: var(--unbc-button-hover-ink);
}
/* Theme-rendered notice links (not editable Button blocks). */
.unbc-sport-notice a.wp-element-button {
	background: var(--unbc-button-fill) !important;
	color: var(--unbc-button-ink) !important;
}
.unbc-sport-notice a.wp-element-button:hover {
	background: var(--unbc-button-hover-fill) !important;
	color: var(--unbc-button-hover-ink) !important;
}
/* Outline buttons take the ink of the surface they sit on and invert to that
 * surface's paired hover fill/ink (they were cream-on-cream on Tournaments). */
:is(main, .wp-block-post-content) .wp-block-button.is-style-outline > .wp-block-button__link {
	padding: 12px 24px;
	border-width: 2px;
	border-style: solid;
	border-color: var(--unbc-outline-ink);
	background: transparent;
	box-shadow: none;
	color: var(--unbc-outline-ink);
}
:is(main, .wp-block-post-content) .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--unbc-outline-hover-fill);
	background: var(--unbc-outline-hover-fill);
	color: var(--unbc-outline-hover-ink);
}
:is(main, .wp-block-post-content) .wp-block-buttons {
	gap: 12px;
	align-items: center;
}
:is(main, .wp-block-post-content) .wp-block-buttons > .wp-block-button {
	margin: 0;
}
/* Tablet hero: keep the two hero actions together instead of spreading them
 * across two growing columns. */
@media (min-width: 601px) and (max-width: 900px) {
	.unbc-hero-actions .cta {
		flex: 0 0 auto !important;
	}
}

.unbc-section.cream a:not(.wp-element-button):not(.wp-block-button__link),
.unbc-section.paper a:not(.wp-element-button):not(.wp-block-button__link) {
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* 5. Focus ------------------------------------------------------------------- */
:where(a, button, summary, input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible {
	outline: 3px solid var(--unbc-focus-ring);
	outline-offset: 3px;
}
:is(main, .wp-block-post-content) :is(.wp-block-button__link, .wp-element-button):focus-visible {
	outline: 3px solid var(--unbc-focus-ring) !important;
	outline-offset: 3px !important;
}

/* 6. Cards, notices and empty states ---------------------------------------- */
.unbc-referee-grid {
	gap: clamp(16px, 2vw, 24px) !important;
	margin-bottom: clamp(24px, 3vw, 36px);
}
.unbc-referee-card {
	box-sizing: border-box;
	padding: var(--unbc-card-pad) !important;
	background: var(--unbc-cream-soft) !important;
	border: 1px solid var(--unbc-line);
	border-top: 4px solid var(--unbc-gold) !important;
	border-radius: var(--unbc-radius) !important;
	color: var(--unbc-green-deep);
}
.unbc-section.green .unbc-referee-card {
	border-color: transparent;
	border-top-color: var(--unbc-gold) !important;
}
.unbc-referee-card .num {
	margin: 0;
	color: var(--unbc-gold-ink) !important;
	font-size: clamp(40px, 4.6vw, 56px) !important;
	line-height: 1;
	overflow-wrap: break-word;
}
.unbc-referee-card h4 {
	margin: 12px 0 8px !important;
	color: var(--unbc-green-deep);
	font-size: clamp(18px, 1.7vw, 22px) !important;
}
.unbc-referee-card p {
	margin: 0;
	color: var(--unbc-muted);
	line-height: 1.55;
}
.unbc-referee-card h4 + p,
.unbc-referee-card .num + p {
	margin-top: 10px;
}

/* One notice style for inactive sports, the referee application and the
 * register fallback: a calm cream card with the gold rule, not a sage block. */
.unbc-sport-notice,
.unbc-form-placeholder {
	box-sizing: border-box;
	padding: var(--unbc-card-pad) !important;
	background: var(--unbc-cream-soft) !important;
	border: 1px solid var(--unbc-line) !important;
	border-left: 6px solid var(--unbc-gold) !important;
	border-radius: var(--unbc-radius);
	box-shadow: none;
	color: var(--unbc-green-deep) !important;
}
.unbc-sport-notice h2,
.unbc-sport-notice h3,
.unbc-sport-notice h4,
.unbc-form-placeholder h3 {
	margin: 0 0 10px !important;
	color: var(--unbc-green-deep) !important;
	font-family: var(--font-display);
	font-size: var(--unbc-h3) !important;
	line-height: 1.05 !important;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}
.unbc-sport-notice p,
.unbc-form-placeholder p {
	max-width: 68ch;
	margin: 0 0 16px !important;
	color: var(--unbc-muted) !important;
	font-size: clamp(16px, 1.3vw, 17px) !important;
	line-height: 1.55;
}
.unbc-sport-notice p:last-child,
.unbc-form-placeholder p:last-child {
	margin-bottom: 0 !important;
}
.unbc-sport-notice a:not(.wp-element-button):not(.wp-block-button__link) {
	color: var(--unbc-green-deep);
}
.unbc-referee-application {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--unbc-line);
}
.unbc-referee-application h4 {
	margin: 0 0 8px !important;
	font-family: var(--font-condensed);
	font-size: 13px !important;
	letter-spacing: 0.16em;
}
/* The register page wraps the fallback notice in its own form card; flatten the
 * inner notice so the page shows one card rather than a card inside a card. */
.unbc-register-form .form-card > .unbc-form-placeholder,
.unbc-register-form .form-card > .unbc-sport-notice {
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
}
.unbc-register-form .form-card {
	padding: var(--unbc-card-pad) !important;
	border: 1px solid var(--unbc-line);
	border-top: 4px solid var(--unbc-gold);
	border-radius: var(--unbc-radius) !important;
	background: var(--unbc-cream-soft) !important;
	box-shadow: var(--unbc-shadow) !important;
}
.unbc-register-form aside h4,
.unbc-register-form .wp-block-column h4 {
	color: var(--unbc-green-deep);
}

/* LeagueFlow and query empty states share the notice tone. */
.unbc-empty-state,
.leagueflow-match-list > p:only-child,
.leagueflow-table-wrap > p:only-child,
.leagueflow-team-list > p:only-child,
.leagueflow-bracket-wrap > p:only-child,
.leagueflow-knockout > p:only-child {
	box-sizing: border-box;
	margin: 0;
	padding: 18px 20px;
	background: rgba(248, 243, 223, 0.7);
	border: 1px dashed var(--unbc-line-strong);
	border-radius: var(--unbc-radius);
	color: var(--unbc-muted);
	font-size: 16px;
	line-height: 1.5;
}
.unbc-section.green .unbc-empty-state,
.unbc-section.green .leagueflow-match-list > p:only-child {
	background: rgba(241, 233, 200, 0.08);
	border-color: rgba(241, 233, 200, 0.4);
	color: rgba(241, 233, 200, 0.86);
}

/* 7. Sport pages ------------------------------------------------------------- */
.unbc-sport-hero {
	padding: clamp(56px, 7vw, 88px) 0 clamp(52px, 6.5vw, 80px) !important;
	border-bottom: 0 !important;
}
.unbc-sport-hero__layout {
	grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
	gap: clamp(28px, 4vw, 48px);
}
.unbc-sport-back {
	display: flex !important;
	margin: 0 0 18px !important;
}
.unbc-sport-back a {
	margin: 0 !important;
	color: var(--unbc-gold-bright) !important;
	text-underline-offset: 4px;
}
.unbc-sport-hero .u-eyebrow {
	display: flex;
	margin: 0;
}
.unbc-sport-hero p:not(.u-eyebrow):not(.unbc-sport-back):not(.unbc-sport-meta-label) {
	max-width: 60ch;
	color: rgba(241, 233, 200, 0.88);
	font-size: clamp(16px, 1.5vw, 20px);
	line-height: 1.5;
}
/* Meta labels on the gold card used cream-on-gold (1.8:1). */
.unbc-sport-hero-card .unbc-sport-meta-label,
.unbc-sport-hero-card dt {
	color: var(--unbc-green-deep) !important;
	opacity: 0.82;
}
.unbc-sport-hero-card {
	transform: none;
}
@media (max-width: 900px) {
	.unbc-sport-hero__layout {
		grid-template-columns: minmax(0, 1fr);
	}
}

.unbc-sport-dashboard {
	gap: clamp(20px, 2.4vw, 28px) !important;
	align-items: start;
}
.unbc-sport-panel {
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
	margin: 0 !important;
	padding: var(--unbc-card-pad) !important;
	background: var(--unbc-cream-soft) !important;
	border: 1px solid var(--unbc-line) !important;
	border-top: 4px solid var(--unbc-gold) !important;
	border-radius: var(--unbc-radius);
	box-shadow: var(--unbc-shadow);
	color: var(--unbc-green-deep);
}
/* Panel headings: eyebrow on its own line, then the heading, then a rule. */
.unbc-sport-panel__head {
	display: block !important;
	margin-bottom: 20px !important;
	padding-bottom: 14px !important;
	border-bottom: 2px solid var(--unbc-green-deep) !important;
}
.unbc-sport-panel__head .u-eyebrow {
	margin: 0 0 6px !important;
}
.unbc-sport-panel__head h2,
.unbc-sport-panel__head h4 {
	margin: 0 !important;
	color: var(--unbc-green-deep);
	font-family: var(--font-display);
	font-size: clamp(28px, 3.6vw, 48px) !important;
	text-transform: uppercase;
	overflow-wrap: break-word;
}
.unbc-sport-panel__head .script {
	display: inline-block;
	transform: rotate(-3deg);
	font-family: var(--font-script);
	font-weight: 400;
	text-transform: none;
}
.unbc-sport-tab-level + .unbc-sport-tab-level {
	margin-top: 24px;
}
.unbc-sport-tab-level h5 {
	margin: 0 0 10px;
	color: var(--unbc-green-deep);
	font-family: var(--font-condensed);
	font-size: 14px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Sports index tabs keep their per-sport tones (green / gold / cream). */

/* 8. LeagueFlow surfaces ----------------------------------------------------- */
/* LeagueFlow 1.2 lays its views out from semantic --lf-* tokens (calendar,
 * standings, team cards, match rows; same card/pill layout as CampusManager).
 * The theme supplies only brand values here. The plugin declares its defaults
 * with zero specificity, so these win without !important or load-order tricks.
 * The legacy --leagueflow-* names stay for the portal and older plugin builds. */
.leagueflow {
	--lf-background: var(--unbc-paper);
	--lf-card: var(--unbc-paper);
	--lf-card-foreground: var(--unbc-green-deep);
	--lf-muted: var(--unbc-cream);
	--lf-muted-foreground: var(--unbc-muted);
	--lf-border: var(--unbc-line);
	--lf-border-strong: var(--unbc-line-strong);
	--lf-primary: var(--unbc-green-deep);
	--lf-primary-foreground: var(--unbc-cream);
	--lf-accent: var(--unbc-gold);
	--lf-accent-foreground: var(--unbc-green-deep);
	--lf-ring: var(--unbc-focus-ring);
	--lf-success: var(--unbc-green);
	--lf-success-foreground: var(--unbc-cream);
	--lf-radius: 4px;
	--lf-radius-sm: var(--unbc-radius);
	--lf-shadow-sm: 0 1px 2px rgba(15, 58, 45, 0.06);
	--lf-shadow: 2px 3px 5px rgba(15, 58, 45, 0.12);
	--lf-shadow-lg: 0 24px 60px rgba(15, 58, 45, 0.28);
	--lf-font-body: var(--font-sans);
	--lf-font-display: var(--font-display);
	--lf-font-label: var(--font-condensed);
	--lf-display-transform: uppercase;
	--lf-label-tracking: 0.1em;

	--leagueflow-border: var(--unbc-line);
	--leagueflow-surface: var(--unbc-cream-soft);
	--leagueflow-text: var(--unbc-ink);
	--leagueflow-muted: var(--unbc-muted);
	--leagueflow-accent: var(--unbc-green);
}

/* Match centre card: team names use the display face like every other team label. */
.leagueflow-match-card__team strong,
.leagueflow-match-card__team h2,
.leagueflow-match-card__team h3,
.unbc-lf-page .leagueflow-match-card__team-name {
	font-family: var(--font-display);
	letter-spacing: 0.01em;
}

/* Portal sign-in panel: same eyebrow, heading scale and primary button as the site. */
.leagueflow-portal--auth .leagueflow-portal__eyebrow {
	color: var(--unbc-gold-ink) !important;
}
.leagueflow-portal--auth .leagueflow-portal__panel h1 {
	color: var(--unbc-green-deep);
	font-family: var(--font-display);
	font-size: clamp(30px, 3.6vw, 44px) !important;
	line-height: 1;
	text-transform: uppercase;
}
.leagueflow-portal--auth .leagueflow-portal__button {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 28px !important;
	background: var(--unbc-gold) !important;
	border: 2px solid transparent !important;
	border-radius: var(--unbc-radius) !important;
	color: var(--unbc-green-deep) !important;
	font-family: var(--font-condensed) !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase;
}
.leagueflow-portal--auth .leagueflow-portal__button:hover {
	background: var(--unbc-gold-bright) !important;
	text-decoration: none;
}

/* 9. Shared photo grids ------------------------------------------------------ */
.unbc-champions-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	align-items: start !important;
}
.unbc-champion-card:nth-child(n) {
	margin-top: 0 !important;
	--champion-pad: 0;
}
.unbc-champion-card__media {
	aspect-ratio: 5 / 4;
	overflow: hidden;
	padding: 0 !important;
}
.unbc-champion-card__media img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	object-position: center 35%;
}
@media (max-width: 900px) {
	.unbc-champions-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}
@media (max-width: 520px) {
	.unbc-champions-grid {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

/* Staff cards: placeholder image sits on the same cream as the card body. */
.unbc-staff-card img,
.unbc-staff-card .wp-block-image {
	background: var(--unbc-cream);
}

/* Query loops (Newsroom) render cards in the palette. */
.wp-block-post-template .has-cream-background-color {
	border: 1px solid var(--unbc-line);
	border-top: 4px solid var(--unbc-gold);
	border-radius: var(--unbc-radius);
}
.wp-block-post-template .wp-block-post-title a {
	color: var(--unbc-green-deep);
	text-decoration: none;
}
.wp-block-post-template .wp-block-post-date {
	color: var(--unbc-gold-ink);
	font-family: var(--font-condensed);
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* 10. Footer ----------------------------------------------------------------- */
.unbc-footer a {
	font-size: 15px;
	padding: 6px 0;
}
.unbc-footer a:focus-visible {
	color: var(--unbc-gold-bright);
	outline-offset: 2px;
}
.unbc-footer .wp-block-navigation__container {
	gap: 4px !important;
}
.unbc-footer p {
	font-size: 15px;
	line-height: 1.6;
}
.unbc-footer-meta {
	opacity: 1;
	color: rgba(241, 233, 200, 0.72);
}

/* Tablet and phone footer. theme.css hid the Programs, Get Involved and Visit
 * columns at 900px and below, so pages such as Tournaments, Champions, Player of
 * the Week and Code of Conduct had no link on small screens. Every column now
 * stays visible: the brand column spans the row and the link columns form a grid
 * (three across on tablets, two on 390px phones, one on 320px phones). The
 * :first-child/:not() parts outrank the legacy hiding rules. */
@media (max-width: 900px) {
	.unbc-footer > .wp-block-columns:first-child {
		display: grid !important;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
		gap: 28px 24px;
	}
	.unbc-footer > .wp-block-columns:first-child > .wp-block-column {
		min-width: 0;
		margin: 0;
	}
	.unbc-footer > .wp-block-columns:first-child > .wp-block-column:first-child {
		grid-column: 1 / -1;
	}
	.unbc-footer > .wp-block-columns:first-child > .wp-block-column:not(:first-child) {
		display: block;
	}
	.unbc-footer > .wp-block-columns:first-child > .wp-block-column:not(:first-child) p {
		margin-top: 0 !important;
	}
	.unbc-footer h4 {
		margin-bottom: 8px;
	}
}

/* 11. Small screens ---------------------------------------------------------- */
@media (max-width: 600px) {
	.unbc-section-head {
		align-items: flex-start;
	}
	:is(main, .wp-block-post-content) .wp-block-buttons {
		width: 100%;
	}
	:is(main, .wp-block-post-content) .wp-block-buttons > .wp-block-button:not(.has-custom-width) {
		flex: 1 1 100%;
	}
	:is(main, .wp-block-post-content) .wp-block-buttons > .wp-block-button:not(.has-custom-width) > .wp-block-button__link {
		width: 100%;
	}
	.unbc-sport-notice a.wp-element-button,
	.unbc-form-placeholder a.wp-element-button {
		width: 100%;
	}
}

/* 12. Not-found page (templates/404.html) ----------------------------------- */
/* One generic page for every 404, including the intentional team-route 404, so
 * it never reveals whether a team or page exists. */
.unbc-not-found .unbc-section {
	padding-top: var(--unbc-section-space) !important;
	padding-bottom: var(--unbc-section-space) !important;
}
.unbc-not-found__title {
	margin: 12px 0 0;
	color: var(--unbc-heading);
	font-family: var(--font-display);
	font-size: var(--unbc-h1);
	line-height: 0.92;
	overflow-wrap: break-word;
	text-transform: uppercase;
}
.unbc-not-found__title .script {
	display: inline-block;
	margin-right: 0.18em;
	font-family: var(--font-script);
	font-size: var(--unbc-script-scale);
	font-weight: 400;
	text-transform: none;
	transform: rotate(-3deg);
}
.unbc-not-found__lead {
	max-width: 56ch;
	margin-top: 18px;
	font-size: clamp(16px, 1.4vw, 19px);
	line-height: 1.55;
}
.unbc-not-found .wp-block-buttons {
	margin-top: 28px;
}
