/**
 * CWTF "Wireframe".
 *
 * Blueprint / vector-CAD reading theme. Outlined rather than filled, a hairline
 * grid ground, corner registration ticks on panels, glow reserved for hover.
 *
 * Scoping rules, and why:
 *   .cwtf        - on every page. Chrome only (header, nav, footer).
 *   .cwtf-wire   - posts, archives, blog index, search. The full design.
 * Kadence's stylesheet is left enqueued because the Elementor pages and the
 * cwtf-landing-pages templates sit on it, so everything here is written to
 * out-specify it rather than replace it.
 *
 * Sizing is fluid end to end - clamp() on type and spacing, auto-fill on the card
 * grid - so the same rules carry a 360px phone through to a 4K monitor without
 * breakpoint jumps. The reading column stays capped by measure, not by viewport:
 * a wider screen gets wider gutters and a wider card grid, never longer lines.
 */

/* =========================================================================
   1. Tokens
   ========================================================================= */

.cwtf {
	--c-ink: #0b0d0d;
	--c-ink-2: #101413;
	--c-fg: #f4f4f4;
	--c-body: rgba(244, 244, 244, 0.82);
	--c-muted: rgba(244, 244, 244, 0.66);
	/* 0.45 gave 4.21:1 on --c-ink and 3.98:1 on the card fill. It is only ever
	   paired with --fs-xs (10.6-12.5px), which is normal text, so 4.5:1 applies.
	   0.56 clears it at ~5.6:1 with headroom for the card fill. */
	--c-faint: rgba(244, 244, 244, 0.56);
	--c-accent: #5e9089;
	--c-accent-lt: #81ccc2;
	--c-warm: #e2b04a;

	/* Boundary tokens carry the whole affordance on inputs, the Copy button,
	   pagination and tag chips, so they answer to 1.4.11 (3:1), not to taste.
	   0.30 measured 1.93:1 and 0.16 measured 1.34:1 against --c-ink. */
	--c-line: rgba(129, 204, 194, 0.52);
	--c-line-soft: rgba(129, 204, 194, 0.48);
	--c-line-hard: rgba(129, 204, 194, 0.7);

	--c-grid-line: rgba(129, 204, 194, 0.045);
	--c-grid-size: 34px;

	--f-display: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--f-body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--f-mono: ui-monospace, "Cascadia Code", "Cascadia Mono", "SF Mono", Menlo, Consolas,
		"DejaVu Sans Mono", monospace;

	/* Fluid type. rem bases stay fixed (html is never resized) so every clamp
	 * below is predictable; the vw term does all the scaling. */
	--fs-xs: clamp(0.66rem, 0.62rem + 0.12vw, 0.78rem);
	--fs-sm: clamp(0.8rem, 0.77rem + 0.12vw, 0.92rem);
	--fs-md: clamp(1rem, 0.97rem + 0.14vw, 1.14rem);
	--fs-lg: clamp(1.15rem, 1.05rem + 0.4vw, 1.5rem);
	--fs-xl: clamp(1.45rem, 1.2rem + 0.95vw, 2.25rem);
	--fs-2xl: clamp(1.9rem, 1.45rem + 1.9vw, 3.4rem);

	--sp-section: clamp(2.25rem, 1.4rem + 3.4vw, 5.5rem);
	--sp-gap: clamp(1.5rem, 1rem + 2vw, 3.25rem);
	--sp-pad: clamp(1.1rem, 0.7rem + 1.6vw, 2.5rem);

	/* Reading shell is capped by measure. Card shell is free to grow so a 4K
	 * monitor fills with more columns instead of more whitespace. */
	--shell-read: min(94vw, 1300px);
	/* 2600 rather than a tighter cap so a 4K monitor fills with a 7-column grid
	 * instead of ~800px of dead gutter each side. Cards still land around 320px,
	 * which is the minmax() floor the grid is built on. */
	--shell-wide: min(94vw, 2600px);

	--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================================
   2. Chrome - present on every page
   ========================================================================= */

.cwtf .cwtf-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	padding: 0.75rem 1.25rem;
	background: var(--c-ink);
	color: var(--c-accent-lt);
	border: 1px solid var(--c-line-hard);
	font-family: var(--f-mono);
	font-size: var(--fs-sm);
}

.cwtf .cwtf-skip:focus {
	left: 0.5rem;
	top: 0.5rem;
}

.cwtf .cwtf-head {
	position: relative;
	z-index: 30;
	background: var(--c-ink);
	border-bottom: 1px solid var(--c-line);
}

.cwtf .cwtf-head__in {
	width: var(--shell-wide);
	margin-inline: auto;
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2vw, 2.5rem);
	padding-block: clamp(0.85rem, 1.4vw, 1.35rem);
}

.cwtf .cwtf-head__brand {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	color: var(--c-fg);
	text-decoration: none;
	font-family: var(--f-display);
	font-weight: 400;
	font-size: var(--fs-sm);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	line-height: 1.2;
	margin-right: auto;
}

/* Registration tick as a logo mark - the same corner motif used on panels. */
.cwtf .cwtf-head__mark {
	width: 13px;
	height: 13px;
	flex: none;
	border-top: 1px solid var(--c-accent-lt);
	border-left: 1px solid var(--c-accent-lt);
}

.cwtf .cwtf-head__actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: none;
}

