/* Ported mechanically from training-puppies-hello-child 0.5.34 style.css by BUILD/block-migration/chrome/port_css.py
   (colours -> theme.json tokens, translucent ones -> legacy alpha tokens; TOKEN-MAP-2026-11-11.md). Mode A parity CSS: change the tokens, not this file. */
/* ------------------------------------------------------------------
   Tokens (approved design system). Every selector below is namespaced
   "tp-" or scoped to the shell, so plugin and WooCommerce UI is not
   restyled. Breakpoints: desktop >= 1024, tablet 768-1023, mobile <= 767.
------------------------------------------------------------------- */
/* Display serif for major headings only (self-hosted, latin subset, weight axis 400-700; SIL OFL, see assets/fonts/OFL.txt). */
body.tp-shell {
	/* Production action and trust colour (unchanged). */
	--tp-primary: var(--wp--preset--color--action);
	--tp-primary-dark: var(--wp--preset--color--action-hover);
	--tp-tint: var(--wp--custom--color--tint);
	/* Field-guide surfaces (redesign 0.5.0): deep ink on warm paper, quiet rules, restrained rust. */
	--tp-text: var(--wp--preset--color--text);
	--tp-muted: var(--wp--preset--color--text-muted);
	--tp-border: var(--wp--custom--legacy--color--border-old);
	--tp-rule: var(--wp--preset--color--border);
	--tp-cream: var(--wp--preset--color--base);
	--tp-paper-deep: var(--wp--preset--color--surface-alt);
	--tp-raised: var(--wp--preset--color--surface);
	--tp-rust: var(--wp--preset--color--accent);
	--tp-footer-bg: var(--wp--custom--color--footer-bg);
	--tp-footer-text: var(--wp--custom--legacy--color--footer-text);
	--tp-footer-muted: var(--wp--custom--color--footer-muted);
	--tp-footer-link: var(--wp--custom--color--footer-link);
	--tp-radius: 8px;
	--tp-header-h: 64px;
	--tp-gutter: 48px;
	--tp-section-space: 64px;
	--tp-admin: var(--wp-admin--admin-bar--height, 0px);
	--tp-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
	--tp-serif: Georgia, "Times New Roman", serif;
	--tp-display: "TP Fraunces", Georgia, "Times New Roman", serif;
}

@media (max-width: 1023px) {
	body.tp-shell {
		--tp-gutter: 24px;
		--tp-section-space: 48px;
	}
}

@media (max-width: 767px) {
	body.tp-shell {
		--tp-header-h: 56px;
		--tp-gutter: 16px;
		--tp-section-space: 40px;
	}
}

/* Page background (the kit's body rule has equal weight; this one is more specific). */
html body.tp-shell {
	background-color: var(--tp-cream);
}

/* Anchor offset below the sticky header: 80px (72px on mobile). */
html {
	scroll-padding-top: calc(80px + var(--wp-admin--admin-bar--height, 0px));
}

@media (max-width: 767px) {
	html {
		scroll-padding-top: calc(72px + var(--wp-admin--admin-bar--height, 0px));
	}
}

/* Heading tracking (approved), scoped to the main landmark. */
#main h1 {
	letter-spacing: -0.02em;
}

#main h2 {
	letter-spacing: -0.015em;
}

/* Editorial label: sentence case, rust, short rule before (replaces all-caps eyebrows; redesign 0.5.0). */
.tp-label {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	color: var(--tp-rust);
	font: 600 14px/1.35 var(--tp-sans);
	letter-spacing: 0.01em;
}

/* ------------------------------------------------------------------
   Main landmark and focus ring
------------------------------------------------------------------- */
.tp-main {
	display: block;
}

#main:focus {
	outline: 0; /* programmatic focus target after the skip link; not an interactive control */
}

.tp-site-header :focus-visible,
#main :focus-visible,
.tp-skip-link:focus-visible {
	outline: 3px solid var(--tp-primary);
	outline-offset: 2px;
}

