/* ==========================================================================
   TechyHunt — main stylesheet
   Prefix: tfg-   Fonts: Space Grotesk (display), Inter (text), self-hosted
   ========================================================================== */

@font-face {
	font-family: "Space Grotesk";
	src: url("../fonts/space-grotesk-var.woff2") format("woff2");
	font-weight: 300 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-var.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	/* Brand */
	--tfg-ink: #101A29;          /* Dark navy: headings, dark sections */
	--tfg-ink-2: #101A29;
	--tfg-ink-3: #09258B;        /* CTA gradient start (deep blue) */
	--tfg-ember: #2753F5;        /* Primary blue: buttons, icons, highlights (white text) */
	--tfg-ember-hover: #1E42C4;  /* Primary hover/focus */
	--tfg-ember-hi: #59C8FF;     /* Sky accent: badges, highlights, accent on dark backgrounds */
	--tfg-ember-text: #1551E9;   /* Links / accent text on light backgrounds */
	--tfg-link-hover: #0E2A94;
	--tfg-ember-wash: rgba(39, 83, 245, 0.08); /* tint of #2753F5 */
	--tfg-cta-gradient: linear-gradient(90deg, #09258B, #2753F5);

	/* Neutrals */
	--tfg-paper: #FFFFFF;
	--tfg-mist: #F3F3F3;                    /* Alternate section background */
	--tfg-line: rgba(16, 26, 41, 0.12);     /* tint of #101A29 */
	--tfg-line-2: rgba(16, 26, 41, 0.22);
	--tfg-text: #101A29;                    /* Headings / strong text */
	--tfg-body: #54566E;                    /* Body text */
	--tfg-muted: #54566E;

	/* On dark */
	--tfg-d-text: #FFFFFF;
	--tfg-d-muted: rgba(255, 255, 255, 0.72);
	--tfg-d-line: rgba(255, 255, 255, 0.1);
	--tfg-d-card: rgba(255, 255, 255, 0.04);

	/* Type */
	--tfg-font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--tfg-font-text: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--tfg-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

	/* Shape */
	--tfg-r-sm: 8px;
	--tfg-r: 14px;
	--tfg-r-lg: 22px;
	--tfg-shadow: 0 1px 2px rgba(16, 26, 41, 0.06), 0 8px 24px -12px rgba(16, 26, 41, 0.18);
	--tfg-shadow-lg: 0 24px 60px -24px rgba(16, 26, 41, 0.35);

	--tfg-wrap: 1240px;
	--tfg-gutter: clamp(16px, 4vw, 32px);
	--tfg-header-h: 72px;
	--tfg-section-y: clamp(64px, 9vw, 112px);
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--tfg-header-h) + 24px);
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
html.tfg-lock { overflow: hidden; }

body {
	margin: 0;
	background: var(--tfg-paper);
	color: var(--tfg-body);
	font-family: var(--tfg-font-text);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--tfg-link-hover); }