.cwtf .cwtf-head__sub {
	flex: none;
	font-family: var(--f-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--c-accent-lt);
	text-decoration: none;
	padding: 0.6em 1.1em;
	border: 1px solid var(--c-line);
	transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.cwtf .cwtf-head__sub:hover,
.cwtf .cwtf-head__sub:focus-visible {
	border-color: var(--c-accent-lt);
	box-shadow: 0 0 22px -6px rgba(129, 204, 194, 0.6);
}

/* Secondary pill - present but not competing with Subscribe. */
.cwtf .cwtf-head__sub--ghost {
	color: var(--c-muted);
	border-color: var(--c-line-soft);
}

.cwtf .cwtf-head__sub--ghost:hover,
.cwtf .cwtf-head__sub--ghost:focus-visible {
	color: var(--c-accent-lt);
	border-color: var(--c-line);
}

/* ---- primary nav ---- */

.cwtf .cwtf-nav__list,
.cwtf .cwtf-nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cwtf .cwtf-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(0.9rem, 1.6vw, 2rem);
}

.cwtf .cwtf-nav__list li {
	position: relative;
}

.cwtf .cwtf-nav__list a {
	display: inline-block;
	color: var(--c-muted);
	text-decoration: none;
	font-size: var(--fs-sm);
	letter-spacing: 0.06em;
	padding-block: 0.4em;
	transition: color 0.2s var(--ease);
	white-space: nowrap;
}

.cwtf .cwtf-nav__list a:hover,
.cwtf .cwtf-nav__list a:focus-visible,
.cwtf .cwtf-nav__list .current-menu-item > a,
.cwtf .cwtf-nav__list .current-menu-ancestor > a {
	color: var(--c-accent-lt);
}

/* Submenu toggle button, injected by JS onto every parent item so the dropdown
 * is operable by keyboard and touch, not hover alone. */
/* 2.5.8: the chevron measured ~16px square and abuts the menu link, so the
   spacing exception does not rescue it. */
.cwtf .cwtf-nav__more {
	background: none;
	border: 0;
	min-width: 24px;
	min-height: 24px;
	justify-content: center;
	padding: 0.35em;
	margin-left: 0.15em;
	color: inherit;
	cursor: pointer;
	line-height: 1;
	display: inline-flex;
	align-items: center;
}

.cwtf .cwtf-nav__more::before {
	content: "";
	width: 6px;
	height: 6px;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: rotate(45deg) translate(-1px, -1px);
	transition: transform 0.25s var(--ease);
}

.cwtf .cwtf-nav__list li.is-open > .cwtf-nav__more::before {
	transform: rotate(225deg) translate(-2px, -2px);
}

.cwtf .cwtf-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: -1rem;
	min-width: 15rem;
	background: var(--c-ink);
	border: 1px solid var(--c-line);
	padding: 0.5rem 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
	box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
}

.cwtf .cwtf-nav__list li:hover > .sub-menu,
.cwtf .cwtf-nav__list li:focus-within > .sub-menu,
.cwtf .cwtf-nav__list li.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.cwtf .cwtf-nav .sub-menu a {
	display: block;
	padding: 0.5rem 1.1rem;
	white-space: normal;
}

/* ---- burger ---- */

.cwtf .cwtf-head__toggle {
	display: none;
	background: none;
	border: 1px solid var(--c-line);
	padding: 0.6rem;
	cursor: pointer;
	width: 2.75rem;
	height: 2.75rem;
	align-items: center;
	justify-content: center;
}

.cwtf .cwtf-head__bars,
.cwtf .cwtf-head__bars::before,
.cwtf .cwtf-head__bars::after {
	display: block;
	width: 18px;
	height: 1px;
	background: var(--c-accent-lt);
	transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.cwtf .cwtf-head__bars::before,
.cwtf .cwtf-head__bars::after {
	content: "";
	position: relative;
}

.cwtf .cwtf-head__bars::before { top: -6px; }
.cwtf .cwtf-head__bars::after { top: 5px; }

.cwtf .cwtf-head__toggle[aria-expanded="true"] .cwtf-head__bars { background: transparent; }
.cwtf .cwtf-head__toggle[aria-expanded="true"] .cwtf-head__bars::before { transform: translateY(6px) rotate(45deg); }
.cwtf .cwtf-head__toggle[aria-expanded="true"] .cwtf-head__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ---- footer ---- */

.cwtf .cwtf-foot {
	background: var(--c-ink);
	border-top: 1px solid var(--c-line);
	margin-top: var(--sp-section);
}

.cwtf .cwtf-foot__in {
	width: var(--shell-wide);
	margin-inline: auto;
	padding-block: clamp(1.75rem, 3vw, 3rem);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem clamp(1.5rem, 3vw, 3rem);
}

.cwtf .cwtf-foot__brand {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	font-size: var(--fs-sm);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--c-muted);
	margin-right: auto;
}

.cwtf .cwtf-foot__links {
	display: flex;
	gap: clamp(1rem, 2vw, 2rem);
	flex-wrap: wrap;
}

.cwtf .cwtf-foot__links a {
	color: var(--c-muted);
	text-decoration: none;
	font-size: var(--fs-sm);
	transition: color 0.2s var(--ease);
}

.cwtf .cwtf-foot__links a:hover,
.cwtf .cwtf-foot__links a:focus-visible { color: var(--c-accent-lt); }

.cwtf .cwtf-foot__legal {
	margin: 0;
	font-family: var(--f-mono);
	font-size: var(--fs-xs);
	color: var(--c-faint);
	width: 100%;
}

/* =========================================================================
   3. Grounds
   ========================================================================= */

