/* Glade — shared utilities + global resets.
   References theme.json tokens (--wp--preset--*); blocks use the own --glade-*
   type scale (NOT --wp--preset--font-size--*, which WP doesn't reliably emit for
   headings — gotcha #4). Loaded on front-end + editor. Per-block CSS lives in
   each src/<block>/style.css. */

/* ── Gotcha resets (WP has no Tailwind preflight) ─────────────────────────── */

/* box-sizing (gotcha #1): WP doesn't set border-box; width:100% + padding overflows. */
[class*="wp-block-glade-"],
[class*="wp-block-glade-"] *,
[class*="wp-block-glade-"] *::before,
[class*="wp-block-glade-"] *::after {
	box-sizing: border-box;
}

/* Root block-gap (gotcha #11): zero margin between top-level header/main/footer
   so full-bleed sections own their vertical spacing (post-content untouched). */
.wp-site-blocks > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* post-content block-gap (gotcha #14): remove the layout gap between stacked
   full-bleed section blocks (core block spacing inside post-content unaffected). */
.wp-block-post-content > [class*="wp-block-glade-"] {
	margin-block: 0;
}

/* Form controls don't inherit the page font in WP (gotcha #13). Zero-specificity
   so explicit per-control font rules still win. */
:where([class*="wp-block-glade-"]) :where( button, input, select, textarea ) {
	font-family: inherit;
}

/* Reset UA heading/paragraph margins inside our blocks (gotcha #5). :where()
   keeps specificity 0 so per-element spacing classes still win. */
:where([class*="wp-block-glade-"]) :where(h1, h2, h3, h4, h5, h6, p, figure, ul, ol, blockquote) {
	margin: 0;
}

/* Smooth in-page anchor scrolling (TOC / hash). Respects reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

/* ── Type scale (own tokens — see gotcha #4) ──────────────────────────────────
   SINGLE SOURCE OF TRUTH for every font-size in the blocks. No block CSS may
   hardcode px — route through these so a site/child theme rescales type by
   overriding the tokens. theme.json `fontSizes` presets mirror the principal
   rungs (display/h1/h2/h3/h4/lead/body/meta/label) for the editor picker; these
   --glade-* values are authoritative for block CSS (gotcha #4: WP doesn't reliably
   emit --wp--preset--font-size--* for headings). See docs token-spec.md §3. */
:root {
	/* Display & headings — big headings are FLUID (clamp scales smoothly mobile→desktop;
	   min/max match the old breakpoint endpoints so phones/desktops are unchanged, only
	   the tablet range becomes a smooth ramp). h1–h4 stay fixed single sizes. */
	--glade-display: clamp(40px, 1.8rem + 2.25vw, 56px);       /* hero / page intro (40→56) */
	--glade-title: clamp(28px, 1.42rem + 1.1vw, 36px);         /* contact form title (28→36) */
	--glade-section-title: clamp(32px, 1.5rem + 1.67vw, 44px); /* section titles (32→44) */
	--glade-h1: 44px;          /* fixed; section-title desktop anchor */
	--glade-h2: 32px;          /* fixed; pricing hlabel, 404 title */
	--glade-h3: 24px;          /* sub-heading, prose h2, price glyph */
	--glade-h4: 22px;          /* small heading, callout title */
	/* Body & UI */
	--glade-lead: 20px;        /* lead paragraph, faq question (desktop) */
	--glade-body: 18px;        /* body copy, buttons, prose, quotes */
	--glade-base: 16px;        /* secondary / compact UI text */
	--glade-meta: 15px;        /* meta, eyebrow */
	--glade-small: 14px;       /* small meta, breadcrumbs, toc link */
	--glade-label: 13px;       /* label, kicker */
	--glade-micro: 12px;       /* overline, micro date */
	/* Weights (semantic, not a numeric scale) — retune as a set when swapping fonts.
	   Body is the inherited 400 default and stays implicit. */
	--glade-weight-heading: 700;  /* headings, titles, names, prices */
	--glade-weight-strong: 600;   /* semibold: eyebrows, labels, emphasis links */
	--glade-weight-medium: 500;   /* buttons, nav links */
}

/* ── Shape & elevation scale ──────────────────────────────────────────────────
   Token-driven so a site / child theme restyles EVERY block by overriding these
   (e.g. `:root{ --glade-radius:0; --glade-btn-radius:8px }`) — no block CSS edits.
   See docs token-spec.md. */
:root {
	--glade-radius-sm: 8px;      /* inputs, small media, badges, pagination */
	--glade-radius: 12px;        /* default: cards, images, callouts */
	--glade-radius-lg: 16px;     /* large surfaces: pricing / split frames */
	--glade-btn-radius: 9999px;  /* button shape: 9999=pill · 8px=rounded · 0=square */

	--glade-shadow-card: 0 8px 24px rgba(15, 23, 42, 0.08);   /* resting card hover */
	--glade-shadow-pop: 0 12px 24px rgba(15, 23, 42, 0.1);    /* dropdown / drawer */
	--glade-shadow-float: 0 6px 20px rgba(15, 23, 42, 0.12);  /* floating button (FAB) */

	--glade-danger: #b32d2e;     /* form validation / error text */
	--glade-on-brand: #fff;      /* text/glyph sitting ON the brand color (light brand → set dark) */
	--glade-on-accent: #1a1a1a;  /* text/glyph sitting ON the solid accent (bright accent → keep dark; deep accent → set #fff) */
	--glade-on-footer: #fff;     /* text sitting ON the dark footer (flip for a light footer) */
	--glade-border-width: 1px;   /* hairline borders — set 0 for a flat/borderless skin, 2px for bold */

	/* Hero `image-bg` layout variant (full-bleed bg + scrim). Per-site tunable. */
	--glade-hero-min-h: 90svh;   /* hero viewport height for the image-bg layout */
	--glade-hero-scrim: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.15) 45%, transparent);
	--glade-hero-on-image: #fff;                       /* text over the hero image */
	--glade-hero-on-image-soft: rgba(255, 255, 255, 0.85);  /* secondary text over the hero image */

	/* Hero `ctaStyle=badge` — pill CTAs with a circular arrow badge. Two tones;
	   defaults map onto the palette (bright=accent, line=translucent on-image). */
	--glade-hero-cta-bright-bg: var(--wp--preset--color--accent);
	--glade-hero-cta-bright-fg: var(--glade-on-accent);
	--glade-hero-cta-bright-badge-bg: var(--wp--preset--color--footer);
	--glade-hero-cta-bright-badge-fg: var(--glade-hero-on-image);
	--glade-hero-cta-line-bg: rgba(255, 255, 255, 0.06);
	--glade-hero-cta-line-fg: var(--glade-hero-on-image);
	--glade-hero-cta-line-border: rgba(255, 255, 255, 0.25);
	--glade-hero-cta-line-badge-bg: var(--glade-hero-on-image);
	--glade-hero-cta-line-badge-fg: var(--wp--preset--color--footer);
}

