/*
 * geetkiseva — header, footer and the light/dark controls.
 *
 * Colours come only from theme.json presets, which resolve to the --gks-*
 * variables in tokens.css. Nothing here hardcodes a colour, so both themes stay
 * correct without a second set of rules.
 */

/* ── Skip link ───────────────────────────────────────────────────────────── */

.gks-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--small);
	padding: 0.7rem 1rem;
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 3px;
}

.gks-skip:focus {
	left: 1rem;
	top: 1rem;
}

/* ── The page between them ───────────────────────────────────────────────── */

/*
 * Every page begins and ends the same distance from the two bands that
 * bracket it, whatever is inside it.
 *
 * It was four distances and three: nothing at all under the header on the
 * homepage, the index pages and search, thirty on a song, thirty-two on an
 * archive, ninety-six on the 404 — each set in a different file by whoever
 * wrote that page. This is the one place it is decided now, and the rules
 * that used to answer the question have been taken out rather than left to
 * lose an argument about specificity.
 *
 * More below than above on purpose: the footer is a heavy band and wants
 * clearing; the header is a hairline and does not.
 */
#gks-content {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--80);
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.gks-header {
	border-bottom: 1px solid var(--wp--preset--color--rule-soft);
	background: var(--wp--preset--color--base);
}

/*
 * Wide-size PLUS its own padding.
 *
 * The page content is capped at wide-size with no padding of its own,
 * so a bar that caps at wide-size and then pads inside ends up narrower
 * than the content beneath it — the logo sits a few pixels in from where
 * the first line of the page starts, which reads as a wonky page rather
 * than as a deliberate margin.
 */
.gks-header__inner {
	max-width: calc(var(--wp--style--global--wide-size) + var(--wp--preset--spacing--50) * 2);
	margin-inline: auto;
	/*
	 * Thin, but not squashed. The header is chrome and the page is the point,
	 * so it stays low — but the 24px phantom gap above it (see the bottom of
	 * this file) was doing the breathing for it, and removing that left the
	 * logo almost touching both edges. The padding has to carry it now.
	 */
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	gap: var(--wp--preset--spacing--50);
	align-items: center;
}

.gks-header__right {
	gap: var(--wp--preset--spacing--40);
	align-items: center;
}

/* ── Logo ────────────────────────────────────────────────────────────────── */

/*
 * Three plucked strings inside a circle — a tanpura, a page gutter, and a play
 * cursor at once. The struck string is the only teal in the mark.
 */
.gks-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
	flex-shrink: 0;
}

.gks-logo:hover {
	text-decoration: none;
}

.gks-logo__mark {
	flex-shrink: 0;
	overflow: visible;
}

.gks-logo__word {
	font-family: var(--wp--preset--font-family--literata);
	font-weight: 300;
	font-size: 1.4rem;
	letter-spacing: -0.025em;
	line-height: 1;
}

.gks-logo__ki {
	color: var(--wp--preset--color--accent);
}

.gks-logo--footer {
	color: var(--wp--preset--color--contrast);
}

/* ── Navigation ──────────────────────────────────────────────────────────── */

.gks-nav {
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--small);
}

.gks-nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.gks-nav .wp-block-navigation-item__content:hover,
.gks-nav .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
}

.gks-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--body);
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
}

.gks-nav .wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--lyric);
}

/* ── Search ──────────────────────────────────────────────────────────────── */

.gks-search .wp-block-search__button {
	background: transparent;
	border: 1px solid var(--wp--preset--color--rule);
	color: var(--wp--preset--color--muted);
	padding: 0.42rem 0.6rem;
	border-radius: 3px;
	min-width: 0;
}

.gks-search .wp-block-search__button:hover {
	color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
}

.gks-search .wp-block-search__button svg {
	width: 1.1rem;
	height: 1.1rem;
	fill: currentColor;
}

/* ── Light / dark switch ─────────────────────────────────────────────────── */

