/* =========================================================================
   TAGE base components — Stage 1 design system
   Source: design_handoff_tage_wp_theme/design/Design System - Components.dc.html
   Rules (01-tokens.md):
   - Only var(--wp--preset--*) / var(--wp--custom--*) for colours. No raw hex.
   - Hover only under (hover:hover) and (pointer:fine); :active shows the hover
     look (+ scale .98) on touch.
   - Focus: :focus-visible 2px terracotta, 3px offset (counter on ink). Fields:
     green border + 3px green halo.
   - Inputs fixed at 16px (no iOS zoom). Tap targets >= 44px.
   - .is-hover / .is-pressed / .is-focus force a state (style guide only).
   ========================================================================= */

/* ---------- 0. Shorthands ---------------------------------------------- */
:root {
	--tage-ease: var(--wp--custom--motion--ease);
	--tage-fast: var(--wp--custom--motion--fast);
	--tage-base: var(--wp--custom--motion--base);
	--tage-slow: var(--wp--custom--motion--slow);
	--tage-touch: var(--wp--custom--touch);
	--tage-btn-h: 48px;
}
@media (max-width: 767px) {
	:root { --tage-btn-h: 50px; }
}

*, *::before, *::after { box-sizing: border-box; }
body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	/* Raleway's default figures are old-style; lining reads better in UI. */
	font-variant-numeric: lining-nums;
}
img, svg, video { max-width: 100%; height: auto; }
.tage-icon { display: inline-block; flex-shrink: 0; vertical-align: middle; height: auto; }
/* Numbers that change (counts, progress). Raleway has no tabular figures:
   lining figures, and the counter itself gets a fixed min-width. */
.tage-num { font-variant-numeric: lining-nums; }
/* Paragraphs typed with Enter in a plain-text field (tage_text()). */
.tage-para { display: block; }
.tage-para + .tage-para { margin-top: 0.75em; }

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

/* ---------- 1. Focus ---------------------------------------------------- */
/* No ring on a mouse click or tap (it beats WordPress's own a:focus outline); keyboard focus keeps it below. */
:where(a, button, summary, [role="button"], [role="tab"], [role="radio"], [role="checkbox"], [tabindex]):focus:not(:focus-visible) { outline: none; }
:where(a, button, summary, [role="button"], [role="tab"], [role="radio"], [role="checkbox"], [tabindex]):focus-visible,
.is-focus {
	outline: var(--wp--custom--focus--ring);
	outline-offset: var(--wp--custom--focus--offset);
}
.has-ink-background-color :focus-visible,
.tage-on-ink :focus-visible,
.tage-on-ink .is-focus {
	outline: var(--wp--custom--focus--on-dark);
	outline-offset: var(--wp--custom--focus--offset);
}

/* ---------- 2. Buttons --------------------------------------------------- */
.tage-btn,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: var(--tage-btn-h);
	padding: 0 26px;
	border: 1.5px solid transparent;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--cream);
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--tage-base) ease, border-color var(--tage-base) ease, color var(--tage-base) ease, transform var(--tage-fast) var(--tage-ease);
	-webkit-tap-highlight-color: transparent;
}
/* Long labels wrap; the pill softens to radius 26 so it stays a pill. */
.tage-btn--wrap { padding-top: 8px; padding-bottom: 8px; border-radius: 26px; }
.tage-btn .tage-icon { width: 18px; height: 18px; }

/* Primary: green → terracotta */
@media (hover: hover) and (pointer: fine) {
	.tage-btn:hover,
	.wp-block-button__link:hover { background: var(--wp--preset--color--terracotta); border-color: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--white); }
}
.tage-btn.is-hover,
.tage-btn.is-pressed,
.tage-btn:active,
.wp-block-button__link:active { background: var(--wp--preset--color--terracotta); border-color: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--white); }
.tage-btn.is-pressed,
.tage-btn:active,
.wp-block-button__link:active { transform: scale(0.98); }

/* Secondary: 1.5px ink outline → terracotta fill */
.tage-btn--secondary,
.is-style-outline > .wp-block-button__link {
	background: transparent;
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--ink);
}

/* Ink: solid ink → terracotta (Notify me) */
.tage-btn--ink { background: var(--wp--preset--color--ink); border-color: var(--wp--preset--color--ink); color: var(--wp--preset--color--cream); }

/* Quiet: green outline, 44px (Load more, small CTAs) */
.tage-btn--quiet {
	--tage-btn-h: 44px;
	background: transparent;
	border-color: var(--wp--preset--color--green);
	color: var(--wp--preset--color--green);
	font-size: var(--wp--preset--font-size--ui);
}
.tage-btn--quiet .tage-icon { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) {
	.tage-btn--quiet:hover { background: transparent; border-color: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--terracotta-text); }
}
.tage-btn--quiet.is-hover { background: transparent; border-color: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--terracotta-text); }
.tage-btn--quiet.is-pressed,
.tage-btn--quiet:active { background: var(--wp--preset--color--terracotta-tint); border-color: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--terracotta-text); }

/* WhatsApp: never disabled, stays green (darker on hover, green-ink pressed) */
.tage-btn--whatsapp { gap: 8px; padding: 0 22px; }
@media (hover: hover) and (pointer: fine) {
	.tage-btn--whatsapp:hover { background: var(--wp--preset--color--green-dark); border-color: var(--wp--preset--color--green-dark); color: var(--wp--preset--color--cream); }
}
.tage-btn--whatsapp.is-hover { background: var(--wp--preset--color--green-dark); border-color: var(--wp--preset--color--green-dark); color: var(--wp--preset--color--cream); }
.tage-btn--whatsapp.is-pressed,
.tage-btn--whatsapp:active { background: var(--wp--preset--color--green-ink); border-color: var(--wp--preset--color--green-ink); color: var(--wp--preset--color--cream); }

/* Disabled + loading (all variants) */
.tage-btn:disabled,
.tage-btn[aria-disabled="true"],
.tage-btn.is-disabled {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
	pointer-events: none;
}
.tage-btn[aria-busy="true"],
.tage-btn.is-loading { pointer-events: none; }
.tage-spinner { width: 18px; height: 18px; animation: tage-spin 0.8s linear infinite; }
.tage-btn--quiet .tage-spinner { width: 16px; height: 16px; }
@keyframes tage-spin { to { transform: rotate(360deg); } }

