/*
Theme Name: Platform KSG
Theme URI: https://platform-ksg.nl
Description: Standalone block theme for Platform Kleinschalige Schapen- en Geitenhouders. Built to the Autive WP standards.
Author: Autive
Author URI: https://autive.nl
Version: 2.3.2
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.2
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ksg
Tags: block-theme, full-site-editing
*/

/* ------------------------------------------------------------------ *\
 * KSG child theme - vanilla CSS for what theme.json cannot express.
 * Senior-friendly UX baseline + KSG-specific micro-styles.
 *
 * Tokens (from child theme.json):
 *   primary         #4E7D1F   pasture green - buttons, links
 *   primary-bright  #80C03A   leaf green - accents, hover backgrounds
 *   secondary       #1F3A6B   KSG blue - headings
 *   accent          #C97B3A   clay - rural decorative
 *   earth           #7A5A3A   warm brown
 *   surface         #F5F1E8   wool/cream
 *   background      #FFFFFF
 *   foreground      #1A2030
\* ------------------------------------------------------------------ */

:root {
	--ksg-tap: 48px;
	--ksg-ring: 3px;
	--ksg-ring-color: var(--wp--preset--color--secondary);
	--ksg-radius-card: 14px;
	--ksg-radius-pill: 999px;

	--ksg-topo-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 200' fill='none' stroke='%2380C03A' stroke-width='1.2' opacity='0.18'%3E%3Cpath d='M0 50 Q200 10 400 50 T800 50'/%3E%3Cpath d='M0 90 Q200 50 400 90 T800 90'/%3E%3Cpath d='M0 130 Q200 90 400 130 T800 130'/%3E%3Cpath d='M0 170 Q200 130 400 170 T800 170'/%3E%3C/svg%3E");

	/* Hill cutout — fill matches surface (#F5F1E8) so the next section reads as one continuous wool field. */
	--ksg-hill-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0 60 C 240 10, 480 100, 720 55 C 960 15, 1200 95, 1440 50 L 1440 120 L 0 120 Z' fill='%23F5F1E8'/%3E%3C/svg%3E");
}

/* === Senior-friendly baseline =============================== */

/* The ring colour follows its context. No single palette colour clears 3:1
   (WCAG 1.4.11) on both the cream sections and the blue bands: secondary is
   9.93:1 on cream but 1.00:1 on the blue band, and accent was 2.92:1 on cream.
   Custom properties inherit, so a dark section only has to set the variable
   and every focusable element inside it follows - including sections an
   editor builds with the secondary background colour. */
*:focus-visible {
	outline: var(--ksg-ring) solid var(--ksg-ring-color);
	outline-offset: 2px;
	border-radius: 2px;
}

.wp-block-button .wp-block-button__link,
.wp-block-search__button,
input[type="submit"],
button:not(.ksg-members-arrow) {
	min-height: var(--ksg-tap);
}

/* Underlines only where a link sits inside a sentence: running text in post
   and page content. There a reader cannot tell a link from the words around
   it by position, and this audience should not have to rely on colour. The
   line is thin and at 40% of the link colour, so it marks without shouting;
   on hover it goes to full colour. Everywhere else - navigation, cards, arrow
   links, footer, contact details - context already says "this is a link", so
   no underline (changed 2026-09-24; theme.json sets the global default to none). */
.wp-block-post-content :where(p, li, dd, figcaption, td) a:not([class]),
.ksg-newsletter-fineprint a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}
.wp-block-post-content :where(p, li, dd, figcaption, td) a:not([class]):hover,
.ksg-newsletter-fineprint a:hover {
	text-decoration-color: currentColor;
}

/* === Header ================================================== */

/* Core puts the root block gap (1rem) between the site's top-level blocks,
   so main sat 16px below the header: a white strip above every blue banner.
   The header and footer carry their own padding; nothing may sit between. */
.wp-site-blocks > main,
.wp-site-blocks > footer {
	margin-block-start: 0;
}

.ksg-header {
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--earth) 18%, transparent) !important;
}
/* Top-level items. One cue per state and the weight never changes:
   - hover/focus: a pale cool tint, text to KSG blue;
   - current page (or the thema section you are in): the same tint, fuller.
   The earlier version stacked a cream fill, a green bar under the link and a
   colour change on hover, plus bold green on the current item. Measured:
   secondary on --ksg-nav-hover 11.3:1, on --ksg-nav-current 10.6:1. */
.ksg-header {
	--ksg-nav-hover: color-mix(in srgb, var(--wp--preset--color--surface-cool) 55%, var(--wp--preset--color--background));
	--ksg-nav-current: var(--wp--preset--color--surface-cool);
}
.ksg-header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.6rem 0.9rem;
	border-radius: 8px;
	text-decoration: none;
	color: var(--wp--preset--color--foreground);
	font-weight: 500;
}
.ksg-header .wp-block-navigation .wp-block-navigation-item__content::after {
	content: none;
}
.ksg-header .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item:not(.has-child) > .wp-block-navigation-item__content:hover,
.ksg-header .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item:not(.has-child) > .wp-block-navigation-item__content:focus-visible {
	background: var(--ksg-nav-hover);
	color: var(--wp--preset--color--secondary);
}
.ksg-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.ksg-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content:hover {
	background: var(--ksg-nav-current);
	color: var(--wp--preset--color--secondary);
}

/* --- Submenu trigger ------------------------------------------ */

/* "Thema's" and its chevron read as one item: the tint sits on the <li>, the
   link gives up most of its right padding and the chevron button sits right
   against the label. The button stays a real 28x44 target of its own, over
   the 24px AA minimum (2.5.8), so it never steals a tap from the link. */