/* ── Spacing scale (density-aware) ─────────────────────────────────────────────
   Component padding / gap / margin route through these (named by base px). One
   knob — --glade-density — scales the whole system at once for a per-site density
   variant: compact .85 · normal 1 · loose 1.2. Section rhythm is a separate knob
   in theme.json (--wp--custom--section--padding). One-off layout constants
   (15px gutter, sticky offsets, 2px insets…) stay literal by design. token-spec §2b. */
:root {
	--glade-density: 1;   /* spacing multiplier — compact .85 · normal 1 · loose 1.2 */
	--glade-leading: 1;   /* line-height multiplier (type twin of density) — tight .92 · normal 1 · airy 1.1.
	                       Every line-height is calc(ratio * --glade-leading), so one override retunes
	                       reading comfort site-wide; pairs with --glade-density. token-spec §4a. */
	--glade-space-4:  calc(4px  * var(--glade-density));
	--glade-space-8:  calc(8px  * var(--glade-density));
	--glade-space-12: calc(12px * var(--glade-density));
	--glade-space-16: calc(16px * var(--glade-density));
	--glade-space-20: calc(20px * var(--glade-density));
	--glade-space-24: calc(24px * var(--glade-density));
	--glade-space-28: calc(28px * var(--glade-density));
	--glade-space-32: calc(32px * var(--glade-density));
	--glade-space-40: calc(40px * var(--glade-density));
	--glade-space-48: calc(48px * var(--glade-density));
	--glade-space-64: calc(64px * var(--glade-density));

	/* Section vertical rhythm for the bespoke Glade section blocks (design:
	   56 mobile → 80 desktop ≥1024, 128 for the dramatic CTA band). Density-aware,
	   so they scale with the rest of the spacing system. One knob per tier. */
	--glade-section-y:    calc(56px  * var(--glade-density));
	--glade-section-y-lg: calc(80px  * var(--glade-density));
	--glade-section-y-xl: calc(128px * var(--glade-density));
}