.gks-theme-switch {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: transparent;
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: 3px;
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 500;
	letter-spacing: 0.04em;
	padding: 0.42rem 0.6rem;
	cursor: pointer;
	line-height: 1;
}

.gks-theme-switch:hover {
	color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
}

/*
 * The button offers the theme you are NOT in, so exactly one icon shows: the
 * moon while you are in light, the sun while you are in dark. data-now is
 * written by theme-switch.js; before it runs, fall back to the media query so
 * there is never a moment with both icons or none.
 */
.gks-theme-switch__sun {
	display: none;
}

@media ( prefers-color-scheme: dark ) {
	:root:not( [ data-theme='light' ] ) .gks-theme-switch__sun {
		display: block;
	}

	:root:not( [ data-theme='light' ] ) .gks-theme-switch__moon {
		display: none;
	}
}

.gks-theme-switch[ data-now='dark' ] .gks-theme-switch__sun,
.gks-theme-switch[ data-now='light' ] .gks-theme-switch__moon {
	display: block;
}

.gks-theme-switch[ data-now='dark' ] .gks-theme-switch__moon,
.gks-theme-switch[ data-now='light' ] .gks-theme-switch__sun {
	display: none;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.gks-footer {
	border-top: 1px solid var(--wp--preset--color--rule-soft);
	background: var(--wp--preset--color--surface);
}

/*
 * Wide-size PLUS its own padding.
 *
 * The page content is capped at wide-size with no padding of its own,
 * so a bar that caps at wide-size and then pads inside ends up narrower
 * than the content beneath it — the logo sits a few pixels in from where
 * the first line of the page starts, which reads as a wonky page rather
 * than as a deliberate margin.
 */
.gks-footer__inner {
	max-width: calc(var(--wp--style--global--wide-size) + var(--wp--preset--spacing--50) * 2);
	margin-inline: auto;
	padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--50);
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: var(--wp--preset--spacing--60);
	align-items: start;
}

.gks-footer__brand {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
	max-width: 28ch;
}

.gks-footer__blurb {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin: 0;
}

.gks-footer__col {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
}

.gks-footer__col .gks-label {
	margin: 0;
}

