/*
 * GFD 2026: /insights/ index cards (Impeccable fix 4). Loaded only on the card loop views.
 * Colours are the site's own: paper #F9F9F5, ink #242E35, forest #113524.
 * Kill switch: define( 'GFD_INSIGHTS_INDEX', false ); in wp-config.php.
 */
body.gfd-ii {
	--gfd-ii-paper: #f9f9f5;
	--gfd-ii-ink: #242e35;
	--gfd-ii-copy: #49545b;
	--gfd-ii-line: rgba(36, 46, 53, 0.14);
	--gfd-ii-forest: #113524;
	--gfd-ii-forest-deep: #0b2619;
	--gfd-ii-tap: 32px;
}

/* Card titles are h2 now (h1 then h2), at the old h3 size. Fakt Pro Semi Bold, like the header:
   each Fakt cut is its own family, so weight stays 400 and the browser never fakes bold. */
.gfd-ii .card-body .gfd-ii-card__title {
	font-family: 'Fakt Pro Semi Bold', 'Fakt Pro Medium', system-ui, sans-serif;
	font-weight: 400;
	color: var(--gfd-ii-ink);
	font-size: 18px;
	line-height: 1.17;
	margin-top: 0;
	margin-bottom: 18px;
}
.gfd-ii .card-body .gfd-ii-card__title a { color: inherit; display: block; min-height: var(--gfd-ii-tap); }

/* Read More stays where it was; only the tap area grows to 32px. */
.gfd-ii .card-body .read-more {
	display: inline-flex;
	align-items: center;
	min-height: var(--gfd-ii-tap);
}

/* Type-only card: a post with no featured image gets a hairline card, title and excerpt, no empty box. */
.gfd-ii .gfd-ii-card--type {
	background: transparent;
	border: 1px solid var(--gfd-ii-line);
	box-shadow: none;
}
.gfd-ii .gfd-ii-card--type .card-body,
.gfd-ii .gfd-ii-card--type .card-footer { background: transparent; }
.gfd-ii .gfd-ii-card--type .card-body { display: flex; flex-direction: column; padding-top: 32px; }
.gfd-ii .gfd-ii-card--type .gfd-ii-card__title { font-size: 24px; line-height: 1.15; }
.gfd-ii .gfd-ii-card--type .card-body p { color: var(--gfd-ii-copy); }
.gfd-ii .gfd-ii-card--type .read-more { margin-top: auto; align-self: flex-start; }

/* Chips: popular keywords in the hero and the category chip on each card. */
.gfd-ii .non-elem-header .badge,
.gfd-ii .card-footer .badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--gfd-ii-tap);
	padding-top: 0;
	padding-bottom: 0;
}

/* Pagination: 32px minimum, and the row no longer pokes 12px past the page edge. */
.gfd-ii .pagination-wrapper { margin-left: 0; margin-right: 0; }
.gfd-ii .pagination { flex-wrap: wrap; }
.gfd-ii .pagination .page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--gfd-ii-tap);
	min-height: var(--gfd-ii-tap);
}

/* The one filled action, after the first row of cards. */
.gfd-ii .gfd-ii-cta { margin: 8px 0 32px; }
.gfd-ii .gfd-ii-cta__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	padding: 24px 0;
	border-top: 1px solid var(--gfd-ii-line);
	border-bottom: 1px solid var(--gfd-ii-line);
}
.gfd-ii .gfd-ii-cta__line {
	margin: 0;
	font-size: 20px;
	line-height: 1.3;
	color: var(--gfd-ii-ink);
}
.gfd-ii .gfd-ii-cta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 24px;
	border-radius: 8px;
	background: var(--gfd-ii-forest);
	color: var(--gfd-ii-paper);
	font-family: 'Fakt Pro Semi Bold', 'Fakt Pro Medium', system-ui, sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 1;
	text-decoration: none;
	transition: background-color 160ms ease, transform 160ms ease;
}
.gfd-ii .gfd-ii-cta__btn:hover,
.gfd-ii .gfd-ii-cta__btn:focus { background: var(--gfd-ii-forest-deep); color: var(--gfd-ii-paper); text-decoration: none; }
.gfd-ii .gfd-ii-cta__btn:active { transform: translateY(1px); }
.gfd-ii .gfd-ii-cta__btn:focus-visible { outline: 2px solid var(--gfd-ii-forest); outline-offset: 3px; }
@media (max-width: 575px) {
	.gfd-ii .gfd-ii-cta__btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.gfd-ii .gfd-ii-cta__btn { transition: none; }
	.gfd-ii .gfd-ii-cta__btn:active { transform: none; }
}

/*
 * The header's "Get started", outlined on /insights/ and its /page/N/ only (body.gfd-ii-home), so the
 * forest "Show me where I stand" is the one filled primary in view. Same look as gfd-one PR 889's
 * .gfdnav__cta--outline, using the header's own nav.css tokens. The phone drawer's button stays filled.
 */
body.gfd-ii-home .gfdnav .gfdnav__actions .gfdnav__cta {
	background: transparent;
	color: var(--gfdnav-forest);
	box-shadow: inset 0 0 0 1px var(--gfdnav-forest);
	border-radius: 999px;
}
body.gfd-ii-home .gfdnav .gfdnav__actions .gfdnav__cta:hover {
	background: var(--gfdnav-wash);
	color: var(--gfdnav-forest-deep);
	box-shadow: inset 0 0 0 1px var(--gfdnav-forest-deep);
}
body.gfd-ii-home .gfdnav .gfdnav__actions .gfdnav__cta:active { box-shadow: inset 0 0 0 1px var(--gfdnav-forest-deep); }