:focus-visible { outline: 2px solid var(--tfg-ember); outline-offset: 3px; border-radius: 4px; }
:is(.tfg-header, .tfg-dark, .tfg-hero, .tfg-page-hero, .tfg-footer, .tfg-takeaways) :focus-visible { outline-color: var(--tfg-ember-hi); }
:is(.tfg-announce, .tfg-cta-band) :focus-visible { outline-color: #FFFFFF; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--tfg-line); margin: 2.5rem 0; }

h1, h2, h3, h4 {
	font-family: var(--tfg-font-display);
	font-weight: 650;
	line-height: 1.12;
	letter-spacing: -0.02em;
	margin: 0 0 0.5em;
	text-wrap: balance;
	color: var(--tfg-text);
}
/* Headings on dark or blue surfaces take the surface's text colour. */
:is(.tfg-dark, .tfg-section--dark, .tfg-hero, .tfg-page-hero, .tfg-cta-band, .tfg-takeaways, .tfg-mega-intro, .tfg-footer, .tfg-tool-result, .tfg-drawer) :is(h1, h2, h3, h4) { color: inherit; }
h1 { font-size: clamp(2.25rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.tfg-wrap {
	width: 100%;
	max-width: calc(var(--tfg-wrap) + var(--tfg-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--tfg-gutter);
}

.tfg-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}
.tfg-skip {
	position: absolute; left: 12px; top: -60px; z-index: 1000;
	background: var(--tfg-ember); color: #FFFFFF;
	padding: 10px 16px; border-radius: var(--tfg-r-sm); font-weight: 600;
	text-decoration: none;
}
.tfg-skip:focus { top: 12px; color: #FFFFFF; }
.tfg-main:focus { outline: none; }

.tfg-icon { width: 1.25em; height: 1.25em; flex: none; }

.tfg-avatar { flex: none; object-fit: cover; }
.tfg-avatar--initials {
	display: inline-grid; place-items: center;
	width: var(--tfg-av); height: var(--tfg-av); border-radius: 50%;
	background: linear-gradient(135deg, var(--tfg-ink-3), var(--tfg-ink));
	color: var(--tfg-ember-hi);
	font-family: var(--tfg-font-display); font-weight: 600;
	font-size: calc(var(--tfg-av) * 0.38); letter-spacing: 0.02em; line-height: 1;
}

/* --------------------------------------------------------------------------
   Buttons
   ----------------------------------------------------------------------- */
.tfg-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
	min-height: 48px; padding: 0 22px;
	border: 1px solid transparent; border-radius: 999px;
	background: var(--tfg-ember); color: #FFFFFF;
	font-family: var(--tfg-font-display); font-weight: 600; font-size: 1rem; line-height: 1;
	text-decoration: none; white-space: nowrap;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.tfg-btn:hover { background: var(--tfg-ember-hover); color: #FFFFFF; }
/* Hero-style CTAs: gradient #09258B -> #2753F5, white text. */
.tfg-hero .tfg-btn:not(.tfg-btn--light):not(.tfg-btn--ghost),
.tfg-header-cta { background: var(--tfg-cta-gradient); color: #FFFFFF; }
.tfg-hero .tfg-btn:not(.tfg-btn--light):not(.tfg-btn--ghost):hover,
.tfg-header-cta:hover { background: var(--tfg-ember-hover); color: #FFFFFF; }
.tfg-btn:active { transform: translateY(1px); }
.tfg-btn .tfg-icon { width: 1.1em; height: 1.1em; }
.tfg-btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.tfg-btn--block { width: 100%; }
.tfg-btn--ghost {
	background: transparent; color: var(--tfg-text); border-color: var(--tfg-line-2);
}
.tfg-btn--ghost:hover { background: var(--tfg-mist); color: var(--tfg-text); border-color: var(--tfg-text); }
.tfg-btn--light {
	background: transparent; color: var(--tfg-d-text); border-color: rgba(255, 255, 255, 0.28);
}
.tfg-btn--light:hover { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; border-color: #FFFFFF; }

.tfg-link-arrow {
	display: inline-flex; align-items: center; gap: 6px;
	font-family: var(--tfg-font-display); font-weight: 600; text-decoration: none;
	color: var(--tfg-ember-text);
}
.tfg-link-arrow .tfg-icon { width: 1.05em; height: 1.05em; transition: transform 0.15s; }
.tfg-link-arrow:hover .tfg-icon { transform: translateX(3px); }
.tfg-dark .tfg-link-arrow { color: var(--tfg-ember-hi); }

/* --------------------------------------------------------------------------
   Announcement bar
   ----------------------------------------------------------------------- */
.tfg-announce {
	background: var(--tfg-ember); color: #FFFFFF;
	font-size: 0.875rem; font-weight: 500;
}
.tfg-announce-inner {
	display: flex; align-items: center; justify-content: center; gap: 12px;
	min-height: 40px; padding-block: 6px; text-align: center; flex-wrap: wrap;
}
.tfg-announce-pill {
	background: var(--tfg-ink); color: #FFFFFF;
	font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
	padding: 3px 8px; border-radius: 999px;
}
.tfg-announce-link {
	display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #FFFFFF;
}
.tfg-announce-link:hover { color: #FFFFFF; text-decoration-thickness: 2px; }
.tfg-announce-link .tfg-icon { width: 1em; height: 1em; }
@media (max-width: 640px) {
	.tfg-announce { font-size: 0.8125rem; }
	.tfg-announce-inner { flex-wrap: nowrap; gap: 8px; min-height: 36px; justify-content: flex-start; text-align: left; }
	.tfg-announce-pill { display: none; }
	.tfg-announce-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.tfg-announce-link { flex: none; }
}

/* --------------------------------------------------------------------------
   Header
   ----------------------------------------------------------------------- */
.tfg-header {
	position: sticky; top: 0; z-index: 100;
	color: var(--tfg-d-text);
	border-bottom: 1px solid var(--tfg-d-line);
	transition: box-shadow 0.2s;
}
/* The blur lives on a pseudo-element: backdrop-filter on the header itself would make it
   the containing block for the fixed-position mobile drawer and clip it. */
.tfg-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: rgba(16, 26, 41, 0.92);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	backdrop-filter: saturate(160%) blur(12px);
}
.admin-bar .tfg-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .tfg-header { top: 0; } }
.tfg-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.7); }

.tfg-header-inner {
	display: flex; align-items: center; gap: 24px;
	min-height: var(--tfg-header-h);
}
.tfg-brand { flex: none; }
.tfg-logo {
	display: inline-flex; align-items: center; gap: 10px;
	color: #FFFFFF; text-decoration: none;
	font-family: var(--tfg-font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em;
}
.tfg-logo:hover { color: #FFFFFF; }
.tfg-logo-mark { width: 32px; height: 32px; color: var(--tfg-ember); }
.tfg-logo-mark .tfg-logo-bg { color: var(--tfg-ember); }
.tfg-logo-mark path:first-of-type { fill: #FFFFFF; }
.tfg-logo-spark { fill: var(--tfg-ember-hi); }
.custom-logo-link img { max-height: 40px; width: auto; }

.tfg-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.tfg-icon-btn {
	display: inline-grid; place-items: center;
	width: 44px; height: 44px; border-radius: 999px;
	background: transparent; border: 1px solid transparent; color: inherit;
}
.tfg-icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.tfg-icon-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.1); }

/* Nav (desktop) */
.tfg-nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.tfg-nav-item { position: relative; }
.tfg-nav-trigger {
	display: inline-flex; align-items: center; gap: 6px;
	height: 44px; padding: 0 14px; border-radius: 999px;
	background: transparent; border: 0; color: var(--tfg-d-text);
	font-size: 0.9375rem; font-weight: 500;
}
.tfg-nav-trigger:hover,
.tfg-nav-item.is-open > .tfg-nav-trigger { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }
.tfg-nav-chev { width: 16px; height: 16px; transition: transform 0.2s; opacity: 0.7; }
.tfg-nav-item.is-open .tfg-nav-chev { transform: rotate(180deg); }

.tfg-mega {
	display: none;
	position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
	width: min(560px, calc(100vw - 48px));
	background: var(--tfg-paper); color: var(--tfg-text);
	border: 1px solid var(--tfg-line); border-radius: var(--tfg-r-lg);
	box-shadow: var(--tfg-shadow-lg);
}
.tfg-mega::before { /* hover bridge */
	content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px;
}
.tfg-mega--wide { width: min(820px, calc(100vw - 48px)); }
.tfg-mega--narrow { width: 340px; }
.tfg-nav-item.is-open > .tfg-mega { display: block; animation: tfg-pop 0.16s ease-out; }
@keyframes tfg-pop { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .tfg-nav-item.is-open > .tfg-mega { animation: none; } }

.tfg-mega-inner { padding: 14px; }
.tfg-mega-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tfg-mega-grid--2 { grid-template-columns: repeat(2, 1fr); }
.tfg-mega-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tfg-mega-link {
	display: flex; gap: 12px; align-items: flex-start;
	padding: 12px; border-radius: var(--tfg-r); text-decoration: none;
	color: var(--tfg-text); line-height: 1.35;
}
.tfg-mega-link:hover, .tfg-mega-link:focus-visible { background: var(--tfg-mist); color: var(--tfg-text); }
.tfg-mega-link strong { display: block; font-family: var(--tfg-font-display); font-weight: 600; font-size: 0.975rem; }
.tfg-mega-desc { display: block; font-size: 0.8125rem; color: var(--tfg-muted); margin-top: 3px; }
.tfg-mega-icon {
	flex: none; display: grid; place-items: center;
	width: 36px; height: 36px; border-radius: 10px;
	background: var(--tfg-ember-wash); color: var(--tfg-ember-text);
}
.tfg-mega-icon .tfg-icon { width: 20px; height: 20px; }
.tfg-mega-foot {
	display: flex; align-items: center; justify-content: space-between;
	margin: 8px -14px -14px; padding: 14px 26px;
	border-top: 1px solid var(--tfg-line); background: var(--tfg-mist);
	border-radius: 0 0 var(--tfg-r-lg) var(--tfg-r-lg);
	font-family: var(--tfg-font-display); font-weight: 600; font-size: 0.9375rem; text-decoration: none;
}
.tfg-mega-foot .tfg-icon { width: 18px; height: 18px; }
.tfg-mega-split { display: grid; grid-template-columns: 200px 1fr; gap: 12px; }
.tfg-mega-intro { background: var(--tfg-ink); color: var(--tfg-d-text); border-radius: var(--tfg-r); padding: 18px; font-size: 0.9rem; }
.tfg-mega-intro .tfg-eyebrow { color: var(--tfg-ember-hi); margin-bottom: 8px; }
.tfg-mega-intro p { margin-bottom: 16px; }

.tfg-drawer-head, .tfg-drawer-foot { display: none; }
.tfg-menu-btn { display: none; }

/* Search panel */
.tfg-search-panel { border-top: 1px solid var(--tfg-d-line); padding: 16px 0; }
.tfg-search-form {
	position: relative; display: flex; gap: 8px; align-items: center;
	max-width: 760px; margin-inline: auto;
}
.tfg-search-icon { position: absolute; left: 16px; color: var(--tfg-muted); pointer-events: none; }
.tfg-search-input {
	flex: 1; min-width: 0; height: 48px; padding: 0 16px 0 46px;
	border: 1px solid var(--tfg-line-2); border-radius: 999px;
	background: #FFFFFF; color: var(--tfg-text);
}
.tfg-search-input:focus { outline: 2px solid var(--tfg-ember); outline-offset: 1px; border-color: transparent; }

.tfg-scrim {
	position: fixed; inset: 0; z-index: 140;
	background: rgba(16, 26, 41, 0.7);
}

/* Mobile / tablet: drawer */
@media (max-width: 1079.98px) {
	.tfg-menu-btn { display: inline-grid; }
	.tfg-header-cta { display: none; }
	.tfg-drawer {
		position: fixed; top: 0; right: 0; bottom: 0; z-index: 150;
		width: min(400px, 92vw);
		display: flex; flex-direction: column;
		background: var(--tfg-ink); color: var(--tfg-d-text);
		transform: translateX(100%); visibility: hidden;
		transition: transform 0.25s ease, visibility 0s 0.25s;
		overflow-y: auto; overscroll-behavior: contain;
	}
	.tfg-drawer.is-open { transform: none; visibility: visible; transition: transform 0.25s ease; }
	@media (prefers-reduced-motion: reduce) { .tfg-drawer, .tfg-drawer.is-open { transition: none; } }
	.tfg-drawer-head {
		display: flex; align-items: center; justify-content: space-between;
		padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--tfg-d-line);
		position: sticky; top: 0; background: var(--tfg-ink); z-index: 1;
	}
	.tfg-drawer-title { font-family: var(--tfg-font-display); font-weight: 600; }
	.tfg-drawer-foot { display: block; padding: 20px; margin-top: auto; border-top: 1px solid var(--tfg-d-line); }
	.tfg-nav { padding: 8px 12px; }
	.tfg-nav-list { flex-direction: column; gap: 0; }
	.tfg-nav-item { border-bottom: 1px solid var(--tfg-d-line); }
	.tfg-nav-trigger { width: 100%; justify-content: space-between; height: 56px; border-radius: 0; padding: 0 8px; font-size: 1.0625rem; }
	.tfg-nav-trigger:hover, .tfg-nav-item.is-open > .tfg-nav-trigger { background: transparent; }
	.tfg-mega, .tfg-mega--wide, .tfg-mega--narrow {
		position: static; transform: none; width: auto;
		background: transparent; border: 0; box-shadow: none; color: var(--tfg-d-text);
	}
	.tfg-mega::before { display: none; }
	.tfg-nav-item.is-open > .tfg-mega { animation: none; }
	.tfg-mega-inner { padding: 0 0 12px; }
	.tfg-mega-grid, .tfg-mega-grid--2, .tfg-mega-split { grid-template-columns: 1fr; }
	.tfg-mega-link { color: var(--tfg-d-text); padding: 10px 8px; }
	.tfg-mega-link:hover, .tfg-mega-link:focus-visible { background: var(--tfg-d-card); color: #FFFFFF; }
	.tfg-mega-desc { color: var(--tfg-d-muted); }
	.tfg-mega-icon { background: rgba(89, 200, 255, 0.14); color: var(--tfg-ember-hi); }
	.tfg-mega-foot { margin: 4px 0 0; padding: 10px 8px; background: transparent; border: 0; color: var(--tfg-ember-hi); }
	.tfg-mega-intro { display: none; }
}
@media (min-width: 1080px) {
	.tfg-drawer { display: flex; flex: 1; justify-content: center; }
	.tfg-scrim { display: none; }
}

/* --------------------------------------------------------------------------
   Sections & headings
   ----------------------------------------------------------------------- */
.tfg-section { padding-block: var(--tfg-section-y); }
.tfg-section--tight { padding-block: clamp(48px, 6vw, 72px); }
.tfg-section--mist { background: var(--tfg-mist); }
.tfg-dark, .tfg-section--dark {
	background: var(--tfg-ink); color: var(--tfg-d-text);
}
.tfg-dark a:hover { color: var(--tfg-ember-hi); }

.tfg-eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	margin: 0 0 14px;
	font-family: var(--tfg-font-display); font-size: 0.8125rem; font-weight: 600;
	letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--tfg-ember-text);
}
.tfg-eyebrow::before {
	content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
}
.tfg-dark .tfg-eyebrow { color: var(--tfg-ember-hi); }

.tfg-section-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 52px); }
.tfg-section-head--center { margin-inline: auto; text-align: center; }
.tfg-section-head--center .tfg-eyebrow { justify-content: center; }
.tfg-section-title { margin-bottom: 0.35em; }
.tfg-lede { font-size: 1.125rem; color: var(--tfg-muted); margin: 0; max-width: 62ch; }
.tfg-dark .tfg-lede { color: var(--tfg-d-muted); }
.tfg-section-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 48px); }
.tfg-section-row .tfg-section-head { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Homepage hero
   ----------------------------------------------------------------------- */
.tfg-hero {
	position: relative; overflow: hidden;
	background: var(--tfg-ink); color: var(--tfg-d-text);
	padding-block: clamp(56px, 8vw, 104px) clamp(64px, 9vw, 120px);
}
.tfg-hero::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background:
		radial-gradient(600px 380px at 85% 10%, rgba(39, 83, 245, 0.35), transparent 70%),
		radial-gradient(500px 400px at 0% 100%, rgba(89, 200, 255, 0.10), transparent 70%);
}
.tfg-hero::after {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
	background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
	background-size: 48px 48px;
	-webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
	mask-image: linear-gradient(180deg, #000 30%, transparent);
}
.tfg-hero-grid {
	position: relative; z-index: 1;
	display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.tfg-hero h1 { color: #FFFFFF; margin-bottom: 20px; }
.tfg-hero h1 em { font-style: normal; color: var(--tfg-ember-hi); }
.tfg-hero-sub { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--tfg-d-muted); max-width: 52ch; margin-bottom: 32px; }
.tfg-hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.tfg-hero-note { margin-top: 28px; display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.875rem; color: var(--tfg-d-muted); }
.tfg-hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.tfg-hero-note .tfg-icon { color: var(--tfg-ember-hi); width: 18px; height: 18px; }
.tfg-hero-visual { position: relative; }
.tfg-hero-visual svg { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.45)); }