.gks-footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.gks-footer__col a {
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.gks-footer__col a:hover {
	color: var(--wp--preset--color--contrast);
	text-decoration: underline;
}

/* ── Reading mode buttons ────────────────────────────────────────────────── */

.gks-mode {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	flex-wrap: wrap;
	color: var(--wp--preset--color--rule);
}

.gks-mode button {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.gks-mode button:hover {
	color: var(--wp--preset--color--contrast);
}

.gks-mode button[ aria-pressed='true' ] {
	color: var(--wp--preset--color--accent);
	font-weight: 500;
}

/* ── Narrow screens ──────────────────────────────────────────────────────── */

@media ( max-width: 60rem ) {
	.gks-footer__inner {
		grid-template-columns: 1fr 1fr;
	}

	.gks-footer__brand {
		grid-column: 1 / -1;
	}
}

@media ( max-width: 40rem ) {
	.gks-header__inner {
		gap: var(--wp--preset--spacing--30);
	}

	.gks-logo__word {
		font-size: 1.2rem;
	}

	.gks-theme-switch__label {
		display: none;
	}

	.gks-footer__inner {
		grid-template-columns: 1fr;
		gap: var(--wp--preset--spacing--50);
	}
}


/* ── Song rows ──────────────────────────────────────────────────────────
 *
 * One row design, used by search, language pages, archives and the homepage —
 * doc 02 section 3.4 asks for them to be consistent everywhere, so there is
 * one block of rules rather than one per page.
 *
 * No per-script font rules here: tokens.css already matches on [lang|="hi"]
 * and the rows carry real lang attributes, so they inherit the right metrics.
 * Repeating them would be a second place to keep in step.
 */

.gks-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gks-row {
	display: flex;
	align-items: baseline;
	gap: var(--wp--preset--spacing--40);
	padding: var(--wp--preset--spacing--40) 0;
	border-bottom: 1px solid var(--gks-rule-soft);
}

.gks-row:last-child { border-bottom: 0; }

/* The printed number, where the reader is scanning for it. */
.gks-row__no {
	flex: none;
	min-width: 2.5rem;
	color: var(--gks-faint);
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.gks-row__main { flex: 1; min-width: 0; }

.gks-row__title {
	display: block;
	color: var(--gks-ink);
	text-decoration: none;
	font-weight: 500;
	line-height: 1.5;
}

.gks-row__title:hover { color: var(--gks-accent); }

/* Under the title, never instead of it — settled decision 5. */
.gks-row__roman {
	display: block;
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	color: var(--gks-muted);
}

.gks-row__line {
	margin: 0.5rem 0 0.2rem;
	color: var(--gks-body);
	border-inline-start: 2px solid var(--gks-accent);
	padding-inline-start: 0.7rem;
}

.gks-row__why,
.gks-row__meta {
	margin: 0.2rem 0 0;
	color: var(--gks-faint);
	font-size: var(--wp--preset--font-size--label);
}

.gks-row__meta a { color: var(--gks-muted); text-decoration: none; }
.gks-row__meta a:hover { color: var(--gks-accent); text-decoration: underline; }
.gks-row__sep { color: var(--gks-rule); }

.gks-row__layers { display: inline-flex; gap: 0.25rem; }

.gks-badge {
	font-size: var(--wp--preset--font-size--label);
	padding: 0.05rem 0.35rem;
	border-radius: 2px;
	background: var(--gks-surface-2);
	color: var(--gks-muted);
}

/* Audio lines up down the right on every page, present or not. */
.gks-row__audio {
	flex: none;
	min-width: 4rem;
	text-align: right;
	font-size: var(--wp--preset--font-size--label);
	color: var(--gks-muted);
	font-variant-numeric: tabular-nums;
}

.gks-row__play { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--gks-accent); }
.gks-row__play .gks-icon { width: 0.85em; height: 0.85em; }
.gks-row__none { color: var(--gks-rule); }

/* ── Result and archive furniture ───────────────────────────────────── */

.gks-results__count,
.gks-count {
	color: var(--gks-muted);
	font-size: var(--wp--preset--font-size--small);
	margin: 0 0 var(--wp--preset--spacing--40);
}

.gks-results__filter,
.gks-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0 0 var(--wp--preset--spacing--50);
}

.gks-chip {
	display: inline-flex;
	align-items: baseline;
	gap: 0.35rem;
	padding: 0.28rem 0.7rem;
	border: 1px solid var(--gks-rule);
	border-radius: 999px;
	color: var(--gks-muted);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
	transition: border-color 0.15s, color 0.15s;
}

.gks-chip:hover { border-color: var(--gks-accent); color: var(--gks-accent); }
.gks-chip span  { color: var(--gks-faint); font-variant-numeric: tabular-nums; }

.gks-chip.is-on {
	background: var(--gks-accent-soft);
	border-color: var(--gks-accent);
	color: var(--gks-accent);
}

.gks-chip.is-on span { color: inherit; }

.gks-nothing,
.gks-results__none {
	color: var(--gks-muted);
	background: var(--gks-surface);
	border-radius: 4px;
	padding: var(--wp--preset--spacing--40);
}

.gks-nothing p,
.gks-results__none p { margin: 0 0 0.5rem; }

.gks-nothing p:last-child,
.gks-results__none p:last-child { margin-bottom: 0; }

.gks-nothing__hint { font-size: var(--wp--preset--font-size--small); color: var(--gks-faint); }

.gks-search--page .wp-block-search__input { font-size: var(--wp--preset--font-size--body); }

/* Phones: the number moves above the title rather than stealing width. */
@media (max-width: 40rem) {
	.gks-row { gap: var(--wp--preset--spacing--30); }
	.gks-row__no { min-width: 1.9rem; font-size: var(--wp--preset--font-size--small); }
	.gks-row__audio { min-width: 3.2rem; font-size: var(--wp--preset--font-size--label); }
}

/* ── Browse pages: language, category, tag ──────────────────────────── */

.gks-crumb {
	font-size: var(--wp--preset--font-size--label);
	color: var(--gks-faint);
	margin-bottom: 0.6rem;
}

.gks-crumb a { color: var(--gks-muted); text-decoration: none; }
.gks-crumb a:hover { color: var(--gks-accent); text-decoration: underline; }
.gks-crumb span { color: var(--gks-rule); }
.gks-crumb span + span { color: var(--gks-muted); }

.gks-archive__head { margin-bottom: var(--wp--preset--spacing--50); }

.gks-archive__title {
	margin: 0 0 0.4rem;
	line-height: 1.25;
}

.gks-archive__note {
	margin: 0 0 0.5rem;
	max-width: 42rem;
	color: var(--gks-muted);
}

/* The honest state of the work, not a boast — half-done work should look
 * half done. */
.gks-archive__counts {
	margin: 0;
	color: var(--gks-faint);
	font-size: var(--wp--preset--font-size--small);
}

.gks-pages {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	margin-top: var(--wp--preset--spacing--60);
}

.gks-pages .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* 2.5rem so it stays a real target under a thumb on a phone. */
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.6rem;
	border: 1px solid var(--gks-rule);
	border-radius: 4px;
	color: var(--gks-muted);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small);
}

