/*
Theme Name: ChatGPT Ads Agency
Description: Custom block theme for the ChatGPT Ads Agency website.
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 8.1
Version: 0.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chatgptadsagency
*/

/* Design tokens and block defaults live in theme.json. This file holds what theme.json can't express. */

:root {
	--cga-status-h: 34px;
	--cga-card-pad: clamp(1.25rem, 2.4vw, 1.75rem);
	--cga-muted-on-ink: color-mix(in srgb, var(--wp--preset--color--paper) 68%, transparent);
	--cga-rule-on-ink: color-mix(in srgb, var(--wp--preset--color--paper) 18%, transparent);
	/* The accent blue is too dark for text on ink; this lighter blue keeps 4.5:1 there. */
	--cga-signal-on-ink: #60A5FA;
	/* The logo gradient, and a soft glow of it for the navy bands. */
	--cga-brand-gradient: linear-gradient(120deg, #2563EB 0%, #4F46E5 55%, #7C3AED 100%);
	--cga-ink-glow: radial-gradient(55% 90% at 100% 0%, rgb(124 58 237 / 0.34), transparent 70%), radial-gradient(50% 80% at 0% 100%, rgb(37 99 235 / 0.30), transparent 70%);
}

html {
	scroll-padding-top: calc(6rem + var(--wp-admin--admin-bar--height, 0px));
}

::selection {
	background: var(--wp--preset--color--signal-wash);
	color: var(--wp--preset--color--ink);
}

/* ---------------------------------------------------------------- type */

/* Headings use Archivo's wide cut; body copy stays at normal width. */
:where(h1, h2),
.has-display-font-size {
	font-stretch: var(--wp--custom--stretch--display);
	text-wrap: balance;
}

:where(h3, h4) {
	text-wrap: balance;
}

:where(p, li, dd) {
	text-wrap: pretty;
}

.wp-block-site-title {
	font-stretch: var(--wp--custom--stretch--title);
}

.has-display-font-size {
	line-height: 1.02;
	letter-spacing: -0.025em;
}

:where(.wp-element-button, .wp-block-button__link) {
	font-stretch: 104%;
}

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 2px;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--signal);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Eyebrow: a short mono label above a heading. The orange square marks it as a label, not body copy. */
.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--wp--preset--color--graphite);
}

.is-style-eyebrow::before {
	content: "";
	display: inline-block;
	width: 0.55em;
	height: 0.55em;
	margin-right: 0.65em;
	background: var(--wp--preset--color--signal);
	vertical-align: 0.05em;
}

.is-style-lede {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	color: var(--wp--preset--color--graphite);
	max-width: 62ch;
}

/* Topic page intros: the first paragraph reads as the lede, the reading guide below it as body text. */
.cga-topic-intro p {
	max-width: 62ch;
	margin: 0;
}

.cga-topic-intro p + p {
	margin-top: 0.9em;
}

.cga-topic-intro p:first-child {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	color: var(--wp--preset--color--graphite);
}

.is-style-note {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.55;
	color: var(--wp--preset--color--graphite);
}

/* -------------------------------------------------------------- buttons */

.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1.5px solid var(--wp--preset--color--ink);
	background: transparent;
	color: var(--wp--preset--color--ink);
	padding: calc(0.85em - 1.5px) calc(1.3em - 1.5px);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

/* --------------------------------------------------------------- header */

.cga-header {
	background: var(--wp--preset--color--paper);
	border-bottom: 1px solid var(--wp--preset--color--rule);
	padding-block: 0.85rem;
}

.cga-header__row {
	gap: 1.5rem;
}

.cga-header .wp-block-site-title {
	flex-shrink: 0;
}

.cga-header__cta .wp-block-button__link {
	font-size: var(--wp--preset--font-size--small);
	padding: 0.65em 1.05em;
	white-space: nowrap;
}

/* The status bar scrolls away; the header row stays pinned below it on larger screens. */
@media (min-width: 782px) {
	.wp-site-blocks > header.wp-block-template-part {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) - var(--cga-status-h));
		z-index: 30;
	}
}

.cga-nav .wp-block-navigation-item__content {
	padding-block: 0.35rem;
}

.cga-nav .wp-block-navigation__submenu-container {
	min-width: 17rem !important;
	padding: 0.5rem !important;
	border: 1px solid var(--wp--preset--color--rule) !important;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--white) !important;
	box-shadow: 0 14px 34px rgb(15 23 42 / 0.09);
}

.cga-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.55rem 0.75rem !important;
	border-radius: var(--wp--custom--radius--sm);
}

.cga-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--fog);
}

.cga-nav .wp-block-navigation-item__content:hover,
.cga-nav .current-menu-item > .wp-block-navigation-item__content {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--signal);
	text-decoration-thickness: 2px;
}

/* Small screens: logo, then the call button, then the menu toggle at the far right. */
@media (max-width: 899px) {
	.cga-header__row .cga-header__cta {
		order: 2;
		margin-left: auto;
	}

	.cga-header__row .cga-nav {
		order: 3;
		flex: none;
	}
}

@media (max-width: 480px) {
	.cga-header__row {
		gap: 0.75rem;
	}
}

/* Narrow phones: "Book a call", so the menu button keeps its place. */
@media (max-width: 409px) {
	.cga-header__cta .cga-cta-word {
		display: none;
	}
}

@media (max-width: 400px) {
	.cga-header .wp-block-site-title {
		font-size: 1rem;
	}

	.cga-header__cta .wp-block-button__link {
		padding: 0.55em 0.8em;
		font-size: 0.875rem;
	}
}

@media (max-width: 359px) {
	.wp-block-buttons.cga-header__cta {
		display: none;
	}
}

/* Core collapses the menu only below 600px; five top-level items plus the logo need it up to 900px. */
@media (min-width: 600px) and (max-width: 899px) {
	.cga-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex !important;
	}

	.cga-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none !important;
	}

	.cga-nav .wp-block-navigation__responsive-container-close:not(.always-shown) {
		display: flex !important;
	}
}

/* --------------------------------------------------------------- footer */

.cga-footer {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	font-size: var(--wp--preset--font-size--small);
}

.cga-footer a {
	color: var(--wp--preset--color--paper);
	text-decoration: none;
}

.cga-footer a:hover {
	text-decoration: underline;
	text-decoration-color: var(--cga-signal-on-ink);
}

.cga-footer .is-style-eyebrow {
	color: var(--cga-muted-on-ink);
}