/* Phone: full width below 480px; pairs stack, primary first */
@media (max-width: 479px) {
	.tage-btn:not(.tage-btn--inline) { width: 100%; }
	.tage-btn-row { flex-direction: column; align-items: stretch; }
}
.tage-btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Icon button: 44px circle, always aria-label */
.tage-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--tage-touch);
	height: var(--tage-touch);
	padding: 0;
	border: 1.5px solid var(--wp--preset--color--stone);
	border-radius: var(--wp--custom--radius--round);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	transition: background-color var(--tage-base) ease, border-color var(--tage-base) ease, color var(--tage-base) ease, transform var(--tage-fast) var(--tage-ease);
	-webkit-tap-highlight-color: transparent;
}
.tage-icon-btn .tage-icon { width: 20px; height: 20px; }
.tage-icon-btn--soft { border-color: transparent; background: var(--wp--preset--color--sand); }
.tage-icon-btn--bare { border-color: transparent; background: transparent; }
@media (hover: hover) and (pointer: fine) {
	.tage-icon-btn:hover { background: var(--wp--preset--color--terracotta); border-color: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--white); }
	.tage-icon-btn--soft:hover, .tage-icon-btn--bare:hover { background: var(--wp--preset--color--sand-deep); border-color: transparent; color: var(--wp--preset--color--ink); }
}
.tage-icon-btn.is-hover, .tage-icon-btn.is-pressed, .tage-icon-btn:active { background: var(--wp--preset--color--terracotta); border-color: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--white); }
.tage-icon-btn--soft.is-hover, .tage-icon-btn--soft:active, .tage-icon-btn--bare.is-hover, .tage-icon-btn--bare:active { background: var(--wp--preset--color--sand-deep); border-color: transparent; color: var(--wp--preset--color--ink); }
.tage-icon-btn.is-pressed, .tage-icon-btn:active { transform: scale(0.95); }
.tage-icon-btn:disabled, .tage-icon-btn.is-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ---------- 3. Links ----------------------------------------------------- */
/* In text: green 700 underlined; hover terracotta-text */
:where(p, li, dd, td, .tage-prose, .wp-block-post-content) a:where(:not([class*="tage-"]):not(.wp-block-button__link)),
.tage-link {
	color: var(--wp--preset--color--green);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
	transition: color var(--tage-base) ease;
}
@media (hover: hover) and (pointer: fine) {
	:where(p, li, dd, td, .tage-prose, .wp-block-post-content) a:where(:not([class*="tage-"]):not(.wp-block-button__link)):hover,
	.tage-link:hover { color: var(--wp--preset--color--terracotta-text); }
}
.tage-link.is-hover, .tage-link:active { color: var(--wp--preset--color--terracotta-text); }

/* Arrow link: arrow nudges 4px (tage-motion adds data-nudge to the svg) */
.tage-link-arrow {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--wp--preset--color--green);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: color var(--tage-base) ease, gap var(--tage-slow) var(--tage-ease);
}
.tage-link-arrow .tage-icon { width: 16px; height: 16px; }
/* Green on sand is 4.27:1; the darker green keeps small link text AA. */
.tage-sec--sand .tage-link-arrow { color: var(--wp--preset--color--green-dark); }
/* Touch target: at least 44px tall without changing the layout. */
.tage-link-arrow::before { content: ""; position: absolute; inset: calc((100% - 44px) / 2) 0; }
@media (hover: hover) and (pointer: fine) {
	.tage-link-arrow:hover { color: var(--wp--preset--color--terracotta-text); }
}
.tage-link-arrow.is-hover { color: var(--wp--preset--color--terracotta-text); gap: 10px; }

/* On sand: green fails AA there, use green-dark */
/* :where() keeps these at the lowest priority, so a component can still set its own link colour */
:where(.has-sand-background-color, .tage-on-sand) a:where(:not([class*="tage-btn"]):not(.wp-block-button__link)),
.tage-on-sand .tage-link,
.tage-on-sand .tage-link-arrow { color: var(--wp--preset--color--green-dark); }

/* On ink: cream text, underline on hover, counter focus ring */
:where(.has-ink-background-color, .tage-on-ink) a:where(:not([class*="tage-btn"]):not(.wp-block-button__link)) {
	color: var(--wp--preset--color--cream);
	font-weight: 400;
	text-decoration: none;
	text-underline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
	:where(.has-ink-background-color, .tage-on-ink) a:where(:not([class*="tage-btn"]):not(.wp-block-button__link)):hover { color: var(--wp--preset--color--cream); text-decoration: underline; }
}
.tage-on-ink a.is-hover { text-decoration: underline; }
.tage-on-ink a.is-focus, .tage-on-ink a:focus-visible { border-radius: 2px; }

/* ---------- 4. Form fields ---------------------------------------------- */
/* One style for the designed forms and Fluent Forms (see fluent-forms.css).
   Label above, help below, error replaces help. */
.tage-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tage-label {
	font-size: var(--wp--preset--font-size--ui);
	font-weight: 700;
	line-height: var(--wp--custom--line-height--ui);
	color: var(--wp--preset--color--ink);
}
.tage-req { color: var(--wp--preset--color--terracotta-text); }
.tage-opt { font-weight: 500; color: var(--wp--preset--color--muted); }
.tage-label .tage-hint { font-size: var(--wp--preset--font-size--small); font-weight: 500; color: var(--wp--preset--color--muted); }
.tage-help {
	margin: 0;
	font-size: 13px;
	line-height: var(--wp--custom--line-height--small);
	color: var(--wp--preset--color--muted);
}
.tage-field-error {
	display: flex;
	gap: 6px;
	align-items: flex-start;
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: var(--wp--custom--line-height--small);
	color: var(--wp--preset--color--terracotta-text);
}
.tage-field-error .tage-icon { width: 16px; height: 16px; margin-top: 1px; }
.tage-field-error[hidden] { display: none; }
.tage-field.is-error .tage-help { display: none; }

