/*
Theme Name: TokenPR
Theme URI: https://tokenpr.net/
Description: Signal Violet — the TokenPR design system. Crypto PR agency + independent Web3 newsroom. Built for this site only.
Author: TokenPR
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: tokenpr
*/

/* ==========================================================================
   00 · FONTS (self-hosted — font-src is 'self' under the site CSP)
   ========================================================================== */

@font-face {
	font-family: "Space Grotesk";
	src: url("assets/fonts/space-grotesk-var.woff2") format("woff2-variations");
	font-weight: 300 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Inter";
	src: url("assets/fonts/inter-var.woff2") format("woff2-variations");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "IBM Plex Mono";
	src: url("assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   01 · TOKENS
   Light is the primary theme. Dark is ink-navy.

   NOTE ON CHROME: --chrome-* are deliberately SEPARATE from --bg/--text.
   The masthead and footer are ink-navy in BOTH themes — that is the brand.
   Mapping chrome onto the surface tokens makes the header invert in dark mode
   and the whole identity collapses. Keep these independent.
   ========================================================================== */

:root {
	/* surfaces */
	--bg: #f7f7fb;
	--surface: #eeeff6;
	--card: #ffffff;
	--border: #e2e4ef;

	/* text */
	--text: #12131a;
	--muted: #5a5e70;

	/* brand */
	--brand: #6d28d9;
	--brand-deep: #4c1d95;
	--accent: #ec4899;
	--gradient: linear-gradient(90deg, #6d28d9 0%, #ec4899 100%);
	--gradient-diag: linear-gradient(135deg, #6d28d9 0%, #ec4899 100%);

	/* Link colour is NOT --brand. #6D28D9 on #F7F7FB is 6.9:1 for text but the
	   brand is also used on large tinted fills where it need only clear 3:1;
	   keeping a dedicated token stops a future palette tweak from silently
	   dropping body links below AA. */
	--link: #5b21b6;
	--link-hover: #4c1d95;

	/* Brand violet used as TEXT on a card/surface, as opposed to as a fill.
	   #6D28D9 measures 2.43:1 on the dark card — it fails AA outright — so this
	   token exists to be overridden in dark mode. Anywhere the brand colour is
	   applied to glyphs (chips, stat figures, icon marks) must use this, not
	   --brand, or it silently goes unreadable in dark mode. */
	--brand-ink: #6d28d9;

	/* status */
	--success: #16a34a;
	--warning: #f59e0b;
	--danger: #dc2626;
	--info: #2563eb;

	/* category tints */
	--cat-tech: #6366f1;
	--cat-marketing: #ec4899;
	--cat-news: #2563eb;
	--cat-web3: #14b8a6;

	/* chrome (theme-independent) */
	--chrome-bg: #0b1020;
	--chrome-bg-soft: #141a2e;
	--chrome-text: #eef0fa;
	--chrome-muted: #97a0bd;
	--chrome-border: #26304c;

	/* commercial labelling */
	--sponsored-bg: #fff7ed;
	--sponsored-border: #fdba74;
	--sponsored-text: #7c2d12;

	/* type */
	--font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	/* spacing — 8px scale */
	--s1: 4px;
	--s2: 8px;
	--s3: 12px;
	--s4: 16px;
	--s5: 24px;
	--s6: 32px;
	--s7: 48px;
	--s8: 64px;
	--s9: 96px;

	/* geometry */
	--wrap: 1200px;
	--read: 720px;
	--radius: 10px;
	--radius-lg: 16px;
	--radius-pill: 999px;

	--shadow-sm: 0 1px 2px rgba(18, 19, 26, 0.05);
	--shadow: 0 4px 16px rgba(18, 19, 26, 0.07);
	--shadow-lg: 0 12px 34px rgba(18, 19, 26, 0.11);
	--ring: 0 0 0 3px rgba(109, 40, 217, 0.35);
}

:root[data-theme="dark"] {
	--bg: #0b1020;
	--surface: #141a2e;
	--card: #141a2e;
	--border: #26304c;
	--text: #eef0fa;
	--muted: #97a0bd;

	/* Violet and magenta stay vivid on ink, but the LINK token has to lighten or
	   it fails contrast against #0B1020 (#5B21B6 is only 2.1:1 there). */
	--link: #c4b5fd;
	--link-hover: #ddd6fe;
	--brand-ink: #c4b5fd;

	--sponsored-bg: #2a1a0d;
	--sponsored-border: #7c4a1a;
	--sponsored-text: #fdba74;

	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
	--shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
	--shadow-lg: 0 12px 34px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0b1020;
		--surface: #141a2e;
		--card: #141a2e;
		--border: #26304c;
		--text: #eef0fa;
		--muted: #97a0bd;
		--link: #c4b5fd;
		--link-hover: #ddd6fe;
		--brand-ink: #c4b5fd;
		--sponsored-bg: #2a1a0d;
		--sponsored-border: #7c4a1a;
		--sponsored-text: #fdba74;
		--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
		--shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
		--shadow-lg: 0 12px 34px rgba(0, 0, 0, 0.55);
	}
}

/* ==========================================================================
   02 · RESET / BASE
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -0.02em;
	margin: 0 0 var(--s4);
	color: var(--text);
	text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 1.75rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }

p { margin: 0 0 var(--s5); }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

/* Focus must be visible on ink chrome AND on paper. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

hr { border: 0; border-top: 1px solid var(--border); margin: var(--s7) 0; }

code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.9em; }

.tpr-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip-path: inset(50%);
	white-space: nowrap; border: 0;
}

.tpr-skip {
	position: absolute; left: -9999px; top: 0; z-index: 200;
	background: var(--brand); color: #fff;
	padding: var(--s3) var(--s5); border-radius: 0 0 var(--radius) 0;
	font-weight: 600; text-decoration: none;
}
.tpr-skip:focus { left: 0; color: #fff; }

/* ==========================================================================
   03 · LAYOUT
   ========================================================================== */

/* Gutter lives on padding-inline ONLY. A `padding:` shorthand added later to
   this rule silently drops the horizontal gutter and the layout goes
   edge-to-edge on mobile — set block padding on the section, not here. */
.tpr-wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--s5);
}

.tpr-read { max-width: var(--read); margin-inline: auto; }

.tpr-section { padding-block: var(--s8); }
.tpr-section--tight { padding-block: var(--s7); }
.tpr-section--band { background: var(--surface); }

.tpr-section__head { margin-bottom: var(--s6); }
.tpr-section__eyebrow {
	font-family: var(--font-display);
	font-size: 0.75rem; font-weight: 700;
	letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 var(--s2);
}
.tpr-section__title { margin: 0 0 var(--s2); }
.tpr-section__sub { color: var(--muted); margin: 0; max-width: 62ch; }

.tpr-section__headrow {
	display: flex; flex-wrap: wrap; gap: var(--s4);
	align-items: flex-end; justify-content: space-between;
	margin-bottom: var(--s6);
}
.tpr-section__headrow > * { margin-bottom: 0; }

/* Auto-fit grids. minmax()'s floor must stay <= the narrowest viewport minus
   gutters, else children overflow their track on small screens. */
.tpr-grid { display: grid; gap: var(--s5); }
.tpr-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.tpr-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.tpr-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.tpr-cols {
	display: grid;
	gap: var(--s7);
	grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1000px) {
	.tpr-cols--sidebar { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* ==========================================================================
   04 · BUTTONS
   ========================================================================== */

.tpr-btn {
	display: inline-flex; align-items: center; justify-content: center;
	gap: var(--s2);
	padding: 0.75rem 1.35rem;
	border-radius: var(--radius);
	border: 1px solid transparent;
	font-family: var(--font-display);
	font-weight: 600; font-size: 0.95rem; line-height: 1.2;
	text-decoration: none; cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	white-space: nowrap;
}
.tpr-btn:hover { transform: translateY(-1px); }
.tpr-btn:active { transform: translateY(0); }

.tpr-btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.tpr-btn--primary:hover { background: var(--brand-deep); color: #fff; box-shadow: var(--shadow); }

.tpr-btn--accent { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.tpr-btn--accent:hover { background: #db2777; color: #fff; box-shadow: var(--shadow); }

.tpr-btn--gradient { background: var(--gradient); color: #fff; box-shadow: var(--shadow); }
.tpr-btn--gradient:hover { color: #fff; box-shadow: var(--shadow-lg); }

.tpr-btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.tpr-btn--ghost:hover { background: var(--surface); color: var(--text); border-color: var(--brand); }

/* On ink chrome / hero the ghost button needs its own colours. */
.tpr-btn--ghost-invert { background: rgba(255, 255, 255, 0.06); color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.tpr-btn--ghost-invert:hover { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.55); }

.tpr-btn--sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
.tpr-btn--block { display: flex; width: 100%; }

.tpr-btnrow { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ==========================================================================
   05 · CHIPS / LABELS
   ========================================================================== */

.tpr-chip {
	display: inline-flex; align-items: center; gap: var(--s1);
	padding: 0.24rem 0.62rem;
	border-radius: var(--radius-pill);
	font-family: var(--font-display);
	font-size: 0.7rem; font-weight: 700;
	letter-spacing: 0.07em; text-transform: uppercase;
	text-decoration: none;
	border: 1px solid transparent;
	line-height: 1.5;
}
.tpr-chip--tech { background: color-mix(in srgb, var(--cat-tech) 14%, transparent); color: var(--cat-tech); border-color: color-mix(in srgb, var(--cat-tech) 32%, transparent); }
.tpr-chip--marketing { background: color-mix(in srgb, var(--cat-marketing) 14%, transparent); color: var(--cat-marketing); border-color: color-mix(in srgb, var(--cat-marketing) 32%, transparent); }
.tpr-chip--news { background: color-mix(in srgb, var(--cat-news) 14%, transparent); color: var(--cat-news); border-color: color-mix(in srgb, var(--cat-news) 32%, transparent); }
.tpr-chip--web3 { background: color-mix(in srgb, var(--cat-web3) 14%, transparent); color: var(--cat-web3); border-color: color-mix(in srgb, var(--cat-web3) 32%, transparent); }
.tpr-chip--neutral { background: var(--surface); color: var(--muted); border-color: var(--border); }
.tpr-chip--brand { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand-ink) 34%, transparent); }

:root[data-theme="dark"] .tpr-chip--tech,
:root[data-theme="dark"] .tpr-chip--news { color: #a5b4fc; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .tpr-chip--tech,
	:root:not([data-theme="light"]) .tpr-chip--news { color: #a5b4fc; }
}

.tpr-eyebrow {
	font-family: var(--font-display);
	font-size: 0.72rem; font-weight: 700;
	letter-spacing: 0.13em; text-transform: uppercase;
	color: var(--muted);
}

/* --- Commercial labels. These must read as a warning band, never as chrome. --- */
.tpr-label-sponsored {
	display: inline-flex; align-items: center; gap: var(--s2);
	padding: 0.3rem 0.7rem;
	border-radius: var(--radius-pill);
	background: var(--sponsored-bg);
	border: 1px solid var(--sponsored-border);
	color: var(--sponsored-text);
	font-family: var(--font-display);
	font-size: 0.72rem; font-weight: 800;
	letter-spacing: 0.1em; text-transform: uppercase;
}

.tpr-disclosure {
	display: flex; gap: var(--s4);
	padding: var(--s5);
	border: 1px solid var(--sponsored-border);
	border-left: 4px solid var(--warning);
	background: var(--sponsored-bg);
	color: var(--sponsored-text);
	border-radius: var(--radius);
	margin: 0 0 var(--s6);
	font-size: 0.95rem;
}
.tpr-disclosure p { margin: 0; }
.tpr-disclosure p + p { margin-top: var(--s2); }
.tpr-disclosure strong { font-weight: 700; }
.tpr-disclosure a { color: inherit; text-decoration: underline; }

/* ==========================================================================
   06 · MASTHEAD
   ========================================================================== */

/* No `overflow: hidden` anywhere on this element or its ancestors — it clips
   the dropdown panels, which are absolutely positioned children. */
.tpr-masthead {
	position: sticky; top: 0; z-index: 100;
	background: var(--chrome-bg);
	color: var(--chrome-text);
	border-bottom: 1px solid var(--chrome-border);
}
.tpr-masthead__inner {
	display: flex; align-items: center; gap: var(--s5);
	min-height: 68px;
}

.tpr-logo {
	display: inline-flex; align-items: baseline;
	font-family: var(--font-display);
	font-size: 1.3rem; font-weight: 700; letter-spacing: -0.03em;
	color: var(--chrome-text); text-decoration: none;
	flex-shrink: 0;
}
.tpr-logo b {
	font-weight: 700;
	background: var(--gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.tpr-nav { display: none; margin-inline-start: auto; }
@media (min-width: 1060px) { .tpr-nav { display: block; } }

.tpr-nav ul { list-style: none; display: flex; align-items: center; gap: var(--s2); margin: 0; padding: 0; }
.tpr-nav li { position: relative; }
.tpr-nav a {
	display: inline-flex; align-items: center; gap: var(--s1);
	padding: var(--s2) var(--s3);
	color: var(--chrome-text); text-decoration: none;
	font-family: var(--font-display); font-size: 0.92rem; font-weight: 600;
	border-radius: var(--radius); white-space: nowrap;
}
.tpr-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.tpr-nav .current-menu-item > a,
.tpr-nav .current-menu-parent > a,
.tpr-nav .current-menu-ancestor > a { color: #fff; background: rgba(255, 255, 255, 0.1); }

.tpr-nav .sub-menu {
	position: absolute; top: calc(100% + 6px); left: 0;
	min-width: 232px;
	background: var(--chrome-bg-soft);
	border: 1px solid var(--chrome-border);
	border-radius: var(--radius);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
	padding: var(--s2);
	display: flex; flex-direction: column; gap: 2px;
	opacity: 0; visibility: hidden; transform: translateY(-4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.tpr-nav li:hover > .sub-menu,
.tpr-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.tpr-nav .sub-menu a { font-weight: 500; font-size: 0.9rem; width: 100%; }

.tpr-masthead__actions { display: flex; align-items: center; gap: var(--s2); margin-inline-start: auto; }
@media (min-width: 1060px) { .tpr-masthead__actions { margin-inline-start: var(--s4); } }

.tpr-iconbtn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px;
	background: transparent; border: 1px solid var(--chrome-border);
	border-radius: var(--radius); color: var(--chrome-text);
	cursor: pointer; flex-shrink: 0;
}
.tpr-iconbtn:hover { background: rgba(255, 255, 255, 0.08); }
.tpr-iconbtn svg { width: 19px; height: 19px; }

.tpr-masthead__cta { display: none; }
@media (min-width: 560px) { .tpr-masthead__cta { display: inline-flex; } }

.tpr-burger { display: inline-flex; }
@media (min-width: 1060px) { .tpr-burger { display: none; } }

/* Mobile drawer */
.tpr-drawer {
	display: none;
	background: var(--chrome-bg-soft);
	border-top: 1px solid var(--chrome-border);
	max-height: min(72vh, 640px);
	overflow-y: auto;
}
.tpr-drawer.is-open { display: block; }
.tpr-drawer ul { list-style: none; margin: 0; padding: 0; }
.tpr-drawer > ul { padding: var(--s4) 0; }
.tpr-drawer a {
	display: block;
	padding: var(--s3) var(--s5);
	color: var(--chrome-text); text-decoration: none;
	font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
}
.tpr-drawer a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.tpr-drawer .sub-menu a { padding-left: var(--s7); font-weight: 400; font-size: 0.92rem; color: var(--chrome-muted); }
.tpr-drawer__cta { padding: var(--s4) var(--s5) var(--s6); }

/* Search overlay */
.tpr-searchbar { display: none; padding: var(--s4) 0 var(--s5); border-top: 1px solid var(--chrome-border); background: var(--chrome-bg-soft); }
.tpr-searchbar.is-open { display: block; }
.tpr-searchbar form { display: flex; gap: var(--s2); }
.tpr-searchbar input[type="search"] {
	flex: 1 1 auto; min-width: 0;
	padding: 0.7rem 0.9rem;
	border-radius: var(--radius);
	border: 1px solid var(--chrome-border);
	background: var(--chrome-bg); color: var(--chrome-text);
}
.tpr-searchbar input[type="search"]::placeholder { color: var(--chrome-muted); }

/* ==========================================================================
   07 · HERO (gradient signature)
   ========================================================================== */

.tpr-hero {
	position: relative;
	background: var(--chrome-bg);
	color: var(--chrome-text);
	overflow: hidden;
	padding-block: var(--s9) var(--s8);
}
.tpr-hero::before {
	content: "";
	position: absolute; inset: -40% -10% auto -10%;
	height: 620px;
	background: radial-gradient(ellipse at 30% 0%, rgba(109, 40, 217, 0.55) 0%, transparent 62%),
	            radial-gradient(ellipse at 78% 18%, rgba(236, 72, 153, 0.36) 0%, transparent 58%);
	pointer-events: none;
}
.tpr-hero__inner { position: relative; z-index: 1; max-width: 860px; }
.tpr-hero h1 { color: #fff; font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.75rem); margin-bottom: var(--s5); }
.tpr-hero__grad {
	background: var(--gradient);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.tpr-hero__sub { color: var(--chrome-muted); font-size: 1.1rem; max-width: 60ch; margin-bottom: var(--s6); }
.tpr-hero .tpr-eyebrow { color: var(--accent); display: block; margin-bottom: var(--s4); }

.tpr-trust {
	position: relative; z-index: 1;
	margin-top: var(--s8);
	padding-top: var(--s6);
	border-top: 1px solid var(--chrome-border);
	display: grid; gap: var(--s5);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.tpr-trust__item { }
.tpr-trust__k { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: #fff; display: block; }
.tpr-trust__v { color: var(--chrome-muted); font-size: 0.92rem; }

/* ==========================================================================
   08 · CARDS
   ========================================================================== */

.tpr-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
	display: flex; flex-direction: column;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.tpr-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 32%, var(--border)); }
.tpr-card__body { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); flex: 1 1 auto; }
.tpr-card__title { font-size: 1.075rem; margin: 0; line-height: 1.32; }
.tpr-card__title a { color: var(--text); text-decoration: none; }
/* Underline on hover rather than a colour change — recolouring the whole card
   title on hover is what dropped it below AA on the tinted surfaces. */
.tpr-card:hover .tpr-card__title a { text-decoration: underline; text-decoration-color: var(--accent); }
.tpr-card__excerpt { color: var(--muted); font-size: 0.94rem; margin: 0; }
.tpr-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); color: var(--muted); font-size: 0.82rem; margin-top: auto; padding-top: var(--s2); }
.tpr-card__meta a { color: var(--muted); text-decoration: none; }
.tpr-card__meta a:hover { color: var(--link); text-decoration: underline; }
.tpr-card__sep { opacity: 0.5; }

.tpr-card__media { display: block; position: relative; background: var(--surface); }
.tpr-card__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tpr-card__media--tall img { aspect-ratio: 4 / 3; }

.tpr-card--sponsored { border-color: var(--sponsored-border); background: color-mix(in srgb, var(--sponsored-bg) 55%, var(--card)); }
.tpr-card--sponsored:hover { border-color: var(--sponsored-border); }

/* Service card — gradient rule on top, icon tile */
.tpr-scard { position: relative; }
.tpr-scard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--gradient); }
.tpr-scard__icon {
	width: 44px; height: 44px; border-radius: var(--radius);
	display: grid; place-items: center;
	background: color-mix(in srgb, var(--brand) 14%, transparent);
	color: var(--brand-ink);
}
.tpr-scard__icon svg { width: 22px; height: 22px; }
.tpr-scard__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); font-size: 0.9rem; color: var(--muted); }
.tpr-scard__list li { display: flex; gap: var(--s2); align-items: flex-start; }
.tpr-scard__list li::before { content: "→"; color: var(--accent); flex-shrink: 0; }

/* Resource / playbook card */
.tpr-rcard__kind { color: var(--accent); }
.tpr-rcard__dl { display: inline-flex; align-items: center; gap: var(--s2); font-family: var(--font-display); font-weight: 600; font-size: 0.88rem; color: var(--link); text-decoration: none; }
.tpr-rcard__dl:hover { text-decoration: underline; }
.tpr-rcard__dl svg { width: 16px; height: 16px; }

/* Case-study card */
.tpr-ccard__result { display: flex; flex-wrap: wrap; gap: var(--s5); padding-top: var(--s3); border-top: 1px dashed var(--border); }
.tpr-ccard__k { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--brand-ink); }
.tpr-ccard__v { font-size: 0.78rem; color: var(--muted); }

/* Author card */
.tpr-acard { text-align: center; align-items: center; padding: var(--s6) var(--s5); }
.tpr-acard__avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.tpr-acard__name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin: 0; }
.tpr-acard__name a { color: var(--text); text-decoration: none; }
.tpr-acard__name a:hover { text-decoration: underline; }
.tpr-acard__role { color: var(--accent); font-size: 0.8rem; font-weight: 600; font-family: var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; }
.tpr-acard__bio { color: var(--muted); font-size: 0.88rem; margin: 0; }

/* ==========================================================================
   09 · LISTS OF POSTS
   ========================================================================== */

.tpr-list { display: grid; gap: var(--s5); }
.tpr-listitem { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 620px) {
	.tpr-listitem--media { grid-template-columns: 200px minmax(0, 1fr); }
}
.tpr-listitem__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.tpr-listitem__title { font-size: 1.15rem; margin: 0 0 var(--s2); }
.tpr-listitem__title a { color: var(--text); text-decoration: none; }
.tpr-listitem__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

/* Featured lead */
.tpr-lead { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) { .tpr-lead { grid-template-columns: 1.15fr 1fr; } }
.tpr-lead__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); }
.tpr-lead__title { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.15rem); margin: var(--s3) 0; }
.tpr-lead__title a { color: var(--text); text-decoration: none; }
.tpr-lead__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.tpr-lead__excerpt { color: var(--muted); }

/* ==========================================================================
   10 · ARTICLE
   ========================================================================== */

.tpr-article__head { padding-block: var(--s7) var(--s5); }
.tpr-breadcrumb { font-size: 0.82rem; color: var(--muted); margin-bottom: var(--s4); }
.tpr-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.tpr-breadcrumb a { color: var(--muted); text-decoration: none; }
.tpr-breadcrumb a:hover { color: var(--link); text-decoration: underline; }
.tpr-breadcrumb li:not(:last-child)::after { content: "/"; margin-inline-start: var(--s2); opacity: 0.45; }

.tpr-article__title { font-size: clamp(1.9rem, 1.3rem + 2.8vw, 3rem); margin-bottom: var(--s4); }
.tpr-standfirst { font-size: 1.15rem; color: var(--muted); line-height: 1.6; margin-bottom: var(--s6); }

.tpr-byline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); padding-block: var(--s4); border-block: 1px solid var(--border); }
.tpr-byline__avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.tpr-byline__who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tpr-byline__name { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.tpr-byline__name a { color: var(--text); text-decoration: none; }
.tpr-byline__name a:hover { text-decoration: underline; }
.tpr-byline__role { color: var(--accent); font-size: 0.78rem; font-weight: 600; }
.tpr-byline__meta { color: var(--muted); font-size: 0.82rem; display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.tpr-byline__spacer { margin-inline-start: auto; }

.tpr-share { display: flex; gap: var(--s2); }
.tpr-share a {
	width: 36px; height: 36px; border-radius: var(--radius);
	border: 1px solid var(--border); color: var(--muted);
	display: grid; place-items: center; text-decoration: none;
}
.tpr-share a:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--surface); }
.tpr-share svg { width: 16px; height: 16px; }