.glade-display, .glade-h1, .glade-h2, .glade-h3, .glade-h4, .glade-title {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: var(--glade-weight-heading);
	color: var(--wp--preset--color--ink);
}
.glade-display { font-size: var(--glade-display); line-height: calc(1.1 * var(--glade-leading)); }
.glade-h1 { font-size: var(--glade-h1); line-height: calc(1.1 * var(--glade-leading)); }
.glade-h2 { font-size: var(--glade-h2); line-height: calc(1.15 * var(--glade-leading)); }
.glade-h3 { font-size: var(--glade-h3); line-height: calc(1.25 * var(--glade-leading)); }
.glade-h4 { font-size: var(--glade-h4); line-height: calc(1.3 * var(--glade-leading)); }
.glade-lead  { font-size: var(--glade-lead);  line-height: calc(1.5 * var(--glade-leading)); }
.glade-body  { font-size: var(--glade-body);  line-height: calc(1.6 * var(--glade-leading)); }
.glade-base  { font-size: var(--glade-base);  line-height: calc(1.6 * var(--glade-leading)); }
.glade-meta  { font-size: var(--glade-meta);  line-height: calc(1.5 * var(--glade-leading)); }
.glade-small { font-size: var(--glade-small); line-height: calc(1.5 * var(--glade-leading)); }
.glade-label { font-size: var(--glade-label); line-height: calc(1.4 * var(--glade-leading)); }
.glade-micro { font-size: var(--glade-micro); line-height: calc(1.4 * var(--glade-leading)); }
/* ↑ Type COMPOSITE utility classes — each bundles size + line-height for its rung.
   Prefer these on text elements (line-height travels with the type) over redeclaring
   font-size + line-height per component. New blocks: use `class="glade-body"` etc.
   (token-spec §3a). Existing components that sit OFF-rung (prose 1.7, post-aside 1.35,
   footer tagline) keep bespoke line-heights by design. */

/* Fluid section title (32→44, smooth) — replaces the old H2→H1 breakpoint step. */
.glade-title {
	font-size: var(--glade-section-title);
	line-height: calc(1.15 * var(--glade-leading));
}

/* ── Layout primitives ────────────────────────────────────────────────────── */
.glade-container {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--wp--custom--container, 1200px);
	margin-inline: auto;
	padding-inline: 15px;
}

/* Section vertical rhythm = per-site base (theme.json) × global density knob.
   theme.json sets the base padding; --glade-density scales it with the rest of the
   spacing system so density covers the page's dominant vertical air, not just
   component internals (token-spec §4a). */
.glade-section {
	padding-block: calc(var(--wp--custom--section--padding, 72px) * var(--glade-density));
}
@media (max-width: 991px) {
	.glade-section { padding-block: calc(var(--wp--custom--section--padding-md, 56px) * var(--glade-density)); }
}
@media (max-width: 767px) {
	.glade-section { padding-block: calc(var(--wp--custom--section--padding-sm, 44px) * var(--glade-density)); }
}
/* Background variant (behavior layer) — any section block taking a `background`
   attribute alternates its tint via these. token-driven, so they reskin too. */