@media (max-width: 900px) {
	.tfg-hero-grid { grid-template-columns: 1fr; }
	.tfg-hero-visual { max-width: 560px; }
}

/* --------------------------------------------------------------------------
   Cards: shared
   ----------------------------------------------------------------------- */
.tfg-grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.tfg-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tfg-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tfg-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) {
	.tfg-grid--3, .tfg-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.tfg-grid--2, .tfg-grid--3, .tfg-grid--4 { grid-template-columns: 1fr; }
}

.tfg-box {
	position: relative;
	background: var(--tfg-paper);
	border: 1px solid var(--tfg-line); border-radius: var(--tfg-r-lg);
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.tfg-box:hover { border-color: var(--tfg-line-2); box-shadow: var(--tfg-shadow); }
.tfg-dark .tfg-box { background: var(--tfg-d-card); border-color: var(--tfg-d-line); }
.tfg-dark .tfg-box:hover { border-color: rgba(255, 255, 255, 0.22); box-shadow: none; }

/* The whole card is clickable via its heading link. */
.tfg-stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.tfg-box a:not(.tfg-stretch) { position: relative; z-index: 2; }
.tfg-stretch { text-decoration: none; }
.tfg-stretch:hover { color: inherit; }
.tfg-box:has(.tfg-stretch:focus-visible) { outline: 2px solid var(--tfg-ember); outline-offset: 3px; }
.tfg-stretch:focus-visible { outline: none; }

/* Numbered topic cards */
.tfg-topic-card { padding: 28px; display: flex; flex-direction: column; gap: 12px; min-height: 220px; }
.tfg-topic-num {
	font-family: var(--tfg-font-display); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.06em;
	color: var(--tfg-muted);
}
.tfg-topic-num b { color: var(--tfg-ember-text); font-weight: 700; }
.tfg-dark .tfg-topic-num { color: var(--tfg-d-muted); }
.tfg-dark .tfg-topic-num b { color: var(--tfg-ember-hi); }
.tfg-topic-card h3 { margin: 0; font-size: 1.375rem; }
.tfg-topic-card p { margin: 0; color: var(--tfg-muted); font-size: 0.975rem; }
.tfg-dark .tfg-topic-card p { color: var(--tfg-d-muted); }
.tfg-topic-card .tfg-topic-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; color: var(--tfg-muted); font-size: 0.875rem; }
.tfg-topic-card .tfg-topic-icon { color: var(--tfg-ember-text); }
.tfg-dark .tfg-topic-card .tfg-topic-icon { color: var(--tfg-ember-hi); }
.tfg-topic-card .tfg-topic-foot .tfg-icon:last-child { transition: transform 0.2s; }
.tfg-topic-card:hover .tfg-topic-foot .tfg-icon:last-child { transform: translateX(4px); }