.tpr-figure { margin: 0 0 var(--s6); }
.tpr-figure img { width: 100%; border-radius: var(--radius-lg); }
.tpr-figure figcaption { color: var(--muted); font-size: 0.84rem; margin-top: var(--s3); }

.tpr-tldr {
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 4px solid var(--brand);
	border-radius: var(--radius);
	padding: var(--s5);
	margin: 0 0 var(--s6);
}
.tpr-tldr h2 { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-ink); margin: 0 0 var(--s3); }
.tpr-tldr ul { margin: 0; padding-left: 1.15rem; display: grid; gap: var(--s2); }
.tpr-tldr li { color: var(--text); font-size: 0.95rem; }

.tpr-toc {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: var(--s5);
	margin: 0 0 var(--s6);
}
.tpr-toc__title { font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s3); }
.tpr-toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: var(--s2); }
.tpr-toc a { color: var(--link); text-decoration: none; font-size: 0.94rem; }
.tpr-toc a:hover { text-decoration: underline; }

/* --- prose ---
   Type selectors here beat any utility class placed on the same element, so
   never try to override these with a class inside .tpr-prose. Wrap instead. */
.tpr-prose { font-size: 1.0625rem; line-height: 1.75; }
.tpr-prose > h2 { margin-top: var(--s8); scroll-margin-top: 90px; }
.tpr-prose > h3 { margin-top: var(--s6); scroll-margin-top: 90px; }
.tpr-prose ul, .tpr-prose ol { margin: 0 0 var(--s5); padding-left: 1.35rem; display: grid; gap: var(--s2); }
.tpr-prose li { padding-left: var(--s1); }
.tpr-prose blockquote {
	margin: var(--s6) 0;
	padding: var(--s5) var(--s6);
	border-left: 4px solid var(--accent);
	background: var(--surface);
	border-radius: 0 var(--radius) var(--radius) 0;
	font-size: 1.1rem; font-style: italic; color: var(--text);
}
.tpr-prose blockquote p:last-child { margin-bottom: 0; }
.tpr-prose blockquote cite { display: block; margin-top: var(--s3); font-size: 0.86rem; font-style: normal; color: var(--muted); }
.tpr-prose img { border-radius: var(--radius); margin-block: var(--s5); }
.tpr-prose a { color: var(--link); }
.tpr-prose strong { font-weight: 650; }

