/*
 * The GTM Lead blog. "Launch-day editorial": white paper, warm cream sections, near-black ink,
 * one coral-orange accent. Tokens mirror the product app (app/globals.css), light only.
 */
:root {
	--tg-paper: #FFFFFF;
	--tg-cream: #FBF6EF;
	--tg-cream-2: #F5EDE2;
	--tg-line: #E8DFD3;
	--tg-ink: #16120F;
	--tg-muted: #5F5853;
	--tg-accent: #C9440F;        /* AA with white text (4.86:1) */
	--tg-accent-strong: #B03A0B;
	--tg-accent-soft: #FDEDE4;
	--tg-brand-bright: #E2541B;  /* logo only */
	--tg-ok: #157A45;
	--tg-warn: #8A5A00;
	--tg-warn-soft: #FEF4D6;
	--tg-crit: #B4123A;
	--tg-radius: 12px;
	--tg-gutter: 16px;
	--tg-wide: 1152px;
	--tg-measure: 680px;
	--tg-display: "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
	color-scheme: light;
}
@media (min-width: 640px) { :root { --tg-gutter: 24px; } }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-padding-top: 88px; }
body { background: var(--tg-paper); color: var(--tg-ink); overflow-x: hidden; }
::selection { background: var(--tg-accent-soft); color: var(--tg-ink); }
:where(a, button, summary, input, [tabindex]):focus-visible { outline: 2px solid var(--tg-accent); outline-offset: 2px; border-radius: 4px; }

.wp-site-blocks { padding: 0 !important; }
.wp-site-blocks > * { margin-block-start: 0 !important; }
.tg-main { margin: 0; }
.tg-main > * { margin-block-start: 0; }
.tg-container { width: 100%; max-width: calc(var(--tg-wide) + 2 * var(--tg-gutter)); margin-inline: auto !important; padding-inline: var(--tg-gutter); box-sizing: border-box; }

.tg-i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Buttons */
.tg-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 40px; padding: 0 16px; border-radius: var(--tg-radius); border: 2px solid transparent;
	font: 600 15px/1 Inter, ui-sans-serif, system-ui, sans-serif; text-decoration: none !important; white-space: nowrap;
	transition: background-color .15s, border-color .15s, color .15s;
}
.tg-btn--primary { background: var(--tg-accent); color: #fff !important; }
.tg-btn--primary:hover { background: var(--tg-accent-strong); }
.tg-btn--secondary { border-color: var(--tg-ink); color: var(--tg-ink) !important; background: transparent; }
.tg-btn--secondary:hover { background: var(--tg-cream); }
.tg-btn--ghost { color: var(--tg-ink) !important; }
.tg-btn--ghost:hover { background: var(--tg-cream); }
.tg-btn .tg-i { width: 16px; height: 16px; }
.tg-icon-btn {
	display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
	border: 1px solid var(--tg-line); border-radius: var(--tg-radius); background: var(--tg-paper); color: var(--tg-ink); cursor: pointer; padding: 0;
}
.tg-icon-btn:hover { background: var(--tg-cream); }

/* Header */
.tg-header-part { position: sticky; top: 0; z-index: 50; margin: 0 !important; }
body.admin-bar .tg-header-part { top: 32px; }
@media (max-width: 782px) { body.admin-bar .tg-header-part { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .tg-header-part { top: 0; } }
.tg-header { background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--tg-line); }
.tg-header__inner { max-width: calc(var(--tg-wide) + 2 * var(--tg-gutter)); margin: 0 auto; padding: 0 var(--tg-gutter); height: 64px; display: flex; align-items: center; gap: 16px; box-sizing: border-box; }
.tg-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--tg-ink) !important; flex-shrink: 0; }
.tg-mark { display: block; width: 28px; height: 28px; }
.tg-brand__name { font: 700 17px/1 var(--tg-display); letter-spacing: -0.02em; }
.tg-nav { display: none; align-items: center; gap: 28px; margin-inline: auto; }
.tg-nav a { color: var(--tg-muted) !important; font-size: 15px; font-weight: 500; text-decoration: none !important; }
.tg-nav a:hover, .tg-nav a.is-active { color: var(--tg-ink) !important; }
.tg-nav a.is-active { font-weight: 600; box-shadow: inset 0 -2px 0 var(--tg-accent); padding-bottom: 4px; margin-bottom: -6px; }
.tg-header__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tg-mobile-nav { border-top: 1px solid var(--tg-line); padding: 8px var(--tg-gutter) 16px; background: var(--tg-paper); }
.tg-mobile-nav[hidden] { display: none; }
.tg-mobile-nav a { display: block; padding: 12px; border-radius: var(--tg-radius); color: var(--tg-ink) !important; font-weight: 500; text-decoration: none !important; }
.tg-mobile-nav a:hover { background: var(--tg-cream); }
.tg-mobile-nav a.is-active { font-weight: 700; box-shadow: inset 3px 0 0 var(--tg-accent); }
@media (max-width: 479px) { .tg-hide-xs { display: none !important; } }
@media (min-width: 900px) {
	.tg-nav { display: flex; }
	.tg-menu-btn, .tg-mobile-nav { display: none !important; }
	.tg-header__actions { margin-left: 0; }
}