.tage-input,
.tage-select,
.tage-textarea {
	display: block;
	width: 100%;
	height: 52px;
	padding: 0 14px;
	border: var(--wp--custom--border--input);
	border-radius: var(--wp--custom--radius--input);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: 16px; /* fixed: no iOS zoom */
	line-height: var(--wp--custom--line-height--input);
	transition: border-color var(--tage-base) ease, box-shadow var(--tage-base) ease, background-color var(--tage-base) ease;
	-webkit-appearance: none;
	appearance: none;
}
.tage-input::placeholder, .tage-textarea::placeholder { color: var(--wp--preset--color--muted); opacity: 1; }
.tage-textarea { height: auto; min-height: 120px; padding: 14px; line-height: 1.5; resize: vertical; field-sizing: content; }
.tage-select {
	padding-right: 44px;
	background-image: url("../icons/chevron-down.svg");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 18px 18px;
	cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
	.tage-input:hover, .tage-select:hover, .tage-textarea:hover { border-color: var(--wp--preset--color--subtle); }
}
.tage-input.is-hover, .tage-select.is-hover, .tage-textarea.is-hover { border-color: var(--wp--preset--color--subtle); }
/* tage-motion.js injects a terracotta ring on every focused input
   (!important, added after this file). Fields use the green halo instead,
   so this outranks it on specificity. */
.tage-input.tage-input:focus-visible, .tage-select.tage-select:focus-visible, .tage-textarea.tage-textarea:focus-visible { outline: none !important; }
.tage-input:focus, .tage-select:focus, .tage-textarea:focus,
.tage-input.is-focus, .tage-select.is-focus, .tage-textarea.is-focus {
	outline: none;
	border: var(--wp--custom--border--focus-field);
	box-shadow: var(--wp--custom--focus--field-ring);
}
/* Error: terracotta border, terracotta-tint field */
.tage-field.is-error .tage-input, .tage-field.is-error .tage-select, .tage-field.is-error .tage-textarea,
.tage-input[aria-invalid="true"], .tage-select[aria-invalid="true"], .tage-textarea[aria-invalid="true"] {
	border: var(--wp--custom--border--error);
	background-color: var(--wp--preset--color--terracotta-tint);
}
.tage-field.is-error .tage-input:focus, .tage-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--wp--custom--alpha--blob-terracotta); }
/* Success (checked): green border, green tick, green-ink help */
.tage-field.is-success .tage-input, .tage-field.is-success .tage-input-group { border: var(--wp--custom--border--success); }
.tage-field.is-success .tage-help { color: var(--wp--preset--color--green-ink); font-weight: 600; }
.tage-input-tick { color: var(--wp--preset--color--green); }
.tage-input-tick .tage-icon, .tage-input-tick { width: 18px; height: 18px; }
/* Disabled: readable, not faded */
.tage-input:disabled, .tage-select:disabled, .tage-textarea:disabled,
.tage-field.is-disabled .tage-input {
	border: 1.5px dashed var(--wp--preset--color--stone);
	background-color: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--muted);
	cursor: not-allowed;
	box-shadow: none;
}
.tage-field.is-disabled .tage-label { color: var(--wp--preset--color--muted); }

/* +91 phone: the group is the box, the input inside is bare */
.tage-input-group {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 52px;
	padding: 0 14px;
	border: var(--wp--custom--border--input);
	border-radius: var(--wp--custom--radius--input);
	background: var(--wp--preset--color--white);
	transition: border-color var(--tage-base) ease, box-shadow var(--tage-base) ease;
}
.tage-input-group:focus-within { border: var(--wp--custom--border--focus-field); box-shadow: var(--wp--custom--focus--field-ring); }
.tage-input-prefix { padding-right: 10px; border-right: var(--wp--custom--border--hairline); color: var(--wp--preset--color--muted); font-size: 16px; }
.tage-input-group .tage-input,
.tage-input-group .tage-input:focus,
.tage-field.is-success .tage-input-group .tage-input,
.tage-field.is-error .tage-input-group .tage-input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; box-shadow: none; }
.tage-field.is-error .tage-input-group { border: var(--wp--custom--border--error); background: var(--wp--preset--color--terracotta-tint); }
.tage-counter { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--wp--preset--color--muted); }

/* Chip choices (radio = pick one, checkbox = pick any). Real input underneath. */
.tage-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.tage-choice { position: relative; display: inline-flex; }
.tage-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tage-choice__ui {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: var(--tage-touch);
	padding: 0 16px;
	border: var(--wp--custom--border--input);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--ui);
	font-weight: 600;
	transition: border-color var(--tage-base) ease, background-color var(--tage-base) ease, color var(--tage-base) ease;
	pointer-events: none;
}
.tage-choice__tick { display: none; width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) {
	.tage-choice:hover .tage-choice__ui { border-color: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--terracotta-text); }
}
.tage-choice.is-hover .tage-choice__ui { border-color: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--terracotta-text); }
.tage-choice input:checked + .tage-choice__ui {
	border-color: var(--wp--preset--color--green);
	background: var(--wp--preset--color--green-tint);
	color: var(--wp--preset--color--green-ink);
	font-weight: 700;
}
.tage-choice input:checked + .tage-choice__ui .tage-choice__tick { display: inline-block; }
.tage-choice input:focus-visible + .tage-choice__ui,
.tage-choice.is-focus .tage-choice__ui { outline: var(--wp--custom--focus--ring); outline-offset: var(--wp--custom--focus--offset); }
.tage-choice.is-focus { outline: none; }
.tage-choices.is-error .tage-choice__ui,
.tage-field.is-error .tage-choice__ui { border-color: var(--wp--preset--color--terracotta); background: var(--wp--preset--color--terracotta-tint); }
.tage-choice input:disabled { cursor: not-allowed; }
.tage-choice input:disabled + .tage-choice__ui {
	border-color: var(--wp--preset--color--stone);
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--muted);
	text-decoration: line-through;
}