/* A table must scroll inside a WRAPPER. Putting display:block on the <table>
   itself makes it shrink-wrap its content and the columns collapse. */
.tpr-tablewrap { overflow-x: auto; margin: 0 0 var(--s6); border: 1px solid var(--border); border-radius: var(--radius); }
.tpr-tablewrap table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.tpr-tablewrap th, .tpr-tablewrap td { padding: var(--s3) var(--s4); text-align: left; border-bottom: 1px solid var(--border); }
.tpr-tablewrap th { background: var(--surface); font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.tpr-tablewrap tr:last-child td { border-bottom: 0; }

.tpr-sources {
	margin: var(--s8) 0 0;
	padding: var(--s5);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}
.tpr-sources h2 { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s3); }
.tpr-sources ol { margin: 0; padding-left: 1.2rem; display: grid; gap: var(--s2); font-size: 0.9rem; }
.tpr-sources a { color: var(--link); word-break: break-word; }

.tpr-authorbox { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); margin-top: var(--s8); padding: var(--s6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
@media (min-width: 620px) { .tpr-authorbox { grid-template-columns: 96px minmax(0, 1fr); } }
.tpr-authorbox__avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.tpr-authorbox__name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin: 0 0 var(--s1); }
.tpr-authorbox__name a { color: var(--text); text-decoration: none; }
.tpr-authorbox__role { color: var(--accent); font-size: 0.82rem; font-weight: 600; margin-bottom: var(--s3); }
.tpr-authorbox__bio { color: var(--muted); font-size: 0.94rem; margin: 0 0 var(--s3); }
.tpr-authorbox__bio p { margin: 0 0 var(--s3); }
.tpr-authorbox__bio p:last-child { margin-bottom: 0; }