/* Large guide cards */
.tfg-guide-card { overflow: hidden; display: flex; flex-direction: column; }
.tfg-guide-card .tfg-card-media { aspect-ratio: 16 / 10; }
.tfg-guide-body { padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tfg-guide-body h3 { font-size: 1.5rem; margin: 0; }
.tfg-guide-body p { color: var(--tfg-muted); margin: 0; }
.tfg-guide-meta { margin-top: auto; padding-top: 14px; display: flex; gap: 16px; font-size: 0.875rem; color: var(--tfg-muted); flex-wrap: wrap; }
.tfg-pill {
	display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
	padding: 4px 10px; border-radius: 999px;
	background: var(--tfg-ember-wash); color: var(--tfg-ember-text);
	font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
	text-decoration: none;
}
a.tfg-pill:hover { background: var(--tfg-ember); color: #FFFFFF; }

/* Card media / generated art */
.tfg-card-media { position: relative; overflow: hidden; background: var(--tfg-ink-2); }
.tfg-card-media img { width: 100%; height: 100%; object-fit: cover; }
.tfg-card-art {
	position: absolute; inset: 0;
	background:
		radial-gradient(120% 90% at 100% 0%, hsl(var(--tfg-art-hue) 80% 50% / 0.35), transparent 60%),
		linear-gradient(160deg, var(--tfg-ink-3), var(--tfg-ink));
}
.tfg-card-art svg:not(.tfg-icon) { position: absolute; inset: 0; width: 100%; height: 100%; }
.tfg-card-art-icon {
	position: absolute; right: 18px; bottom: 16px; width: 34px; height: 34px;
	color: hsl(var(--tfg-art-hue) 95% 72%);
}

/* Tool cards */
.tfg-tool-card { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.tfg-tool-card h3 { margin: 0; font-size: 1.25rem; }
.tfg-tool-card p { margin: 0; color: var(--tfg-muted); font-size: 0.95rem; }
.tfg-dark .tfg-tool-card p { color: var(--tfg-d-muted); }
.tfg-tool-icon {
	display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
	background: var(--tfg-ember); color: #FFFFFF;
}
.tfg-tool-icon .tfg-icon { width: 24px; height: 24px; }
.tfg-tool-card .tfg-tool-go { margin-top: auto; padding-top: 6px; font-family: var(--tfg-font-display); font-weight: 600; font-size: 0.9375rem; display: inline-flex; gap: 6px; align-items: center; color: var(--tfg-ember-text); }
.tfg-dark .tfg-tool-card .tfg-tool-go { color: var(--tfg-ember-hi); }
.tfg-tool-go .tfg-icon { width: 18px; height: 18px; }

/* Post cards */
.tfg-card { overflow: hidden; display: flex; flex-direction: column; }
.tfg-card .tfg-card-media { aspect-ratio: 16 / 9; }
.tfg-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tfg-card-topic { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tfg-ember-text); text-decoration: none; align-self: flex-start; }
.tfg-card h3 { font-size: 1.1875rem; margin: 0; line-height: 1.25; }
.tfg-card-sf { margin: 0; color: var(--tfg-muted); font-size: 0.9375rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tfg-card-meta { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; color: var(--tfg-muted); }
.tfg-card-meta .tfg-avatar { width: 24px; height: 24px; border-radius: 50%; }
.tfg-card-meta .tfg-dot::before { content: "·"; margin-right: 10px; }

/* Featured (hub) */
.tfg-feature {
	display: grid; grid-template-columns: 1.15fr 1fr; overflow: hidden;
}
.tfg-feature .tfg-card-media { min-height: 320px; }
.tfg-feature-body { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.tfg-feature-body h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); margin: 0; }
.tfg-feature-body p { color: var(--tfg-muted); margin: 0; font-size: 1.0625rem; }
@media (max-width: 860px) {
	.tfg-feature { grid-template-columns: 1fr; }
	.tfg-feature .tfg-card-media { min-height: 0; aspect-ratio: 16 / 9; }
}

/* --------------------------------------------------------------------------
   Live numbers
   ----------------------------------------------------------------------- */
.tfg-stats {
	display: grid; grid-template-columns: repeat(var(--tfg-stat-n, 4), minmax(0, 1fr));
	border: 1px solid var(--tfg-d-line); border-radius: var(--tfg-r-lg); overflow: hidden;
}
.tfg-stat { padding: clamp(24px, 3vw, 40px); border-left: 1px solid var(--tfg-d-line); text-decoration: none; color: inherit; display: block; }
.tfg-stat:first-child { border-left: 0; }
.tfg-stat:hover { background: var(--tfg-d-card); }
.tfg-stat-n {
	display: block;
	font-family: var(--tfg-font-display); font-weight: 650; letter-spacing: -0.03em;
	font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1; color: #FFFFFF;
	font-variant-numeric: tabular-nums;
}
.tfg-stat-l { display: block; margin-top: 10px; color: var(--tfg-d-muted); font-size: 0.9375rem; }
.tfg-stats-note { margin-top: 16px; font-size: 0.8125rem; color: var(--tfg-d-muted); }
@media (max-width: 760px) {
	.tfg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tfg-stat:nth-child(odd) { border-left: 0; }
	.tfg-stat:nth-child(n+3) { border-top: 1px solid var(--tfg-d-line); }
}

/* --------------------------------------------------------------------------
   How we work
   ----------------------------------------------------------------------- */
.tfg-split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 900px) { .tfg-split { grid-template-columns: 1fr; } }
.tfg-pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 560px) { .tfg-pillars { grid-template-columns: 1fr; } }
.tfg-pillar { padding: 24px; }
.tfg-pillar-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--tfg-ink); color: var(--tfg-ember-hi); margin-bottom: 16px; }
.tfg-pillar h3 { font-size: 1.125rem; margin-bottom: 6px; }
.tfg-pillar p { margin: 0; color: var(--tfg-muted); font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Glossary teaser + archive
   ----------------------------------------------------------------------- */
.tfg-az { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 28px; padding: 0; }
.tfg-az a, .tfg-az span {
	display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
	font-family: var(--tfg-font-display); font-weight: 600; text-decoration: none;
	border: 1px solid var(--tfg-line); background: var(--tfg-paper);
}
.tfg-az a:hover { background: var(--tfg-ink); color: #FFFFFF; border-color: var(--tfg-ink); }
.tfg-az span { color: var(--tfg-line-2); background: transparent; }
.tfg-terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .tfg-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tfg-terms { grid-template-columns: 1fr; } }
.tfg-term { padding: 20px 22px; }
.tfg-term h3 { font-size: 1.0625rem; margin: 0 0 6px; }
.tfg-term p { margin: 0; color: var(--tfg-muted); font-size: 0.9rem; }
.tfg-gloss-letter { scroll-margin-top: calc(var(--tfg-header-h) + 24px); margin-bottom: 40px; }
.tfg-gloss-letter > h2 {
	font-size: 1.75rem; display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
}
.tfg-gloss-letter > h2::after { content: ""; flex: 1; height: 1px; background: var(--tfg-line); }

/* --------------------------------------------------------------------------
   FAQ
   ----------------------------------------------------------------------- */
.tfg-faq { border-top: 1px solid var(--tfg-line); }
.tfg-faq details { border-bottom: 1px solid var(--tfg-line); }
.tfg-faq summary {
	list-style: none; cursor: pointer;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 22px 0; font-family: var(--tfg-font-display); font-weight: 600; font-size: 1.125rem;
}
.tfg-faq summary::-webkit-details-marker { display: none; }
.tfg-faq summary .tfg-icon { transition: transform 0.2s; flex: none; color: var(--tfg-ember-text); }
.tfg-faq details[open] summary .tfg-icon { transform: rotate(180deg); }
.tfg-faq-a { padding: 0 0 22px; color: var(--tfg-muted); max-width: 68ch; }
.tfg-faq-a a { color: var(--tfg-text); }

/* --------------------------------------------------------------------------
   Closing CTA band
   ----------------------------------------------------------------------- */
.tfg-cta-band {
	position: relative; overflow: hidden;
	background: var(--tfg-ember); color: #FFFFFF;
	border-radius: var(--tfg-r-lg);
	padding: clamp(36px, 6vw, 72px);
	display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
}
.tfg-cta-band::after {
	content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
	border: 48px solid rgba(255, 255, 255, 0.10); pointer-events: none;
}
.tfg-cta-band h2 { margin-bottom: 10px; }
.tfg-cta-band p { margin: 0; font-size: 1.125rem; }
.tfg-cta-band .tfg-eyebrow { color: #FFFFFF; }
.tfg-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; position: relative; z-index: 1; }
.tfg-cta-band .tfg-btn { background: var(--tfg-ink); color: #FFFFFF; }
.tfg-cta-band .tfg-btn:hover { background: var(--tfg-ink-3); }
.tfg-cta-band .tfg-btn--ghost { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, 0.6); }
.tfg-cta-band .tfg-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); color: #FFFFFF; }
.tfg-cta-embed { position: relative; z-index: 1; }
.tfg-cta-embed input[type="email"], .tfg-cta-embed input[type="text"] { width: 100%; height: 48px; border-radius: 999px; border: 0; padding: 0 18px; margin-bottom: 8px; }
@media (max-width: 860px) {
	.tfg-cta-band { grid-template-columns: 1fr; }
	.tfg-cta-actions { justify-content: flex-start; }
}