.cga-footer .wp-block-site-title a {
	color: var(--wp--preset--color--paper);
}

.cga-footer__about {
	color: var(--cga-muted-on-ink);
	max-width: 36ch;
}

.cga-footer__legal {
	border-top: 1px solid var(--cga-rule-on-ink);
	color: var(--cga-muted-on-ink);
	font-size: var(--wp--preset--font-size--x-small);
}

.cga-footer__legal a {
	color: var(--cga-muted-on-ink);
}

.cga-footer .wp-block-list {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

.cga-footer .wp-block-list li + li {
	margin-top: 0.45rem;
}

/* ----------------------------------------------------- sections, bands */

/* Call to action above the footer: a framed card on paper, so it reads apart from the ink footer. */
.cga-cta__card {
	position: relative;
	background: var(--wp--preset--color--white);
	border: 1.5px solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--lg);
	padding: clamp(1.75rem, 4vw, 3.5rem);
}

/* A short signal tab on the top edge, like the label on a spec sheet. */
.cga-cta__card::before {
	content: "";
	position: absolute;
	top: -1.5px;
	left: clamp(1.75rem, 4vw, 3.5rem);
	width: 4rem;
	height: 4px;
	background: var(--wp--preset--color--signal);
}

.cga-cta__cols {
	gap: clamp(1.75rem, 4vw, 4rem);
	margin: 0;
}

.cga-cta h2 {
	max-width: 22ch;
	margin-top: 0.6rem;
}

.cga-cta__lede {
	margin-top: 1.1rem;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--graphite);
}

.cga-cta__list {
	margin-top: 0.6rem;
}

.cga-cta__actions {
	padding-left: clamp(1.75rem, 3vw, 3rem);
	border-left: 1px solid var(--wp--preset--color--rule);
}

.cga-cta__note {
	margin-top: 1.1rem;
}

@media (max-width: 781px) {
	.cga-cta__actions {
		padding-left: 0;
		padding-top: 1.75rem;
		border-left: 0;
		border-top: 1px solid var(--wp--preset--color--rule);
	}
}

/* ----------------------------------------------------------------- cards */

.is-style-card {
	position: relative;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: var(--wp--custom--radius--md);
	padding: var(--cga-card-pad);
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.is-style-panel {
	background: var(--wp--preset--color--fog);
	border-radius: var(--wp--custom--radius--lg);
	padding: var(--cga-card-pad);
}

/* A card whose heading links somewhere is clickable as a whole. */
.is-style-card:has(:is(h2, h3, h4) a) {
	cursor: pointer;
}

.is-style-card :is(h2, h3, h4) a {
	color: inherit;
	text-decoration: none;
}

.is-style-card :is(h2, h3, h4) a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.is-style-card:has(:is(h2, h3, h4) a:hover),
.is-style-card:has(:is(h2, h3, h4) a:focus-visible) {
	border-color: var(--wp--preset--color--ink);
}

.is-style-card:has(:is(h2, h3, h4) a:focus-visible) {
	outline: 2px solid var(--wp--preset--color--signal);
	outline-offset: 3px;
}

.is-style-card :is(h2, h3, h4) a:focus-visible {
	outline: none;
}

/* In a card (flex column) the link sits at the bottom; elsewhere it keeps the normal gap. */
.is-layout-flex > .cga-card-more {
	margin-top: auto;
}

.cga-card-more {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	color: var(--wp--preset--color--signal-deep);
}

/* --------------------------------------------------------------- chips */

.cga-chip,
.wp-block-table.is-style-spec td:last-child :is(a, .cga-cite) {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	padding: 0.45em 0.75em;
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: 999px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.cga-chip::before,
.wp-block-table.is-style-spec td:last-child :is(a, .cga-cite)::before {
	content: "";
	flex: none;
	width: 0.5em;
	height: 0.5em;
	border-radius: 50%;
	background: var(--wp--preset--color--signal);
}

a.cga-chip:hover,
.wp-block-table.is-style-spec td:last-child a:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

/* Reported (not confirmed by OpenAI): dashed outline, hollow dot. */
.cga-chip.is-reported,
.wp-block-table.is-style-spec td:last-child :is(a, .cga-cite):has(em) {
	border-style: dashed;
	border-color: var(--wp--preset--color--graphite);
}

.cga-chip.is-reported::before,
.wp-block-table.is-style-spec td:last-child :is(a, .cga-cite):has(em)::before {
	background: transparent;
	box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--graphite);
}

.wp-block-table.is-style-spec td:last-child :is(a, .cga-cite) em {
	font-style: normal;
}

/* ---------------------------------------------------------- spec table */

.wp-block-table.is-style-spec table {
	width: 100%;
	border-collapse: collapse;
}

.wp-block-table.is-style-spec :is(th, td) {
	padding: 1rem 1.25rem 1rem 0;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--rule);
	text-align: left;
	vertical-align: top;
}