.tpr-taglist { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s6); }

/* ==========================================================================
   11 · FAQ
   ========================================================================== */

.tpr-faq { display: grid; gap: var(--s3); }
.tpr-faq details {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}
.tpr-faq details[open] { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.tpr-faq summary {
	cursor: pointer; list-style: none;
	padding: var(--s4) var(--s5);
	font-family: var(--font-display); font-weight: 600; font-size: 1rem;
	display: flex; gap: var(--s4); align-items: center; justify-content: space-between;
}
.tpr-faq summary::-webkit-details-marker { display: none; }
.tpr-faq summary::after {
	content: "+"; font-size: 1.3rem; color: var(--accent); flex-shrink: 0; line-height: 1;
}
.tpr-faq details[open] summary::after { content: "–"; }
.tpr-faq__a { padding: 0 var(--s5) var(--s5); color: var(--muted); }
.tpr-faq__a p:last-child { margin-bottom: 0; }

/* ==========================================================================
   12 · FORMS / LEAD CAPTURE / NEWSLETTER
   ========================================================================== */

.tpr-field { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.tpr-field label { font-family: var(--font-display); font-weight: 600; font-size: 0.88rem; }
.tpr-field .tpr-req { color: var(--danger); }
.tpr-field input, .tpr-field select, .tpr-field textarea {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card); color: var(--text);
}
.tpr-field input:focus, .tpr-field select:focus, .tpr-field textarea:focus {
	outline: none; border-color: var(--brand); box-shadow: var(--ring);
}
.tpr-field textarea { min-height: 132px; resize: vertical; }
.tpr-field__hint { color: var(--muted); font-size: 0.8rem; }

.tpr-form {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: var(--s6);
	box-shadow: var(--shadow-sm);
}
.tpr-form__grid { display: grid; gap: 0 var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .tpr-form__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The consent row needs flex on the WRAPPER; putting it on the <label> makes
   the checkbox stretch to the full text height. */
.tpr-consent { display: flex; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s4); }
.tpr-consent input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; accent-color: var(--brand); }
.tpr-consent label { font-size: 0.86rem; color: var(--muted); font-weight: 400; line-height: 1.5; }
.tpr-consent a { color: var(--link); }