/* --------------------------------------------------------------------------
   Page hero (archives, hubs, pages)
   ----------------------------------------------------------------------- */
.tfg-page-hero {
	position: relative; overflow: hidden;
	background: var(--tfg-ink); color: var(--tfg-d-text);
	padding-block: clamp(40px, 6vw, 80px) clamp(40px, 6vw, 72px);
}
.tfg-page-hero::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: radial-gradient(520px 300px at 90% 0%, rgba(39, 83, 245, 0.30), transparent 70%);
}
.tfg-page-hero > .tfg-wrap { position: relative; }
.tfg-page-hero h1 { color: #FFFFFF; font-size: clamp(2rem, 4.4vw, 3.25rem); max-width: 20ch; margin-bottom: 14px; }
.tfg-page-hero .tfg-lede, .tfg-page-hero .tfg-intro { color: var(--tfg-d-muted); max-width: 64ch; font-size: 1.125rem; }
.tfg-page-hero .tfg-intro p:last-child { margin-bottom: 0; }

/* Breadcrumbs */
.tfg-crumbs ol { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 0.875rem; }
.tfg-crumbs li { display: inline-flex; align-items: center; gap: 8px; color: var(--tfg-muted); }
.tfg-crumbs li + li::before { content: "/"; opacity: 0.5; }
.tfg-crumbs a { color: inherit; text-decoration: none; }
.tfg-crumbs a:hover { text-decoration: underline; color: var(--tfg-text); }
.tfg-dark .tfg-crumbs li, .tfg-page-hero .tfg-crumbs li { color: var(--tfg-d-muted); }
.tfg-dark .tfg-crumbs a:hover, .tfg-page-hero .tfg-crumbs a:hover { color: #FFFFFF; }
.tfg-crumbs [aria-current] { color: inherit; max-width: 36ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Filter tabs */
.tfg-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 28px; scrollbar-width: thin; }
.tfg-tabs a {
	flex: none; padding: 9px 16px; border-radius: 999px;
	border: 1px solid var(--tfg-line); background: var(--tfg-paper);
	font-size: 0.9375rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.tfg-tabs a:hover { border-color: var(--tfg-text); color: var(--tfg-text); }
.tfg-tabs a[aria-current="page"] { background: var(--tfg-ink); border-color: var(--tfg-ink); color: #FFFFFF; }

/* Subtopics */
.tfg-subtopics { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tfg-subtopics a {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 16px; border-radius: 12px; border: 1px solid var(--tfg-line);
	text-decoration: none; font-weight: 500; background: var(--tfg-paper);
}
.tfg-subtopics a:hover { border-color: var(--tfg-ember); color: var(--tfg-text); }
.tfg-subtopics small { color: var(--tfg-muted); }

/* Pagination */
.tfg-pager { margin-top: 48px; }
.tfg-pager ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.tfg-pager a, .tfg-pager span {
	display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px;
	border-radius: 12px; border: 1px solid var(--tfg-line); text-decoration: none; font-weight: 500;
}
.tfg-pager a:hover { border-color: var(--tfg-text); color: var(--tfg-text); }
.tfg-pager .current { background: var(--tfg-ink); border-color: var(--tfg-ink); color: #FFFFFF; }
.tfg-pager .dots { border: 0; }

.tfg-empty { padding: 48px; text-align: center; border: 1px dashed var(--tfg-line-2); border-radius: var(--tfg-r-lg); color: var(--tfg-muted); }

/* --------------------------------------------------------------------------
   Article
   ----------------------------------------------------------------------- */
.tfg-article-head { background: var(--tfg-mist); border-bottom: 1px solid var(--tfg-line); padding-block: clamp(32px, 5vw, 64px) clamp(28px, 4vw, 44px); }
.tfg-article-head-inner { max-width: 820px; }
.tfg-article-head h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); margin: 14px 0 16px; }
.tfg-standfirst { font-size: clamp(1.125rem, 1.8vw, 1.3125rem); color: var(--tfg-muted); line-height: 1.5; margin-bottom: 28px; max-width: 64ch; }

.tfg-byline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 0.9rem; color: var(--tfg-muted); }
.tfg-byline .tfg-avatar { width: 48px; height: 48px; border-radius: 50%; }
.tfg-byline-who { display: flex; flex-direction: column; line-height: 1.35; }
.tfg-byline-who a { color: var(--tfg-text); font-weight: 600; text-decoration: none; }
.tfg-byline-who a:hover { text-decoration: underline; }
.tfg-byline-dates { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-left: 16px; border-left: 1px solid var(--tfg-line-2); }
.tfg-byline-dates b { font-weight: 600; color: var(--tfg-text); }
.tfg-reviewed { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 0.875rem; color: var(--tfg-muted); }
.tfg-reviewed .tfg-icon { color: #198754; width: 18px; height: 18px; }
.tfg-reviewed a { color: var(--tfg-text); font-weight: 600; }
@media (max-width: 640px) {
	.tfg-byline-dates { border-left: 0; padding-left: 0; width: 100%; }
}

.tfg-disclosure {
	margin-top: 18px; padding: 12px 16px; border-radius: var(--tfg-r-sm);
	background: var(--tfg-paper); border: 1px solid var(--tfg-line); font-size: 0.875rem; color: var(--tfg-muted);
}
.tfg-disclosure a { color: var(--tfg-text); }

.tfg-article-layout {
	display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px);
	padding-block: clamp(36px, 5vw, 56px) var(--tfg-section-y);
}
.tfg-article-layout--no-toc { grid-template-columns: minmax(0, 1fr); }
.tfg-article-main { max-width: 72ch; min-width: 0; }
.tfg-toc { position: sticky; top: calc(var(--tfg-header-h) + 28px); align-self: start; max-height: calc(100vh - var(--tfg-header-h) - 56px); overflow: auto; }
.admin-bar .tfg-toc { top: calc(var(--tfg-header-h) + 60px); }
.tfg-toc-title { font-family: var(--tfg-font-display); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tfg-muted); margin: 0 0 12px; }
.tfg-toc-list { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--tfg-line); font-size: 0.9rem; }
.tfg-toc-list a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--tfg-muted); text-decoration: none; line-height: 1.4; }
.tfg-toc-list a:hover { color: var(--tfg-text); }
.tfg-toc-list a[aria-current] { color: var(--tfg-text); border-left-color: var(--tfg-ember); font-weight: 600; }
.tfg-toc-l3 a { padding-left: 28px; font-size: 0.85rem; }
.tfg-toc-mobile { display: none; }
@media (max-width: 1000px) {
	.tfg-article-layout { grid-template-columns: minmax(0, 1fr); }
	.tfg-toc { display: none; }
	.tfg-toc-mobile { display: block; margin-bottom: 32px; border: 1px solid var(--tfg-line); border-radius: var(--tfg-r); }
	.tfg-toc-mobile summary { cursor: pointer; padding: 14px 18px; font-family: var(--tfg-font-display); font-weight: 600; }
	.tfg-toc-mobile .tfg-toc-list { margin: 0 18px 16px; }
	.tfg-article-main { margin-inline: auto; }
}

