:root {
	--clg-color-primary: #005ea8;
	--clg-color-primary-dark: #143e66;
	--clg-color-secondary: #2e8540;
	--clg-color-accent: #2e8540;
	--clg-color-navy: #102f4f;
	--clg-color-ink: #1b1b1b;
	/* Design source uses #565c65 (6.74:1); nudged to clear WCAG AAA 7:1 on paper. */
	--clg-color-muted: #525860;
	--clg-color-paper: #ffffff;
	--clg-color-surface: #f7f9fb;
	--clg-color-border: #d8dee6;
	--clg-color-gold: #ffbe2e;
	--clg-focus-ring: 3px solid #face00;

	/* Footer bands, per crumina-civic-site.css .usa-footer. */
	--clg-color-footer: #0b253e;
	--clg-color-footer-deep: #071d31;
	--clg-color-footer-ink: #e8eef5;
	--clg-color-footer-muted: #dce7f1;
	--clg-color-footer-rule: rgb(255 255 255 / 18%);

	/* Matches the --cc-content container in crumina-civic-site.css. */
	--clg-content-width: 75rem;
	--clg-gutter: 1.25rem;

	--clg-font-sans: "Source Sans 3", "Source Sans Pro Web", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--clg-font-serif: Merriweather, "Merriweather Web", Georgia, "Times New Roman", serif;
}

body {
	color: var(--clg-color-ink);
	background: var(--clg-color-paper);
}

.wp-block-post-content {
	max-width: var(--wp--style--global--content-size, 760px);
	margin-inline: auto;
}

.wp-block-post-content img,
.wp-block-post-content video,
.wp-block-post-content iframe,
.wp-block-post-content table {
	max-width: 100%;
}

a {
	text-underline-offset: 0.16em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: var(--clg-focus-ring);
	outline-offset: 3px;
}

.usa-form {
	max-width: 32rem;
}

.usa-fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.usa-legend,
.usa-label {
	display: block;
	margin-top: 1rem;
	font-weight: 700;
	line-height: 1.3;
}

.usa-legend {
	margin-bottom: 0.5rem;
	padding: 0;
}

.usa-input,
.usa-select,
.usa-textarea {
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: 30rem;
	margin-top: 0.5rem;
	border: 1px solid #565c65;
	border-radius: 0;
	background-color: #fff;
	color: var(--clg-color-ink);
	font: inherit;
}

.usa-input,
.usa-select {
	min-height: 2.5rem;
	padding: 0.5rem;
}

.usa-textarea {
	min-height: 8rem;
	padding: 0.5rem;
}

.usa-radio,
.usa-checkbox {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	margin-top: 0.5rem;
}

.usa-radio__input,
.usa-checkbox__input {
	flex: 0 0 auto;
	margin-top: 0.2rem;
}

.usa-radio__label,
.usa-checkbox__label {
	line-height: 1.4;
}

.usa-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	margin-top: 1rem;
	padding: 0.75rem 1.25rem;
	border: 0;
	border-radius: 0.25rem;
	background: var(--clg-color-primary);
	color: #fff;
	font: inherit;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
}

.usa-button:hover,
.usa-button:focus {
	background: #1a4480;
	color: #fff;
}

.usa-button:disabled {
	background: #c9c9c9;
	color: #454545;
	cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Site header.

   Proportions, palette, and type follow the marketing design in
   crumina-civic-site.css (.usa-header / .usa-navbar / .usa-logo) so the
   WordPress theme and the static design pages read as one system.
   -------------------------------------------------------------------------- */

.clg-site-header {
	border-bottom: 1px solid var(--clg-color-border);
	background: var(--clg-color-paper);
}

/*
 * WordPress's root flow layout adds `margin-block-start: 24px` to every
 * non-first child of an `.is-layout-flow` container. In this header that
 * pushed the nav row 24px below the service strip and knocked the menu the
 * same distance out of line with the brand, so zero it for the header's own
 * containers. Selectors stay at two classes to outweigh
 * `:root :where(.is-layout-flow) > *` on specificity rather than source order.
 */
.clg-site-header > .wp-block-group,
.clg-site-header .clg-site-header__inner > *,
.clg-site-header .clg-site-header__identity > * {
	margin-block: 0;
}

/*
 * Same 24px again one level up: root layout applies it to every direct child
 * of `.wp-site-blocks`, so the main region is pushed off the header and a
 * full-bleed hero opens with a white band above it. Module templates own their
 * own top spacing (hero or article padding), so drop the inherited margin.
 */
#main-content {
	margin-block-start: 0;
}