.wp-block-table.is-style-spec thead th {
	padding-top: 0;
	border-bottom: 1.5px solid var(--wp--preset--color--ink);
	color: var(--wp--preset--color--graphite);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.wp-block-table.is-style-spec tbody td:first-child {
	width: 20%;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding-top: 1.2rem;
}

.wp-block-table.is-style-spec tbody td:nth-child(2) {
	font-size: var(--wp--preset--font-size--medium);
}

/* Code such as event names keeps its case in the uppercase label column. */
.wp-block-table.is-style-spec td code {
	letter-spacing: 0;
	text-transform: none;
}

/* Source chips: keep the column tight. A last column of plain text wraps and reads like the one before it. */
.wp-block-table.is-style-spec tbody td:last-child:has(a, .cga-cite) {
	width: 1%;
	padding-right: 0;
	white-space: nowrap;
}

.wp-block-table.is-style-spec tbody td:last-child:not(:has(a, .cga-cite)) {
	font-size: var(--wp--preset--font-size--medium);
}

/* Long lists, such as the country tracker: tighter rows, smaller body text. */
.wp-block-table.is-style-spec.cga-table-compact :is(th, td) {
	padding-block: 0.6rem;
}

.wp-block-table.is-style-spec.cga-table-compact thead th {
	padding-top: 0;
}

.wp-block-table.is-style-spec.cga-table-compact tbody td:first-child {
	padding-top: 0.75rem;
}

.wp-block-table.is-style-spec.cga-table-compact tbody td:nth-child(2) {
	font-size: var(--wp--preset--font-size--small);
}

/* Glossary terms such as oppref or oCPC keep their case. */
.wp-block-table.is-style-spec.cga-table-terms tbody td:first-child {
	text-transform: none;
	letter-spacing: 0;
}

.wp-block-table.is-style-spec figcaption {
	margin-top: 1rem;
	text-align: left;
}

@media (max-width: 700px) {
	.wp-block-table.is-style-spec thead {
		display: none;
	}

	.wp-block-table.is-style-spec :is(tr, td) {
		display: block;
		width: auto !important;
	}

	.wp-block-table.is-style-spec tr {
		padding: 1rem 0;
		border-bottom: 1px solid var(--wp--preset--color--rule);
	}

	.wp-block-table.is-style-spec td {
		padding: 0.2rem 0 !important;
		border: 0 !important;
	}

	.wp-block-table.is-style-spec tbody td:last-child {
		padding-top: 0.6rem !important;
	}

	.wp-block-table.is-style-spec.cga-table-compact tr {
		padding: 0.65rem 0;
	}

	/* Two short columns, such as a currency and its minimum, stay side by side. */
	.wp-block-table.is-style-spec.cga-table-pairs thead {
		display: table-header-group;
	}

	.wp-block-table.is-style-spec.cga-table-pairs tr {
		display: table-row;
	}

	.wp-block-table.is-style-spec.cga-table-pairs tbody td {
		display: table-cell;
		padding: 0.6rem 1rem 0.6rem 0 !important;
		border-bottom: 1px solid var(--wp--preset--color--rule) !important;
	}
}

/* Long code lines scroll inside the block instead of widening the page on phones. */
.wp-block-code {
	overflow-x: auto;
}

.wp-block-code code {
	white-space: pre;
}

/* Inline code, such as an example URL, breaks anywhere rather than overflowing. */
:not(pre) > code {
	overflow-wrap: anywhere;
}

/* Keeps names like OAI-SearchBot or ranges like US$3–5 on one line. */
.cga-nowrap {
	white-space: nowrap;
}

/* ------------------------------------------------------------- lists */

.wp-block-list:is(.is-style-checks, .is-style-dashes) {
	list-style: none;
	padding-left: 0;
}

.wp-block-list:is(.is-style-checks, .is-style-dashes) > li {
	position: relative;
	padding-left: 1.9em;
}

.wp-block-list:is(.is-style-checks, .is-style-dashes) > li + li {
	margin-top: 0.7rem;
}

.wp-block-list.is-style-checks > li::before {
	content: "";
	position: absolute;
	left: 0.15em;
	top: 0.38em;
	width: 0.85em;
	height: 0.45em;
	border-left: 2px solid var(--wp--preset--color--signal-deep);
	border-bottom: 2px solid var(--wp--preset--color--signal-deep);
	transform: rotate(-45deg);
}

.wp-block-list.is-style-dashes > li::before {
	content: "";
	position: absolute;
	left: 0.1em;
	top: 0.78em;
	width: 0.9em;
	height: 2px;
	background: var(--wp--preset--color--graphite);
}

/* ---------------------------------------------------- process steps */

.cga-steps {
	counter-reset: cga-step;
}

.cga-step {
	border-top: 1.5px solid var(--wp--preset--color--ink);
	padding-top: 1.1rem;
}

.cga-step__when {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--signal-deep);
}

/* ------------------------------------------------------ next steps */

/* Numbered because the steps happen in this order. */
.cga-next {
	padding-left: 0;
	list-style: none;
	counter-reset: cga-next;
}

.cga-next > li {
	position: relative;
	padding-left: 2.4rem;
	counter-increment: cga-next;
}

.cga-next > li + li {
	margin-top: 1rem;
}

.cga-next > li::before {
	content: counter(cga-next);
	position: absolute;
	left: 0;
	top: 0.05em;
	display: grid;
	place-items: center;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	background: var(--wp--preset--color--signal);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	font-weight: 600;
}

/* Only applies once the columns stack: keeps the panel clear of the submit button. */
.cga-contact {
	row-gap: var(--wp--preset--spacing--50);
}

@media (min-width: 782px) {
	.cga-contact > .wp-block-column:last-child {
		position: sticky;
		top: 6.5rem;
		align-self: flex-start;
	}
}

/* ------------------------------------------------------------- FAQ */

.wp-block-details summary {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1.5rem;
	cursor: pointer;
	list-style: none;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 620;
	line-height: 1.35;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	flex: none;
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 600;
	color: var(--wp--preset--color--signal-deep);
}

.wp-block-details[open] summary::after {
	content: "\2212";
}

.wp-block-details > :not(summary) {
	max-width: 70ch;
	color: var(--wp--preset--color--graphite);
}

.wp-block-details > summary + * {
	margin-top: 0.8rem;
}

.cga-faq > .wp-block-details:first-of-type {
	border-top: 1px solid var(--wp--preset--color--rule);
}

/* ------------------------------------------------------ post cards */

.cga-post-card {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	height: 100%;
}

.cga-post-card .wp-block-post-title {
	font-size: var(--wp--preset--font-size--large);
	font-stretch: 100%;
	line-height: 1.25;
	margin: 0;
}

.cga-post-card .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.cga-post-card .wp-block-post-terms a {
	position: relative;
	z-index: 1;
	color: var(--wp--preset--color--signal-deep);
	text-decoration: none;
}

.cga-post-card .wp-block-post-terms a:hover {
	text-decoration: underline;
}

/* "Keep reading" disappears when a post has no related posts yet. */
.cga-related-wrap:not(:has(.wp-block-post)) {
	display: none;
}

.cga-meta-row {
	gap: 0.35rem 0.9rem;
	color: var(--wp--preset--color--graphite);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
}

.cga-meta-row > * {
	margin: 0;
}

/* Pagination */
.wp-block-query-pagination {
	gap: 0.4rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	padding: 0.35em 0.65em;
	border-radius: var(--wp--custom--radius--sm);
	text-decoration: none;
}