.tpr-formnote { color: var(--muted); font-size: 0.82rem; margin: var(--s4) 0 0; }

.tpr-newsletter {
	background: var(--chrome-bg);
	color: var(--chrome-text);
	border-radius: var(--radius-lg);
	padding: var(--s7);
	position: relative; overflow: hidden;
}
.tpr-newsletter::before {
	content: ""; position: absolute; inset: auto -10% -60% 40%;
	height: 320px;
	background: radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.4) 0%, transparent 62%);
	pointer-events: none;
}
.tpr-newsletter__inner { position: relative; z-index: 1; max-width: 620px; }
.tpr-newsletter h2 { color: #fff; margin-bottom: var(--s3); }
.tpr-newsletter p { color: var(--chrome-muted); margin-bottom: var(--s5); }
.tpr-newsletter form { display: flex; flex-wrap: wrap; gap: var(--s3); }
.tpr-newsletter input[type="email"] {
	flex: 1 1 260px; min-width: 0;
	padding: 0.75rem 0.95rem;
	border-radius: var(--radius);
	border: 1px solid var(--chrome-border);
	background: rgba(255, 255, 255, 0.07); color: #fff;
}
.tpr-newsletter input[type="email"]::placeholder { color: var(--chrome-muted); }
.tpr-newsletter input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.3); }
.tpr-newsletter__note { color: var(--chrome-muted); font-size: 0.8rem; margin: var(--s4) 0 0; }