.clg-site-header .clg-site-header__utility,
.clg-site-header .clg-site-header__inner {
	padding-inline: max(var(--clg-gutter), calc((100% - var(--clg-content-width)) / 2));
}

.clg-site-header .clg-site-header__utility {
	padding-block: 0.62rem;
	background: var(--clg-color-navy);
	color: var(--clg-color-paper);
}

/* Colour is set on the text itself: a bare `p { color }` rule elsewhere in the
   cascade beats inheritance from the strip and would leave grey on navy. */
.clg-site-header .clg-site-header__utility-text {
	margin: 0;
	color: var(--clg-color-paper);
	font-family: var(--clg-font-sans);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.45;
}

.clg-site-header .clg-site-header__utility a {
	color: inherit;
}

.clg-site-header .clg-site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 5.75rem;
}

.clg-site-header .clg-site-header__brand {
	flex: 0 1 auto;
	display: flex;
	align-items: center;
	gap: 0.8rem;
	min-width: 0;
}

.clg-site-header .clg-site-header__monogram {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: var(--clg-color-primary);
	color: var(--clg-color-paper);
	font-family: var(--clg-font-serif);
	font-size: 1.35rem;
	font-weight: 900;
	line-height: 1;
}

/* A real custom logo always wins over the generated monogram. */
.clg-site-header .clg-site-header__brand:has(.wp-block-site-logo img) .clg-site-header__monogram {
	display: none;
}

.clg-site-header .wp-block-site-logo {
	flex: 0 0 auto;
	width: auto;
}

.clg-site-header .wp-block-site-logo img {
	width: auto;
	height: 3rem;
	max-width: 14rem;
}

.clg-site-header .clg-site-header__identity {
	display: grid;
	gap: 0.22rem;
	min-width: 0;
}

.clg-site-header .wp-block-site-title {
	margin: 0;
	font-family: var(--clg-font-serif);
	font-size: 1.45rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.1;
}

.clg-site-header .wp-block-site-title a {
	color: var(--clg-color-navy);
	text-decoration: none;
}

.clg-site-header .wp-block-site-title a:hover,
.clg-site-header .wp-block-site-title a:focus {
	color: var(--clg-color-primary);
}