.wp-block-query-pagination .page-numbers.current {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

/* ------------------------------------------------------ single post */

/* Long reads (posts, plain pages such as the legal ones, and resource pages) give headings room to breathe. */
:is(.cga-article, .cga-page, .cga-resource) .wp-block-post-content > * + :is(h2, h3) {
	margin-top: 2.4em;
}

.cga-dek {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	color: var(--wp--preset--color--graphite);
}

.cga-dek p {
	margin: 0;
}

/* Resource pages: contents column stays in view beside the text. */
@media (min-width: 960px) {
	.cga-resource__aside {
		position: sticky;
		top: 6.5rem;
		align-self: flex-start;
	}
}

/* --------------------------------------------------- media queries */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ======================================================= home sections */

/* Section heading with its link on the right, aligned to the heading's baseline. */
.cga-section-head {
	gap: 1rem 2rem;
}

.cga-section-head__lede {
	margin-top: 1rem;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--graphite);
}

.cga-hero__proof {
	margin-top: var(--wp--preset--spacing--50) !important;
	margin-bottom: var(--wp--preset--spacing--40) !important;
}

/* Headline figures: the one dark band on the page, read like the totals row of a spec sheet. */
.cga-figures {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

.cga-figures :where(h2, h3) {
	color: var(--wp--preset--color--paper);
}

.cga-figures .is-style-eyebrow,
.cga-figures .cga-section-head__lede {
	color: var(--cga-muted-on-ink);
}

.cga-figures .cga-card-more a {
	color: var(--cga-signal-on-ink);
}

.cga-figure-grid {
	margin-top: var(--wp--preset--spacing--50);
	gap: 0 !important;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--paper) 22%, transparent);
}

.cga-figure {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.75rem 1.5rem 0.5rem 0;
}

.cga-figure + .cga-figure {
	padding-left: 1.5rem;
	border-left: 1px solid color-mix(in srgb, var(--wp--preset--color--paper) 22%, transparent);
}

.cga-figure__num {
	margin: 0;
	font-family: var(--wp--preset--font-family--archivo);
	font-size: clamp(2.5rem, 5vw, 3.75rem);
	font-weight: 700;
	font-stretch: var(--wp--custom--stretch--display, 116%);
	line-height: 0.95;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--paper);
}

.cga-figure__num::after {
	content: "";
	display: block;
	width: 1.5rem;
	height: 3px;
	margin-top: 1rem;
	background: var(--wp--preset--color--signal);
}

.cga-figure__label {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
	color: var(--cga-muted-on-ink);
}

.cga-figure__source {
	margin-top: auto !important;
	padding-top: 0.5rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
}

.cga-figure__source :is(a, .cga-cite) {
	color: var(--wp--preset--color--paper);
	text-decoration: underline;
	text-decoration-color: var(--cga-signal-on-ink);
	text-underline-offset: 0.2em;
}

@media (max-width: 781px) {
	.cga-figure,
	.cga-figure + .cga-figure {
		padding: 1.5rem 0;
		border-left: 0;
		border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--paper) 22%, transparent);
	}
}

/* Services as an editorial list: one full-width row per service, the whole row clickable. */
.cga-service-list {
	margin-top: var(--wp--preset--spacing--50);
	border-top: 1.5px solid var(--wp--preset--color--ink);
}

.cga-service-row {
	position: relative;
	display: grid;
	grid-template-columns: 11rem minmax(0, 1.1fr) minmax(0, 1fr) 2rem;
	gap: 1.5rem;
	align-items: baseline;
	margin: 0 !important;
	padding: 1.6rem 0;
	border-bottom: 1px solid var(--wp--preset--color--rule);
	transition: background-color 0.15s ease;
}

.cga-service-row::after {
	content: "→";
	justify-self: end;
	font-size: 1.35rem;
	color: var(--wp--preset--color--ink);
	transition: transform 0.2s ease, color 0.2s ease;
}

.cga-service-row:hover::after,
.cga-service-row:focus-within::after {
	color: var(--wp--preset--color--signal-deep);
	transform: translateX(6px);
}

.cga-service-row > * {
	margin: 0 !important;
}

.cga-service-row__type {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--graphite);
}

.cga-service-row :is(h2, h3) {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.15;
}

.cga-service-row :is(h2, h3) a {
	color: inherit;
	text-decoration: none;
}

.cga-service-row :is(h2, h3) a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.cga-service-row :is(h2, h3) a:focus-visible {
	outline: none;
}

.cga-service-row:has(:is(h2, h3) a:focus-visible) {
	outline: 2px solid var(--wp--preset--color--signal);
	outline-offset: 2px;
}

.cga-service-row p:last-child {
	color: var(--wp--preset--color--graphite);
}

@media (max-width: 900px) {
	.cga-service-row {
		grid-template-columns: minmax(0, 1fr) 2rem;
		gap: 0.5rem 1rem;
	}

	.cga-service-row__type,
	.cga-service-row :is(h2, h3),
	.cga-service-row p:last-child {
		grid-column: 1;
	}

	.cga-service-row::after {
		grid-column: 2;
		grid-row: 2;
	}
}

/* Principles: four short statements, each topped with an ink rule and a signal tag. */
.cga-principles {
	margin-top: var(--wp--preset--spacing--50);
}

.cga-principle {
	padding-top: 1.1rem;
	border-top: 1.5px solid var(--wp--preset--color--ink);
}

.cga-principle > * {
	margin: 0;
}

.cga-principle > * + * {
	margin-top: 0.6rem;
}

.cga-principle__tag {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--signal-deep);
}

.cga-principle h3 {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.15;
}

.cga-principle p:not(.cga-principle__tag, .is-style-note) {
	color: var(--wp--preset--color--graphite);
}

/* Process as a measured timeline: one line across the weeks, a marker at each step. */
.cga-timeline {
	position: relative;
	padding-top: 1.75rem;
}

.cga-timeline::before {
	content: "";
	position: absolute;
	top: 0.45rem;
	left: 0;
	right: 0;
	height: 1.5px;
	background: var(--wp--preset--color--ink);
}

.cga-timeline .cga-step {
	position: relative;
	border-top: 0;
	padding-top: 0.25rem;
}

.cga-timeline .cga-step::before {
	content: "";
	position: absolute;
	top: calc(-1.75rem + 0.1rem);
	left: 0;
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 50%;
	background: var(--wp--preset--color--paper);
	border: 2px solid var(--wp--preset--color--ink);
}

.cga-timeline .cga-step:last-child::before {
	background: var(--wp--preset--color--signal);
	border-color: var(--wp--preset--color--signal);
}

@media (max-width: 781px) {
	.cga-timeline {
		padding-top: 0;
		padding-left: 1.75rem;
	}

	.cga-timeline::before {
		top: 0;
		bottom: 0;
		left: 0.35rem;
		right: auto;
		width: 1.5px;
		height: auto;
	}

	.cga-timeline .cga-step::before {
		top: 0.3rem;
		left: calc(-1.75rem + 0.02rem);
	}
}