.tp-site-footer :focus-visible {
	outline: 3px solid var(--tp-footer-link);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------
   Skip link
------------------------------------------------------------------- */
.tp-skip-link {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.tp-skip-link:focus {
	z-index: 100001;
	top: calc(8px + var(--tp-admin, 0px));
	left: 16px;
	display: inline-flex;
	align-items: center;
	width: auto;
	height: auto;
	min-height: 44px;
	margin: 0;
	padding: 0 24px;
	overflow: visible;
	clip: auto;
	background: var(--tp-primary);
	border-radius: var(--tp-radius);
	color: var(--wp--custom--color--on-action);
	font: 600 16px/1 var(--tp-sans);
	text-decoration: none;
	outline: 3px solid var(--tp-primary-dark);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------
   Header (sticky, direct child of body)
------------------------------------------------------------------- */
.tp-site-header {
	position: sticky;
	top: var(--tp-admin, 0px);
	z-index: 50;
	background: var(--tp-cream);
	border-bottom: 1px solid var(--tp-rule);
	font-family: var(--tp-sans);
}

.tp-site-header .tp-header-inner {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 1216px;
	height: var(--tp-header-h);
	margin: 0 auto;
	padding: 0 var(--tp-gutter);
}

.tp-site-header .tp-brand,
.tp-site-footer .tp-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	color: var(--tp-text);
	text-decoration: none;
}

.tp-site-header .tp-brand:hover,
.tp-site-header .tp-brand:focus {
	color: var(--tp-text);
	text-decoration: none;
}

.tp-site-header .tp-brand-name,
.tp-site-footer .tp-brand-name {
	font-family: var(--tp-display);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
}

.tp-site-header .tp-brand-mark {
	flex: none;
}

/* Buttons: neutralise the kit's/theme's global button styling inside the shell (all states). */
.tp-site-header .tp-btn,
.tp-site-header .tp-btn:hover,
.tp-site-header .tp-btn:focus,
.tp-site-header .tp-btn:active {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0 12px;
	background: transparent;
	border: 0;
	border-radius: var(--tp-radius);
	box-shadow: none;
	color: var(--tp-text);
	font: 500 16px/1 var(--tp-sans);
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
}

.tp-site-header .tp-nav-button[aria-expanded="true"] {
	color: var(--tp-primary);
}

.tp-site-header .tp-chevron {
	flex: none;
}

/* Group heading before tp-shell.js upgrades it to the disclosure button: same look, not interactive. */
.tp-site-header .tp-nav-label {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 12px;
	color: var(--tp-text);
	font: 500 16px/1 var(--tp-sans);
}

.tp-site-header .tp-nav-button[aria-expanded="true"] .tp-chevron {
	transform: rotate(180deg);
}

.tp-site-header .tp-menu-toggle,
.tp-site-header .tp-menu-toggle:hover,
.tp-site-header .tp-menu-toggle:focus,
.tp-site-header .tp-menu-toggle:active {
	display: none;
	width: 44px;
	height: 44px;
	padding: 0;
	background: var(--tp-raised);
	border: 1px solid var(--tp-rule);
}

.tp-site-header .tp-menu-toggle .tp-icon-close,
.tp-site-header .tp-menu-toggle[aria-expanded="true"] .tp-icon-open {
	display: none;
}

.tp-site-header .tp-menu-toggle[aria-expanded="true"] .tp-icon-close {
	display: block;
}

/* Navigation list */
.tp-site-header .tp-nav-list {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tp-site-header .tp-nav-item {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Links: explicit states so the kit's link colors cannot win. */
.tp-site-header .tp-link,
.tp-site-header .tp-link:visited {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	min-height: 44px;
	padding: 0 12px;
	border-radius: var(--tp-radius);
	background: transparent;
	color: var(--tp-text);
	font: 500 16px/1.3 var(--tp-sans);
	text-decoration: none;
}

.tp-site-header .tp-link:hover,
.tp-site-header .tp-link:focus,
.tp-site-header .tp-nav-button:hover,
.tp-site-header .tp-nav-button:focus {
	color: var(--tp-primary-dark);
	text-decoration: underline;
}

.tp-site-header .tp-link[aria-current="page"],
.tp-site-header .tp-link[aria-current="page"]:hover,
.tp-site-header .tp-link[aria-current="page"]:focus {
	background: var(--tp-tint);
	color: var(--tp-primary-dark);
}

/* Dropdown panels (desktop) */
.tp-site-header .tp-sub {
	position: absolute;
	top: 52px;
	left: 0;
	z-index: 5;
	box-sizing: border-box;
	width: max-content;
	min-width: 220px;
	max-width: 320px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: var(--tp-raised);
	border: 1px solid var(--tp-rule);
	border-radius: var(--tp-radius);
}

.tp-site-header .tp-nav-item:last-child .tp-sub {
	right: 0;
	left: auto;
}

.tp-site-header .tp-sub[hidden],
.tp-js:not(.tp-nav-ready) .tp-site-header .tp-sub {
	display: none; /* collapsed from the first paint until tp-shell.js has initialised (tp-nav-ready) */
}

/* The compact menu button only works once tp-shell.js has initialised: keep its space, do not expose it before. */
.tp-js:not(.tp-nav-ready) .tp-site-header .tp-menu-toggle {
	visibility: hidden;
}

.tp-site-header .tp-sub > * {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tp-site-header .tp-scrim {
	display: none;
}

/* Without the script (disabled, blocked or failed) the navigation stays visible and fully expanded in normal
   document flow; the group heading stays a plain label, so it does not look like a toggle. The expanded header
   is tall, so it scrolls away with the page instead of staying stuck over the content. */
html:not(.tp-js) .tp-site-header {
	position: relative;
}

html:not(.tp-js) .tp-site-header .tp-header-inner {
	flex-wrap: wrap;
	height: auto;
	padding-top: 4px;
	padding-bottom: 4px;
}

html:not(.tp-js) .tp-site-header .tp-sub {
	position: static;
	width: auto;
	border: 0;
}

html:not(.tp-js) .tp-site-header .tp-chevron {
	display: none;
}

/* ------------------------------------------------------------------
   Compact header: tablet and mobile (<= 1023px)
------------------------------------------------------------------- */
@media (max-width: 1023px) {
	.tp-site-header .tp-brand {
		gap: 10px;
	}

	.tp-site-header .tp-brand-name {
		font-size: 20px;
	}

	.tp-site-header .tp-brand-mark {
		width: 36px;
		height: 36px;
	}

	.tp-js .tp-site-header .tp-menu-toggle,
	.tp-js .tp-site-header .tp-menu-toggle:hover,
	.tp-js .tp-site-header .tp-menu-toggle:focus,
	.tp-js .tp-site-header .tp-menu-toggle:active {
		display: inline-flex;
	}

	.tp-js .tp-site-header .tp-primary-nav {
		display: none;
	}

	.tp-js .tp-site-header .tp-primary-nav.tp-open {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		z-index: 2;
		display: block;
		box-sizing: border-box;
		max-height: calc(100vh - var(--tp-header-h) - var(--tp-admin, 0px));
		padding: 8px var(--tp-gutter) 16px;
		overflow-y: auto;
		background: var(--tp-cream);
		border-bottom: 1px solid var(--tp-rule);
	}

	.tp-site-header .tp-nav-list {
		display: block;
	}

	.tp-site-header .tp-nav-item {
		border-bottom: 1px solid var(--tp-border);
	}

	.tp-site-header .tp-nav-item:last-child {
		border-bottom: 0;
	}

	.tp-site-header .tp-primary-nav .tp-link,
	.tp-site-header .tp-primary-nav .tp-nav-label,
	.tp-site-header .tp-primary-nav .tp-nav-button,
	.tp-site-header .tp-primary-nav .tp-nav-button:hover,
	.tp-site-header .tp-primary-nav .tp-nav-button:focus {
		justify-content: space-between;
		width: 100%;
		min-height: 48px;
		margin: 4px 0;
	}

	.tp-site-header .tp-nav-item > .tp-link {
		justify-content: flex-start;
	}

	.tp-site-header .tp-nav-item:last-child .tp-sub,
	.tp-site-header .tp-sub {
		position: static;
		width: auto;
		min-width: 0;
		max-width: none;
		margin: 0 0 8px;
		padding: 0 0 0 16px;
		background: transparent;
		border: 0;
		border-radius: 0;
	}

	.tp-site-header .tp-sub-link {
		min-height: 44px;
	}

	.tp-js .tp-site-header .tp-scrim.tp-open {
		position: fixed;
		top: calc(var(--tp-header-h) + var(--tp-admin, 0px));
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 1;
		display: block;
		background: var(--wp--custom--legacy--alpha--ink-kit-50);
	}
}

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------- */
.tp-site-footer {
	background: var(--tp-footer-bg);
	color: var(--tp-footer-text);
	font-family: var(--tp-sans);
}

.tp-site-footer .tp-footer-inner {
	box-sizing: border-box;
	max-width: 1216px;
	margin: 0 auto;
	padding: 48px var(--tp-gutter) 28px;
}

.tp-site-footer .tp-footer-grid {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) repeat(var(--tp-cols, 0), minmax(0, 2fr));
	gap: 40px 64px;
}

.tp-site-footer .tp-footer-brand {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tp-site-footer .tp-brand,
.tp-site-footer .tp-brand:hover,
.tp-site-footer .tp-brand:focus {
	align-self: flex-start;
	color: var(--wp--custom--color--on-action);
	text-decoration: none;
}

.tp-site-footer .tp-footer-heading {
	margin: 0 0 12px;
	color: var(--tp-footer-muted);
	font: 600 14px/1.3 var(--tp-sans);
	letter-spacing: 0.01em;
}

.tp-site-footer .tp-footer-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	column-gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tp-site-footer .tp-footer-list li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tp-site-footer .tp-footer-link,
.tp-site-footer .tp-footer-link:visited {
	display: flex;
	align-items: center;
	min-height: 44px;
	color: var(--tp-footer-link);
	font: 400 14px/1.4 var(--tp-sans);
	text-decoration: none;
}

.tp-site-footer .tp-footer-link:hover,
.tp-site-footer .tp-footer-link:focus {
	color: var(--tp-footer-link);
	text-decoration: underline;
}

.tp-site-footer .tp-footer-bottom {
	margin-top: 32px;
	padding-top: 20px;
	border-top: 1px solid var(--wp--custom--legacy--color--muted-old);
	color: var(--tp-footer-muted);
	font-size: 14px;
	line-height: 1.5;
}

@media (max-width: 1023px) {
	.tp-site-footer .tp-footer-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.tp-site-footer .tp-footer-inner {
		padding-top: 40px;
	}
}

/* ------------------------------------------------------------------
   0.5.4 header panels (from the approved lab prototype): the homepage's group line, then each guide with
   its owner sentence. Paper card, ink hairline, offset paper shadow. Markup only; behaviour is tp-shell.js.
------------------------------------------------------------------- */
.tp-site-header .tp-sub {
	top: calc(100% + 6px);
	width: 360px;
	max-width: 360px;
	padding: 14px 8px 8px;
	border: 1.5px solid var(--tp-text);
	border-radius: 16px;
	box-shadow: 6px 6px 0 var(--wp--custom--legacy--color--shadow-sand);
}

.tp-site-header .tp-sub .tp-sub-kicker {
	padding: 0 12px 6px;
	color: var(--tp-rust);
	font: 600 13px/1.3 var(--tp-sans);
	letter-spacing: 0.01em;
}

.tp-site-header .tp-sub-link {
	display: grid;
	gap: 2px;
	padding: 10px 12px;
	border-radius: 10px;
	white-space: normal;
}

.tp-site-header .tp-sub-title {
	font: 500 17px/1.25 var(--tp-display);
	color: var(--tp-text);
}

.tp-site-header .tp-sub-desc {
	color: var(--tp-muted);
	font: 400 13.5px/1.4 var(--tp-sans);
}

.tp-site-header .tp-sub-link:hover .tp-sub-title,
.tp-site-header .tp-sub-link:focus-visible .tp-sub-title {
	text-decoration: underline;
	text-decoration-color: var(--wp--custom--color--mark);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
	.tp-nav-ready .tp-site-header .tp-sub:not([hidden]) {
		animation: tp-sub-in 180ms cubic-bezier(0.23, 1, 0.32, 1) both;
	}

	@keyframes tp-sub-in {
		from { opacity: 0; transform: translateY(-6px); }
		to { opacity: 1; transform: none; }
	}
}

@media (max-width: 1023px) {
	.tp-site-header .tp-nav-item:last-child .tp-sub,
	.tp-site-header .tp-sub {
		width: auto;
		max-width: none;
		padding: 0 0 8px 8px;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	.tp-site-header .tp-sub .tp-sub-kicker {
		padding: 0 4px 2px;
	}

	.tp-site-header .tp-sub-link {
		padding: 10px 4px;
	}

	.tp-site-header .tp-sub:not([hidden]) {
		animation: none;
	}
}

html:not(.tp-js) .tp-site-header .tp-sub {
	box-shadow: none;
	border: 0;
}