.glade-section.is-bg-surface { background: var(--wp--preset--color--surface); }
.glade-section.is-bg-accent  { background: var(--wp--preset--color--accent-soft); }
.glade-section.is-bg-page    { background: var(--wp--preset--color--page); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.glade-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: var(--glade-space-12) var(--glade-space-24);
	font-size: var(--glade-body);
	font-weight: var(--glade-weight-medium);
	line-height: calc(1.4 * var(--glade-leading));
	border-radius: var(--glade-btn-radius);
	border: var(--glade-border-width) solid transparent;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
		transform 0.2s ease, box-shadow 0.2s ease;
}
.glade-btn:hover { transform: translateY(-1px); }
.glade-btn-primary {
	background-color: var(--wp--preset--color--brand);
	border-color: var(--wp--preset--color--brand);
}
.glade-btn-primary:hover {
	background-color: var(--wp--preset--color--brand-hover);
	border-color: var(--wp--preset--color--brand-hover);
}
.glade-btn-outline {
	background-color: transparent;
	border-color: var(--wp--preset--color--brand);
}
.glade-btn-outline:hover {
	background-color: var(--wp--preset--color--brand);
}
/* Solid accent button — the "pop" CTA color (badges/highlights too). Hover darkens
   the accent itself so no per-skin accent-hover token is needed. */
.glade-btn-accent {
	background-color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
}
.glade-btn-accent:hover { filter: brightness(0.94); }
/* Button TEXT color via compound class selectors (specificity 0,3,0) so theme.json's
   link element styling — `:root :where(a):hover { color }` (0,2,0), loaded after this
   file — can't recolor button text on hover. */
.glade-btn.glade-btn-primary,
.glade-btn.glade-btn-primary:hover,
.glade-btn.glade-btn-primary:focus { color: var(--glade-on-brand); }
.glade-btn.glade-btn-outline { color: var(--wp--preset--color--brand); }
.glade-btn.glade-btn-outline:hover,
.glade-btn.glade-btn-outline:focus { color: var(--glade-on-brand); }
.glade-btn.glade-btn-accent,
.glade-btn.glade-btn-accent:hover,
.glade-btn.glade-btn-accent:focus { color: var(--glade-on-accent); }

/* Spacing utilities — collapse the gap where two same-background sections meet
   (set one section's facing padding to 0). */
.is-pt-0 { padding-top: 0 !important; }
.is-pb-0 { padding-bottom: 0 !important; }

/* ── Pill button with arrow badge (the design's PillButton) ───────────────────
   A pill whose right side carries a circular badge holding an arrow that rotates
   on hover. Tone modifiers set the pill + badge colours. */