@media (min-width: 600px) {
	.ksg-header .wp-block-navigation .wp-block-navigation-item.has-child {
		display: flex;
		align-items: center;
		border-radius: 8px;
	}
}
.ksg-header .wp-block-navigation .has-child > .wp-block-navigation-item__content {
	padding-right: 0.15rem;
	background: transparent !important;
}
.ksg-header .wp-block-navigation .has-child:hover,
.ksg-header .wp-block-navigation .has-child:focus-within {
	background: var(--ksg-nav-hover);
}
.ksg-header .wp-block-navigation .has-child.current-menu-ancestor,
.ksg-header .wp-block-navigation .has-child.current-menu-item {
	background: var(--ksg-nav-current);
}
.ksg-header .wp-block-navigation .has-child:hover > .wp-block-navigation-item__content,
.ksg-header .wp-block-navigation .has-child:focus-within > .wp-block-navigation-item__content,
.ksg-header .wp-block-navigation .has-child.current-menu-ancestor > .wp-block-navigation-item__content,
.ksg-header .wp-block-navigation .has-child.current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--secondary);
}
.ksg-header .wp-block-navigation .wp-block-navigation__submenu-icon {
	display: inline-flex !important;
	align-items: center;
	justify-content: flex-start;
	width: 28px;
	min-height: 44px;
	margin: 0 !important;
	padding: 0 0 0 0.2rem !important;
	color: inherit;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 8px 8px 0;
	cursor: pointer;
	transition: transform 0.2s ease;
}
.ksg-header .wp-block-navigation .wp-block-navigation__submenu-icon svg {
	width: 0.75rem;
	height: 0.75rem;
	display: block;
	fill: none;
	transition: transform 0.2s ease;
}
.ksg-header .wp-block-navigation .wp-block-navigation__submenu-icon svg path {
	stroke: currentColor;
	stroke-width: 2;
	fill: none;
}
.ksg-header .wp-block-navigation .has-child:hover > .wp-block-navigation__submenu-icon,
.ksg-header .wp-block-navigation .has-child:focus-within > .wp-block-navigation__submenu-icon,
.ksg-header .wp-block-navigation .has-child.current-menu-ancestor > .wp-block-navigation__submenu-icon {
	color: var(--wp--preset--color--secondary);
}
.ksg-header .wp-block-navigation .has-child:hover > .wp-block-navigation__submenu-icon svg,
.ksg-header .wp-block-navigation .has-child:focus-within > .wp-block-navigation__submenu-icon svg,
.ksg-header .wp-block-navigation .wp-block-navigation__submenu-icon[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

/* Submenu panel — desktop only. Mobile uses the responsive overlay. */
@media (min-width: 600px) {
	/* Hover bridge: covers the 6px gap between the trigger LI and the panel
	   so the cursor never leaves a hoverable area on its way down. Height must
	   match the panel's top offset below. */
	.ksg-header .wp-block-navigation .has-child::after {
		content: "";
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		height: 6px;
		pointer-events: auto;
	}

	.ksg-header .wp-block-navigation .has-child > .wp-block-navigation__submenu-container {
		--ksg-sub-pad: 0.4rem;
		position: absolute;
		/* A floating card 6px under the trigger. An earlier version dropped it
		   from "the bottom edge of the header bar" via the header's bottom
		   padding, but the logo makes the header taller than the nav row, so
		   the panel landed mid-header with its square top corners poking
		   through the white band. All four corners rounded: it is a layer over
		   whatever is beneath it, not an extension of the header. */
		top: calc(100% + 6px);
		left: 0 !important;
		right: auto !important;
		width: max-content;
		max-width: min(22rem, calc(100vw - 2rem));
		height: auto;
		min-width: 0;
		margin: 0;
		gap: 0;
		row-gap: 0;
		padding: var(--ksg-sub-pad);
		overflow: visible;
		background: var(--wp--preset--color--background);
		border: 1px solid color-mix(in srgb, var(--wp--preset--color--secondary) 12%, transparent);
		border-radius: 12px;
		box-shadow: 0 24px 48px -24px rgba(31, 58, 107, 0.30),
		            0 6px 14px -10px rgba(31, 58, 107, 0.18);
		list-style: none;
		opacity: 0;
		transform: translateY(4px);
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
		z-index: 60;
	}

	.ksg-header .wp-block-navigation .has-child:hover > .wp-block-navigation__submenu-container,
	.ksg-header .wp-block-navigation .has-child:focus-within > .wp-block-navigation__submenu-container,
	.ksg-header .wp-block-navigation .wp-block-navigation__submenu-icon[aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
		opacity: 1;
		transform: translateY(0);
		visibility: visible;
		pointer-events: auto;
		transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
	}

	.ksg-header .wp-block-navigation .wp-block-navigation__submenu-container li {
		display: block;
		margin: 0;
	}
	.ksg-header .wp-block-navigation .wp-block-navigation__submenu-container li + li {
		margin-top: 2px;
	}

	.ksg-header .wp-block-navigation .wp-block-navigation__submenu-container a {
		display: flex;
		align-items: center;
		min-height: var(--ksg-tap);
		padding: 0.55rem 0.85rem;
		border-radius: 8px;
		font-weight: 500;
		color: var(--wp--preset--color--foreground);
		line-height: 1.25;
		white-space: nowrap;
	}
	/* Same two states as the top level, same tints. */
	.ksg-header .wp-block-navigation .wp-block-navigation__submenu-container a:hover,
	.ksg-header .wp-block-navigation .wp-block-navigation__submenu-container a:focus-visible {
		background: var(--ksg-nav-hover);
		color: var(--wp--preset--color--secondary);
	}
	.ksg-header .wp-block-navigation .wp-block-navigation__submenu-container .current-menu-item > a {
		background: var(--ksg-nav-current);
		color: var(--wp--preset--color--secondary);
	}
}

@media (prefers-reduced-motion: reduce) {
	/* The open-state selectors re-declare transition at higher specificity
	   than the bare container selector, so they must be listed here too or
	   the fade wins from this block. Found in the 2026-09-04 a11y review. */
	.ksg-header .wp-block-navigation .wp-block-navigation__submenu-icon,
	.ksg-header .wp-block-navigation .has-child > .wp-block-navigation__submenu-container,
	.ksg-header .wp-block-navigation .has-child:hover > .wp-block-navigation__submenu-container,
	.ksg-header .wp-block-navigation .has-child:focus-within > .wp-block-navigation__submenu-container,
	.ksg-header .wp-block-navigation .wp-block-navigation__submenu-icon[aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
		transition: none;
	}
}

/* --- Mobile overlay -------------------------------------------- */

/* Core's overlay shows every submenu open and has no use for the chevron, but
   the chevron rule above is unscoped, so the button landed on a line of its
   own under "Thema's", and the overlay inherited the desktop bar's right
   alignment. The overlay is its own design now: full-width rows with hairline
   dividers, the thema's as a nested list on a rail, one soft tint for the
   current page (the same --ksg-nav-current as desktop, weight never changes),
   and the KSG topo pattern fading in at the bottom as on the hero. */
.ksg-header .wp-block-navigation__responsive-container.is-menu-open {
	--navigation-layout-justification-setting: stretch;
	--navigation-layout-justify: flex-start;
	--navigation-layout-align: stretch;
	--ksg-ov-divider: color-mix(in srgb, var(--wp--preset--color--secondary) 10%, transparent);
	padding: 1rem 1.5rem 2rem !important;
	background: var(--wp--preset--color--background) !important;
	overflow-y: auto;
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open::before {
	content: "";
	position: fixed;
	inset: auto 0 0 0;
	height: 14rem;
	background: var(--ksg-topo-svg) center bottom / cover no-repeat;
	mask-image: linear-gradient(to top, black 10%, transparent 90%);
	opacity: 0.6;
	pointer-events: none;
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close {
	position: relative;
	z-index: 1;
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	top: 1rem;
	right: 1rem;
	display: grid;
	place-items: center;
	width: var(--ksg-tap);
	height: var(--ksg-tap);
	border-radius: 999px;
	color: var(--wp--preset--color--secondary);
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: stretch;
	padding-top: 3.5rem !important;
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: stretch;
	gap: 0 !important;
	width: 100%;
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
	display: block;
	width: 100%;
	padding-block: 0.2rem;
	border-top: 1px solid var(--ksg-ov-divider);
	background: transparent !important;
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:first-child {
	border-top: 0;
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: flex !important;
	align-items: center;
	min-height: var(--ksg-tap);
	margin-inline: -0.75rem;
	padding: 0.5rem 0.75rem !important;
	border-radius: 10px;
	font-size: 1.25rem;
	font-weight: 500;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--foreground);
}
/* Thema's folds. Core reports every submenu as open while the overlay is
   open (isSubmenuOpen returns true for the whole overlay), so its chevron
   cannot drive this. ksg.js adds its own .ksg-sub-toggle next to the link,
   shown only in the overlay; the thema's open when the <li> has
   .ksg-sub-open. On a thema page it starts open. */
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon,
.ksg-header .ksg-sub-toggle {
	display: none !important;
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .has-child {
	display: grid !important;
	grid-template-columns: 1fr auto;
	align-items: center;
	column-gap: 0.5rem;
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .has-child > .wp-block-navigation-item__content {
	margin-right: 0;
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .ksg-sub-toggle {
	display: grid !important;
	place-items: center;
	width: var(--ksg-tap);
	height: var(--ksg-tap);
	margin: 0 -0.75rem 0 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--wp--preset--color--secondary);
	cursor: pointer;
}
.ksg-header .ksg-sub-toggle svg {
	width: 1.1rem;
	height: 1.1rem;
	transition: transform 0.2s ease;
}
.ksg-header .ksg-sub-toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}
@media (prefers-reduced-motion: reduce) {
	.ksg-header .ksg-sub-toggle svg { transition: none; }
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .has-child > .wp-block-navigation__submenu-container {
	grid-column: 1 / -1;
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .has-child:not(.ksg-sub-open) > .wp-block-navigation__submenu-container {
	display: none !important;
}
/* The thema's: smaller, on a rail, so the hierarchy reads without a chevron. */
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	display: flex !important;
	flex-direction: column;
	align-items: stretch !important;
	gap: 0 !important;
	margin: 0.15rem 0 0.4rem 0.1rem !important;
	padding: 0 0 0 1.25rem !important;
	border-left: 2px solid var(--ksg-ov-divider) !important;
	background: transparent !important;
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 1.0625rem;
	color: color-mix(in srgb, var(--wp--preset--color--foreground) 82%, var(--wp--preset--color--background));
}
.ksg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--secondary);
}

/* === Hero ==================================================== */

.ksg-hero {
	position: relative;
	overflow: hidden;
	padding-bottom: clamp(9rem, 10vw, 12rem) !important; /* room for stats + hill cutout */
	background: var(--wp--preset--color--background) !important;
}
.ksg-hero::before {
	content: "";
	position: absolute;
	inset: -2rem -2rem auto auto;
	width: 38rem;
	height: 24rem;
	background: var(--ksg-topo-svg) right top / cover no-repeat;
	pointer-events: none;
	z-index: 0;
	mask-image: linear-gradient(225deg, black 30%, transparent 80%);
}
.ksg-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px; /* avoid hairline gap between cutout and next section */
	height: 90px;
	background: var(--ksg-hill-svg) center bottom / 100% 100% no-repeat;
	pointer-events: none;
	z-index: 1;
}
.ksg-hero > .wp-block-columns {
	position: relative;
	z-index: 2;
}
.ksg-hero-photo {
	position: relative;
	border-radius: 18px;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	box-shadow: 0 30px 60px -28px rgba(31, 58, 107, 0.35);
}
.ksg-hero-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ksg-hero-photo::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(190deg, transparent 50%, rgba(31, 58, 107, 0.45));
	pointer-events: none;
}
/* The callout sits above the photo's gradient overlay, and its title link is
   stretched over the whole card so the card is one big tap target. */
.ksg-hero-callout {
	z-index: 1;
}
.ksg-hero-callout-link {
	color: var(--wp--preset--color--secondary);
	text-decoration: none;
}
.ksg-hero-callout-link::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 14px;
}
.ksg-hero-callout-link:hover {
	color: var(--wp--preset--color--primary);
}
.ksg-hero-callout:has(.ksg-hero-callout-link:focus-visible) {
	outline: 3px solid var(--ksg-ring-color, var(--wp--preset--color--secondary));
	outline-offset: 3px;
}
.ksg-hero-callout-link:focus-visible {
	outline: none;
}
/* === Thema grid - the centerpiece ============================ */