.clg-site-header .wp-block-site-tagline {
	margin: 0;
	color: var(--clg-color-muted);
	font-family: var(--clg-font-sans);
	font-size: 0.71rem;
	font-weight: 800;
	letter-spacing: 0.075em;
	line-height: 1.15;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.clg-site-header .clg-site-header__nav {
	flex: 0 0 auto;
	font-family: var(--clg-font-sans);
}

.clg-site-header .clg-site-header__nav .wp-block-navigation__container {
	align-items: center;
	gap: clamp(0.4rem, 1.4vw, 1.1rem);
}

.clg-site-header .clg-site-header__nav .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 3.25rem;
	padding-inline: 0.65rem;
	color: var(--clg-color-ink);
	font-size: 0.93rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.clg-site-header .clg-site-header__nav .wp-block-navigation-item__content:hover,
.clg-site-header .clg-site-header__nav .wp-block-navigation-item__content:focus,
.clg-site-header .clg-site-header__nav .current-menu-item > .wp-block-navigation-item__content,
.clg-site-header .clg-site-header__nav [aria-current="page"].wp-block-navigation-item__content {
	color: var(--clg-color-primary);
}

/*
 * Call-to-action menu item. Add the `clg-nav-cta` class to a navigation link
 * (block editor → Advanced → Additional CSS class) to render it as a button.
 */
.clg-site-header .clg-site-header__nav .clg-nav-cta > .wp-block-navigation-item__content {
	justify-content: center;
	margin-left: 0.5rem;
	padding: 0.7rem 1.15rem;
	border: 2px solid var(--clg-color-primary);
	border-radius: 0.3rem;
	background: var(--clg-color-primary);
	color: var(--clg-color-paper);
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.clg-site-header .clg-site-header__nav .clg-nav-cta > .wp-block-navigation-item__content:hover,
.clg-site-header .clg-site-header__nav .clg-nav-cta > .wp-block-navigation-item__content:focus {
	border-color: var(--clg-color-primary-dark);
	background: var(--clg-color-primary-dark);
	color: var(--clg-color-paper);
	transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Mobile navigation drawer.

   Mirrors .usa-nav in crumina-civic-site.css: a 15rem white panel pinned to
   the right edge over a 70% scrim, links stacked as full-width rows separated
   by hairlines. Several rules below carry extra classes purely to outrank
   core's own overlay styles, which are specificity-heavy by design.
   -------------------------------------------------------------------------- */

.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container-open,
.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container-close {
	/* Padding, not min-height: these are flex/grid boxes in core. 0.65rem
	   around a 24px icon clears the 44px AAA target (SC 2.5.5). */
	padding: 0.65rem;
	color: var(--clg-color-navy);
}

/* Keep the icon optically aligned with the container edge despite the padding. */
.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container-open {
	margin-inline-end: -0.65rem;
}

/* The full-screen container becomes the scrim. */
.clg-site-header .clg-site-header__nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
	/*
	 * The header nav is right-justified, and core reuses that setting to align
	 * the overlay's lists too — which shrink-wraps them and pushes long labels
	 * off the drawer's left edge. Reset core's own layout variables rather than
	 * fighting each rule that reads them.
	 */
	--navigation-layout-justification-setting: stretch;
	--navigation-layout-align: stretch;
	--navigation-layout-justify: flex-start;

	padding: 0;
	background: rgb(0 0 0 / 70%);
	color: var(--clg-color-ink);
}

.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list {
	align-items: stretch;
	width: 100%;
	gap: 0;
}

/* ...and the close wrapper becomes the drawer itself. */
.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close {
	width: 25rem;
	max-width: 100%;
	height: 100%;
	margin-inline: auto 0;
	padding: 1rem;
	background: var(--clg-color-paper);
	overflow-y: auto;
}

.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: stretch;
	gap: 0;
}

.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	display: block;
	width: 100%;
	border-top: 1px solid var(--clg-color-border);
}

.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block;
	min-height: 0;
	padding: 1rem;
	color: var(--clg-color-ink);
	font-size: 1.06rem;
	white-space: normal;
}

/*
 * Nested levels. Core expands submenus inline in the overlay, but gives them
 * `min-width: 200px` and 2rem of side padding — more than a 15rem drawer can
 * hold once nested twice. Re-indent to a single step per level instead.
 */
.clg-site-header .clg-site-header__nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	min-width: 0;
	width: 100%;
	padding: 0;
}

.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding-left: 1.75rem;
}

.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding-left: 2.5rem;
}

.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container.is-menu-open .current-menu-item > .wp-block-navigation-item__content,
.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container.is-menu-open [aria-current="page"].wp-block-navigation-item__content {
	box-shadow: inset 0.25rem 0 0 var(--clg-color-primary);
}

.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container.is-menu-open .clg-nav-cta {
	border-top: 0;
}

.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container.is-menu-open .clg-nav-cta > .wp-block-navigation-item__content {
	margin: 1rem 0 0;
	padding: 0.7rem 1.15rem;
	color: var(--clg-color-paper);
	text-align: center;
}

/*
 * Core swaps to the overlay at 600px; the reference design swaps at 64em.
 * Re-declare core's below-breakpoint rules up to 64em so the drawer takes over
 * at the same width, which also retires the cramped inline tier in between.
 */
@media (max-width: 63.99em) {
	.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.clg-site-header .clg-site-header__nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
}