.tfg-takeaways {
	margin: 0 0 36px; padding: 24px 26px; border-radius: var(--tfg-r);
	background: var(--tfg-ink); color: var(--tfg-d-text);
}
.tfg-takeaways h2 { font-size: 1rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tfg-ember-hi); margin: 0 0 14px; }
.tfg-takeaways ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tfg-takeaways li { display: flex; gap: 10px; }
.tfg-takeaways li .tfg-icon { color: var(--tfg-ember-hi); flex: none; margin-top: 3px; width: 18px; height: 18px; }

/* Prose */
.tfg-prose { font-size: 1.125rem; line-height: 1.75; }
.tfg-prose > * { margin-block: 0 1.25em; }
.tfg-prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.875rem); margin: 2.2em 0 0.6em; }
.tfg-prose h3 { font-size: 1.3rem; margin: 1.8em 0 0.5em; }
.tfg-prose h2 + h3 { margin-top: 0.8em; }
.tfg-prose a { color: var(--tfg-ember-text); text-decoration: underline; }
.tfg-prose a:hover { color: var(--tfg-link-hover); }
.tfg-prose ul, .tfg-prose ol { padding-left: 1.3em; }
.tfg-prose li { margin-bottom: 0.4em; }
.tfg-prose li::marker { color: var(--tfg-ember-text); }
.tfg-prose blockquote {
	margin-inline: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--tfg-ember);
	font-size: 1.2rem; color: var(--tfg-text);
}
.tfg-prose code { font-family: var(--tfg-font-mono); font-size: 0.88em; background: var(--tfg-mist); padding: 2px 6px; border-radius: 6px; }
.tfg-prose pre { background: var(--tfg-ink); color: var(--tfg-d-text); padding: 20px; border-radius: var(--tfg-r); overflow-x: auto; font-size: 0.9rem; line-height: 1.6; }
.tfg-prose pre code { background: none; padding: 0; color: inherit; }
.tfg-prose img { border-radius: var(--tfg-r); }
.tfg-prose figure { margin-inline: 0; }
.tfg-prose figcaption, .tfg-prose .wp-caption-text { font-size: 0.875rem; color: var(--tfg-muted); margin-top: 8px; }
.tfg-prose .wp-caption { max-width: 100%; }
.tfg-prose .alignright { float: right; margin: 0 0 1em 1.5em; max-width: 50%; }
.tfg-prose .alignleft { float: left; margin: 0 1.5em 1em 0; max-width: 50%; }
.tfg-prose .aligncenter { margin-inline: auto; }
.tfg-prose table, .tfg-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.tfg-prose th, .tfg-prose td, .tfg-table th, .tfg-table td { padding: 12px 14px; border-bottom: 1px solid var(--tfg-line); text-align: left; vertical-align: top; }
.tfg-prose thead th, .tfg-table thead th { background: var(--tfg-mist); font-family: var(--tfg-font-display); font-weight: 600; border-bottom-color: var(--tfg-line-2); }
.tfg-prose iframe { max-width: 100%; }
.tfg-prose::after { content: ""; display: table; clear: both; }