/* Feedback states */
.tpr-alert { padding: var(--s4) var(--s5); border-radius: var(--radius); margin-bottom: var(--s5); font-size: 0.94rem; border: 1px solid; }
.tpr-alert--ok { background: color-mix(in srgb, var(--success) 10%, transparent); border-color: color-mix(in srgb, var(--success) 40%, transparent); color: var(--success); }
.tpr-alert--err { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }

/* ==========================================================================
   13 · PROCESS / STEPS / PULL-QUOTE
   ========================================================================== */

.tpr-steps { counter-reset: tprstep; display: grid; gap: var(--s5); }
.tpr-step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s4); align-items: start; }
.tpr-step::before {
	counter-increment: tprstep; content: counter(tprstep);
	width: 44px; height: 44px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--gradient); color: #fff;
	font-family: var(--font-display); font-weight: 700;
}
.tpr-step__title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin: 0 0 var(--s2); }
.tpr-step__body { color: var(--muted); margin: 0; font-size: 0.95rem; }

.tpr-pullquote {
	margin: var(--s7) 0;
	padding-left: var(--s6);
	border-left: 4px solid var(--accent);
	font-family: var(--font-display);
	font-size: 1.3rem; font-weight: 600; line-height: 1.45;
	color: var(--text);
}
.tpr-pullquote cite { display: block; margin-top: var(--s3); font-size: 0.86rem; font-weight: 400; font-style: normal; color: var(--muted); font-family: var(--font-body); }