/* Resource cards lead with one figure. */
.cga-card-figure {
	margin: 0;
	font-family: var(--wp--preset--font-family--archivo);
	font-size: clamp(2rem, 3.4vw, 2.75rem);
	font-weight: 700;
	font-stretch: var(--wp--custom--stretch--display, 116%);
	line-height: 1;
	letter-spacing: -0.02em;
}

.cga-card-figure + .is-style-note {
	margin-top: 0.4rem;
}

/* Placeholder prices stay visible but don't dominate the card. */
.cga-price {
	font-size: var(--wp--preset--font-size--large) !important;
	line-height: 1.3;
}

/* ================================================== page hero spec card */

.cga-hero-cols {
	gap: clamp(2rem, 5vw, 5rem);
	margin-top: 0.5rem;
}

.cga-spec-card {
	position: relative;
	background: var(--wp--preset--color--white);
	border: 1.5px solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--lg);
	padding: 1.5rem 1.6rem 0.6rem;
}

/* The same signal tab as the call-to-action card. */
.cga-spec-card::before {
	content: "";
	position: absolute;
	top: -1.5px;
	left: 1.6rem;
	width: 3rem;
	height: 4px;
	background: var(--cga-brand-gradient);
}

.cga-spec-card__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--graphite);
}

.cga-spec-card__table {
	margin: 0.6rem 0 0;
}

.cga-spec-card__table table {
	width: 100%;
	border-collapse: collapse;
}

.cga-spec-card__table td {
	padding: 0.85rem 0;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--rule);
	vertical-align: top;
	text-align: left;
}

.cga-spec-card__table tr:first-child td {
	border-top: 0;
}

.cga-spec-card__table td:first-child {
	width: 38%;
	padding-right: 1rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--graphite);
	padding-top: 1rem;
}

.cga-spec-card__table td:last-child {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.4;
	color: var(--wp--preset--color--ink);
}

@media (max-width: 781px) {
	.cga-spec-col {
		margin-top: 0.5rem;
	}
}

/* On the services hub the list is the first thing in its section. */
.cga-service-list--flush {
	margin-top: 0;
}

/* About: the working rules as a ruled list beside a sticky heading. */
.cga-rules {
	gap: clamp(2rem, 5vw, 5rem);
}

@media (min-width: 782px) {
	.cga-rules__head {
		position: sticky;
		top: 2rem;
		align-self: flex-start;
	}
}

.cga-rules__head p:last-child {
	color: var(--wp--preset--color--graphite);
}

.cga-rule-list {
	border-top: 1.5px solid var(--wp--preset--color--ink);
}

.cga-rule {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
	gap: 0.5rem 2.5rem;
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--wp--preset--color--rule);
}

.cga-rule > * {
	margin: 0 !important;
}

.cga-rule h3 {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.2;
}

.cga-rule p {
	color: var(--wp--preset--color--graphite);
}

@media (max-width: 700px) {
	.cga-rule {
		grid-template-columns: 1fr;
	}
}

/* ================================================== pricing: rate card and worked example */

/* Services as one rate card: service and what it includes. Fees are quoted per account, so there is no price column.
   Same frame and signal tab as the spec card. */
.cga-rate-card {
	position: relative;
	margin-top: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--white);
	border: 1.5px solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--lg);
	padding: 0.5rem clamp(1.25rem, 3vw, 2.25rem) 0;
}

.cga-rate-card::before {
	content: "";
	position: absolute;
	top: -1.5px;
	left: clamp(1.25rem, 3vw, 2.25rem);
	width: 3rem;
	height: 4px;
	background: var(--cga-brand-gradient);
}

.cga-rate-card__head,
.cga-rate-row,
.cga-rate-card__foot {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
	gap: 0.5rem 2.5rem;
	align-items: baseline;
}

.cga-rate-card > *,
.cga-rate-card__head > *,
.cga-rate-row > *,
.cga-rate-row__name > *,
.cga-rate-card__foot > *,
.cga-rate-card__quote > * {
	margin: 0 !important;
}

.cga-rate-card__head {
	padding: 1.1rem 0 0.9rem;
	border-bottom: 1.5px solid var(--wp--preset--color--ink);
}

.cga-rate-card__head p,
.cga-rate-row__type,
.cga-rate-card__foot-title {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.cga-rate-card__head p {
	color: var(--wp--preset--color--graphite);
}

.cga-rate-row {
	padding: 1.4rem 0;
	border-bottom: 1px solid var(--wp--preset--color--rule);
}

.cga-rate-row__type {
	color: var(--wp--preset--color--signal-deep);
}

.cga-rate-row__name h3 {
	margin-top: 0.35rem !important;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.2;
}

.cga-rate-row__name h3 a {
	color: inherit;
	text-decoration: none;
}

.cga-rate-row__name h3 a:hover,
.cga-rate-row__name h3 a:focus-visible {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--signal);
	text-underline-offset: 0.2em;
}

.cga-rate-row > p {
	color: var(--wp--preset--color--graphite);
}

.cga-rate-card__foot {
	padding: 1.4rem 0 1.75rem;
}

.cga-rate-card__quote > * + * {
	margin-top: 1.1rem !important;
}

.cga-rate-card__quote > p {
	color: var(--wp--preset--color--graphite);
}

.cga-rate-card__factors {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem 2rem;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--small);
}

.cga-rate-card__factors li {
	position: relative;
	margin: 0;
	padding-left: 1.1rem;
}

.cga-rate-card__factors li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.62em;
	width: 0.45rem;
	height: 0.45rem;
	background: var(--wp--preset--color--signal);
}

@media (max-width: 900px) {
	.cga-rate-card__head {
		display: none;
	}

	.cga-rate-row,
	.cga-rate-card__foot {
		grid-template-columns: 1fr;
		gap: 0.6rem;
	}
}

@media (max-width: 600px) {
	.cga-rate-card__factors {
		grid-template-columns: 1fr;
	}
}

/* Worked example: the break-even sum set out like a receipt on an ink card. */
.cga-example {
	gap: clamp(2rem, 5vw, 5rem);
}

.cga-equation {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	border-radius: var(--wp--custom--radius--lg);
	padding: clamp(1.5rem, 3vw, 2.25rem);
}

.cga-equation > * {
	margin: 0 !important;
}