.gks-pages .page-numbers:hover { border-color: var(--gks-accent); color: var(--gks-accent); }

.gks-pages .page-numbers.current {
	background: var(--gks-accent);
	border-color: var(--gks-accent);
	color: var(--gks-ground);
}

.gks-pages .page-numbers.dots { border-color: transparent; }

/* ── Index cards: all languages, all categories, all tags ───────────── */

.gks-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	/* Fills the row on a desktop, single column on a phone, with no
	 * breakpoint to keep in step. */
	grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
	gap: var(--wp--preset--spacing--40);
}

.gks-card__link {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	height: 100%;
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--gks-rule);
	border-radius: 6px;
	background: var(--gks-surface);
	text-decoration: none;
	transition: border-color 0.15s, transform 0.15s;
}

.gks-card__link:hover {
	border-color: var(--gks-accent);
	transform: translateY(-1px);
}

.gks-card__name {
	color: var(--gks-ink);
	font-weight: 500;
	line-height: 1.35;
}

.gks-card__note {
	color: var(--gks-muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

.gks-card__facts {
	margin-top: auto;
	padding-top: 0.4rem;
	color: var(--gks-faint);
	font-size: var(--wp--preset--font-size--label);
}

/* ── Homepage: four ways in ─────────────────────────────────────────── */

.gks-ways {
	list-style: none;
	margin: 0 0 var(--wp--preset--spacing--50);
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
	gap: var(--wp--preset--spacing--30);
}

.gks-ways a {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
	border: 1px solid var(--gks-rule);
	border-radius: 6px;
	background: var(--gks-surface);
	text-decoration: none;
	transition: border-color 0.15s;
}

.gks-ways a:hover { border-color: var(--gks-accent); }

.gks-ways strong {
	color: var(--gks-ink);
	font-size: var(--wp--preset--font-size--heading);
	font-weight: 500;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.gks-ways span {
	color: var(--gks-faint);
	font-size: var(--wp--preset--font-size--label);
}

/* ── Homepage ───────────────────────────────────────────────────────────
 *
 * The page is 1180px wide, but the things people READ inside it are not.
 * A verse set across the full width is uncomfortable to read, so the hero
 * keeps its own measure and sits centred in the wider page.
 */

.gks-verse {
	max-width: 46rem;
	margin: var(--wp--preset--spacing--70) auto var(--wp--preset--spacing--50);
	text-align: center;
}

.gks-verse__ref {
	margin: 0 0 var(--wp--preset--spacing--40);
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gks-faint);
}

.gks-verse__ref span { color: var(--gks-muted); }

.gks-verse__text {
	margin: 0;
	border: 0;
	padding: 0;
}

.gks-verse__text p {
	margin: 0;
	font-size: clamp(var(--wp--preset--font-size--title), 3.2vw, 2.4rem);
	line-height: 1.35;
	font-weight: 300;
	color: var(--gks-ink);
}

/* ── The hero search: one rule, a magnifier, and the count ──────────────
 *
 * No box and no button. The mockup draws a single line with the number of
 * songs sitting quietly at the right end, and that number is doing real work:
 * it tells someone how big the archive is before they decide to type.
 */
.gks-hero-search {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	max-width: 42rem;
	margin: 0 auto var(--wp--preset--spacing--40);
	padding-bottom: 0.55rem;
	border-bottom: 1px solid var(--gks-rule);
	transition: border-color 0.15s;
}

.gks-hero-search:focus-within { border-bottom-color: var(--gks-accent); }

.gks-hero-search__ico {
	flex: none;
	width: 1em;
	height: 1em;
	color: var(--gks-faint);
}

.gks-hero-search__input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 0.15rem 0;
	font: inherit;
	font-size: var(--wp--preset--font-size--body);
	color: var(--gks-ink);
}

.gks-hero-search__input::placeholder { color: var(--gks-faint); }
.gks-hero-search__input:focus { outline: none; }

/* Chrome and Safari add their own clear button; it fights the design. */
.gks-hero-search__input::-webkit-search-decoration,
.gks-hero-search__input::-webkit-search-cancel-button { display: none; }

.gks-hero-search__count {
	flex: none;
	color: var(--gks-faint);
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--label);
	font-variant-numeric: tabular-nums;
}