@media (prefers-reduced-motion: reduce) {
	.clg-site-header .clg-site-header__nav .clg-nav-cta > .wp-block-navigation-item__content {
		transition: none;
	}

	.clg-site-header .clg-site-header__nav .clg-nav-cta > .wp-block-navigation-item__content:hover,
	.clg-site-header .clg-site-header__nav .clg-nav-cta > .wp-block-navigation-item__content:focus {
		transform: none;
	}
}

@media (max-width: 63.99em) {
	.clg-site-header .wp-block-site-title {
		font-size: 1.25rem;
	}
}

@media (max-width: 47.99em) {
	.clg-site-header .clg-site-header__inner {
		min-height: 4.75rem;
	}

	.clg-site-header .clg-site-header__utility-text {
		font-size: 0.75rem;
	}

	.clg-site-header .clg-site-header__monogram {
		width: 2.5rem;
		height: 2.5rem;
		font-size: 1.1rem;
	}

	.clg-site-header .wp-block-site-logo img {
		height: 2.5rem;
	}

	.clg-site-header .wp-block-site-title {
		font-size: 1.2rem;
	}
}

/* --------------------------------------------------------------------------
   Site footer.

   Three bands, matching .usa-footer in crumina-civic-site.css: a return-to-top
   rule, the navigation band, and a darker agency identity band under a gold
   top edge.
   -------------------------------------------------------------------------- */

.clg-site-footer {
	margin-top: 3rem;
	border-top: 0.35rem solid var(--clg-color-gold);
	background: var(--clg-color-footer);
	color: var(--clg-color-footer-ink);
	font-family: var(--clg-font-sans);
}

/* Root flow layout again: zero its 24px so the bands stack edge to edge. */
.clg-site-footer > .wp-block-group,
.clg-site-footer .clg-site-footer__secondary > * {
	margin-block: 0;
}

.clg-site-footer .clg-site-footer__top,
.clg-site-footer .clg-site-footer__primary,
.clg-site-footer .clg-site-footer__secondary {
	padding-inline: max(var(--clg-gutter), calc((100% - var(--clg-content-width)) / 2));
}

.clg-site-footer .clg-site-footer__top {
	position: relative;
	padding-block: 1rem;
	text-align: right;
}

/* The rule sits inside the container, not across the full bleed. */
.clg-site-footer .clg-site-footer__top::after {
	content: "";
	position: absolute;
	inset-block-end: 0;
	inset-inline: max(var(--clg-gutter), calc((100% - var(--clg-content-width)) / 2));
	border-bottom: 1px solid var(--clg-color-footer-rule);
}

.clg-site-footer .clg-site-footer__return {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 800;
}

.clg-site-footer .clg-site-footer__return a::after {
	content: " \2191";
	color: var(--clg-color-gold);
}

.clg-site-footer .clg-site-footer__primary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	padding-block: 1.75rem;
}

.clg-site-footer a {
	color: var(--clg-color-paper);
}

.clg-site-footer a:hover,
.clg-site-footer a:focus {
	color: var(--clg-color-gold);
}

.clg-site-footer .clg-site-footer__nav .wp-block-navigation__container {
	flex-wrap: wrap;
	gap: 0.65rem 1.4rem;
}

/*
 * The footer menu is a single level. Neither core/navigation nor core/page-list
 * exposes a depth attribute, so the nested lists and their disclosure toggles
 * are dropped here instead. `display: none` also takes them out of the
 * accessibility tree, so the footer is one level for every user, not just
 * visually. Parent items stay as ordinary links. The header keeps its submenus.
 */
.clg-site-footer .clg-site-footer__nav .wp-block-navigation__submenu-container,
.clg-site-footer .clg-site-footer__nav .wp-block-navigation__submenu-icon {
	display: none;
}

/*
 * Core ships `.wp-block-navigation-item__content.wp-block-navigation-item__content
 * { color: inherit }`, so the class is doubled here too — otherwise the footer
 * links settle on the band's body ink instead of the design's white.
 */