/* The Elementor front page. Only the grid is added here - the page keeps the
 * background colour Kadence sets from the Customizer, so nothing Elementor has
 * been built against shifts underneath it. Any Elementor section carrying its own
 * opaque background will sit on top of the grid, which is the intended reading:
 * panels laid on blueprint paper. */
/* Painted on #wrapper, not body: Kadence gives #wrapper its own opaque
 * background, which would otherwise hide anything set on the canvas behind it. */
body.cwtf.home #wrapper {
	/* The front page ground (#181616) is lighter than the posts ground, so the
	 * grid needs more contrast to read at the same strength. */
	--c-grid-line: rgba(129, 204, 194, 0.095);
	background-image:
		repeating-linear-gradient(90deg, var(--c-grid-line) 0 1px, transparent 1px var(--c-grid-size)),
		repeating-linear-gradient(0deg, var(--c-grid-line) 0 1px, transparent 1px var(--c-grid-size));
	background-attachment: fixed;
}

/* ...unless the front page is one of our own templates, which paints its own grid
 * on .cwtf-lp and covers only the content area. The wrapper grid then showed
 * through wherever .cwtf-lp does not reach - most visibly in the footer's top
 * margin, where a strip of blueprint sat between the closing band and the footer
 * while every other landing page showed flat ground there.
 *
 * Keyed on both classes, so this reverses itself: switch the front page back to
 * the Elementor layout and .cwtf-lp-page disappears, the rule stops matching, and
 * the grid above returns with nothing to undo. */
body.cwtf.home.cwtf-lp-page #wrapper {
	background-image: none;
}

/* Elementor's top-level containers inherit a ground from the kit; clearing it on
 * the front page lets the grid read through. Sections that set their own
 * background in the editor still win, so nothing intentional is overridden. */
body.cwtf.home .elementor-section-wrap > .elementor-section:not([style*="background"]),
body.cwtf.home .elementor > .e-con:not([style*="background"]) {
	background-color: transparent;
}

/* =========================================================================
   3b. Wire ground
   ========================================================================= */

body.cwtf-wire {
	background-color: var(--c-ink);
	/* Viewport-anchored so the grid is one continuous plane down the page
	 * regardless of how many sections sit on it. */
	background-image:
		repeating-linear-gradient(90deg, var(--c-grid-line) 0 1px, transparent 1px var(--c-grid-size)),
		repeating-linear-gradient(0deg, var(--c-grid-line) 0 1px, transparent 1px var(--c-grid-size));
	background-attachment: fixed;
	color: var(--c-body);
	font-family: var(--f-body);
	font-weight: 400;
	font-size: clamp(1rem, 0.96rem + 0.12vw, 1.19rem);
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
}

/* Neutralise the Kadence wrappers our templates render inside. */
.cwtf-wire #wrapper,
.cwtf-wire #inner-wrap {
	background: transparent;
	max-width: none;
	margin: 0;
	padding: 0;
}

.cwtf-wire .cwtf-shell {
	width: var(--shell-read);
	margin-inline: auto;
}

.cwtf-wire .cwtf-listing .cwtf-shell { width: var(--shell-wide); }

/* No sidebar means no reason to hold a sidebar's worth of shell. Redefining the
 * token here narrows the header and the body together, so the post stays a single
 * centred column instead of hugging the left edge of a 4K screen. */
.cwtf-wire .cwtf-single--notoc { --shell-read: min(94vw, 880px); }

.cwtf-wire a { color: var(--c-accent-lt); }

/*
 * Scoped to body.cwtf, not .cwtf-wire, for two reasons.
 *
 * Coverage: .cwtf-wire is only on posts and archives, so landing pages and the
 * Elementor home had no CSS focus indicator at all - they fell back to the UA
 * outline, which Kadence suppresses via `.hide-focus-outline *:focus{outline:0}`
 * until its navigation.js sees a keydown. A blocked or slow script left keyboard
 * users with nothing.
 *
 * Specificity: `.hide-focus-outline *:focus` is (0,2,0) and the old
 * `.cwtf-wire :focus-visible` was also (0,2,0) - the tie was broken only by
 * stylesheet order. `body.cwtf` is (0,2,1) and wins outright.
 */
body.cwtf :focus-visible {
	outline: 2px solid var(--c-accent-lt);
	outline-offset: 3px;
}

.cwtf-wire .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* =========================================================================
   4. Post header
   ========================================================================= */

.cwtf-wire .cwtf-post-head,
.cwtf-wire .cwtf-arch-head {
	padding-block: var(--sp-section) clamp(1.5rem, 2.5vw, 2.75rem);
	border-bottom: 1px solid var(--c-line);
	margin-bottom: var(--sp-gap);
}

.cwtf-wire .cwtf-eyebrow {
	display: inline-block;
	font-family: var(--f-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--c-accent-lt);
	text-decoration: none;
	margin-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
}

.cwtf-wire a.cwtf-eyebrow:hover { text-decoration: underline; }
.cwtf-wire .cwtf-eyebrow--plain { color: var(--c-faint); }

.cwtf-wire .cwtf-post__title,
.cwtf-wire .cwtf-arch__title {
	margin: 0;
	font-family: var(--f-display);
	font-weight: 300;
	font-size: var(--fs-2xl);
	line-height: 1.14;
	letter-spacing: -0.015em;
	color: var(--c-fg);
	text-wrap: balance;
	/* Titles run to 149 characters on this site - never let one push the page wide. */
	overflow-wrap: break-word;
}