.cga-equation__title {
	padding-bottom: 1rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cga-muted-on-ink);
}

.cga-equation__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1rem 0;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--paper) 22%, transparent);
}

.cga-equation__row > * {
	margin: 0 !important;
}

.cga-equation__row > p:first-child {
	color: var(--cga-muted-on-ink);
	font-size: var(--wp--preset--font-size--small);
}

.cga-equation__op {
	display: inline-block;
	width: 1.4rem;
	margin-left: -1.4rem;
	font-family: var(--wp--preset--font-family--mono);
	color: var(--cga-signal-on-ink);
}

.cga-equation__row {
	padding-left: 1.4rem;
}

.cga-equation__value {
	flex: none;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	color: var(--wp--preset--color--paper);
}

.cga-equation__row--total {
	border-top: 1.5px solid var(--wp--preset--color--paper);
}

.cga-equation__row--total > p:first-child {
	color: var(--wp--preset--color--paper);
	font-weight: 600;
}

.cga-equation__row--total .cga-equation__value {
	font-family: var(--wp--preset--font-family--archivo);
	font-size: clamp(2.25rem, 4vw, 3rem);
	font-weight: 700;
	font-stretch: var(--wp--custom--stretch--display, 116%);
	line-height: 1;
	color: var(--cga-signal-on-ink);
}

.cga-equation__note {
	padding-top: 1rem;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--paper) 22%, transparent);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--cga-muted-on-ink);
}

/* ================================================== service pages */

/* The scope of each service on an ink band: the one dark moment on the page. */
.cga-band-ink {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

.cga-band-ink :where(h2, h3) {
	color: var(--wp--preset--color--paper);
}

.cga-band-ink .is-style-eyebrow,
.cga-band-ink .wp-block-column > p:not(.is-style-eyebrow) {
	color: var(--cga-muted-on-ink);
}

.cga-band-ink a {
	color: var(--cga-signal-on-ink);
}

.cga-band-ink a:hover {
	color: var(--wp--preset--color--paper);
}

/* Scope list: two columns of ruled cells instead of one long list. */
.wp-block-list.cga-scope {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 2.5rem;
	margin: 0;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--paper) 22%, transparent);
}

.wp-block-list.cga-scope > li,
.wp-block-list.cga-scope > li + li {
	margin: 0;
	padding: 1.05rem 0 1.05rem 2rem;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--paper) 22%, transparent);
	line-height: 1.5;
}

.wp-block-list.cga-scope > li::before {
	top: 1.45rem;
	border-color: var(--wp--preset--color--signal);
}

/* An odd item out takes the full row instead of leaving a gap. */
.wp-block-list.cga-scope > li:last-child:nth-child(odd) {
	grid-column: 1 / -1;
}

@media (max-width: 700px) {
	.wp-block-list.cga-scope {
		grid-template-columns: 1fr;
	}
}

/* What we need to start: a brief to tick off, on a framed card. */
.wp-block-list.cga-checklist {
	position: relative;
	margin: 0;
	padding: 0.4rem 1.6rem;
	list-style: none;
	background: var(--wp--preset--color--white);
	border: 1.5px solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--lg);
}

.wp-block-list.cga-checklist > li {
	position: relative;
	margin: 0;
	padding: 1rem 0 1rem 2.1rem;
}

.wp-block-list.cga-checklist > li + li {
	border-top: 1px solid var(--wp--preset--color--rule);
}

.wp-block-list.cga-checklist > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1.2rem;
	width: 1rem;
	height: 1rem;
	border: 1.5px solid var(--wp--preset--color--ink);
	border-radius: 3px;
}

/* Related services: the service list at a smaller size. */
.cga-service-list--compact :is(h2, h3) {
	font-size: var(--wp--preset--font-size--large);
}

.cga-service-list--compact .cga-service-row {
	padding-block: 1.1rem;
}

/* In an ink band, body copy in the right-hand column reads at full strength. */
.cga-band-ink .wp-block-column:last-child > p:not(.is-style-note, .cga-card-more, .is-style-eyebrow) {
	color: var(--wp--preset--color--paper);
}

/* ================================================== resource pages */

/* Header: title and dek beside a fact-check card, ruled off from the body. */
.cga-resource__hero {
	border-bottom: 1px solid var(--wp--preset--color--rule);
}

.cga-resource__head > * {
	margin-block: 0;
}

.cga-resource__head > * + * {
	margin-top: 1rem;
}

.cga-factcheck {
	padding-bottom: 1.4rem;
}

.cga-factcheck > * {
	margin: 0;
}

.cga-factcheck .cga-last-verified {
	margin-top: 1rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--graphite);
}

.cga-factcheck .cga-last-verified time {
	display: block;
	margin-top: 0.35rem;
	font-family: var(--wp--preset--font-family--archivo);
	font-size: clamp(1.9rem, 3vw, 2.4rem);
	font-weight: 700;
	font-stretch: var(--wp--custom--stretch--display, 116%);
	line-height: 1;
	letter-spacing: -0.01em;
	text-transform: none;
	color: var(--wp--preset--color--ink);
}

.cga-factcheck > p:not(.cga-spec-card__title, .cga-last-verified) {
	margin-top: 0.9rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--wp--preset--color--rule);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	color: var(--wp--preset--color--graphite);
}

/* "The short version": the page's answer, framed so it reads first. */
.cga-summary {
	position: relative;
	padding: 1.6rem clamp(1.25rem, 3vw, 2rem) 1.4rem;
	background: var(--wp--preset--color--white);
	border: 1.5px solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--lg);
}

.cga-summary::before {
	content: "";
	position: absolute;
	top: -1.5px;
	left: clamp(1.25rem, 3vw, 2rem);
	width: 3rem;
	height: 4px;
	background: var(--cga-brand-gradient);
}

.cga-summary > :first-child {
	margin-top: 0;
}

.cga-summary > :last-child {
	margin-bottom: 0;
}

.cga-summary .is-style-checks {
	margin-top: 1.1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--rule);
}

/* Sources at the end of posts and resource pages: a ruled reference list. */
.wp-block-post-content h2#sources + :is(ul, ol) {
	padding: 0;
	list-style: none;
	border-top: 1.5px solid var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-post-content h2#sources + :is(ul, ol) > li {
	position: relative;
	margin: 0;
	padding: 0.75rem 0 0.75rem 1.4rem;
	border-bottom: 1px solid var(--wp--preset--color--rule);
	color: var(--wp--preset--color--graphite);
}