/* ==========================================================================
   14 · SIDEBAR / WIDGETS
   ========================================================================== */

.tpr-side { display: grid; gap: var(--s5); align-content: start; }
.tpr-widget { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s5); }
.tpr-widget__title { font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s4); }
.tpr-widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.tpr-widget a { color: var(--text); text-decoration: none; font-size: 0.94rem; }
.tpr-widget a:hover { color: var(--link); text-decoration: underline; }

.tpr-sticky { position: sticky; top: 88px; }

/* ==========================================================================
   15 · CTA BANDS
   ========================================================================== */

.tpr-cta {
	background: var(--gradient-diag);
	color: #fff;
	border-radius: var(--radius-lg);
	padding: var(--s8) var(--s7);
	text-align: center;
}
.tpr-cta h2 { color: #fff; margin-bottom: var(--s3); }
.tpr-cta p { color: rgba(255, 255, 255, 0.88); max-width: 56ch; margin-inline: auto; margin-bottom: var(--s6); }
.tpr-cta .tpr-btnrow { justify-content: center; }
.tpr-cta .tpr-btn--ghost-invert { border-color: rgba(255, 255, 255, 0.6); }

/* ==========================================================================
   16 · PAGINATION / ARCHIVE HEAD
   ========================================================================== */

.tpr-archhead { padding-block: var(--s7) var(--s6); border-bottom: 1px solid var(--border); margin-bottom: var(--s7); }
.tpr-archhead__title { margin-bottom: var(--s3); }
.tpr-archhead__desc { color: var(--muted); max-width: 68ch; margin: 0; }
.tpr-subcats { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }

.tpr-pagination { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; margin-top: var(--s8); }
.tpr-pagination .page-numbers {
	display: inline-grid; place-items: center;
	min-width: 40px; height: 40px; padding-inline: var(--s3);
	border: 1px solid var(--border); border-radius: var(--radius);
	color: var(--text); text-decoration: none;
	font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
}
.tpr-pagination .page-numbers:hover { border-color: var(--brand); color: var(--brand-ink); }
.tpr-pagination .page-numbers.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.tpr-pagination .dots { border-color: transparent; }

/* ==========================================================================
   17 · FOOTER
   ========================================================================== */

.tpr-footer { background: var(--chrome-bg); color: var(--chrome-text); margin-top: var(--s9); }
.tpr-footer__grid {
	display: grid; gap: var(--s7);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	padding-block: var(--s8) var(--s7);
}
.tpr-footer__brandblurb { color: var(--chrome-muted); font-size: 0.92rem; margin: var(--s4) 0 var(--s5); max-width: 34ch; }
.tpr-footer__col h3 { font-family: var(--font-display); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--chrome-muted); margin: 0 0 var(--s4); }
.tpr-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.tpr-footer__col a { color: var(--chrome-text); text-decoration: none; font-size: 0.92rem; }
.tpr-footer__col a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); }