/* File upload */
.tage-upload { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tage-dropzone {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 110px;
	padding: 14px;
	border: 1.5px dashed var(--wp--preset--color--subtle);
	border-radius: var(--wp--custom--radius--input);
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--ink);
	font-size: 14px;
	text-align: center;
	transition: border-color var(--tage-base) ease, background-color var(--tage-base) ease;
}
.tage-dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tage-dropzone .tage-icon { width: 22px; height: 22px; }
.tage-dropzone__cta { color: var(--wp--preset--color--green); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.tage-dropzone__meta { font-size: var(--wp--preset--font-size--eyebrow); color: var(--wp--preset--color--muted); font-weight: 500; }
.tage-dropzone:focus-within { outline: var(--wp--custom--focus--ring); outline-offset: var(--wp--custom--focus--offset); }
.tage-dropzone.is-dragover {
	border-color: var(--wp--preset--color--green);
	background: var(--wp--preset--color--green-tint);
	color: var(--wp--preset--color--green-ink);
	font-weight: 700;
}
.tage-file {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border: 1.5px solid var(--wp--preset--color--sand-deep);
	border-radius: var(--wp--custom--radius--input);
	background: var(--wp--preset--color--white);
}
.tage-file__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--ink);
}
.tage-file__thumb .tage-icon { width: 20px; height: 20px; }
.tage-file.is-done .tage-file__thumb { background: var(--wp--preset--color--green-tint); color: var(--wp--preset--color--green-ink); }
.tage-file__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tage-file.is-done .tage-file__body { gap: 0; }
.tage-file__name { overflow: hidden; font-size: 14px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.tage-file__meta, .tage-file__pct { font-size: var(--wp--preset--font-size--eyebrow); color: var(--wp--preset--color--muted); }
.tage-progress { height: 4px; overflow: hidden; border-radius: 2px; background: var(--wp--preset--color--sand-deep); }
.tage-progress > span { display: block; height: 100%; background: var(--wp--preset--color--green); transition: width var(--tage-base) linear; }

/* Consent checkbox: 22px box, radius 6 */
.tage-check {
	position: relative;
	display: flex;
	gap: 12px;
	align-items: flex-start;
	font-size: var(--wp--preset--font-size--ui);
	line-height: 1.5;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
}
.tage-check input {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	margin: 1px 0 0;
	border: var(--wp--custom--border--input);
	border-radius: 6px;
	background: var(--wp--preset--color--white) no-repeat center / 14px 14px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color var(--tage-base) ease, border-color var(--tage-base) ease;
}
/* white tick (stroke 3) drawn as a data URI so it needs no extra markup */
.tage-check input:checked {
	border-color: var(--wp--preset--color--green);
	background-color: var(--wp--preset--color--green);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
}
/* Larger hit area without changing the drawn box */
.tage-check input::after { content: ""; position: absolute; inset: -11px; }
.tage-check input:focus-visible { outline: var(--wp--custom--focus--ring); outline-offset: var(--wp--custom--focus--offset); }
.tage-check.is-error input, .tage-check input[aria-invalid="true"] { border-color: var(--wp--preset--color--terracotta); background-color: var(--wp--preset--color--terracotta-tint); }
.tage-check + .tage-field-error { padding-left: 34px; }
.tage-check-wrap { display: flex; flex-direction: column; gap: 6px; }

.tage-form-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--wp--preset--color--muted); }

/* Error summary: top of form, focus moves here on submit */
.tage-error-summary {
	display: flex;
	gap: 12px;
	padding: 16px 18px;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--terracotta-tint);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--ui);
	line-height: 1.5;
}
.tage-error-summary:focus { outline: var(--wp--custom--focus--ring); outline-offset: var(--wp--custom--focus--offset); }
.tage-error-summary > .tage-icon { width: 22px; height: 22px; color: var(--wp--preset--color--terracotta-text); }
.tage-error-summary__body { display: flex; flex-direction: column; gap: 6px; }
.tage-error-summary__title { font-weight: 700; }
.tage-error-summary ul { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tage-error-summary a { color: var(--wp--preset--color--terracotta-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Success panel: replaces the form in place, focus moves to the heading */
.tage-success {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 24px;
	border: 1.5px solid var(--wp--preset--color--green-line);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--green-tint);
}
.tage-success__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: var(--wp--custom--radius--round);
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--white);
}
.tage-success__icon .tage-icon { width: 24px; height: 24px; stroke-width: 2.6; }
.tage-success__title { margin: 0; font-family: var(--wp--preset--font-family--heading); font-size: 22px; font-weight: 600; line-height: var(--wp--custom--line-height--h-4); }
.tage-success__title:focus { outline: none; }
.tage-success p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--wp--preset--color--body); }
.tage-success .tage-link-arrow { color: var(--wp--preset--color--green-ink); }

/* ---------- 5. Chips + badges ------------------------------------------- */
/* Filter chips: off white/stone · hover terracotta · on ink + tick · zero sand */
.tage-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tage-filter-chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 14px;
	border: var(--wp--custom--border--input);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color var(--tage-base) ease, background-color var(--tage-base) ease, color var(--tage-base) ease;
	-webkit-tap-highlight-color: transparent;
}
/* 40px drawn, 44px hit area */
.tage-filter-chip::after { content: ""; position: absolute; inset: -2px 0; }
.tage-filter-chip .tage-icon { display: none; width: 14px; height: 14px; stroke-width: 2.6; }
@media (hover: hover) and (pointer: fine) {
	.tage-filter-chip:hover { border-color: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--terracotta-text); }
}
.tage-filter-chip.is-hover { border-color: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--terracotta-text); }
.tage-filter-chip[aria-pressed="true"],
.tage-filter-chip.is-on {
	border-color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--cream);
	font-weight: 700;
}
.tage-filter-chip[aria-pressed="true"] .tage-icon, .tage-filter-chip.is-on .tage-icon { display: inline-block; }
.tage-filter-chip:disabled, .tage-filter-chip.is-empty {
	border-color: var(--wp--preset--color--sand-deep);
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--muted);
	cursor: default;
	pointer-events: none;
}
/* Phone: one row that scrolls sideways, fading at the edge */
@media (max-width: 767px) {
	.tage-filter-chips--scroll {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		margin-inline: calc(var(--wp--preset--spacing--gutter) * -1);
		padding: 2px var(--wp--preset--spacing--gutter);
		-webkit-mask-image: linear-gradient(90deg, black calc(100% - 32px), transparent);
		mask-image: linear-gradient(90deg, black calc(100% - 32px), transparent);
	}
	.tage-filter-chips--scroll::-webkit-scrollbar { display: none; }
}
@media (max-width: 359px) {
	.tage-filter-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}

/* Active filters: removable */
.tage-active-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tage-active-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 34px;
	padding: 0 4px 0 12px;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--sand);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}