.glade-pill {
	display: inline-flex; align-items: center; gap: 20px;
	height: 56px; padding: 0 8px 0 28px;
	border-radius: 9999px;
	font-size: 16px; font-weight: 500; line-height: 1;
	text-decoration: none;
	transition: transform 0.2s ease, background-color 0.2s ease;
}
.glade-pill:hover { transform: translateY(-2px); }
.glade-pill__badge {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; flex-shrink: 0;
	border-radius: 9999px;
	transition: transform 0.3s ease;
}
.glade-pill:hover .glade-pill__badge { transform: rotate(-45deg); }
.glade-pill__badge svg { width: 16px; height: 16px; }
.glade-pill--bright { background: #a4c63f; }
.glade-pill--bright, .glade-pill--bright:hover, .glade-pill--bright:focus { color: #18301a; }
.glade-pill--bright .glade-pill__badge { background: #18301a; color: #f2eee2; }
.glade-pill--forest { background: #18301a; }
.glade-pill--forest, .glade-pill--forest:hover, .glade-pill--forest:focus { color: #f2eee2; }
.glade-pill--forest .glade-pill__badge { background: #a4c63f; color: #18301a; }
.glade-pill--darkline { background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(242, 238, 226, 0.2); }
.glade-pill--darkline, .glade-pill--darkline:hover, .glade-pill--darkline:focus { color: #f2eee2; }
.glade-pill--darkline:hover { background: rgba(255, 255, 255, 0.1); }
.glade-pill--darkline .glade-pill__badge { background: #f2eee2; color: #18301a; }

/* ── Eyebrow pill ─────────────────────────────────────────────────────────── */
.glade-eyebrow {
	display: inline-flex;
	align-items: center;
	background-color: var(--wp--preset--color--accent);
	color: var(--glade-on-accent, #18301a);
	padding: 6px 14px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: -0.01em;
	line-height: 1.2;
	border-radius: 9999px;
}

/* ── Section heading (eyebrow + title + optional lead) ────────────────────── */
.glade-shead .glade-title { margin-top: var(--glade-space-16); }
.glade-shead.is-center { text-align: center; }
.glade-shead__lead {
	margin: var(--glade-space-16) 0 var(--glade-space-40);
	max-width: 640px;
	font-size: var(--glade-body);
	line-height: calc(1.6 * var(--glade-leading));
	color: var(--wp--preset--color--muted);
}

/* ── Page header (archive / inner page hero, no image) ────────────────────── */
.glade-page-header { padding-block: 48px 8px; background: var(--wp--preset--color--page); }
@media (min-width: 1024px) { .glade-page-header { padding-block: 64px 8px; } }
.glade-page-header.is-bg-surface { background: var(--wp--preset--color--surface); }
.glade-page-header.is-bg-accent { background: var(--wp--preset--color--accent-soft); }
.glade-page-header.is-bg-none { background: transparent; }
.glade-page-header__inner { max-width: 760px; }
.glade-page-header__title {
	margin-top: 20px;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 500;
	font-size: clamp(2.25rem, 4.6vw, 3.75rem);
	line-height: 1.04;
	letter-spacing: -0.02em;
	color: #1a1a1a;
}
.glade-page-header__lead {
	margin-top: 20px;
	max-width: 640px;
	font-size: 20px;
	line-height: 1.5;
	color: #5c6356;
}

/* ── 404 ──────────────────────────────────────────────────────────────────── */
.glade-404 { text-align: center; }
.glade-404__inner { margin-inline: auto; }
.glade-404__code {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800; /* one-off extra-heavy display numeral (intentional literal) */
	font-size: clamp(64px, 14vw, 120px);
	line-height: calc(1 * var(--glade-leading));
	color: color-mix(in srgb, var(--wp--preset--color--brand) 30%, var(--wp--preset--color--surface));
	letter-spacing: -0.02em;
}
.glade-404__title { margin-top: var(--glade-space-8); font-size: var(--glade-h2); color: var(--wp--preset--color--ink); }
.glade-404__text { margin-top: var(--glade-space-16); margin-inline: auto; }
.glade-404__actions { margin-top: var(--glade-space-32); display: flex; flex-wrap: wrap; gap: var(--glade-space-12); justify-content: center; }

/* ── Callout ──────────────────────────────────────────────────────────────── */
.glade-callout {
	border-radius: var(--glade-radius-sm);
	padding: var(--glade-space-24);
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--ink);
}
@media (min-width: 768px) { .glade-callout { padding: var(--glade-space-32); } }
.glade-callout__title {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: var(--glade-weight-heading);
	font-size: var(--glade-lead);
	color: var(--wp--preset--color--ink);
}
@media (min-width: 768px) { .glade-callout__title { font-size: var(--glade-h4); } }
.glade-callout__body {
	margin-top: var(--glade-space-8);
	font-size: var(--glade-base);
	line-height: calc(1.6 * var(--glade-leading));
	color: var(--wp--preset--color--ink-soft);
}
.glade-callout__action {
	margin-top: var(--glade-space-16);
	display: inline-flex;
	align-items: center;
	gap: var(--glade-space-8);
	font-size: var(--glade-meta);
	font-weight: var(--glade-weight-strong);
	color: var(--wp--preset--color--brand-hover);
	text-decoration: none;
}
.glade-callout__action:hover { color: var(--wp--preset--color--brand); }

/* ── Blog post card (homepage teaser + blog archive) ──────────────────────── */
.glade-post-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: var(--glade-border-width) solid var(--wp--preset--color--line);
	border-radius: var(--glade-radius-sm);
	background: var(--wp--preset--color--surface);
	overflow: hidden;
	text-decoration: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.glade-post-card:hover {
	border-color: var(--wp--preset--color--brand);
	box-shadow: var(--glade-shadow-card);
	transform: translateY(-1px);
}
/* height:auto is required — the <img> carries width="640" height="480" attrs;
   without it that presentational height pins the box and aspect-ratio is ignored
   (image renders portrait + cropped). */
.glade-post-card__img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.glade-post-card__body { display: flex; flex-direction: column; flex: 1; padding: var(--glade-space-24); }
.glade-post-card__meta {
	display: flex;
	align-items: center;
	gap: var(--glade-space-8);
	font-size: var(--glade-label);
	line-height: calc(1.4 * var(--glade-leading));
	font-weight: var(--glade-weight-strong);
	color: var(--wp--preset--color--brand-hover);
}
.glade-post-card__title {
	margin-top: var(--glade-space-12);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: var(--glade-weight-heading);
	font-size: var(--glade-lead);
	line-height: calc(1.5 * var(--glade-leading));
	color: var(--wp--preset--color--ink);
}
.glade-post-card:hover .glade-post-card__title { color: var(--wp--preset--color--brand-hover); }
.glade-post-card__summary {
	margin-top: var(--glade-space-8);
	font-size: var(--glade-meta);
	line-height: calc(1.5 * var(--glade-leading));
	color: var(--wp--preset--color--muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.glade-post-card__foot {
	margin-top: auto;
	padding-top: var(--glade-space-20);
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: var(--glade-label);
	line-height: calc(1.4 * var(--glade-leading));
	color: var(--wp--preset--color--muted);
}
.glade-post-card__arrow { color: var(--wp--preset--color--brand); transition: transform 0.2s ease; }
.glade-post-card:hover .glade-post-card__arrow { transform: translateX(4px); }

/* ── FAQ accordion item (homepage teaser + /faq page) ─────────────────────── */
.glade-faqt__item {
	background: var(--wp--preset--color--surface);
	border: var(--glade-border-width) solid var(--wp--preset--color--line);
	border-radius: var(--glade-radius-sm);
}
.glade-faqt__q {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: var(--glade-space-24);
	padding: var(--glade-space-20) var(--glade-space-24);
	text-align: left;
	font-weight: var(--glade-weight-strong);
	font-size: var(--glade-body);
	color: var(--wp--preset--color--ink);
	background: none;
	border: 0;
	cursor: pointer;
}
@media (min-width: 768px) { .glade-faqt__q { padding: var(--glade-space-24) var(--glade-space-32); font-size: var(--glade-lead); } }
.glade-faqt__icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--wp--preset--color--brand); }
.glade-faqt__icon--minus { display: none; }
.glade-faqt__item.is-open .glade-faqt__icon--plus { display: none; }
.glade-faqt__item.is-open .glade-faqt__icon--minus { display: block; }
.glade-faqt__answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.glade-faqt__item.is-open .glade-faqt__answer { grid-template-rows: 1fr; }
.glade-faqt__answer-inner { overflow: hidden; }
.glade-faqt__answer-inner p {
	font-size: var(--glade-base);
	line-height: calc(1.6 * var(--glade-leading));
	color: var(--wp--preset--color--muted);
}

/* ── Table of contents (long-form pages) ──────────────────────────────────── */
.glade-toc__label { margin: 0; font-size: var(--glade-micro); font-weight: var(--glade-weight-strong); text-transform: uppercase; letter-spacing: 0.04em; color: var(--wp--preset--color--muted); }
.glade-toc__list { margin-top: var(--glade-space-12); padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--glade-space-8); }
.glade-toc__link { display: block; border-left: 2px solid var(--wp--preset--color--line); padding-left: var(--glade-space-12); font-size: var(--glade-small); line-height: calc(1.4 * var(--glade-leading)); color: var(--wp--preset--color--muted); text-decoration: none; transition: color 0.2s ease, border-color 0.2s ease; }
.glade-toc__link:hover { color: var(--wp--preset--color--ink-soft); }
.glade-toc__link.is-active { border-left-color: var(--wp--preset--color--brand); color: var(--wp--preset--color--brand-hover); font-weight: var(--glade-weight-strong); }

/* ── Long-form prose ──────────────────────────────────────────────────────── */
.glade-prose { font-size: var(--glade-body); line-height: calc(1.7 * var(--glade-leading)); color: var(--wp--preset--color--ink-soft); }
.glade-prose > :first-child { margin-top: 0; }
.glade-prose h2 { font-family: var(--wp--preset--font-family--heading); font-weight: var(--glade-weight-heading); color: var(--wp--preset--color--ink); font-size: var(--glade-h3); line-height: calc(1.3 * var(--glade-leading)); margin-top: var(--glade-space-32); margin-bottom: var(--glade-space-12); scroll-margin-top: 112px; }
.glade-prose h3 { font-family: var(--wp--preset--font-family--heading); font-weight: var(--glade-weight-heading); color: var(--wp--preset--color--ink); font-size: var(--glade-lead); margin-top: var(--glade-space-24); margin-bottom: var(--glade-space-8); scroll-margin-top: 112px; }
/* Deeper levels real articles use. Body is 18px, so h4 sits at body size (bold +
   heading font distinguish it); h5/h6 read as small-caps eyebrow headings. */
.glade-prose h4 { font-family: var(--wp--preset--font-family--heading); font-weight: var(--glade-weight-heading); color: var(--wp--preset--color--ink); font-size: var(--glade-body); margin-top: var(--glade-space-24); margin-bottom: var(--glade-space-4); }
.glade-prose h5 { font-family: var(--wp--preset--font-family--heading); font-weight: var(--glade-weight-heading); color: var(--wp--preset--color--ink); font-size: var(--glade-base); margin-top: var(--glade-space-20); margin-bottom: var(--glade-space-4); }
.glade-prose h6 { font-weight: var(--glade-weight-strong); color: var(--wp--preset--color--muted); font-size: var(--glade-small); text-transform: uppercase; letter-spacing: 0.04em; margin-top: var(--glade-space-20); margin-bottom: var(--glade-space-4); }
.glade-prose p { margin-block: var(--glade-space-16); }
.glade-prose ul, .glade-prose ol { margin-block: var(--glade-space-16); padding-left: var(--glade-space-24); }
.glade-prose ul { list-style: disc; }
.glade-prose ol { list-style: decimal; }
.glade-prose li { margin-block: var(--glade-space-4); }
.glade-prose a { color: var(--wp--preset--color--brand-hover); text-decoration: underline; text-underline-offset: 2px; }
.glade-prose strong { font-weight: var(--glade-weight-strong); color: var(--wp--preset--color--ink); }
/* Rich article elements (images, figures, quotes, tables, code). */
.glade-prose :where(img, figure, .wp-block-image) { margin-block: var(--glade-space-24); }
.glade-prose img { max-width: 100%; height: auto; display: block; border-radius: var(--glade-radius); }
.glade-prose figcaption { margin-top: var(--glade-space-8); font-size: var(--glade-small); color: var(--wp--preset--color--muted); text-align: center; }
.glade-prose blockquote {
	margin-block: var(--glade-space-24);
	padding: var(--glade-space-4) 0 var(--glade-space-4) var(--glade-space-24);
	border-left: 3px solid var(--wp--preset--color--brand);
	font-size: var(--glade-lead);
	line-height: calc(1.5 * var(--glade-leading));
	color: var(--wp--preset--color--ink);
}
.glade-prose blockquote p { margin-block: var(--glade-space-8); }
.glade-prose blockquote cite { display: block; margin-top: var(--glade-space-8); font-size: var(--glade-small); font-style: normal; color: var(--wp--preset--color--muted); }
.glade-prose :where(code, kbd, samp) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--wp--preset--color--surface); border: var(--glade-border-width) solid var(--wp--preset--color--line); border-radius: var(--glade-radius-sm); padding: 0.1em 0.4em; }
.glade-prose :where(pre, .wp-block-code) {
	margin-block: var(--glade-space-24);
	padding: var(--glade-space-20);
	background: var(--wp--preset--color--footer);
	color: var(--wp--preset--color--surface);
	border-radius: var(--glade-radius);
	overflow-x: auto;
	font-size: var(--glade-small);
	line-height: calc(1.6 * var(--glade-leading));
}
.glade-prose :where(pre, .wp-block-code) code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
/* Tables — selectors must out-specify WP core's `.wp-block-table td,th` (0,1,1),
   so cell rules are scoped under `.wp-block-table` (0,2,1). */
.glade-prose .wp-block-table { margin-block: var(--glade-space-24); }
.glade-prose .wp-block-table table, .glade-prose > table { width: 100%; border-collapse: collapse; font-size: var(--glade-base); }
.glade-prose .wp-block-table :is(th, td), .glade-prose > table :is(th, td) { padding: var(--glade-space-12) var(--glade-space-16); border: var(--glade-border-width) solid var(--wp--preset--color--line); text-align: left; }
.glade-prose .wp-block-table th, .glade-prose > table th { background: var(--wp--preset--color--surface); font-weight: var(--glade-weight-strong); color: var(--wp--preset--color--ink); }
/* WP core gives thead a 3px currentColor bottom border (and tfoot a top one); retone to the token line. */
.glade-prose .wp-block-table thead, .glade-prose > table thead { border-bottom: var(--glade-border-width) solid var(--wp--preset--color--line); }
.glade-prose .wp-block-table tfoot, .glade-prose > table tfoot { border-top: var(--glade-border-width) solid var(--wp--preset--color--line); }
.glade-prose :where(hr, .wp-block-separator) { margin-block: var(--glade-space-32); border: 0; border-top: var(--glade-border-width) solid var(--wp--preset--color--line); }

/* Featured image on single / detail templates. Token-driven (WP strips var() from
   the block's border-radius style support, so it lives here, not inline). */
.glade-cover { margin-block: var(--glade-space-24); }
.glade-cover img { display: block; border-radius: var(--glade-radius); }

/* ── Text Page template (long-form: hero + sticky TOC + post-content) ─────── */
.glade-textpage__crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--glade-space-8);
	margin-bottom: var(--glade-space-24);
	font-size: var(--glade-small);
	color: var(--wp--preset--color--muted);
}
.glade-textpage__crumbs a { color: var(--wp--preset--color--muted); text-decoration: none; }
.glade-textpage__crumbs a:hover { color: var(--wp--preset--color--brand-hover); }
.glade-textpage__crumb-current { color: var(--wp--preset--color--ink-soft); }
.glade-textpage__main { background: transparent; }
.glade-textpage__grid { display: grid; grid-template-columns: 1fr; gap: var(--glade-space-48); }
@media (min-width: 1024px) { .glade-textpage__grid { grid-template-columns: 220px 1fr; } }
.glade-textpage__grid > .wp-block-post-content { min-width: 0; }
.glade-textpage__aside { display: none; }
@media (min-width: 1024px) { .glade-textpage__aside { display: block; } }
/* gotcha #22: sticky TOC top must clear the sticky header (tune per project — measure in browser). */
.glade-textpage__sticky { position: sticky; top: 112px; }
.glade-textpage > *, .glade-textpage__main > *, .glade-textpage__grid > * { margin-block: 0; }
.glade-prose .glade-textpage__draft {
	display: inline-flex;
	align-items: center;
	margin: 0 0 var(--glade-space-24);
	padding: var(--glade-space-4) var(--glade-space-12);
	border-radius: 9999px;
	background: var(--wp--preset--color--accent-soft);
	font-size: var(--glade-micro);
	font-weight: var(--glade-weight-strong);
	color: var(--wp--preset--color--brand-hover);
}