/* Themas continues the wool surface from the hero hill cutout — visually one
   continuous land. Bottom edge of section flows into news section (also wool). */
.ksg-themas {
	background: var(--wp--preset--color--surface) !important;
	padding-top: 4rem !important;
}
.ksg-thema-grid {
	/* Flex, not grid: seven cards never fill a grid's last row, and a grid
	   leaves that row hanging left. Flex centres it, so 4 + 3 on the homepage
	   and 3 + 3 + 1 inside the page content both read as intended. The card
	   width follows the container, not the viewport: the same markup is used
	   full-bleed on the homepage and inside the narrower content on /themas/. */
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
	margin-top: 3rem;
}
/* The grid is a core group, so it carries is-layout-flow, which gives every
   child but the first a 1rem block-start margin. That margin would push one
   card out of line with its row. */
.ksg-thema-grid > .ksg-thema-card {
	margin-block-start: 0;
	/* border-box, or the card's padding is added on top of the basis and
	   four cards no longer fit a row: measured 362px on a 320px basis. */
	box-sizing: border-box;
	flex: 0 1 calc((100% - 3 * 1.5rem) / 4);
	min-width: min(100%, 240px);
}

.ksg-thema-card {
	margin-block-start: 0;
}

.ksg-thema-card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 2rem 1.75rem;
	min-height: 280px;
	background: var(--wp--preset--color--background);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--earth) 14%, transparent);
	border-top: 4px solid var(--wp--preset--color--primary-bright);
	border-radius: var(--ksg-radius-card);
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
	transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.ksg-thema-card:hover,