.tage-active-chip__remove {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: var(--wp--custom--radius--round);
	background: transparent;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
}
.tage-active-chip__remove::after { content: ""; position: absolute; inset: -9px; }
.tage-active-chip__remove .tage-icon { width: 14px; height: 14px; stroke-width: 2; }
@media (hover: hover) and (pointer: fine) {
	.tage-active-chip__remove:hover { background: var(--wp--preset--color--sand-deep); }
}
.tage-clear-all {
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--green);
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	min-height: var(--tage-touch);
}

/* Feature chips ("Good for"): static */
.tage-feature-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tage-feature-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 12px;
	border: var(--wp--custom--border--hairline);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}
.tage-feature-chip .tage-icon { width: 16px; height: 16px; }

/* Size picker (PDP 44px; --card 28px; --sticky on the sticky bar) */
.tage-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.tage-size {
	position: relative;
	display: inline-flex;
	align-items: center;
	height: var(--tage-touch);
	padding: 0 18px;
	border: var(--wp--custom--border--input);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--ui);
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color var(--tage-base) ease, background-color var(--tage-base) ease, color var(--tage-base) ease;
	-webkit-tap-highlight-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
	.tage-size:hover { border-color: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--terracotta-text); }
}
.tage-size.is-hover { border-color: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--terracotta-text); }
.tage-size[aria-checked="true"], .tage-size.is-selected {
	border-color: var(--wp--preset--color--green);
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--cream);
	font-weight: 700;
}
/* Out of stock: dashed, struck, still selectable (→ Notify me) */
.tage-size.is-oos {
	border-style: dashed;
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--muted);
	text-decoration: line-through;
}
.tage-size.is-oos[aria-checked="true"] { border-style: dashed; border-color: var(--wp--preset--color--green); background: var(--wp--preset--color--green-tint); color: var(--wp--preset--color--green-ink); }
.tage-sizes--card { gap: 6px; }
.tage-sizes--card .tage-size { height: 28px; padding: 0 12px; border-width: 1px; font-size: 12px; }
.tage-sizes--card .tage-size::after { content: ""; position: absolute; inset: -8px 0; }
.tage-sizes--sticky .tage-size[aria-checked="true"] { border-color: var(--wp--preset--color--cream); background: var(--wp--preset--color--cream); color: var(--wp--preset--color--green-ink); font-weight: 800; }

/* Badges: max 2 on a photo, material first. "Compostable" never reworded. */
.tage-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.tage-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--white);
	box-shadow: 0 0 0 1px var(--wp--custom--alpha--hairline);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 700;
	line-height: 16px;
	white-space: nowrap;
}
.tage-badge .tage-icon { width: 12px; height: 12px; stroke-width: 2.2; }
/* Terracotta #A45D44 on white = 4.97:1, so OK as text here (tokens.json contrast) */
.tage-badge--accent { color: var(--wp--preset--color--terracotta); }
.tage-badge--compost { background: var(--wp--preset--color--green-tint); box-shadow: none; color: var(--wp--preset--color--green-ink); }
.tage-badge--oos { background: var(--wp--preset--color--ink); box-shadow: none; color: var(--wp--preset--color--cream); }
.tage-badge--size {
	height: 28px;
	padding: 0 12px;
	border: 1px dashed var(--wp--preset--color--terracotta);
	background: transparent;
	box-shadow: none;
	color: var(--wp--preset--color--terracotta-text);
	font-size: 12px;
	font-weight: 600;
}

/* Quote count on the header quote icon: hidden at 0, caps at 99+ */
.tage-quote-icon { position: relative; display: inline-flex; }
.tage-count {
	position: absolute;
	top: -4px;
	right: -4px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border: 2px solid var(--wp--preset--color--cream);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--terracotta);
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: lining-nums;
}
.tage-count--wide { right: -8px; }
.tage-count:empty, .tage-count[data-count="0"] { display: none; }

/* ---------- 6. Product card -------------------------------------------- */
/* Grid: 4 cols ≥1180, 3 cols 768–1179, 2 below 768, 1 below 340 */
.tage-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .tage-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1180px) { .tage-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 339px) { .tage-card-grid { grid-template-columns: minmax(0, 1fr); } }

.tage-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1.5px solid transparent;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--white);
	box-shadow: var(--wp--preset--shadow--card);
	transition: border-color 0.15s ease, box-shadow var(--tage-slow) ease, transform var(--tage-slow) var(--tage-ease);
}
.tage-card__media {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--wp--preset--color--sand);
}
.tage-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--tage-ease), filter var(--tage-base) ease; }
.tage-card__nophoto {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: var(--wp--preset--color--muted);
	font-size: 13px;
	font-weight: 600;
}
.tage-card__nophoto .tage-icon { width: 34px; height: 34px; color: var(--wp--preset--color--subtle); stroke-width: 1.6; }
.tage-card__badges { position: absolute; top: 10px; left: 10px; max-width: 70%; }
.tage-card__features { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tage-card__feature {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: var(--wp--custom--border--hairline);
	border-radius: var(--wp--custom--radius--round);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
}
.tage-card__feature .tage-icon { width: 14px; height: 14px; stroke-width: 2; }
.tage-card__body { display: flex; flex-direction: column; gap: 12px; padding: 16px; flex: 1; }
.tage-card .tage-card__name {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: anywhere;
	transition: color var(--tage-base) ease;
}
.tage-card__name a { color: inherit; font-weight: inherit; text-decoration: none; }
/* Whole card is the link to the PDP; buttons sit above the stretched link */
.tage-card__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tage-card__name a:focus-visible { outline: none; }
.tage-card:has(.tage-card__name a:focus-visible) { outline: var(--wp--custom--focus--ring); outline-offset: var(--wp--custom--focus--offset); }
.tage-card__sizes, .tage-card__btn { position: relative; z-index: 2; }
.tage-card__features { z-index: 2; }
.tage-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--wp--preset--color--sand);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--eyebrow);
	font-weight: 600;
}
.tage-card__meta > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tage-card__meta .tage-icon { width: 14px; height: 14px; color: var(--wp--preset--color--ink); stroke-width: 2; }
.tage-card__compost { color: var(--wp--preset--color--green-ink); flex-shrink: 0; }
.tage-card__compost .tage-icon { color: currentColor; }
.tage-card__meta-short { display: none; margin: 0; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--eyebrow); font-weight: 600; }
.tage-card__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: var(--tage-touch);
	margin-top: auto;
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--body);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--tage-base) ease, color var(--tage-base) ease, border-color var(--tage-base) ease;
}
.tage-card__btn .tage-icon { width: 14px; height: 14px; stroke-width: 2.5; }
.tage-card__btn-short { display: none; }
.tage-card__btn--in { border-color: var(--wp--preset--color--green-line); background: var(--wp--preset--color--green-tint); color: var(--wp--preset--color--green-ink); }
.tage-card__btn--notify { border: var(--wp--custom--border--strong); background: transparent; color: var(--wp--preset--color--ink); }
/* Out of stock: photo slightly desaturated */
.tage-card.is-oos .tage-card__media img { filter: saturate(0.6); }
/* Hover (mouse only): lift + photo zoom come from tage-motion (data-card);
   the colour part lives here. */