/* Hero (index, archive, search, 404) */
.tg-hero { margin: 0 !important; padding: 64px 0 48px; border-bottom: 1px solid var(--tg-line); }
@media (min-width: 768px) { .tg-hero { padding: 96px 0 64px; } }
.tg-hero .tg-container > * { margin-block: 0; }
.tg-kicker { font: 700 12px/1.4 var(--tg-display) !important; letter-spacing: .14em !important; text-transform: uppercase; color: var(--tg-accent) !important; margin: 0 !important; }
.tg-kicker a { color: inherit !important; text-decoration: none !important; }
.tg-kicker a:hover { text-decoration: underline !important; }
.tg-hero__title { margin-top: 14px !important; max-width: 16ch; font-family: var(--tg-display); font-size: clamp(40px, 7vw, 72px) !important; font-weight: 700; line-height: 1.02 !important; letter-spacing: -0.035em !important; }
.tg-hero__lead, .tg-hero .wp-block-term-description { margin-top: 20px !important; max-width: 40rem; font-size: 19px; line-height: 1.6; color: var(--tg-muted); }
.tg-hero .wp-block-term-description p { margin: 0; }
.tg-search { margin-top: 24px !important; max-width: 30rem; }
.tg-search .wp-block-search__inside-wrapper { gap: 8px; border: 0 !important; padding: 0 !important; }
.tg-search .wp-block-search__input { height: 48px; padding: 0 14px; border: 1px solid var(--tg-line); border-radius: var(--tg-radius); font: inherit; font-size: 16px; background: var(--tg-paper); color: var(--tg-ink); }
.tg-search .wp-block-search__input:focus { outline: 2px solid var(--tg-accent); outline-offset: 0; border-color: transparent; }
.tg-search .wp-block-search__button { height: 48px; margin: 0; padding: 0 18px; border: 0; border-radius: var(--tg-radius); background: var(--tg-accent); color: #fff; font: 600 15px/1 Inter, sans-serif; cursor: pointer; }
.tg-search .wp-block-search__button:hover { background: var(--tg-accent-strong); }
.tg-404-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px !important; }
.tg-404-links .tg-btn { height: 48px; padding: 0 20px; }