.ksg-thema-card:focus-visible {
	transform: translateY(-3px);
	background: color-mix(in srgb, var(--wp--preset--color--primary-bright) 8%, var(--wp--preset--color--background));
	border-top-color: var(--wp--preset--color--primary);
	box-shadow: 0 22px 40px -22px rgba(78, 125, 31, 0.32);
}
.ksg-thema-icon {
	width: 2.75rem;
	height: 2.75rem;
	color: var(--wp--preset--color--primary);
	flex-shrink: 0;
}
.ksg-thema-title {
	margin: auto 0 0;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.5rem;
	color: var(--wp--preset--color--secondary);
	line-height: 1.15;
}
.ksg-thema-desc {
	margin: 0;
	color: var(--wp--preset--color--foreground);
	opacity: 0.8;
	line-height: 1.45;
}
.ksg-thema-count {
	display: inline-block;
	align-self: flex-start;
	padding: 0.3rem 0.85rem;
	border-radius: var(--ksg-radius-pill);
	background: var(--wp--preset--color--primary-bright);
	color: var(--wp--preset--color--secondary);
	font-size: 0.85rem;
	font-weight: 700;
}
/* Homepage variant: icon, title and count only, so the section points at the
   themas without competing with the hero. The full card is on /themas/. */
.ksg-thema-grid--compact {
	gap: 1rem;
}
.ksg-thema-grid--compact > .ksg-thema-card {
	flex-basis: calc((100% - 3rem) / 4);
	min-height: 0;
	padding: 1.5rem 1.25rem 1.25rem;
	gap: 0.75rem;
}
.ksg-thema-grid--compact .ksg-thema-icon {
	width: 2.25rem;
	height: 2.25rem;
}
.ksg-thema-grid--compact .ksg-thema-title {
	font-size: 1.25rem;
}

/* === Themahouder (thema page) ================================ */

.ksg-themahouder {
	margin: 3rem auto 0;
	padding: 1.75rem 2rem;
	background: var(--wp--preset--color--surface);
	border-radius: 14px;
}
.ksg-themahouder__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.15;
}
.ksg-themahouder__lead {
	margin: 0.5rem 0 0;
	max-width: 52ch;
}
.ksg-themahouder .ksg-people {
	margin-top: 1rem;
}
.ksg-themahouder .ksg-people > li {
	border-top-color: color-mix(in srgb, var(--wp--preset--color--earth) 18%, transparent);
}
.ksg-themahouder .ksg-people > li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}
/* Primary green measures 4.36:1 on the cream surface (4.91:1 on white), so
   the mail link, the only way to reach the themahouder, goes secondary blue
   here: 10.6:1. */
.ksg-themahouder .ksg-people .ksg-people__links a {
	color: var(--wp--preset--color--secondary);
}

/* Stand-alone links that are not running text: a 22px line box is under the
   24px of WCAG 2.5.8, so give them a padded box without changing the rhythm. */
.ksg-people .ksg-people__links a,
.ksg-docs .ksg-docs__title a,
.ksg-footer-list a {
	display: inline-block;
	padding-block: 0.35rem;
	margin-block: -0.35rem;
}

/* === Documents register (/documenten/) ======================= */

/* One entry per document: the editor writes a heading with the link and a
   paragraph with thema, author, version and date under it. */
.ksg-docs {
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}
.ksg-docs > li {
	margin: 0;
	padding-block: 1rem;
	border-top: var(--stroke-hair) solid var(--border-subtle);
}
.ksg-docs > li:last-child {
	border-bottom: var(--stroke-hair) solid var(--border-subtle);
}
.ksg-docs__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.3;
}
.ksg-docs .ksg-docs__title a {
	text-decoration: none;
	color: var(--wp--preset--color--primary);
}
.ksg-docs .ksg-docs__title a:hover,
.ksg-docs .ksg-docs__title a:focus-visible {
	text-decoration: underline;
}
.ksg-docs__meta {
	margin: 0.2rem 0 0;
	color: var(--text-muted);
}

/* === News three-up ===========================================
   News section continues the wool surface from themas with no gap. */