/* Run the title across most of the shell rather than holding it to a narrow
 * display measure - it fills the hero without reaching full bleed. */
.cwtf-wire .cwtf-post__title { max-width: 78%; }

/* A ch measure alone is pinned to the font size, so a 4K monitor got the same
 * two-line title as a laptop. The vw term lets it grow with the viewport; the ch
 * bounds keep it from going flat and wide. Same reasoning on the description. */
.cwtf-wire .cwtf-arch__title { max-width: clamp(24ch, 32vw, 40ch); }

/* Percentages stop helping once the shell is only a phone wide. */
@media (max-width: 60rem) {
	.cwtf-wire .cwtf-post__title { max-width: 100%; }
}

.cwtf-wire .cwtf-arch__desc {
	margin-top: 0.85rem;
	/* 80ch is the ceiling because this is prose; past that the line is a chore to
	 * track back from. Below it, the measure follows the viewport. */
	max-width: clamp(62ch, 42vw, 80ch);
	color: var(--c-muted);
}

.cwtf-wire .cwtf-arch__count,
.cwtf-wire .cwtf-meta {
	margin: clamp(0.9rem, 1.6vw, 1.4rem) 0 0;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.6rem 0.9rem;
	font-family: var(--f-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.1em;
	color: var(--c-faint);
	text-transform: uppercase;
}

.cwtf-wire .cwtf-meta__sep {
	width: 4px;
	height: 4px;
	transform: rotate(45deg);
	border: 1px solid var(--c-line-hard);
}

/* ---- archive header action ---- */

.cwtf-wire .cwtf-arch-head__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	/* flex-start, not space-between: the header shell is --shell-wide (up to 2600px)
	 * because it shares the listing grid's container, and space-between threw the
	 * button at the far edge of that, a screen away from the title it belongs to. */
	justify-content: flex-start;
	gap: clamp(1.5rem, 2.5vw, 3rem);
}

/* Shrink-wrapped, not grown. Growing the block only moved its right edge - the
 * title and description are capped by their own measures and never filled it - so
 * the button ended up across an empty gap. Sized to its widest line instead, the
 * button lands right beside the text at every width, and the text still expands
 * with the viewport because those two measures now do (see .cwtf-arch__title).
 *
 * min-width: 0 so it can shrink below max-content on a phone and wrap the button
 * underneath rather than overflowing the shell. */
.cwtf-wire .cwtf-arch-head__text {
	flex: 0 1 auto;
	min-width: 0;
}

.cwtf-wire .cwtf-arch-head__actions { flex: 0 0 auto; }

/* Solid pill CTA, matching the waitlist buttons on the course landing pages.
 *
 * A deliberate copy of .cwtf-btn--solid from cwtf-landing.css rather than a shared
 * component: that stylesheet is enqueued only on cwtf-landing-pages templates and
 * every rule in it is scoped to .cwtf-lp, so neither the class nor the gradient
 * reaches an archive. Keep the two in step if the brand ramp changes.
 *
 * The name is NOT .cwtf-btn. That class is already taken further down this file by
 * the empty-state chip in template-parts/listing.php - outlined, uppercase, mono -
 * and being both later in the file and equally specific, it silently won every
 * declaration this rule set shares with it.
 *
 * Deep teal (#24544c -> #4a7871) so #fff clears 4.9:1 across the whole gradient;
 * the lighter #5E9089 -> #81CCC2 ramp only reaches ~3.6:1. */
.cwtf-wire .cwtf-arch-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 52px;
	padding: 0.95rem 2.15rem;
	border-radius: 999px;
	font-family: var(--f-display);
	font-size: 1.02rem;
	font-weight: 500;
	line-height: 1.6;
	letter-spacing: 0.015em;
	text-align: center;
	text-decoration: none;
	transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

/* Tag plus class so this out-specifies `.cwtf-wire a` (0,2,0) above, which would
 * otherwise repaint the label in the accent colour against the gradient. */