.wp-block-post-content h2#sources + :is(ul, ol) > li::before {
	content: "↗";
	position: absolute;
	left: 0;
	top: 0.75rem;
	font-family: var(--wp--preset--font-family--mono);
	color: var(--wp--preset--color--signal-deep);
}

@media (max-width: 781px) {
	.cga-resource__aside {
		margin-bottom: 1.5rem;
	}
}

/* ================================================== posts */

/* The topic above a post title reads as its eyebrow. */
.cga-article__topic {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.cga-article__topic::before {
	content: "";
	display: inline-block;
	width: 0.55em;
	height: 0.55em;
	margin-right: 0.65em;
	background: var(--wp--preset--color--signal);
	vertical-align: 0.05em;
}

.cga-article__topic a {
	color: var(--wp--preset--color--graphite);
	text-decoration: none;
}

.cga-article__topic a:hover {
	color: var(--wp--preset--color--ink);
}

/* The opening paragraph of a post is its lede. */
.cga-article .wp-block-post-content > p:first-child {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
	color: var(--wp--preset--color--ink);
}

/* Section headings carry the same numbers as the contents list, over a heavy rule. Both count every level-2
   heading in the page's content in order (cga_toc_headings), so the numbers always match. */
:is(.cga-article, .cga-resource) .wp-block-post-content {
	counter-reset: cga-section;
}

:is(.cga-article, .cga-resource) .wp-block-post-content h2.wp-block-heading {
	counter-increment: cga-section;
}

:is(.cga-article, .cga-resource) .wp-block-post-content h2.wp-block-heading::before {
	content: counter(cga-section, decimal-leading-zero);
	display: block;
	margin-bottom: 0.7rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--signal-deep);
}

:is(.cga-article, .cga-resource) .wp-block-post-content > h2.wp-block-heading {
	padding-top: 1.1rem;
	border-top: 1.5px solid var(--wp--preset--color--ink);
}

/* The author box closes the article with room above it. */
.cga-article .cga-author-box {
	margin-top: var(--wp--preset--spacing--60) !important;
}

/* On phones the fact-check card keeps only its date, so the article starts sooner. */
@media (max-width: 781px) {
	.cga-factcheck > p:not(.cga-spec-card__title, .cga-last-verified) {
		display: none;
	}
}

/* ================================================== blog index and topic pages */

.cga-listing .cga-resource__hero + .cga-post-grid {
	margin-top: var(--wp--preset--spacing--50);
}

.cga-archive-head > * {
	margin-block: 0;
}

.cga-archive-head > * + * {
	margin-top: 1rem;
}

/* Topic index: every topic with its post count, the current one marked. */
.cga-topic-index {
	padding-bottom: 1.1rem;
}

.cga-topic-index ul {
	margin: 0.6rem 0 0;
	padding: 0;
	list-style: none;
}

.cga-topic-index li + li {
	border-top: 1px solid var(--wp--preset--color--rule);
}

.cga-topic-index li a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.7rem 0;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.cga-topic-index li a:hover .cga-topic-index__name {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--signal);
	text-underline-offset: 0.2em;
}

.cga-topic-index__count {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	color: var(--wp--preset--color--graphite);
}

.cga-topic-index li.is-current a {
	font-weight: 600;
}

.cga-topic-index li.is-current .cga-topic-index__name::before {
	content: "";
	display: inline-block;
	width: 0.5em;
	height: 0.5em;
	margin-right: 0.6em;
	background: var(--wp--preset--color--signal);
	vertical-align: 0.08em;
}

.cga-topic-index li.is-current .cga-topic-index__count {
	color: var(--wp--preset--color--signal-deep);
}

.cga-topic-index__all {
	margin: 0.4rem 0 0;
	padding-top: 0.9rem;
	border-top: 1.5px solid var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
}

.cga-topic-index__all a {
	color: var(--wp--preset--color--signal-deep);
}

/* Post cards: ruled editorial columns rather than boxes. The whole card stays clickable. */
.is-style-card.cga-post-card {
	padding: 1.2rem 0 0.4rem;
	background: transparent;
	border: 0;
	border-top: 1.5px solid var(--wp--preset--color--ink);
	border-radius: 0;
}

.is-style-card.cga-post-card:has(:is(h2, h3) a:hover),
.is-style-card.cga-post-card:has(:is(h2, h3) a:focus-visible) {
	border-top-color: var(--wp--preset--color--signal);
}

.is-style-card.cga-post-card:has(:is(h2, h3) a:hover) .wp-block-post-title a {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--signal);
	text-underline-offset: 0.18em;
}