@media (hover: hover) and (pointer: fine) {
	.tage-card:hover { border-color: var(--wp--preset--color--terracotta); box-shadow: var(--wp--preset--shadow--card-hover); }
	.tage-card:hover .tage-card__name { color: var(--wp--preset--color--terracotta-text); }
	.tage-card:hover .tage-card__btn:not(.tage-card__btn--in):not(.tage-card__btn--notify) { background: var(--wp--preset--color--terracotta); }
}
.tage-card.is-hover { border-color: var(--wp--preset--color--terracotta); box-shadow: var(--wp--preset--shadow--card-hover); transform: translateY(-4px); }
.tage-card.is-hover .tage-card__media img { transform: scale(1.04); }
.tage-card.is-hover .tage-card__name { color: var(--wp--preset--color--terracotta-text); }
.tage-card.is-hover .tage-card__btn { background: var(--wp--preset--color--terracotta); }
/* Touch: no lift; pressed = terracotta border + scale .98 */
@media (hover: none), (pointer: coarse) {
	.tage-card:active { border-color: var(--wp--preset--color--terracotta); transform: scale(0.98); transition-duration: var(--tage-fast); }
}

/* Phone card (<768): no size pills or feature icons, one badge, short meta + "Add" */
@media (max-width: 767px) {
	.tage-card { border-radius: var(--wp--custom--radius--md); border-width: 0; }
	.tage-card__badges { top: 8px; left: 8px; }
	.tage-card__badges .tage-badge { padding: 3px 8px; font-size: 11px; line-height: 15px; }
	.tage-card__badges .tage-badge ~ .tage-badge,
	.tage-card__features,
	.tage-card__sizes,
	.tage-card__meta { display: none; }
	.tage-card__body { gap: 8px; padding: 10px 10px 12px; }
	.tage-card .tage-card__name { font-size: 14px; }
	.tage-card__meta-short { display: block; }
	.tage-card__nophoto { font-size: 12px; gap: 6px; }
	.tage-card__nophoto .tage-icon { width: 28px; height: 28px; }
	.tage-card__btn-long { display: none; }
	.tage-card__btn-short { display: inline; }
}

/* The same phone card on demand: narrow rails, the style guide preview */
.tage-card-grid.tage-card-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tage-card-grid--compact .tage-card { border-radius: var(--wp--custom--radius--md); border-width: 0;}
.tage-card-grid--compact .tage-card__badges { top: 8px; left: 8px;}
.tage-card-grid--compact .tage-card__badges .tage-badge { padding: 3px 8px; font-size: 11px; line-height: 15px;}
.tage-card-grid--compact .tage-card__badges .tage-badge ~ .tage-badge, .tage-card-grid--compact .tage-card__features, .tage-card-grid--compact .tage-card__sizes, .tage-card-grid--compact .tage-card__meta { display: none;}
.tage-card-grid--compact .tage-card__body { gap: 8px; padding: 10px 10px 12px;}
.tage-card-grid--compact .tage-card .tage-card__name { font-size: 14px;}
.tage-card-grid--compact .tage-card__meta-short { display: block;}
.tage-card-grid--compact .tage-card__nophoto { font-size: 12px; gap: 6px;}
.tage-card-grid--compact .tage-card__nophoto .tage-icon { width: 28px; height: 28px;}
.tage-card-grid--compact .tage-card__btn-long { display: none;}
.tage-card-grid--compact .tage-card__btn-short { display: inline;}


/* ---------- 7. Accordion ------------------------------------------------ */
/* One open at a time; heading + button; answer is real text (FAQPage). */
.tage-accordion { display: flex; flex-direction: column; gap: 10px; }
.tage-accordion__item {
	overflow: hidden;
	border: var(--wp--custom--border--hairline);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--white);
}
.tage-accordion__heading { margin: 0; font: inherit; }
.tage-accordion__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	min-height: 60px;
	padding: 16px 18px;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: 16.5px;
	font-weight: 700;
	line-height: 1.4;
	text-align: left;
	cursor: pointer;
	transition: color var(--tage-base) ease;
}
.tage-accordion__trigger:focus-visible { outline-offset: -3px; border-radius: var(--wp--custom--radius--md); }
.tage-accordion__icon {
	position: relative;
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: var(--wp--custom--radius--round);
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--ink);
}
.tage-accordion__icon .tage-icon { width: 16px; height: 16px; stroke-width: 2; }
.tage-accordion__icon .tage-icon--minus { display: none; }
.tage-accordion__trigger[aria-expanded="true"] .tage-icon--plus { display: none; }
.tage-accordion__trigger[aria-expanded="true"] .tage-icon--minus { display: inline-block; }
@media (hover: hover) and (pointer: fine) {
	.tage-accordion__trigger:hover { color: var(--wp--preset--color--terracotta-text); }
}
.tage-accordion__trigger.is-hover { color: var(--wp--preset--color--terracotta-text); }
.tage-accordion__panel { padding: 0 18px 18px; }
.tage-accordion__panel[hidden] { display: none; }
.tage-accordion__panel > * { max-width: 640px; margin: 0; color: var(--wp--preset--color--body); font-size: 15.5px; line-height: 1.6; text-wrap: pretty; }