.cwtf-wire a.cwtf-arch-cta {
	background: linear-gradient(120deg, #24544c 0%, #4a7871 100%);
	color: #fff;
	border: 1px solid rgba(129, 204, 194, 0.5);
	text-shadow: 0 1px 2px rgba(12, 13, 14, 0.45);
	box-shadow: 0 14px 34px -14px rgba(94, 144, 137, 0.9);
}

.cwtf-wire a.cwtf-arch-cta:hover,
.cwtf-wire a.cwtf-arch-cta:focus-visible {
	color: #fff;
	border-color: var(--c-accent-lt);
	transform: translateY(-3px);
	box-shadow: 0 22px 46px -16px rgba(129, 204, 194, 0.85);
	/* No brightness lift on hover - it drops #fff on the #4a7871 end to about 4.0:1. */
}

.cwtf-wire .cwtf-arch-cta__arrow { transition: transform 0.28s var(--ease); }
.cwtf-wire .cwtf-arch-cta:hover .cwtf-arch-cta__arrow { transform: translateX(4px); }

.cwtf-wire .cwtf-meta__item--upd { color: var(--c-accent-lt); }

/* =========================================================================
   5. Post body + table of contents
   ========================================================================= */

.cwtf-wire .cwtf-post-body { padding-bottom: var(--sp-section); }

/* Single column until there is genuinely room for a sidebar alongside a
 * comfortable measure. Below that the TOC collapses to a disclosure above. */
@media (min-width: 62rem) {
	.cwtf-wire .cwtf-post-body--toc {
		display: grid;
		grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
		gap: var(--sp-gap);
		align-items: start;
	}
}

.cwtf-wire .cwtf-toc { min-width: 0; }

.cwtf-wire .cwtf-toc__sticky {
	position: sticky;
	top: 1.5rem;
	border-left: 1px solid var(--c-line);
	padding-left: clamp(0.9rem, 1.5vw, 1.4rem);
	max-height: calc(100vh - 3rem);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.cwtf-wire .cwtf-toc__title {
	margin: 0 0 0.9rem;
	font-family: var(--f-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--c-faint);
}

.cwtf-wire .cwtf-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.cwtf-wire .cwtf-toc__item a {
	color: var(--c-muted);
	text-decoration: none;
	font-size: var(--fs-sm);
	line-height: 1.4;
	display: block;
	transition: color 0.2s var(--ease);
}

.cwtf-wire .cwtf-toc__item a:hover,
.cwtf-wire .cwtf-toc__item.is-current a { color: var(--c-accent-lt); }

/* Colour alone carried the current-section state, which fails 1.4.1 Use of
   Color. A rule and a weight change say the same thing without relying on hue. */
.cwtf-wire .cwtf-toc__item.is-current a {
	font-weight: 500;
	box-shadow: inset 2px 0 0 var(--c-accent-lt);
	padding-left: 0.55rem;
	margin-left: -0.55rem;
}
.cwtf-wire .cwtf-toc__item--l3 { padding-left: 0.9rem; font-size: 0.95em; }

/* Below the sidebar breakpoint the TOC becomes a bordered block, not a rail. */
@media (max-width: 61.99rem) {
	.cwtf-wire .cwtf-toc__sticky {
		position: static;
		border: 1px solid var(--c-line);
		padding: var(--sp-pad);
		margin-bottom: var(--sp-gap);
		max-height: none;
	}
}

/* =========================================================================
   6. Prose
   ========================================================================= */

.cwtf-wire .cwtf-prose {
	min-width: 0;
	max-width: 74ch;
}

.cwtf-wire .cwtf-prose > * { margin-block: 0 1.35em; }
.cwtf-wire .cwtf-prose > *:last-child { margin-bottom: 0; }

.cwtf-wire .cwtf-prose p { margin-block: 0 1.35em; }

.cwtf-wire .cwtf-prose h2,
.cwtf-wire .cwtf-prose h3 {
	font-family: var(--f-display);
	font-weight: 350;
	color: var(--c-fg);
	line-height: 1.25;
	letter-spacing: 0.005em;
	text-wrap: balance;
	scroll-margin-top: 2rem;
	overflow-wrap: break-word;
}

.cwtf-wire .cwtf-prose h2 {
	font-size: var(--fs-xl);
	margin-block: 2.2em 0.7em;
	padding-bottom: 0.45em;
	border-bottom: 1px solid var(--c-line-soft);
}

.cwtf-wire .cwtf-prose h3 {
	font-size: var(--fs-lg);
	margin-block: 1.8em 0.6em;
}

.cwtf-wire .cwtf-prose h2:first-child,
.cwtf-wire .cwtf-prose h3:first-child { margin-top: 0; }

.cwtf-wire .cwtf-prose strong { color: var(--c-fg); font-weight: 500; }

.cwtf-wire .cwtf-prose ul,
.cwtf-wire .cwtf-prose ol { padding-left: 1.35em; margin-block: 0 1.35em; }
.cwtf-wire .cwtf-prose li { margin-bottom: 0.55em; }
.cwtf-wire .cwtf-prose li::marker { color: var(--c-accent); }

.cwtf-wire .cwtf-prose a {
	color: var(--c-accent-lt);
	text-decoration: underline;
	text-decoration-color: var(--c-line);
	text-underline-offset: 0.18em;
	transition: text-decoration-color 0.2s var(--ease);
}

.cwtf-wire .cwtf-prose a:hover { text-decoration-color: var(--c-accent-lt); }

.cwtf-wire .cwtf-prose img,
.cwtf-wire .cwtf-prose figure { max-width: 100%; height: auto; }

.cwtf-wire .cwtf-prose .wp-block-image img { border: 1px solid var(--c-line-soft); }

/* Raw wp:html blocks carry arbitrary markup and floats - contain them. */
.cwtf-wire .cwtf-prose::after { content: ""; display: table; clear: both; }

/* ---- separator: the site's core rhythm device, ~7 per post ---- */

.cwtf-wire .cwtf-prose hr,
.cwtf-wire .cwtf-prose .wp-block-separator {
	border: 0;
	height: 1px;
	background: var(--c-line-soft);
	margin-block: 2.4em;
	position: relative;
	overflow: visible;
}

.cwtf-wire .cwtf-prose hr::after,
.cwtf-wire .cwtf-prose .wp-block-separator::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 7px;
	height: 7px;
	transform: translate(-50%, -50%) rotate(45deg);
	border: 1px solid var(--c-line-hard);
	background: var(--c-ink);
}

/* ---- video embed: the lead element on 96 of 99 posts ---- */

.cwtf-wire .cwtf-prose .wp-block-embed { position: relative; margin-bottom: 1.5em; }

.cwtf-wire .cwtf-prose .wp-block-embed__wrapper {
	position: relative;
	border: 1px solid var(--c-line);
}

.cwtf-wire .cwtf-prose .wp-block-embed__wrapper::after {
	content: "";
	position: absolute;
	top: -1px;
	left: -1px;
	width: 12px;
	height: 12px;
	border-top: 1px solid var(--c-accent-lt);
	border-left: 1px solid var(--c-accent-lt);
	pointer-events: none;
	z-index: 2;
}

.cwtf-wire .cwtf-prose .wp-block-embed iframe {
	display: block;
	width: 100%;
	border: 0;
}

/* Shorts are portrait; without a cap they run taller than the viewport. */
.cwtf-wire .cwtf-prose .wp-embed-aspect-9-16 .wp-block-embed__wrapper,
.cwtf-wire .cwtf-prose .wp-embed-aspect-1-1 .wp-block-embed__wrapper {
	max-width: min(100%, 26rem);
	margin-inline: auto;
}

/* ---- subscribe CTA ---- */

.cwtf-wire .cwtf-sub-cta-wrap { margin-block: 0 2em; }

.cwtf-wire .cwtf-sub-cta {
	display: inline-flex;
	align-items: center;
	gap: 0.7em;
	padding: 0.7em 1.3em;
	border: 1px solid var(--c-accent-lt);
	color: var(--c-accent-lt);
	text-decoration: none;
	font-family: var(--f-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	transition: box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}

.cwtf-wire .cwtf-sub-cta:hover,
.cwtf-wire .cwtf-sub-cta:focus-visible {
	background: rgba(129, 204, 194, 0.08);
	box-shadow: 0 0 26px -6px rgba(129, 204, 194, 0.6);
}

.cwtf-wire .cwtf-sub-cta__play {
	width: 0;
	height: 0;
	border-left: 9px solid currentColor;
	border-top: 5.5px solid transparent;
	border-bottom: 5.5px solid transparent;
}

/* =========================================================================
   7. Code blocks
   ========================================================================= */

.cwtf-wire .cwtf-code {
	position: relative;
	border: 1px solid var(--c-line);
	background: rgba(129, 204, 194, 0.035);
	margin-block: 0 1.6em;
}

.cwtf-wire .cwtf-code::after {
	content: "";
	position: absolute;
	top: -1px;
	left: -1px;
	width: 12px;
	height: 12px;
	border-top: 1px solid var(--c-accent-lt);
	border-left: 1px solid var(--c-accent-lt);
	pointer-events: none;
}

.cwtf-wire .cwtf-code__bar {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.55rem 0.9rem;
	border-bottom: 1px solid var(--c-line-soft);
	font-family: var(--f-mono);
	font-size: var(--fs-xs);
}

.cwtf-wire .cwtf-code__lang {
	color: var(--c-accent-lt);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	margin-left: 0.35rem;
}

.cwtf-wire .cwtf-code__copy {
	margin-left: auto;
	background: none;
	border: 1px solid var(--c-line-soft);
	color: var(--c-muted);
	font-family: inherit;
	font-size: inherit;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 0.3em 0.75em;
	min-height: 24px;  /* 2.5.8 - measured ~21px at --fs-xs */
	cursor: pointer;
	transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.cwtf-wire .cwtf-code__copy:hover { color: var(--c-accent-lt); border-color: var(--c-line); }
.cwtf-wire .cwtf-code__copy.is-done { color: var(--c-accent-lt); border-color: var(--c-accent-lt); }

/* The 348 code blocks on this site were rendering as a light #EDF2F7 panel with
 * grey text on a dark page - about 2.3:1. This is the single biggest fix here. */
.cwtf-wire .cwtf-code pre,
.cwtf-wire .cwtf-prose pre.wp-block-code {
	margin: 0;
	padding: clamp(0.9rem, 1.6vw, 1.35rem);
	background: transparent;
	border: 0;
	overflow-x: auto;
	font-family: var(--f-mono);
	font-size: clamp(0.78rem, 0.72rem + 0.22vw, 0.92rem);
	line-height: 1.7;
	color: #d8dedc;
	white-space: pre;
	tab-size: 4;
}

.cwtf-wire .cwtf-prose code {
	font-family: var(--f-mono);
	font-size: 0.9em;
}

/* Inline code only - the block variant inherits from pre above. */
.cwtf-wire .cwtf-prose :not(pre) > code {
	background: rgba(129, 204, 194, 0.1);
	border: 1px solid var(--c-line-soft);
	padding: 0.12em 0.4em;
	color: var(--c-accent-lt);
	overflow-wrap: break-word;
}

/* Highlighter tokens. */
.cwtf-wire .cwtf-tok-k { color: #c792ea; }
.cwtf-wire .cwtf-tok-s { color: #ecc48d; }
/* #6b7a77 measured 4.14:1 on the code panel - and the comment token is the one
   carrying the explanation in every sample. #8a9b97 gives 5.9:1. */
.cwtf-wire .cwtf-tok-c { color: #8a9b97; font-style: italic; }
.cwtf-wire .cwtf-tok-a { color: var(--c-warm); }
.cwtf-wire .cwtf-tok-n { color: #f78c6c; }
.cwtf-wire .cwtf-tok-t { color: var(--c-accent-lt); }

/* =========================================================================
   8. Tags, post nav, related
   ========================================================================= */

.cwtf-wire .cwtf-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding-block: var(--sp-gap) 0;
	border-top: 1px solid var(--c-line-soft);
}

.cwtf-wire .cwtf-tag {
	font-family: var(--f-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.08em;
	color: var(--c-muted);
	text-decoration: none;
	padding: 0.4em 0.8em;
	/* 2.5.8 - measured ~21px tall with an 8px gap, so the spacing exception
	   also failed. inline-flex so min-height applies to an inline anchor. */
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	border: 1px solid var(--c-line-soft);
	transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.cwtf-wire .cwtf-tag:hover { color: var(--c-accent-lt); border-color: var(--c-line); }

.cwtf-wire .cwtf-postnav {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	gap: 1px;
	background: var(--c-line-soft);
	border: 1px solid var(--c-line-soft);
	margin-top: var(--sp-gap);
}

.cwtf-wire .cwtf-postnav__link {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: var(--sp-pad);
	background: var(--c-ink);
	text-decoration: none;
	transition: background-color 0.25s var(--ease);
}

.cwtf-wire .cwtf-postnav__link:hover { background: rgba(129, 204, 194, 0.05); }
.cwtf-wire .cwtf-postnav__link--next { text-align: right; }

.cwtf-wire .cwtf-postnav__dir {
	font-family: var(--f-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--c-faint);
}

.cwtf-wire .cwtf-postnav__title {
	color: var(--c-fg);
	font-size: var(--fs-md);
	font-weight: 350;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cwtf-wire .cwtf-related { padding-block: var(--sp-section) 0; }

.cwtf-wire .cwtf-related__title {
	margin: 0 0 var(--sp-gap);
	font-family: var(--f-display);
	font-weight: 300;
	font-size: var(--fs-xl);
	color: var(--c-fg);
	letter-spacing: -0.01em;
}

/* =========================================================================
   9. Card grid
   ========================================================================= */

/* auto-fill with a min() floor: one column at 360px, and as many as fit at 4K
 * without ever forcing a card narrower than the viewport. */
.cwtf-wire .cwtf-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
	gap: var(--sp-gap);
	padding-bottom: var(--sp-section);
}

.cwtf-wire .cwtf-related .cwtf-grid { padding-bottom: 0; }

.cwtf-wire .cwtf-card { min-width: 0; }

.cwtf-wire .cwtf-card__link {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--c-line);
	/* On-palette lift so cards read as panels sitting on the grid rather than
	 * dissolving into it. Outline-only, and then 0.07, both sat too close to the
	 * #0B0D0D ground - this is double the first pass. */
	background: rgba(129, 204, 194, 0.14);
	text-decoration: none;
	transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease),
		background-color 0.25s var(--ease);
}

.cwtf-wire .cwtf-card__link::after {
	content: "";
	position: absolute;
	top: -1px;
	left: -1px;
	width: 12px;
	height: 12px;
	border-top: 1px solid var(--c-accent-lt);
	border-left: 1px solid var(--c-accent-lt);
	pointer-events: none;
}

.cwtf-wire .cwtf-card__link:hover,
.cwtf-wire .cwtf-card__link:focus-visible {
	border-color: var(--c-accent-lt);
	background: rgba(129, 204, 194, 0.21);
	box-shadow: 0 0 30px -8px rgba(129, 204, 194, 0.35);
}

/* 90 of 99 featured images are landscape and 9 are portrait Shorts art, so the
 * ratio is enforced here rather than trusted from the file. */
.cwtf-wire .cwtf-card__thumb {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: linear-gradient(140deg, rgba(94, 144, 137, 0.18), transparent 70%);
	border-bottom: 1px solid var(--c-line-soft);
}

.cwtf-wire .cwtf-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	opacity: 0.85;
	transition: opacity 0.3s var(--ease), filter 0.3s var(--ease), transform 0.5s var(--ease);
}

.cwtf-wire .cwtf-card__link:hover .cwtf-card__thumb img,
.cwtf-wire .cwtf-card__link:focus-visible .cwtf-card__thumb img {
	opacity: 1;
	filter: none;
	transform: scale(1.03);
}

.cwtf-wire .cwtf-card__thumb-fallback {
	display: block;
	width: 100%;
	height: 100%;
	background:
		repeating-linear-gradient(90deg, var(--c-line-soft) 0 1px, transparent 1px 22px),
		repeating-linear-gradient(0deg, var(--c-line-soft) 0 1px, transparent 1px 22px);
}

.cwtf-wire .cwtf-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: var(--sp-pad);
	flex: 1;
}

.cwtf-wire .cwtf-card__cat {
	font-family: var(--f-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--c-accent-lt);
}

/* Titles average 85 characters and reach 149 - clamp hard or the grid ragged. */
.cwtf-wire .cwtf-card__title {
	font-family: var(--f-display);
	font-weight: 400;
	font-size: var(--fs-md);
	line-height: 1.35;
	color: var(--c-fg);
	letter-spacing: -0.005em;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	overflow-wrap: break-word;
}

.cwtf-wire .cwtf-card__excerpt {
	font-size: var(--fs-sm);
	color: var(--c-muted);
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cwtf-wire .cwtf-card__date {
	margin-top: auto;
	padding-top: 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--f-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.08em;
	color: var(--c-faint);
}

.cwtf-wire .cwtf-card__dot {
	width: 4px;
	height: 4px;
	transform: rotate(45deg);
	border: 1px solid var(--c-line-hard);
}

/* =========================================================================
   10. Pagination, search, empty state
   ========================================================================= */

.cwtf-wire .cwtf-pagination,
.cwtf-wire .navigation.pagination {
	padding-bottom: var(--sp-section);
}

.cwtf-wire .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	align-items: center;
}

.cwtf-wire .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0 0.75rem;
	border: 1px solid var(--c-line-soft);
	color: var(--c-muted);
	text-decoration: none;
	font-family: var(--f-mono);
	font-size: var(--fs-sm);
	transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.cwtf-wire .page-numbers:hover { color: var(--c-accent-lt); border-color: var(--c-line); }
.cwtf-wire .page-numbers.current { color: var(--c-accent-lt); border-color: var(--c-accent-lt); }
.cwtf-wire .page-numbers.dots { border-color: transparent; }

.cwtf-wire .cwtf-search { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }

.cwtf-wire .cwtf-search input {
	flex: 1 1 14rem;
	min-width: 0;
	background: transparent;
	border: 1px solid var(--c-line);
	color: var(--c-fg);
	padding: 0.7em 1em;
	font: inherit;
	font-size: var(--fs-sm);
}

.cwtf-wire .cwtf-search button {
	background: none;
	border: 1px solid var(--c-accent-lt);
	color: var(--c-accent-lt);
	padding: 0.7em 1.4em;
	font-family: var(--f-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
}

.cwtf-wire .cwtf-empty {
	border: 1px solid var(--c-line-soft);
	padding: clamp(2rem, 5vw, 4rem);
	text-align: center;
	margin-bottom: var(--sp-section);
}

.cwtf-wire .cwtf-empty__title {
	margin: 0 0 0.5rem;
	font-family: var(--f-display);
	font-weight: 300;
	font-size: var(--fs-xl);
	color: var(--c-fg);
}

.cwtf-wire .cwtf-empty__text { margin: 0 0 1.5rem; color: var(--c-muted); }

.cwtf-wire .cwtf-btn {
	display: inline-block;
	border: 1px solid var(--c-accent-lt);
	color: var(--c-accent-lt);
	text-decoration: none;
	padding: 0.7em 1.4em;
	font-family: var(--f-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* =========================================================================
   11. Small screens
   ========================================================================= */

@media (max-width: 60rem) {
	.cwtf .cwtf-head__toggle { display: inline-flex; }

	.cwtf .cwtf-head__in { flex-wrap: wrap; row-gap: 0; }

	.cwtf .cwtf-nav {
		order: 10;
		flex-basis: 100%;
		display: none;
		border-top: 1px solid var(--c-line);
		margin-top: 0.85rem;
		padding-block: 0.5rem;
	}

	.cwtf .cwtf-nav.is-open { display: block; }

	.cwtf .cwtf-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.cwtf .cwtf-nav__list > li {
		border-bottom: 1px solid var(--c-line-soft);
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.cwtf .cwtf-nav__list > li:last-child { border-bottom: 0; }

	.cwtf .cwtf-nav__list > li > a { flex: 1; padding-block: 0.85em; }

	.cwtf .cwtf-nav__more { padding: 0.85em; }

	/* Static flow on mobile - a floating dropdown has nowhere to go. */
	.cwtf .cwtf-nav .sub-menu {
		position: static;
		flex-basis: 100%;
		min-width: 0;
		border: 0;
		border-top: 1px solid var(--c-line-soft);
		box-shadow: none;
		transform: none;
		padding: 0.25rem 0 0.6rem 1rem;
		display: none;
		opacity: 1;
		visibility: visible;
	}

	/* The tap toggle, and the only thing that opens a submenu at this width - hover
	 * cannot, because the rule above is the base state and the desktop hover rule
	 * sets opacity/visibility/transform but never display.
	 *
	 * There used to be a second line here suppressing this on :hover, guarded by
	 * `.sub-menu:not(.is-open)`. is-open goes on the <li>, never on the .sub-menu, so
	 * that guard was always true, and at (0,5,1) it out-specified this rule (0,4,1)
	 * whenever the item was hovered. Tapping leaves an item in sticky hover, so it
	 * hid the submenu at exactly the moment it was asked to open - while the chevron,
	 * keyed off li.is-open alone, still rotated. Do not reintroduce it. */
	.cwtf .cwtf-nav__list li.is-open > .sub-menu { display: block; }

	/* Two pills will not sit beside the burger on a phone, so they move into the
	 * drawer. Keyed off the toggle rather than a media query alone: if no menu is
	 * assigned there is no toggle and no drawer, and the pills stay visible. */
	.cwtf .cwtf-head__toggle ~ .cwtf-head__actions {
		order: 11;
		flex-basis: 100%;
		display: none;
		gap: 0.6rem;
		padding-top: 0.85rem;
	}

	.cwtf .cwtf-nav.is-open ~ .cwtf-head__actions { display: flex; }

	.cwtf .cwtf-head__actions .cwtf-head__sub {
		flex: 1;
		text-align: center;
	}
}

@media (max-width: 26rem) {
	.cwtf .cwtf-head__brand { font-size: var(--fs-xs); letter-spacing: 0.1em; }
	.cwtf-wire .cwtf-postnav__link--next { text-align: left; }
}

/* =========================================================================
   12. Motion + print
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
	.cwtf *,
	.cwtf *::before,
	.cwtf *::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}

	.cwtf-wire .cwtf-card__thumb img { opacity: 1; filter: none; }
}

@media print {
	.cwtf .cwtf-head,
	.cwtf .cwtf-foot,
	.cwtf-wire .cwtf-toc,
	.cwtf-wire .cwtf-postnav,
	.cwtf-wire .cwtf-related,
	.cwtf-wire .cwtf-sub-cta-wrap { display: none !important; }

	body.cwtf-wire { background: #fff; color: #000; }
	.cwtf-wire .cwtf-prose { max-width: none; }
}