/* Post grid */
.tg-section { padding-top: 48px; padding-bottom: 96px; background: var(--tg-cream); }
.tg-section.tg-container { max-width: none; padding-inline: max(var(--tg-gutter), calc((100% - var(--tg-wide)) / 2)); }
.tg-posts { margin: 0; }
.wp-block-post-template.tg-grid { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 700px) { .wp-block-post-template.tg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .wp-block-post-template.tg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.tg-grid > li { margin: 0 !important; display: flex; }
.tg-card { position: relative; display: flex; flex-direction: column; width: 100%; background: var(--tg-paper); border: 1px solid var(--tg-line); border-radius: var(--tg-radius); overflow: hidden; transition: border-color .15s, transform .15s; }
.tg-card:hover { border-color: var(--tg-ink); transform: translateY(-2px); }
.tg-card > * { margin: 0 !important; }
.tg-card__media { background: var(--tg-cream-2); border-bottom: 1px solid var(--tg-line); }
.tg-card__media img { display: block; width: 100%; object-fit: cover; }
.tg-card__body { display: flex; flex-direction: column; gap: 10px; padding: 22px; flex: 1; }
.tg-card__body > * { margin: 0 !important; }
.tg-card__date { font-size: 13px; font-weight: 600; color: var(--tg-muted); }
.tg-card__title { font-family: var(--tg-display); font-size: 22px !important; font-weight: 700; line-height: 1.2 !important; letter-spacing: -0.02em; }
.tg-card__title a { color: var(--tg-ink) !important; text-decoration: none !important; }
.tg-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tg-card__excerpt, .tg-card__excerpt p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--tg-muted); }
.tg-card__excerpt .wp-block-post-excerpt__more-text { display: none; }
.tg-card__more { margin-top: auto !important; padding-top: 6px; font-size: 14px; font-weight: 700; color: var(--tg-accent) !important; text-decoration: none !important; }
.tg-card__more::after { content: " \2192"; }
.tg-pagination { margin-top: 40px !important; font-weight: 600; font-size: 15px; }
.tg-pagination a { color: var(--tg-ink) !important; text-decoration: none !important; }
.tg-pagination .page-numbers { padding: 6px 11px; border-radius: 8px; }
.tg-pagination .page-numbers.current { background: var(--tg-ink); color: var(--tg-paper); }
.tg-empty { color: var(--tg-muted); }

/* Single */
.tg-article { margin: 0; padding-top: 48px; padding-bottom: 32px; }
.tg-article > * { margin-block: 0; }
.tg-article__head, .tg-prose, .tg-tags, .tg-postnav { width: 100%; max-width: calc(var(--tg-measure) + 2 * var(--tg-gutter)); margin-inline: auto !important; padding-inline: var(--tg-gutter); box-sizing: border-box; }
.tg-article__head > * { margin-block: 0; }
.tg-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 28px !important; font-size: 14px; font-weight: 600; color: var(--tg-muted) !important; text-decoration: none !important; }
.tg-back:hover { color: var(--tg-ink) !important; }
.tg-back .tg-i { width: 16px; height: 16px; }
.tg-article__head .tg-kicker { margin-bottom: 12px !important; }
.tg-article__title { font-family: var(--tg-display); font-size: clamp(34px, 6vw, 52px) !important; font-weight: 700; line-height: 1.06 !important; letter-spacing: -0.03em !important; text-wrap: balance; }
.tg-meta { margin-top: 18px !important; gap: 14px !important; font-size: 14px; color: var(--tg-muted); }
.tg-meta > * { margin: 0 !important; }
.tg-meta > * + *::before { content: "\00B7"; margin-right: 14px; color: var(--tg-line); }
.tg-meta a { color: inherit !important; }
.tg-article__media { max-width: calc(var(--tg-wide) + 2 * var(--tg-gutter)); margin: 36px auto 0 !important; padding-inline: var(--tg-gutter); box-sizing: border-box; }
.tg-article__media img { display: block; width: 100%; height: auto; border-radius: var(--tg-radius); border: 1px solid var(--tg-line); }