/* ---------- 8. Tabs ----------------------------------------------------- */
.tage-tabs { overflow: hidden; border: var(--wp--custom--border--hairline); border-radius: var(--wp--custom--radius--md); background: var(--wp--preset--color--white); }
.tage-tabs__list {
	display: flex;
	gap: 4px;
	padding: 0 12px;
	border-bottom: var(--wp--custom--border--hairline);
	overflow-x: auto;
	scrollbar-width: none;
}
.tage-tabs__list::-webkit-scrollbar { display: none; }
.tage-tab {
	flex-shrink: 0;
	min-height: 52px;
	margin-bottom: -1px;
	padding: 0 14px;
	border: 0;
	border-bottom: 3px solid transparent;
	background: transparent;
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: color var(--tage-base) ease, border-color var(--tage-base) ease;
}
.tage-tab:focus-visible { outline-offset: -3px; }
@media (hover: hover) and (pointer: fine) {
	.tage-tab:hover { border-bottom-color: var(--wp--preset--color--sand-deep); color: var(--wp--preset--color--terracotta-text); }
}
.tage-tab.is-hover { border-bottom-color: var(--wp--preset--color--sand-deep); color: var(--wp--preset--color--terracotta-text); }
.tage-tab[aria-selected="true"] { border-bottom-color: var(--wp--preset--color--green); color: var(--wp--preset--color--ink); font-weight: 700; }
.tage-tabs__panel { min-height: 96px; padding: 20px 18px; color: var(--wp--preset--color--body); font-size: 15.5px; line-height: 1.6; }
.tage-tabs__panel[hidden] { display: none; }
.tage-tabs__panel > :first-child { margin-top: 0; }
.tage-tabs__panel > :last-child { margin-bottom: 0; }

/* ---------- 9. Breadcrumbs --------------------------------------------- */
.tage-breadcrumbs ol { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 0; list-style: none; font-size: var(--wp--preset--font-size--small); }
.tage-breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.tage-breadcrumbs li:last-child { flex: 1 1 auto; min-width: 0; }
.tage-breadcrumbs a { color: var(--wp--preset--color--green); font-weight: 600; white-space: nowrap; text-decoration: none; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
	.tage-breadcrumbs a:hover { text-decoration: underline; }
}
.tage-breadcrumbs a.is-hover { text-decoration: underline; }
.tage-breadcrumbs .tage-icon { width: 14px; height: 14px; color: var(--wp--preset--color--subtle); stroke-width: 2; }
.tage-breadcrumbs [aria-current="page"] { overflow: hidden; color: var(--wp--preset--color--muted); font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.tage-breadcrumbs__back { display: none; }
.tage-on-sand .tage-breadcrumbs a { color: var(--wp--preset--color--green-dark); }
/* Phone: parent only, as a back link */
@media (max-width: 767px) {
	.tage-breadcrumbs ol { display: none; }
	.tage-breadcrumbs__back {
		display: inline-flex;
		align-items: center;
		gap: 4px;
		min-height: var(--tage-touch);
		color: var(--wp--preset--color--green);
		font-size: 14px;
		font-weight: 700;
		text-decoration: none;
	}
	.tage-breadcrumbs__back .tage-icon { width: 16px; height: 16px; stroke-width: 2; }
}

/* ---------- 10. Pagination --------------------------------------------- */
.tage-loadmore { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tage-loadmore__count { margin: 0; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.tage-loadmore .tage-btn--quiet { padding: 0 28px; }

.tage-pagination ul { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tage-page,
.tage-page-step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: var(--tage-touch);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--ui);
	font-weight: 600;
	text-decoration: none;
	transition: border-color var(--tage-base) ease, color var(--tage-base) ease;
}
.tage-page { width: var(--tage-touch); border: 1.5px solid transparent; border-radius: var(--wp--custom--radius--round); }
.tage-page[aria-current="page"] { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--cream); font-weight: 700; }
@media (hover: hover) and (pointer: fine) {
	a.tage-page:hover { border-color: var(--wp--preset--color--terracotta); }
	a.tage-page-step:hover { color: var(--wp--preset--color--terracotta-text); }
}
.tage-page.is-hover { border-color: var(--wp--preset--color--terracotta); }
.tage-page-gap { width: 28px; text-align: center; color: var(--wp--preset--color--muted); }
.tage-page-step { gap: 6px; padding: 0 14px; border-radius: var(--wp--custom--radius--pill); color: var(--wp--preset--color--green); font-weight: 700; }
.tage-page-step .tage-icon { width: 16px; height: 16px; stroke-width: 2; }
.tage-page-step[aria-disabled="true"] { color: var(--wp--preset--color--muted); font-weight: 600; opacity: 0.45; pointer-events: none; }
.tage-pagination--phone { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; max-width: 342px; margin: 0 auto; }
.tage-pagination--phone .tage-icon-btn .tage-icon { width: 18px; height: 18px; }
.tage-pagination--phone .tage-icon-btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.tage-pagination__label { font-size: var(--wp--preset--font-size--ui); font-weight: 600; }
/* Numbered on tablet+, prev/next on phone (when both are printed) */
@media (max-width: 767px) { .tage-pagination--numbered.has-phone { display: none; } }
@media (min-width: 768px) { .tage-pagination--phone.has-numbered { display: none; } }

/* ---------- 11. Modal, sheet, toast ------------------------------------ */
/* Same layer as the header lifts to while the page is scroll-locked (chrome.css);
   overlays come later in the page, so they sit on top of it. */
.tage-overlay {
	position: fixed;
	inset: 0;
	z-index: var(--wp--custom--z--modal);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: var(--wp--custom--alpha--overlay);
}
.tage-overlay[hidden] { display: none; }
.tage-modal {
	position: relative;
	z-index: var(--wp--custom--z--modal);
	display: flex;
	flex-direction: column;
	width: min(560px, 100%);
	max-height: calc(100dvh - 48px);
	overflow: auto;
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--white);
	box-shadow: var(--wp--preset--shadow--modal);
}
.tage-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 22px 0; }
.tage-modal__title { margin: 0; font-family: var(--wp--preset--font-family--heading); font-size: 26px; font-weight: 600; line-height: 1.2; }
.tage-modal__close { margin: -6px -6px 0 0; }
.tage-modal__body { padding: 12px 22px 0; color: var(--wp--preset--color--body); font-size: 15.5px; line-height: 1.6; }
.tage-modal__body > * { margin: 0; }
.tage-modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 22px; }
.tage-modal__actions .tage-btn { padding: 0 24px; }