.ksg-news {
	background: var(--wp--preset--color--surface) !important;
	padding-top: 1rem !important;     /* themas already has bottom padding */
	padding-bottom: var(--wp--custom--section--y) !important;
}
.ksg-news-card {
	overflow: hidden;
	background: var(--wp--preset--color--background) !important;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	display: flex;
	flex-direction: column;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--earth) 12%, transparent) !important;
}
.ksg-news-card:hover,
.ksg-news-card:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 28px 48px -28px rgba(31, 58, 107, 0.35);
}
.ksg-news-card .wp-block-post-featured-image { margin: 0 !important; }
.ksg-news-card .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
}
.ksg-news-card .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--secondary);
}
.ksg-news-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}
.ksg-news-card .wp-block-post-excerpt__more-link {
	color: var(--wp--preset--color--primary);
	font-weight: 700;
	margin-top: 0.5rem;
	display: inline-block;
}

/* === Single post: prev/next + related ======================== */

/* Ghost cards in the news-card language: bordered, rounded, whole card
   clickable, hover lift. The eyebrow label says what the card does, so
   the title needs no underline. */
.ksg-post-nav-cards {
	margin-top: 3.5rem;
	padding-top: 1.75rem;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--earth) 18%, transparent);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
}
.ksg-post-nav-card {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 1.25rem 1.5rem;
	background: var(--wp--preset--color--background);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--earth) 12%, transparent);
	border-radius: var(--ksg-radius-card);
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ksg-post-nav-card:hover,
.ksg-post-nav-card:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 28px 48px -28px rgba(31, 58, 107, 0.35);
}
/* The next card keeps the right column even when it is the only one. */
.ksg-post-nav-card--prev { grid-column: 1; }
.ksg-post-nav-card--next {
	grid-column: 2;
	text-align: right;
	align-items: flex-end;
}
.ksg-post-nav-label {
	color: var(--wp--preset--color--earth);
	font-size: 0.95rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.ksg-post-nav-title {
	color: var(--wp--preset--color--secondary);
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1.3;
}
.ksg-post-nav-card:hover .ksg-post-nav-title,
.ksg-post-nav-card:focus-visible .ksg-post-nav-title {
	color: var(--wp--preset--color--primary);
}
@media (max-width: 600px) {
	.ksg-post-nav-cards { grid-template-columns: 1fr; }
	.ksg-post-nav-card--prev,
	.ksg-post-nav-card--next { grid-column: 1; }
	.ksg-post-nav-card--next { text-align: left; align-items: flex-start; }
}

/* Quiet tertiary action under the nav cards: smaller, muted, centered.
   75% foreground on white still measures ~6.5:1. */
.ksg-post-back a {
	font-size: 1rem;
	color: color-mix(in srgb, var(--wp--preset--color--foreground) 75%, transparent);
}
.ksg-post-back a:hover,
.ksg-post-back a:focus-visible {
	color: var(--wp--preset--color--secondary);
}

/* Hand-rendered card grid in the related-posts pattern. The cards reuse the
   .ksg-news-card classes, so only the grid and the card innards that the
   block version set inline need rules here. */
.ksg-related-grid {
	display: grid;
	/* auto-fit, not auto-fill: with three cards on the wide width, auto-fill
	   keeps an empty fourth track and the cards huddle left. */
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.25rem;
}
.ksg-related-grid .ksg-news-card { border-radius: 14px; }
.ksg-related-grid .ksg-news-card > a img {
	width: 100%;
	/* height:auto, or the img's height attribute pins the intrinsic height
	   and the aspect-ratio below never engages. */
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
}
.ksg-news-card-body {
	padding: 1.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.ksg-news-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	font-weight: 500;
}
.ksg-news-card-body h3 {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.15;
	font-weight: 700;
	margin: 0;
}

/* === /nieuws/ thema filter ====================================
   Plain links, one per thema, so every filtered view has its own URL and
   works without JavaScript. The current choice is marked by aria-current and
   by a filled chip, not by colour alone: the fill changes and a check mark is
   added. */
.ksg-filter {
	margin-top: 3rem;
}
.ksg-filter__label {
	margin: 0 0 0.75rem;
	font-weight: 700;
	color: var(--wp--preset--color--secondary);
}
.ksg-filter__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ksg-filter__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-block-size: 48px;
	padding: 0.5rem 1.1rem;
	border: 2px solid var(--wp--preset--color--secondary);
	border-radius: var(--ksg-radius-pill, 999px);
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--secondary);
	font-weight: 600;
	text-decoration: none;
	line-height: 1.2;
}
.ksg-filter__chip:hover {
	background: var(--wp--preset--color--surface-cool);
}
.ksg-filter__chip[aria-current="page"] {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--background);
}
.ksg-filter__chip[aria-current="page"]::before {
	content: "\2713";
	font-weight: 700;
}
.ksg-filter__count {
	font-weight: 500;
}
.ksg-filter-status {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem 2rem;
	margin-top: 2.5rem;
}
.ksg-filter-status__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-large);
	color: var(--wp--preset--color--secondary);
}

/* === Thema page ===============================================
   Heading row of a hand-rendered section: title left, link right, wrapping
   under each other on narrow screens. Same arrangement as the news section on
   the homepage, which builds it from blocks. */
.ksg-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 2rem;
}
/* Eight articles as text cards. No photos: the thema pages would otherwise
   show the same stock image eight times over. */
.ksg-article-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: 1.25rem;
	margin: 3rem auto 0;
	padding: 0;
	list-style: none;
}
.ksg-article-list__item {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin: 0;
	padding: 1.5rem 1.5rem 1.75rem;
	background: var(--wp--preset--color--background);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--earth) 12%, transparent);
	border-top: 4px solid var(--wp--preset--color--primary-bright);
	border-radius: 14px;
}
.ksg-article-list__item:focus-within {
	box-shadow: 0 22px 40px -24px rgba(31, 58, 107, 0.35);
}
.ksg-article-list__date {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	color: var(--wp--preset--color--foreground);
}
.ksg-article-list__title {
	margin: 0;
	font-size: 1.5rem;
	line-height: 1.2;
}
.ksg-article-list__title a {
	color: var(--wp--preset--color--secondary);
	text-decoration: none;
}
/* The title link covers the whole card: one big tap target. */
.ksg-article-list__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 14px;
}
.ksg-article-list__item:hover .ksg-article-list__title a {
	color: var(--wp--preset--color--primary);
}
.ksg-article-list__excerpt {
	margin: 0;
	line-height: 1.5;
}