/* ── Language chips: plain words, not pills ────────────────────────────
 *
 * The mockup sets these as quiet text under the search, not as buttons. A row
 * of bordered pills there competes with the verse above it for attention, and
 * the verse should win.
 */
.gks-chips--lang {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem 1.5rem;
	max-width: 42rem;
	margin: 0 auto var(--wp--preset--spacing--70);
}

.gks-chips--lang .gks-chip {
	border: 0;
	border-radius: 0;
	background: none;
	padding: 0.1rem 0;
	color: var(--gks-muted);
	font-size: var(--wp--preset--font-size--body);
}

.gks-chips--lang .gks-chip:hover {
	color: var(--gks-accent);
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

/* ── The featured song ──────────────────────────────────────────────── */

.gks-featured {
	padding: var(--wp--preset--spacing--50) 0;
	border-block: 1px solid var(--gks-rule-soft);
}

.gks-featured__kicker {
	margin: 0 0 var(--wp--preset--spacing--30);
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gks-faint);
}

/* Big, because this is the one song the page is recommending. The native
 * script leads and keeps its own metrics — settled decision 5. */
.gks-featured__title {
	display: block;
	color: var(--gks-ink);
	text-decoration: none;
	font-size: clamp(var(--wp--preset--font-size--heading), 2.6vw, 2rem);
	line-height: 1.5;
}

.gks-featured__title:hover { color: var(--gks-accent); }

.gks-featured__roman {
	margin: 0.2rem 0 0;
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	color: var(--gks-muted);
}

.gks-featured__meta {
	margin: 0.35rem 0 0;
	color: var(--gks-faint);
	font-size: var(--wp--preset--font-size--small);
}

/* ── Language chips ─────────────────────────────────────────────────── */

/* Under the hero search, so they centre with it and share its measure. */
.gks-chips--lang {
	max-width: 42rem;
	margin-inline: auto;
	justify-content: center;
	margin-bottom: var(--wp--preset--spacing--70);
}

.gks-chips--lang .gks-chip {
	padding: 0.45rem 1rem;
	font-size: var(--wp--preset--font-size--body);
}