/* Below 768 any modal becomes a bottom sheet */
@media (max-width: 767px) {
	.tage-overlay { align-items: flex-end; padding: 0; }
	.tage-modal { width: 100%; max-height: 85dvh; border-radius: var(--wp--custom--radius--xl) var(--wp--custom--radius--xl) 0 0; }
	.tage-modal__actions { flex-direction: column-reverse; }
	.tage-modal__actions .tage-btn { width: 100%; }
}
.tage-overlay--sheet { align-items: flex-end; padding: 0; }
.tage-sheet {
	position: relative;
	z-index: var(--wp--custom--z--modal);
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: 85dvh;
	border-radius: var(--wp--custom--radius--xl) var(--wp--custom--radius--xl) 0 0;
	background: var(--wp--preset--color--white);
}
@media (min-width: 768px) {
	.tage-overlay--sheet { align-items: center; padding: 24px; }
	.tage-overlay--sheet .tage-sheet { width: min(560px, 100%); border-radius: var(--wp--custom--radius--lg); box-shadow: var(--wp--preset--shadow--modal); }
	.tage-overlay--sheet .tage-sheet__handle { display: none; }
}
.tage-sheet__handle { align-self: center; width: 40px; height: 4px; margin-top: 10px; border-radius: 2px; background: var(--wp--preset--color--stone); }
.tage-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 8px 20px; }
.tage-sheet__title { margin: 0; font-family: var(--wp--preset--font-family--heading); font-size: 22px; font-weight: 600; }
.tage-sheet__body { display: flex; flex-direction: column; gap: 10px; padding: 4px 20px 16px; overflow-y: auto; overscroll-behavior: contain; }
.tage-sheet__actions { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 20px 20px; border-top: 1px solid var(--wp--preset--color--sand); background: var(--wp--preset--color--white); }
.tage-sheet__actions .tage-btn { min-height: 50px; padding: 0 16px; }
.tage-sheet__actions .tage-btn:first-child { flex: 1; }
.tage-sheet__actions .tage-btn:last-child { flex: 2; }
@media (max-width: 479px) { .tage-sheet__actions .tage-btn { width: auto; } }
@media (max-height: 500px) and (orientation: landscape) {
	.tage-sheet, .tage-modal { max-height: 100dvh; }
}
body.tage-scroll-locked { overflow: hidden; }

/* Toast: ink bar, radius 8, max 420. Desktop bottom-left 24px; phone full width - 16px */
.tage-toasts {
	position: fixed;
	left: 24px;
	bottom: 24px;
	z-index: var(--wp--custom--z--toast);
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: min(420px, calc(100vw - 48px));
	pointer-events: none;
}
@media (max-width: 767px) {
	.tage-toasts { left: 8px; right: 8px; bottom: calc(8px + var(--tage-sticky-offset, 0px)); width: auto; }
}
.tage-toast {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 420px;
	padding: 12px 12px 12px 16px;
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--popover);
	color: var(--wp--preset--color--cream);
	pointer-events: auto;
}
.tage-toast__icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: var(--wp--custom--radius--round);
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--white);
}
.tage-toast__icon .tage-icon { width: 14px; height: 14px; stroke-width: 3; }
.tage-toast--error .tage-toast__icon { background: var(--wp--preset--color--terracotta); }
.tage-toast__text { flex: 1; min-width: 0; font-size: var(--wp--preset--font-size--ui); line-height: 1.4; }
.tage-toast__action {
	padding: 10px 4px;
	border: 0;
	background: none;
	color: var(--wp--preset--color--counter);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--ui);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
	cursor: pointer;
}
.tage-toast__action { position: relative; }
.tage-toast__action::after { content: ""; position: absolute; inset: -4px 0; } /* 44px hit area */
.tage-toast__action:focus-visible { outline: var(--wp--custom--focus--on-dark); }

/* ---------- 12. Loading ------------------------------------------------- */
.tage-skel-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--wp--custom--radius--md); background: var(--wp--preset--color--white); }
.tage-skel-card__media { aspect-ratio: 1 / 1; background: var(--wp--preset--color--sand); }
.tage-skel-card__body { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.tage-skel { display: block; border-radius: var(--wp--custom--radius--xs); background: var(--wp--preset--color--sand-deep); }
.tage-skel--line { height: 14px; }
.tage-skel--text { height: 12px; }
.tage-skel--pill { height: 28px; width: 56px; border-radius: var(--wp--custom--radius--pill); background: var(--wp--preset--color--sand); }
.tage-skel--btn { height: 44px; margin-top: 6px; border-radius: var(--wp--custom--radius--pill); background: var(--wp--preset--color--sand); }
.tage-skel-row { display: flex; gap: 6px; padding-top: 4px; }
/* Shimmer 1.4s; off for reduced motion */
.tage-skel, .tage-skel-card__media {
	background-image: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--wp--preset--color--white) 45%, transparent) 50%, transparent 100%);
	background-size: 200% 100%;
	background-repeat: no-repeat;
	animation: tage-shimmer 1.4s ease-in-out infinite;
}
@keyframes tage-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .tage-skel, .tage-skel-card__media { animation: none; background-image: none; } }
.tage-text-lines { display: flex; flex-direction: column; gap: 8px; }

/* Page bar: 3px green, fixed top, above the header, only after 300ms */
.tage-pagebar { height: 3px; overflow: hidden; border-radius: 2px; background: var(--wp--preset--color--sand-deep); }
.tage-pagebar > span { display: block; height: 100%; background: var(--wp--preset--color--green); }
.tage-pagebar--fixed { position: fixed; top: 0; left: 0; right: 0; z-index: calc(var(--wp--custom--z--header) + 1); border-radius: 0; background: transparent; }

/* ---------- 13. Placeholders until step 2 ------------------------------ */
.tage-placeholder-header, .tage-placeholder-footer { padding-block: var(--wp--preset--spacing--md); }
.tage-placeholder-footer { margin-top: var(--wp--preset--spacing--section); background: var(--wp--preset--color--ink); color: var(--wp--preset--color--cream); }
.tage-placeholder-footer a { color: var(--wp--preset--color--cream); }
.tage-main { padding-block: var(--wp--preset--spacing--2-xl) var(--wp--preset--spacing--section); }

/* The footer sits straight under the page: each page's last section sets the space (no global block gap on top). */
.wp-site-blocks > footer.wp-block-template-part { margin-block-start: 0; }