/* "Ons standpunt" on a thema page: a group the editor can keep, move or
   delete. Cream panel with a green rule, so the platform's own position stands
   apart from the explanation around it. */
.ksg-standpunt {
	margin-block: 2.5rem;
	padding: 1.75rem 2rem;
	background: var(--wp--preset--color--surface);
	border-left: 6px solid var(--wp--preset--color--primary);
	border-radius: 0 14px 14px 0;
}
.ksg-standpunt > :first-child {
	margin-top: 0;
}
.ksg-standpunt > :last-child {
	margin-bottom: 0;
}
/* The editor's h2s sit one level under the page title; at the global h2 size
   they shouted louder than the banner. */
.ksg-thema-body .wp-block-post-content h2 {
	margin-top: 2.5rem;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.15;
}

/* === Newsletter CTA ========================================== */

.ksg-newsletter {
	position: relative;
	background: linear-gradient(135deg, var(--wp--preset--color--secondary) 0%, #16294B 100%) !important;
}
.ksg-newsletter::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--ksg-topo-svg) center / 1200px no-repeat;
	opacity: 0.2;
	pointer-events: none;
}
.ksg-newsletter > * { position: relative; z-index: 1; }
.ksg-newsletter h2,
.ksg-newsletter .ksg-newsletter-bullets {
	color: #fff;
}
.ksg-newsletter-bullets {
	list-style: none !important;
	padding-left: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.ksg-newsletter-bullets li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	color: rgba(255, 255, 255, 0.92);
	font-size: 1.05rem;
}
.ksg-newsletter-bullets li > span[aria-hidden="true"] {
	color: var(--wp--preset--color--primary-bright);
	font-size: 1.2em;
	flex-shrink: 0;
	font-weight: 700;
}

/* Gravity Forms newsletter signup sits on the dark band — wrap it in a white
   card so the inherited Gravity Forms styling from the parent theme reads
   against the secondary-blue background. */
.ksg-newsletter-form-wrap .gform_wrapper {
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--foreground);
	border-radius: 16px;
	padding: 1.75rem;
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.4);
	box-sizing: border-box;
	max-width: 100%;
}
.ksg-newsletter .ksg-newsletter-fineprint {
	margin: 1rem 0 0;
	color: rgba(255, 255, 255, 0.7);
}
.ksg-newsletter .ksg-newsletter-fineprint a {
	color: var(--wp--preset--color--primary-bright, #fff);
}

/* === Members marquee (auto-scrolling logo strip) =============
   Continuously scrolls left. Pauses on hover & focus-within.
   Reduced motion → static row, scrollable manually. */

.ksg-members {
	background: var(--wp--preset--color--background) !important;
}
@keyframes ksg-marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); } /* exactly half — second copy slides into the same position */
}
.ksg-marquee {
	width: 100%;
	max-width: var(--wp--style--global--wide-size);
	margin-left: auto;
	margin-right: auto;
	overflow: hidden;
	position: relative;
	padding: 1.5rem 0;
	mask-image: linear-gradient(90deg, transparent 0, black 6%, black 94%, transparent 100%);
}
.ksg-marquee-track {
	display: flex;
	gap: 2.5rem;
	width: max-content;
	animation: ksg-marquee 60s linear infinite;
	will-change: transform;
}
.ksg-marquee:hover .ksg-marquee-track,
.ksg-marquee:focus-within .ksg-marquee-track {
	animation-play-state: paused;
}
.ksg-marquee-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
	width: 11rem;
	flex-shrink: 0;
	padding: 1rem 0.75rem;
	border-radius: 14px;
	text-decoration: none;
	color: var(--wp--preset--color--foreground);
	transition: background 0.25s ease, transform 0.25s ease;
}
.ksg-marquee-item:hover,
.ksg-marquee-item:focus-visible {
	background: var(--wp--preset--color--surface);
	transform: translateY(-2px);
}
.ksg-marquee-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 5rem;
	height: 5rem;
	border-radius: 14px;
	background: var(--wp--preset--color--background);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--earth) 14%, transparent);
	box-shadow: 0 6px 14px -10px rgba(31, 58, 107, 0.25);
	overflow: hidden;
}
.ksg-marquee-mark img {
	max-width: 70%;
	max-height: 70%;
	width: auto;
	height: auto;
	object-fit: contain;
}
.ksg-marquee-initial {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.65rem;
	color: var(--wp--preset--color--primary);
}
.ksg-marquee-name {
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--wp--preset--color--secondary);
	text-align: center;
	max-width: 11rem;
	text-wrap: balance;
}

@media (prefers-reduced-motion: reduce) {
	.ksg-marquee-track {
		animation: none;
		flex-wrap: wrap;
		justify-content: center;
		width: 100%;
		gap: 1.5rem;
	}
	.ksg-marquee {
		mask-image: none;
		overflow-x: auto;
	}
}

/* === Members overview page (archive) ========================== */

.ksg-leden-page {
	padding: clamp(2rem, 4vw, 3.5rem) 0;
}
.ksg-leden-hero {
	position: relative;
	border-radius: 22px;
	overflow: hidden;
	min-height: 320px;
	display: flex;
	align-items: flex-end;
	padding: 2.5rem;
	color: #fff;
	margin-bottom: 3rem;
}
.ksg-leden-hero img {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	z-index: 0;
}
.ksg-leden-hero::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(31, 58, 107, 0.05) 0%, rgba(31, 58, 107, 0.85) 100%);
	z-index: 1;
}
.ksg-leden-hero > .ksg-leden-hero-text {
	position: relative;
	z-index: 2;
	max-width: 60ch;
}
.ksg-leden-hero h1 {
	color: #fff !important;
	font-size: clamp(2.5rem, 4vw + 1rem, 4rem);
	margin: 0 0 0.5rem 0;
	line-height: 1.05;
}
.ksg-leden-hero p {
	color: rgba(255, 255, 255, 0.92);
	font-size: 1.25rem;
	margin: 0;
}
.ksg-leden-search {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 2rem;
	align-items: center;
}
/* The field and its label are one column; the count sits beside them. The
   label is a real, visible <label> - it used to be an aria-label plus a
   placeholder, so the only on-screen hint vanished the moment someone started
   typing, exactly when they might want to check what the box was for. */