.tfg-sources { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--tfg-line); }
.tfg-sources h2 { font-size: 1.125rem; margin-bottom: 12px; }
.tfg-sources ol { margin: 0; padding-left: 1.3em; font-size: 0.95rem; color: var(--tfg-muted); }
.tfg-sources li { margin-bottom: 6px; overflow-wrap: anywhere; }
.tfg-sources a { color: var(--tfg-text); }

.tfg-author-box {
	margin-top: 48px; padding: 28px; display: grid; grid-template-columns: 80px 1fr; gap: 20px;
	background: var(--tfg-mist); border-radius: var(--tfg-r-lg);
}
.tfg-author-box .tfg-avatar { width: 80px; height: 80px; border-radius: 50%; }
.tfg-author-box h2 { font-size: 1.25rem; margin: 0 0 2px; }
.tfg-author-box h2 a { text-decoration: none; }
.tfg-author-role { font-size: 0.9rem; color: var(--tfg-muted); margin: 0 0 10px; }
.tfg-author-box p { font-size: 0.975rem; }
.tfg-author-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.9rem; align-items: center; }
.tfg-author-links a { display: inline-flex; gap: 6px; align-items: center; }
.tfg-author-links .tfg-icon { width: 18px; height: 18px; }
@media (max-width: 560px) { .tfg-author-box { grid-template-columns: 1fr; } }

.tfg-standards-line {
	margin-top: 28px; padding: 14px 18px; border: 1px solid var(--tfg-line); border-radius: var(--tfg-r);
	display: flex; gap: 10px; align-items: center; font-size: 0.9375rem; color: var(--tfg-muted);
}
.tfg-standards-line .tfg-icon { color: var(--tfg-ember-text); flex: none; }
.tfg-standards-line a { color: var(--tfg-text); font-weight: 600; }

/* --------------------------------------------------------------------------
   Author page & team
   ----------------------------------------------------------------------- */
.tfg-profile { display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: start; }
.tfg-profile .tfg-avatar { width: 120px; height: 120px; border-radius: 24px; }
.tfg-profile-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tfg-profile-meta .tfg-pill { background: rgba(255, 255, 255, 0.08); color: var(--tfg-d-text); text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 0.8125rem; }
.tfg-profile .tfg-author-links a { color: var(--tfg-d-text); }
@media (max-width: 640px) { .tfg-profile { grid-template-columns: 1fr; } }