.cga-post-card .wp-block-post-terms {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.cga-post-card .wp-block-post-excerpt {
	color: var(--wp--preset--color--graphite);
}

.cga-post-grid .wp-block-post-template {
	row-gap: 2.75rem;
}

/* The newest post on the blog index leads, across the full width. */
.cga-post-grid--lead .wp-block-post-template > li:first-child {
	grid-column: 1 / -1;
}

.cga-post-grid--lead .wp-block-post-template > li:first-child .cga-post-card {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	grid-template-areas: "terms excerpt" "title excerpt" "title meta";
	grid-template-rows: auto auto 1fr;
	gap: 0.9rem 3rem;
	padding: 1.6rem 0 2rem;
	border-top-width: 3px;
}

.cga-post-grid--lead li:first-child .wp-block-post-terms {
	grid-area: terms;
}

.cga-post-grid--lead li:first-child .wp-block-post-title {
	grid-area: title;
	font-size: clamp(2rem, 3.4vw, 3rem);
	font-stretch: var(--wp--custom--stretch--display, 116%);
	line-height: 1.05;
	letter-spacing: -0.01em;
}

.cga-post-grid--lead li:first-child .wp-block-post-excerpt {
	grid-area: excerpt;
	align-self: end;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
}

.cga-post-grid--lead li:first-child .cga-meta-row {
	grid-area: meta;
	align-self: start;
}

@media (max-width: 781px) {
	.cga-post-grid .wp-block-post-template {
		row-gap: 1.75rem;
	}

	.cga-post-grid--lead .wp-block-post-template > li:first-child .cga-post-card {
		padding-bottom: 0.4rem;
	}

	.cga-post-grid--lead .wp-block-post-template > li:first-child .cga-post-card {
		grid-template-columns: 1fr;
		grid-template-areas: "terms" "title" "excerpt" "meta";
		grid-template-rows: auto;
	}
}

/* Author archive: the heading already names the author, so the profile shows only the bio. */
.cga-listing .cga-archive-head .cga-author__name {
	display: none;
}

.cga-listing .cga-archive-head .cga-author__bio {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	color: var(--wp--preset--color--graphite);
}

/* Search: the form sits under the results heading, full width of its column. */
.cga-listing .cga-archive-head .wp-block-search {
	max-width: 36rem;
}

/* 404: the header is the whole page, so it runs straight into the footer without a rule. */
.cga-404 .cga-resource__hero {
	border-bottom: 0;
}

.cga-404 .cga-topic-index__count {
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* Policy pages: the current document is marked "Reading" in the policy list. */
.cga-policy-nav .cga-topic-index__count {
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* On phones the footer's policy links do this job, so the text starts sooner. */
@media (max-width: 781px) {
	.cga-legal .cga-spec-col {
		display: none;
	}
}

/* Thank-you page: the visitor has just got in touch, so the "book a call" band would be one ask too many. */
body:has(.cga-thanks) :is(.wp-block-template-part:has(> .cga-cta), .cga-cta) {
	display: none;
}

.cga-thanks__next .cga-next {
	margin: 1rem 0 0.4rem;
}

.cga-thanks__next .cga-next > li {
	padding-bottom: 1rem;
}

.cga-thanks__next .cga-next > li + li {
	margin-top: 0;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--rule);
}

.cga-thanks__next .cga-next > li + li::before {
	top: 1.05rem;
}

/* With the band gone the fog section meets the footer, so drop the block gap between them. */
body:has(.cga-thanks) .wp-site-blocks > footer {
	margin-block-start: 0;
}

/* ================================================== logo */

.wp-block-image.cga-logo {
	flex-shrink: 0;
	margin: 0;
	line-height: 0;
}

.cga-logo img {
	display: block;
	height: auto;
	aspect-ratio: 640 / 170;
}

.cga-logo a {
	display: inline-block;
	border-radius: 4px;
}

.cga-logo a:focus-visible {
	outline: 2px solid var(--wp--preset--color--signal);
	outline-offset: 4px;
}

.cga-footer .cga-logo {
	margin-bottom: 1.25rem;
}

/* Smaller on phones, so the logo, the call button and the menu fit on one row. */
@media (max-width: 781px) {
	.cga-header .cga-logo img {
		width: 168px !important;
	}
}

@media (max-width: 400px) {
	.cga-header .cga-logo img {
		width: 138px !important;
	}
}

/* ================================================== brand colour */

/* Navy bands carry a soft glow of the logo's blue and violet. */
:is(.cga-figures, .cga-band-ink, .cga-footer) {
	background-color: var(--wp--preset--color--ink);
	background-image: var(--cga-ink-glow);
}

/* Outline buttons: navy outline, filling blue on hover. */
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--signal);
	background: var(--wp--preset--color--signal);
	color: var(--wp--preset--color--white);
}

/* Gradient type for a key phrase (home headline). */
.cga-grad-text {
	background: var(--cga-brand-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* The closing call to action is the brand's colour moment on every page. */
.cga-cta__card {
	border: 0;
	background: var(--cga-brand-gradient);
	color: var(--wp--preset--color--white);
	box-shadow: 0 24px 48px -28px rgb(37 99 235 / 0.55);
}

.cga-cta__card::before {
	display: none;
}

.cga-cta__card :is(h2, .cga-cta__lede, .cga-cta__list li, .is-style-eyebrow, .cga-cta__note) {
	color: var(--wp--preset--color--white);
}

.cga-cta__card .cga-cta__lede,
.cga-cta__card .cga-cta__note {
	color: rgb(255 255 255 / 0.9);
}

.cga-cta__card .is-style-eyebrow::before {
	background: var(--wp--preset--color--white);
}

.cga-cta__card .is-style-checks > li::before {
	border-color: var(--wp--preset--color--white);
}

.cga-cta__card .cga-cta__actions {
	border-color: rgb(255 255 255 / 0.28);
}

.cga-cta__card .wp-block-button:not(.is-style-outline) > .wp-block-button__link {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
}

.cga-cta__card .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}

.cga-cta__card .wp-block-button.is-style-outline > .wp-block-button__link {
	border-color: rgb(255 255 255 / 0.85);
	color: var(--wp--preset--color--white);
}

.cga-cta__card .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--white);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
}

.cga-cta__card a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--white);
}

/* ================================================== featured images (from the CGA Image Studio) */

.cga-post-card .cga-post-card__image {
	margin: 0 0 0.4rem !important;
}

.cga-post-card__image img {
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--fog);
}

/* A lead story with an image: picture on the left, the text beside it. Without one it keeps the text layout. */
.cga-post-grid--lead .wp-block-post-template > li:first-child .cga-post-card:has(.cga-post-card__image) {
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	grid-template-areas: "image terms" "image title" "image excerpt" "image meta";
	grid-template-rows: auto auto auto 1fr;
	align-items: start;
}

.cga-post-grid--lead li:first-child .cga-post-card__image {
	grid-area: image;
	margin: 0 !important;
}

.cga-post-grid--lead li:first-child .cga-post-card:has(.cga-post-card__image) .wp-block-post-title {
	font-size: clamp(1.8rem, 2.6vw, 2.5rem);
}

.cga-post-grid--lead li:first-child .cga-post-card:has(.cga-post-card__image) .wp-block-post-excerpt {
	align-self: start;
}

@media (max-width: 781px) {
	.cga-post-grid--lead .wp-block-post-template > li:first-child .cga-post-card:has(.cga-post-card__image) {
		grid-template-columns: 1fr;
		grid-template-areas: "image" "terms" "title" "excerpt" "meta";
	}
}

/* ChatGPT-generated illustrations: the featured image above the article, and images placed in posts and pages. */
.cga-article__image {
	max-width: 780px;
	margin-bottom: var(--wp--preset--spacing--40);
}

.cga-article__image img,
.wp-block-image.cga-ai-img img {
	border-radius: var(--wp--custom--radius--lg);
	box-shadow: 0 1px 0 rgb(15 23 42 / 0.04), 0 18px 40px -24px rgb(15 23 42 / 0.28);
}

.wp-block-image.cga-ai-img {
	margin-block: var(--wp--preset--spacing--50) !important;
}

/* In a page section the illustration sits below the section's content at a readable width. */
section .wp-block-image.cga-ai-img {
	max-width: 960px;
}