.ksg-leden-search-field {
	flex: 1 1 18rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 0;
}
.ksg-leden-search-field label {
	font-weight: 600;
	font-size: 1rem;
	color: var(--wp--preset--color--secondary);
}
.ksg-leden-search input {
	width: 100%;
	min-height: var(--ksg-tap);
	padding: 0.85rem 1rem 0.85rem 3rem;
	border-radius: 12px;
	border: 1.5px solid color-mix(in srgb, var(--wp--preset--color--earth) 18%, transparent);
	background: var(--wp--preset--color--background) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3A6B' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35' stroke-linecap='round'/%3E%3C/svg%3E") 0.85rem center / 1.25rem no-repeat;
	font-size: 1.125rem;
	font-family: inherit;
	color: var(--wp--preset--color--foreground);
}
.ksg-leden-search input:focus-visible {
	outline: 3px solid var(--ksg-ring-color);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--primary);
}
.ksg-leden-count {
	font-size: 1.125rem;
	color: var(--wp--preset--color--foreground);
	font-weight: 600;
}
.ksg-leden-count strong {
	color: var(--wp--preset--color--primary);
}
.ksg-leden-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.25rem;
}
.ksg-leden-grid article {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	background: var(--wp--preset--color--background);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--earth) 14%, transparent);
	border-radius: var(--ksg-radius-card);
	padding: 1.75rem;
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.ksg-leden-grid article:hover {
	transform: translateY(-3px);
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 22px 40px -28px rgba(78, 125, 31, 0.30);
}
.ksg-leden-grid h2 {
	font-size: 1.25rem;
	line-height: 1.2;
	margin: 0;
	color: var(--wp--preset--color--secondary);
	font-weight: 700;
}
.ksg-leden-grid h2 a { color: inherit; text-decoration: none; }
.ksg-leden-grid h2 a:hover { color: var(--wp--preset--color--primary); }
.ksg-leden-grid .ksg-member-link {
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	margin-top: auto;
}
.ksg-leden-grid article[hidden] { display: none; }
.ksg-leden-grid .ksg-member-mark,
.ksg-leden-grid .ksg-member-logo {
	width: 4rem;
	height: 4rem;
}
.ksg-leden-grid .ksg-member-mark {
	border-radius: 50%;
	background: linear-gradient(135deg, var(--wp--preset--color--primary), var(--wp--preset--color--primary-bright));
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.5rem;
}
.ksg-leden-grid .ksg-member-logo {
	border-radius: 12px;
	background: var(--wp--preset--color--background);
	padding: 0.4rem;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--earth) 14%, transparent);
	object-fit: contain;
}

/* === Round initials mark (people lists) ====================== */

.ksg-werkgroep-mark {
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--wp--preset--color--secondary), #16294B);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.05rem;
	flex-shrink: 0;
	box-shadow: 0 6px 14px -8px rgba(31, 58, 107, 0.5);
}
/* === Footer ================================================= */

.ksg-footer {
	color: rgba(255, 255, 255, 0.85);
	background: linear-gradient(180deg, var(--wp--preset--color--secondary) 0%, #16294B 100%) !important;
	position: relative;
}
.ksg-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--ksg-topo-svg) center / 1200px no-repeat;
	opacity: 0.18;
	pointer-events: none;
}
.ksg-footer > * { position: relative; z-index: 1; }
/* Footer links are lists of destinations, not links inside sentences: no
   underline, normal weight. Hover goes to full white. */
.ksg-footer a {
	color: rgba(255, 255, 255, 0.92);
	font-weight: 400;
	text-decoration: none;
}
.ksg-footer a:hover,
.ksg-footer a:focus-visible {
	color: #fff;
}
.ksg-footer-list li {
	margin: 0 0 0.6rem 0;
	list-style: none;
}
.ksg-footer-list {
	padding-left: 0;
}
.ksg-footer-logo {
	display: inline-block;
	line-height: 0;
}
.ksg-footer-logo img {
	width: 96px;
	height: auto;
}

/* === Reduced motion =========================================== */

@media (prefers-reduced-motion: reduce) {
	.ksg-thema-card,
	.ksg-news-card,
	.ksg-post-nav-card,
	.ksg-marquee-item,
	.ksg-leden-grid article {
		transition: none;
	}
	.ksg-thema-card:hover,
	.ksg-news-card:hover,
	.ksg-news-card:focus-within,
	.ksg-post-nav-card:hover,
	.ksg-post-nav-card:focus-visible,
	.ksg-marquee-item:hover,
	.ksg-leden-grid article:hover {
		transform: none;
	}
}

/* ============================================================
   Page banner — branded header band on subpages (pages,
   archives, single posts, search, 404). Mirrors the hero /
   footer identity: secondary-blue band + green topo overlay.
   ============================================================ */
.ksg-page-banner {
	position: relative;
	overflow: hidden;
	background: var(--wp--preset--color--secondary);
	color: #fff;
	padding-top: clamp(2.5rem, 5vw, 4.5rem);
	padding-bottom: clamp(2.25rem, 5vw, 4rem);
	margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.ksg-page-banner::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--ksg-topo-svg) right top / 900px no-repeat;
	opacity: 0.6;
	pointer-events: none;
}
.ksg-page-banner > * {
	position: relative;
	z-index: 1;
}
.ksg-page-banner .ksg-banner-eyebrow {
	color: var(--wp--preset--color--primary-bright);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.95rem;
	margin: 0 0 0.6rem 0;
}
.ksg-page-banner h1,
.ksg-page-banner .wp-block-query-title,
.ksg-page-banner .wp-block-post-title {
	color: #fff !important;
	font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem);
	line-height: 1.05;
	margin: 0;
	max-width: 24ch;
}
.ksg-page-banner .ksg-banner-sub,
.ksg-page-banner .wp-block-term-description {
	color: rgba(255, 255, 255, 0.92);
	font-size: 1.25rem;
	line-height: 1.5;
	margin: 1rem 0 0 0;
	max-width: 60ch;
}
.ksg-page-banner .ksg-banner-sub a,
.ksg-page-banner .wp-block-term-description a {
	color: #fff;
}