/* ── The header pair ────────────────────────────────────────────────────
 *
 * The theme toggle and the search button are ONE style. They sit beside each
 * other, so any difference in height or radius reads as a mistake rather than
 * as a distinction.
 */

.gks-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	height: 2.125rem;
	padding: 0 0.6rem;
	background: transparent;
	border: 1px solid var(--gks-rule);
	border-radius: 3px;
	color: var(--gks-muted);
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 500;
	letter-spacing: 0.04em;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s;
}

.gks-btn:hover { border-color: var(--gks-accent); color: var(--gks-accent); }
.gks-btn .gks-icon { width: 1em; height: 1em; }

/* Square, for a button that is only an icon. */
.gks-btn--icon { width: 2.125rem; padding: 0; }

/* The toggle keeps its own padding rule out of the way now. */
.gks-theme-switch { height: 2.125rem; padding: 0 0.6rem; }

/* ── The search box that opens over the page ────────────────────────── */

.gks-find {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: max(4vh, 2rem) 1rem 1rem;
	background: var(--gks-scrim, rgba(0, 0, 0, 0.55));
	opacity: 0;
	transition: opacity 0.16s ease;
}

.gks-find[hidden] { display: none; }
.gks-find.is-open { opacity: 1; }

/*
 * Blur the page behind where the browser can do it, and simply darken it
 * further where it cannot. A mid-range phone should not stutter for an effect
 * that is decoration.
 */
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
	.gks-find {
		backdrop-filter: blur(8px);
		-webkit-backdrop-filter: blur(8px);
		background: color-mix(in srgb, var(--gks-ground) 55%, transparent);
	}
}

.gks-find__panel {
	width: min(44rem, 100%);
	background: var(--gks-ground);
	border: 1px solid var(--gks-rule);
	border-radius: 10px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
	overflow: hidden;
	transform: translateY(-8px);
	transition: transform 0.16s ease;
}

.gks-find.is-open .gks-find__panel { transform: none; }

.gks-find__bar {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--gks-rule-soft);
}

.gks-find__ico { flex: none; width: 1.1em; height: 1.1em; color: var(--gks-faint); }

.gks-find__input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: var(--wp--preset--font-size--body);
	color: var(--gks-ink);
	padding: 0.1rem 0;
}

.gks-find__input::placeholder { color: var(--gks-faint); }
.gks-find__input:focus { outline: none; }
.gks-find__input::-webkit-search-decoration,
.gks-find__input::-webkit-search-cancel-button { display: none; }

.gks-find__go {
	flex: none;
	height: 2.125rem;
	padding: 0 0.9rem;
	border: 1px solid var(--gks-accent);
	border-radius: 3px;
	background: var(--gks-accent-soft);
	color: var(--gks-accent);
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 500;
	cursor: pointer;
}

.gks-find__go:hover { background: var(--gks-accent); color: var(--gks-ground); }

.gks-find__body { max-height: min(58vh, 28rem); overflow-y: auto; }

.gks-find__hit {
	display: block;
	padding: 0.7rem 1rem;
	border-bottom: 1px solid var(--gks-rule-soft);
	text-decoration: none;
	color: inherit;
}

.gks-find__hit:last-child { border-bottom: 0; }
.gks-find__hit:hover,
.gks-find__hit.is-on { background: var(--gks-surface); }

.gks-find__t { display: block; color: var(--gks-ink); }
.gks-find__r {
	display: block;
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--small);
	color: var(--gks-muted);
}

.gks-find__line {
	display: block;
	margin: 0.3rem 0 0.15rem;
	color: var(--gks-body);
	border-inline-start: 2px solid var(--gks-accent);
	padding-inline-start: 0.7rem;
}

.gks-find__why,
.gks-find__say {
	display: block;
	color: var(--gks-faint);
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--label);
}

.gks-find__say { padding: 1.4rem 1rem; font-size: var(--wp--preset--font-size--small); }