.tg-prose { margin-top: 36px !important; font-size: 18px; line-height: 1.75; color: var(--tg-ink); }
.tg-prose > * { margin-block: 0 !important; }
.tg-prose > * + * { margin-top: 1.25em !important; }
.tg-prose > :where(h2, h3, h4) { font-family: var(--tg-display); color: var(--tg-ink); scroll-margin-top: 96px; }
.tg-prose > h2 { margin-top: 2.1em !important; font-size: 30px; line-height: 1.2; letter-spacing: -0.025em; }
.tg-prose > h3 { margin-top: 1.8em !important; font-size: 23px; line-height: 1.3; letter-spacing: -0.02em; }
.tg-prose > h4 { margin-top: 1.6em !important; font-size: 19px; line-height: 1.35; }
.tg-prose > :where(h2, h3, h4) + * { margin-top: 0.6em !important; }
.tg-prose strong { font-weight: 700; }
.tg-prose a { color: var(--tg-accent) !important; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.tg-prose a:hover { color: var(--tg-accent-strong) !important; }
.tg-prose :where(ul, ol) { padding-left: 1.3em; }
.tg-prose li + li { margin-top: 0.45em; }
.tg-prose ul > li::marker { color: var(--tg-accent); }
.tg-prose ol > li::marker { font-family: var(--tg-display); font-weight: 700; color: var(--tg-ink); }
.tg-prose blockquote, .tg-prose .wp-block-quote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--tg-accent); font-size: 20px; font-family: var(--tg-display); font-weight: 500; line-height: 1.5; }
.tg-prose .wp-block-quote cite { display: block; margin-top: 8px; font: 500 14px/1.4 Inter, sans-serif; color: var(--tg-muted); }
.tg-prose code:not(pre code) { padding: 2px 6px; border-radius: 6px; background: var(--tg-cream-2); font-size: .88em; }
.tg-prose pre { overflow-x: auto; }
.tg-prose img { max-width: 100%; height: auto; border-radius: var(--tg-radius); }
.tg-prose figcaption { margin-top: 8px; font-size: 14px; color: var(--tg-muted); text-align: left; }
.tg-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tg-prose .wp-block-table { overflow-x: auto; }
.tg-prose th, .tg-prose td { padding: 10px 12px; border-bottom: 1px solid var(--tg-line); text-align: left; vertical-align: top; }
.tg-prose thead th { border-bottom: 2px solid var(--tg-ink); font-weight: 700; }
.tg-prose hr, .tg-prose .wp-block-separator { border: 0; border-top: 1px solid var(--tg-line); margin-block: 2.5em !important; }
.tg-tags { margin-top: 40px !important; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.tg-tags a { display: inline-block; padding: 4px 10px; border-radius: 8px; background: var(--tg-cream); color: var(--tg-ink) !important; text-decoration: none !important; font-weight: 600; }
.tg-tags .wp-block-post-terms__separator { display: none; }
.tg-postnav { margin-top: 48px !important; padding-top: 24px; padding-bottom: 24px; border-top: 1px solid var(--tg-line); gap: 16px; font-size: 15px; font-weight: 600; }
.tg-postnav a { color: var(--tg-ink) !important; text-decoration: none !important; }
.tg-postnav a:hover { color: var(--tg-accent) !important; }

/* CTA */
.tg-cta { margin: 56px 0 0 !important; background: var(--tg-ink); color: var(--tg-paper); }
.tg-cta__inner { max-width: calc(var(--tg-wide) + 2 * var(--tg-gutter)); margin: 0 auto; padding: 72px var(--tg-gutter); box-sizing: border-box; }
.tg-cta__title { margin: 0; max-width: 18ch; font-family: var(--tg-display); font-size: clamp(32px, 5vw, 52px); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; color: var(--tg-paper) !important; }
.tg-cta__body { margin: 18px 0 0; max-width: 38rem; font-size: 17px; line-height: 1.6; color: rgba(255,255,255,.78); }
.tg-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tg-cta .tg-btn { height: 48px; padding: 0 22px; }
.tg-cta .tg-btn--secondary { border-color: rgba(255,255,255,.85); color: var(--tg-paper) !important; }
.tg-cta .tg-btn--secondary:hover { background: rgba(255,255,255,.1); }

/* Footer */
.tg-footer-part { margin: 0 !important; }
.tg-footer { background: var(--tg-cream); border-top: 1px solid var(--tg-line); }
.tg-footer__inner { max-width: calc(var(--tg-wide) + 2 * var(--tg-gutter)); margin: 0 auto; padding: 48px var(--tg-gutter); box-sizing: border-box; display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 768px) { .tg-footer__inner { flex-direction: row; justify-content: space-between; align-items: flex-start; } }
.tg-footer__about { max-width: 24rem; }
.tg-footer__about p { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: var(--tg-muted); }
.tg-footer__links { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 40px; }
@media (min-width: 640px) { .tg-footer__links { grid-template-columns: repeat(3, auto); } }
.tg-footer__links a { font-size: 15px; color: var(--tg-muted) !important; text-decoration: none !important; }
.tg-footer__links a:hover { color: var(--tg-ink) !important; }
.tg-footer__bar { border-top: 1px solid var(--tg-line); }
.tg-footer__bar p { max-width: calc(var(--tg-wide) + 2 * var(--tg-gutter)); margin: 0 auto; padding: 18px var(--tg-gutter); box-sizing: border-box; font-size: 13px; color: var(--tg-muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