/* ------------------------------------------------------------------ *\
 * Presentation lifted out of block markup (standards 1.5.0 blockcheck)
 *
 * These properties used to sit inline on the elements themselves, which
 * made the blocks invalid: core's save() does not emit them, so the
 * editor offered "attempt recovery" on any page using these patterns.
\* ------------------------------------------------------------------ */

/* Placeholder media in the inherited ksg/* patterns. */
.ksg-media img {
	display: block;
	width: 100%;
}
.ksg-media--5x4 img {
	aspect-ratio: 5 / 4;
	object-fit: cover;
}
.ksg-media--4x5 img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	filter: saturate(0.92);
}
.ksg-media--blob img {
	aspect-ratio: 5 / 5.4;
	object-fit: cover;
	filter: contrast(1.02) saturate(0.95);
}
.ksg-media--fill img {
	height: 100%;
	object-fit: cover;
	filter: saturate(0.92);
}

/* Category duo cards: the whole card is clickable, but the anchor now lives
   on the heading instead of wrapping the group (core/group has no <a> tag). */
.ksg-cat-card {
	position: relative;
}
.ksg-cat-card__link {
	text-decoration: none;
	color: inherit;
}
.ksg-cat-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.ksg-cat-card__link:focus-visible::after {
	outline: 3px solid var(--ksg-ring-color);
	outline-offset: 2px;
}

/* === Focus ring on dark ===================================== */
/* Anything sitting on the blue band or the footer. The palette class is the
   important one: it is what the editor emits when someone sets a section's
   background to secondary, so a section they build gets this for free. */
.has-secondary-background-color,
.ksg-footer,
.ksg-cta-band,
.section-inverse,
.is-style-ksg-section-inverse {
	--ksg-ring-color: var(--wp--preset--color--primary-bright);
}

/* === Skip link ============================================== */
/* Core prints its own skip-link CSS in an inline <style>, and
   `.skip-link.screen-reader-text:focus` (0,3,0) outranks core.css's
   `.skip-link:focus` (0,2,0). So the theme's green bar never appeared and the
   link kept its translateY(-150%) - it unclipped on focus but stayed above the
   viewport, which is why the first Tab press looked like it did nothing.
   One class more than core's, so it wins without !important. */
body .skip-link.screen-reader-text:focus {
	/* No transition here on purpose. core.css animates `transform` between
	   translateY(-150%) and 0, but the element goes from 1px tall to ~72px in
	   the same state change, so the percentage resolves against a moving
	   height and the link never actually arrives - measured at -108px, still
	   off-screen, 800ms after focus. That is the "first Tab press does
	   visibly nothing" from the accessibility review. Positioned with `top`
	   instead, which does not depend on its own height. */
	transition: none;
	transform: none;
	top: 0;
	left: 1rem;
	margin: 0;
	inline-size: auto;
	min-block-size: 48px;
	display: flex;
	align-items: center;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	padding: 0.75rem 1.5rem;
	border-radius: 0 0 6px 6px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: underline;
	z-index: 100000;
}

/* === Contact page: details + form split ===================== */

.ksg-contact {
	display: grid;
	grid-template-columns: 5fr 7fr;
	gap: clamp(2rem, 5vw, 5rem);
	align-items: start;
}
@media (max-width: 860px) {
	.ksg-contact { grid-template-columns: 1fr; }
}

/* People list: dividers, not cards. Name carries the contrast, role is muted. */
.ksg-people {
	list-style: none;
	padding: 0;
	margin: 2rem 0 0;
}
.ksg-people > li {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding-block: 1.25rem;
	border-top: var(--stroke-hair) solid var(--border-subtle);
}
.ksg-people > li:last-child {
	border-bottom: var(--stroke-hair) solid var(--border-subtle);
}
.ksg-people__body { min-width: 0; }
.ksg-people__name {
	margin: 0;
	font-weight: 600;
	color: var(--wp--preset--color--foreground);
	font-size: 1.125rem;
	line-height: 1.3;
}
.ksg-people__role {
	margin: 0.1rem 0 0;
	color: var(--text-muted);
}
.ksg-people__links {
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
}
/* Doubled class: outranks the running-text underline rule, these are
   contact details in a list, not links inside a sentence. */
.ksg-people .ksg-people__links a {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
	text-decoration: none;
	overflow-wrap: anywhere;
}

/* Term/detail pairs for the address block. */
.ksg-details {
	margin: 2rem 0 0;
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.75rem 1.5rem;
}
@media (max-width: 480px) {
	.ksg-details { grid-template-columns: 1fr; gap: 0.25rem 0; }
	.ksg-details dd { margin-bottom: 0.75rem; }
}
.ksg-details dt {
	font-weight: 600;
	color: var(--wp--preset--color--foreground);
}
.ksg-details dd {
	margin: 0;
	color: var(--text-muted);
	line-height: 1.6;
}
.ksg-details.ksg-details dd a {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
	text-decoration: none;
	overflow-wrap: anywhere;
}

/* Form card: white, hairline ring, radius shared with the site's cards. */
.ksg-contact .ksg-form-card {
	background: var(--wp--preset--color--background);
	border: var(--stroke-hair) solid var(--border-subtle);
	border-radius: 16px;
	box-shadow: 0 18px 40px -28px rgba(31, 58, 107, 0.20);
}
.ksg-contact .ksg-form-card p:not(.ksg-eyebrow) { max-width: 48ch; }
.ksg-contact .gform_wrapper { margin-top: 1.5rem; }

/* === About page: photo split ================================= */

.ksg-about-photo img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: min(1.2vw, 16px);
	outline: 1px solid rgba(0, 0, 0, 0.05);
	outline-offset: -1px;
}
@media (max-width: 860px) {
	.ksg-about-photo img { aspect-ratio: 3 / 2; }
}