.tfg-team-card { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.tfg-team-card .tfg-avatar { width: 72px; height: 72px; border-radius: 18px; }
.tfg-team-card h3 { margin: 0; font-size: 1.25rem; }
.tfg-team-card .tfg-author-role { margin: 0; }
.tfg-team-card p { margin: 0; color: var(--tfg-muted); font-size: 0.95rem; }
.tfg-team-group + .tfg-team-group { margin-top: 64px; }

/* --------------------------------------------------------------------------
   Plain pages
   ----------------------------------------------------------------------- */
.tfg-page-body { padding-block: clamp(40px, 6vw, 72px) var(--tfg-section-y); }
.tfg-page-body .tfg-prose { max-width: 72ch; }
.tfg-updated-note { font-size: 0.875rem; color: var(--tfg-muted); margin-top: 40px; }

/* --------------------------------------------------------------------------
   Tool widgets
   ----------------------------------------------------------------------- */
.tfg-tool {
	padding: clamp(20px, 3vw, 32px); margin-bottom: 40px;
	border: 1px solid var(--tfg-line); border-radius: var(--tfg-r-lg); background: var(--tfg-paper);
	box-shadow: var(--tfg-shadow);
}
.tfg-field-label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 8px; }
.tfg-field-row { display: flex; gap: 8px; }
.tfg-input {
	width: 100%; min-width: 0; height: 48px; padding: 0 14px;
	border: 1px solid var(--tfg-line-2); border-radius: 12px; background: #FFFFFF;
}
select.tfg-input { width: auto; padding-right: 30px; }
.tfg-tool-grid select.tfg-input#tfg-dl-eff, .tfg-tool-grid #tfg-st-unit { width: 100%; }
.tfg-input:focus { outline: 2px solid var(--tfg-ember); outline-offset: 1px; border-color: transparent; }
.tfg-tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.tfg-meter { height: 10px; border-radius: 999px; background: var(--tfg-mist); margin: 16px 0 20px; overflow: hidden; }
.tfg-meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--tfg-ember); transition: width 0.2s, background-color 0.2s; }
.tfg-tool-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.tfg-tool-out div { padding: 14px; border-radius: 12px; background: var(--tfg-mist); }
.tfg-tool-out dt { font-size: 0.8125rem; color: var(--tfg-muted); }
.tfg-tool-out dd { margin: 4px 0 0; font-family: var(--tfg-font-display); font-weight: 600; font-size: 1.125rem; }
@media (max-width: 640px) { .tfg-tool-out { grid-template-columns: 1fr; } }
.tfg-tool-tips { margin: 0 0 12px; padding-left: 1.2em; color: var(--tfg-muted); font-size: 0.95rem; }
.tfg-tool-result {
	margin: 24px 0 12px; padding: 20px; border-radius: 14px; background: var(--tfg-ink); color: #FFFFFF;
	font-family: var(--tfg-font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600;
}
.tfg-tool-result small { display: block; font-family: var(--tfg-font-text); font-size: 0.875rem; font-weight: 400; color: var(--tfg-d-muted); margin-top: 6px; }
.tfg-tool-table { margin: 20px 0 12px; display: table; }
.tfg-tool-table td { font-variant-numeric: tabular-nums; }
.tfg-tool-note { font-size: 0.8125rem; color: var(--tfg-muted); margin: 0; }

/* --------------------------------------------------------------------------
   Footer
   ----------------------------------------------------------------------- */
.tfg-footer { background: var(--tfg-ink); color: var(--tfg-d-muted); padding-top: clamp(56px, 7vw, 88px); font-size: 0.9375rem; }
.tfg-footer a { color: var(--tfg-d-text); text-decoration: none; }
.tfg-footer a:hover { color: var(--tfg-ember-hi); text-decoration: underline; }
.tfg-footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px 32px; padding-bottom: 56px; }
@media (max-width: 1000px) { .tfg-footer-grid { grid-template-columns: repeat(2, 1fr); } .tfg-footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .tfg-footer-grid { grid-template-columns: 1fr; } }
.tfg-footer-tagline { margin: 16px 0 18px; max-width: 36ch; }
.tfg-footer-biz { font-style: normal; line-height: 1.7; margin-bottom: 20px; }
.tfg-footer-biz strong { color: var(--tfg-d-text); font-weight: 600; }
.tfg-footer-h { font-family: var(--tfg-font-display); font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: #FFFFFF; margin: 4px 0 16px; }
.tfg-footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tfg-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.tfg-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--tfg-d-line); }
.tfg-social a:hover { border-color: var(--tfg-ember-hi); }
.tfg-social .tfg-icon { width: 20px; height: 20px; }
.tfg-footer-base {
	display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
	padding: 22px 0 28px; border-top: 1px solid var(--tfg-d-line); font-size: 0.875rem;
}
.tfg-footer-base p { margin: 0; }

/* --------------------------------------------------------------------------
   Misc
   ----------------------------------------------------------------------- */
.tfg-mt-lg { margin-top: clamp(40px, 5vw, 64px); }
.tfg-center { text-align: center; }
.tfg-search-hero .tfg-search-form { margin: 24px 0 0; max-width: 640px; }
.tfg-result-type { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tfg-muted); }
.tfg-404-code { font-family: var(--tfg-font-display); font-size: clamp(5rem, 14vw, 9rem); font-weight: 700; line-height: 1; color: var(--tfg-ember-hi); margin: 0 0 8px; letter-spacing: -0.04em; }

@media print {
	.tfg-header, .tfg-footer, .tfg-toc, .tfg-announce, .tfg-related { display: none !important; }
	.tfg-article-layout { display: block; }
}

/* --------------------------------------------------------------------------
   Converter tools (binary, hex, ascii, morse, base64, caesar)
   ----------------------------------------------------------------------- */
.tfg-conv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.tfg-conv-dir { margin: 0; font-family: var(--tfg-font-display); font-weight: 600; font-size: 1.0625rem; }
.tfg-conv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 720px) { .tfg-conv-grid { grid-template-columns: 1fr; } }
.tfg-textarea { height: auto; min-height: 168px; padding: 12px 14px; resize: vertical; font-family: var(--tfg-font-mono); font-size: 0.9375rem; line-height: 1.55; overflow-wrap: anywhere; }
.tfg-textarea[readonly] { background: var(--tfg-mist); }
.tfg-conv-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; }
.tfg-conv-status { font-size: 0.875rem; color: var(--tfg-muted); margin-left: 4px; }
.tfg-conv-error {
	margin: 8px 0 12px; padding: 10px 14px; border-radius: var(--tfg-r-sm);
	background: #fdecea; color: #9b1c1c; border: 1px solid #f5c2c0; font-size: 0.9375rem;
}
.tfg-conv-opts { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.tfg-conv-mode { border: 0; margin: 0; padding: 0; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.tfg-conv-mode legend { float: left; margin-right: 8px; }
.tfg-conv-mode label { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.tfg-conv-shift { flex: 1; min-width: 220px; }
.tfg-conv-shift input[type="range"] { width: 100%; accent-color: var(--tfg-ember); }
.tfg-conv-shift output { font-family: var(--tfg-font-mono); color: var(--tfg-ember-text); margin-left: 6px; }

/* --------------------------------------------------------------------------
   Ad slots (only rendered when enabled in Customizer → Ads)
   ----------------------------------------------------------------------- */
.tfg-ad { max-width: calc(var(--tfg-wrap) + var(--tfg-gutter) * 2); margin: 24px auto; padding-inline: var(--tfg-gutter); text-align: center; overflow: hidden; }
.tfg-prose .tfg-ad { margin: 2em 0; padding-inline: 0; }