.gks-find__foot {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	padding: 0.65rem 1rem;
	border-top: 1px solid var(--gks-rule-soft);
	color: var(--gks-faint);
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: var(--wp--preset--font-size--label);
}

.gks-find__foot kbd {
	border: 1px solid var(--gks-rule);
	border-radius: 3px;
	padding: 0 0.25rem;
	font-family: inherit;
	font-size: 0.95em;
}

/* On a phone the keyboard takes half the screen; the hints are not worth it. */
@media (max-width: 34rem) {
	.gks-find { padding: 0; }
	.gks-find__panel { width: 100%; border: 0; border-radius: 0; min-height: 100%; }
	.gks-find__foot span:first-child { display: none; }
	.gks-find__body { max-height: none; }
}

/* ── Whitespace in the template-part wrappers ───────────────────────────
 *
 * WordPress wraps each template part in a block-level element, and the
 * newlines around the markup inside become anonymous line boxes — a blank
 * line of the inherited line-height, roughly 24px, sitting ABOVE the header
 * and not below it. The result is a header that looks bottom-heavy for no
 * reason visible in its own padding, which is why it survived measuring.
 *
 * A flex container does not render whitespace-only text nodes at all. With a
 * single child, column flex lays out identically to block otherwise.
 */
header.wp-block-template-part,
footer.wp-block-template-part {
	display: flex;
	flex-direction: column;
}

/*
 * NOT .gks-header or .gks-footer.
 *
 * Making those flex containers too looked harmless and squashed both bars:
 * their inner has `margin-inline: auto`, and an auto margin on a flex item's
 * cross axis stops it stretching. So instead of spanning the full width it
 * shrank to fit its own contents and sat in the middle — logo and nav bunched
 * together in the centre of an otherwise empty bar.
 */

/*
 * And the block gap the skip link leaves behind.
 *
 * WordPress puts margin-block-start on any block preceded by a sibling. The
 * skip link IS a sibling — it is absolutely positioned and takes no space, but
 * the rule does not know that, so the bar below it inherited a 24px gap it
 * could never account for in its own padding. That is why the header measured
 * evenly padded and still looked bottom-heavy.
 */
.gks-header > .gks-header__inner,
.gks-footer > .gks-footer__inner {
	margin-block-start: 0;
}

/*
 * And again one level down, inside the footer.
 *
 * The footer inner is a default-layout group, so the same rule lands on its
 * second, third and fourth children — the three link columns. The inner is a
 * GRID, and a margin on a grid item pushes nothing: it drops that item inside
 * its own cell and makes the row taller. So the columns sat 24px below the
 * brand beside them, and the footer carried 24px it had not asked for.
 */
.gks-footer__inner > * {
	margin-block-start: 0;
}


/* ── The interface under a thumb ──────────────────────────────────────────
 *
 * A phone is the way this site is read: standing, one hand, often mid-song.
 * Everything that can be tapped is at least --gks-tap across, and the rows
 * are tapped edge to edge rather than on the words alone, which is what
 * makes a list feel like an app's list instead of a page's.
 */

@media (max-width: 34rem) {

	/* The whole row is the target, not the title inside it. */
	.gks-row {
		min-height: var(--gks-tap);
		padding-block: 0.55rem;
	}

	.gks-crumb {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 0 0.3rem;
	}

	.gks-crumb a {
		min-height: 2.25rem;
		display: inline-flex;
		align-items: center;
	}

	.gks-chip,
	.gks-pages .page-numbers {
		min-height: var(--gks-tap);
		display: inline-flex;
		align-items: center;
	}

	.gks-card__link {
		min-height: var(--gks-tap);
	}

	/* The search field: 17px, because anything under 16 makes iOS zoom the
	 * whole page in the moment somebody starts typing. */
	.gks-hero-search__input,
	.gks-search--page .wp-block-search__input {
		min-height: var(--gks-tap);
	}
}