.clg-site-footer .clg-site-footer__nav .wp-block-navigation-item__content.wp-block-navigation-item__content {
	padding-block: 0.3rem;
	color: var(--clg-color-paper);
	font-size: 0.95rem;
	font-weight: 750;
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

.clg-site-footer .clg-site-footer__nav .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.clg-site-footer .clg-site-footer__nav .wp-block-navigation-item__content.wp-block-navigation-item__content:focus {
	color: var(--clg-color-gold);
	text-decoration-thickness: 0.13em;
}

.clg-site-footer .clg-site-footer__secondary {
	padding-block: 1.75rem;
	border-top: 1px solid var(--clg-color-footer-rule);
	background: var(--clg-color-footer-deep);
}

.clg-site-footer .wp-block-site-title {
	margin: 0 0 0.25rem;
	font-family: var(--clg-font-serif);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
}

.clg-site-footer .wp-block-site-title a {
	text-decoration: none;
}

.clg-site-footer .wp-block-site-tagline {
	margin: 0;
	max-width: 46rem;
	color: var(--clg-color-footer-muted);
	font-size: 0.9rem;
	line-height: 1.5;
}

@media (max-width: 47.99em) {
	.clg-site-footer .clg-site-footer__top {
		text-align: left;
	}

	.clg-site-footer .clg-site-footer__primary {
		display: block;
	}

	.clg-site-footer .clg-site-footer__nav .wp-block-navigation__container {
		gap: 0.5rem 1.2rem;
	}
}

.clg-page-header {
	padding-top: 3rem;
	padding-bottom: 3rem;
	border-bottom: 1px solid var(--clg-color-border);
	background: var(--clg-color-surface);
}

.clg-page-header__eyebrow {
	margin-bottom: 0.5rem;
	color: var(--clg-color-primary);
	font-size: 0.875rem;
	font-weight: 700;
	text-transform: uppercase;
}

.clg-page-header h1 {
	max-width: 14ch;
	margin-top: 0;
	margin-bottom: 1rem;
	line-height: 1.15;
}

.clg-page-header__intro {
	max-width: 42rem;
	margin-top: 0;
	font-size: 1.125rem;
}

.clg-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	gap: 1rem;
}

.clg-identifier {
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
	border-top: 1px solid var(--clg-color-border);
	background: #1b1b1b;
	color: #fff;
}

.clg-identifier a {
	color: #fff;
}

.clg-identifier__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
}

.clg-identifier__heading {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
}

.clg-identifier__text {
	margin: 0;
	max-width: 48rem;
}

.usa-alert {
	padding: 1rem;
	border-left: 0.5rem solid var(--clg-color-primary);
	background: var(--clg-color-surface);
}

.usa-alert--success {
	border-left-color: var(--clg-color-secondary);
}

.usa-alert--warning {
	border-left-color: #b38c00;
}

.usa-alert--error {
	border-left-color: #b32d2e;
}

.usa-alert--slim {
	padding: 0.5rem 0.75rem;
}

.usa-alert__heading {
	margin: 0 0 0.25rem;
	font-size: 1.125rem;
}

.usa-alert__text > :first-child,
.usa-card__body > :first-child,
.usa-summary-box__text > :first-child {
	margin-top: 0;
}

.usa-alert__text > :last-child,
.usa-card__body > :last-child,
.usa-summary-box__text > :last-child {
	margin-bottom: 0;
}

.usa-card__container,
.usa-summary-box {
	border: 1px solid var(--clg-color-border);
	border-radius: 4px;
	background: var(--clg-color-paper);
}

.usa-card__header,
.usa-card__body,
.usa-card__footer,
.usa-summary-box__body {
	padding: 1rem;
}

.usa-card__heading,
.usa-summary-box__heading {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.3;
}

.usa-tag {
	display: inline-flex;
	align-items: center;
	min-height: 1.5rem;
	padding: 0 0.5rem;
	border-radius: 4px;
	background: var(--clg-color-primary);
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 700;
}

.usa-tag--accent {
	background: var(--clg-color-accent);
}

.usa-table {
	width: 100%;
	border-collapse: collapse;
}

.usa-table caption {
	margin-bottom: 0.5rem;
	font-weight: 700;
	text-align: left;
}

.usa-table th,
.usa-table td {
	padding: 0.75rem;
	border: 1px solid var(--clg-color-border);
	text-align: left;
	vertical-align: top;
}