.tpr-social { display: flex; gap: var(--s2); }
.tpr-social a {
	width: 36px; height: 36px; border-radius: var(--radius);
	border: 1px solid var(--chrome-border); color: var(--chrome-text);
	display: grid; place-items: center; text-decoration: none;
}
.tpr-social a:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--accent); }
.tpr-social svg { width: 17px; height: 17px; }

.tpr-footer__bottom { border-top: 1px solid var(--chrome-border); padding-block: var(--s5) var(--s7); display: grid; gap: var(--s4); }
.tpr-footer__legal { color: var(--chrome-muted); font-size: 0.85rem; margin: 0; }
.tpr-footer__disclosure { color: var(--chrome-muted); font-size: 0.8rem; margin: 0; max-width: 92ch; line-height: 1.6; }
.tpr-footer__disclosure a { color: var(--chrome-text); }

/* ==========================================================================
   18 · UTILITIES / STATES
   ========================================================================== */

.tpr-empty { text-align: center; padding: var(--s9) var(--s5); color: var(--muted); }
.tpr-empty h2 { color: var(--text); }

.tpr-skel { background: linear-gradient(90deg, var(--surface) 25%, var(--border) 37%, var(--surface) 63%); background-size: 400% 100%; animation: tprshimmer 1.4s ease infinite; border-radius: var(--radius); }
@keyframes tprshimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.tpr-reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.tpr-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .tpr-reveal { opacity: 1; transform: none; } }

.tpr-hide { display: none !important; }
.tpr-mt0 { margin-top: 0; }
.tpr-mb0 { margin-bottom: 0; }
.tpr-center { text-align: center; }
