/* Good Family — main stylesheet
   Tokens → base → header → components → home → article → archive → WP content → utilities */

/* ---------- Tokens ---------- */
:root {
  --paper: #FBF8F3;
  --paper-2: #F4EFE6;
  --surface: #FFFFFF;
  --ink: #1E2422;
  --ink-2: #4A524E;
  --ink-3: #646A65;
  --line: #E6DFD3;
  --line-strong: #CFC5B5;
  --accent: #B4472B;
  --accent-ink: #FFFFFF;
  --accent-soft: #F6E3DA;
  --focus: #1F5FAD;

  --baby: #355A86;    --baby-soft: #E2EAF4;
  --toddler: #B4472B; --toddler-soft: #F6E3DA;
  --play: #4A6E50;    --play-soft: #E1EBDF;
  --parent: #7A4A6E;  --parent-soft: #F1E4EC;
  --school: #82600F;  --school-soft: #F5EAD0;

  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-text: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step-1: 1.125rem;
  --step-3: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-4: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
  --step-5: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow-1: 0 1px 2px rgba(30, 36, 34, .06), 0 2px 8px rgba(30, 36, 34, .04);
  --shadow-2: 0 8px 30px rgba(30, 36, 34, .10);
  --wrap: 1200px;
  --gutter: 16px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --article-size: 1.125rem;
  --c: var(--accent);
  --soft: var(--paper-2);
}
@media (min-width: 768px) { :root { --gutter: 28px; --header-h: 76px; } }

/* Night: warm, low-glare, for the 3 a.m. feed */
:root[data-theme="night"] {
  color-scheme: dark;
  --paper: #141716;
  --paper-2: #1A1E1D;
  --surface: #1E2321;
  --ink: #EDE6DA;
  --ink-2: #C3BBAE;
  --ink-3: #A39B8F;
  --line: #2C3230;
  --line-strong: #3B4240;
  --accent: #E68A6C;
  --accent-ink: #1A1513;
  --accent-soft: #3A2620;
  --focus: #8DB7EE;
  --baby: #9DBBE3;    --baby-soft: #1F2A38;
  --toddler: #E68A6C; --toddler-soft: #36231D;
  --play: #9CC3A1;    --play-soft: #1E2B21;
  --parent: #D6A3C8;  --parent-soft: #2E2029;
  --school: #E0BF6E;  --school-soft: #2E2716;
  --shadow-1: none;
  --shadow-2: 0 8px 30px rgba(0, 0, 0, .45);
}
:root[data-text="lg"] { --article-size: 1.3125rem; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 64px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
body.is-locked { overflow: hidden; }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.sr-only, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 1000; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; }
.skip-link:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: 760px; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 0px); }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.brand, .custom-logo-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-height: 44px; }
.custom-logo { max-height: 44px; width: auto; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-mark .head { fill: var(--accent); }
.brand-mark .arms { stroke: var(--ink); }
.brand-name { font-family: var(--font-display); font-size: 1.125rem; line-height: 1; letter-spacing: -0.01em; white-space: nowrap; }
.brand-name em { font-style: normal; color: var(--accent); }
@media (min-width: 400px) { .brand-name { font-size: 1.25rem; } }

.main-nav { display: none; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; min-height: 44px;
  border: 0; background: none;
  font-size: .9375rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
  border-radius: 999px;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--paper-2); color: var(--ink); }
.nav-link[aria-current="page"], .nav-link[data-current] { color: var(--ink); font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c); }
.nav-link .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.nav-link[aria-expanded="true"] .icon { transform: rotate(180deg); }

.header-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: none; color: var(--ink);
  transition: background-color .15s var(--ease);
  touch-action: manipulation;
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn[aria-pressed="true"] { background: var(--paper-2); color: var(--accent); }
[data-night] .i-sun { display: none; }
:root[data-theme="night"] [data-night] .i-sun { display: block; }
:root[data-theme="night"] [data-night] .i-moon { display: none; }
.header-actions .header-cta { display: none; }
@media (min-width: 1080px) {
  .main-nav { display: block; }
  .menu-toggle { display: none; }
  .header-actions .header-cta { display: inline-flex; margin-left: 8px; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px;
  font-weight: 600; font-size: .9375rem; text-decoration: none; line-height: 1.2;
  border: 1.5px solid transparent;
  transition: transform .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn .icon { width: 18px; height: 18px; }

/* Mega panel */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s linear .18s;
}
.mega.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mega-inner { display: grid; grid-template-columns: 1.1fr 1fr 1.3fr; gap: 40px; padding-block: 32px; }
.mega-title { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; margin-bottom: 8px; }
.mega p { color: var(--ink-2); }
.mega-inner > div > p:not(.mega-label):not(.mega-title) { margin-bottom: 16px; }
.mega-label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3) !important; margin: 0 0 12px; }
.mega-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega-list a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; margin-inline: -12px; border-radius: var(--r-sm); text-decoration: none; font-weight: 500; }
.mega-list a:hover { background: var(--paper-2); }
.mega-list span { color: var(--ink-3); font-size: .875rem; font-weight: 400; }
.mega-feature { display: grid; grid-template-columns: 120px 1fr; gap: 16px; text-decoration: none; align-items: start; }
.mega-feature img, .mega-feature .thumb-fallback { width: 120px; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); }
.mega-feature-title { display: block; font-family: var(--font-display); font-size: 1.125rem; line-height: 1.25; margin-bottom: 6px; }
.mega-feature:hover .mega-feature-title { text-decoration: underline; text-underline-offset: 3px; }

/* Mobile sheet */
.sheet {
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper);
  display: flex; flex-direction: column;
  transform: translateY(16px); opacity: 0; visibility: hidden;
  transition: transform .25s var(--ease), opacity .2s var(--ease), visibility 0s linear .25s;
}
.sheet.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); padding-inline: var(--gutter); border-bottom: 1px solid var(--line); flex: none; }
.sheet-body { overflow-y: auto; padding: 20px var(--gutter) 40px; display: grid; gap: 24px; align-content: start; }
.sheet-search { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 18px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-3); text-align: left; }
.stage-cards { display: grid; gap: 10px; }
.stage-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); text-decoration: none; background: var(--soft); color: var(--ink); }
.stage-card strong { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; display: block; line-height: 1.2; }
.stage-card small { color: var(--ink-2); font-size: .875rem; }
.stage-card > .icon { margin-left: auto; color: var(--c); }
.stage-badge { width: 44px; height: 44px; border-radius: 12px; background: var(--c); color: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: .8125rem; flex: none; }
.sheet-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.sheet-links a { color: var(--ink-2); text-decoration: none; display: inline-block; padding: 10px 0; }

/* Search overlay */
.search-overlay { position: fixed; inset: 0; z-index: 110; background: rgba(20, 23, 22, .55); display: grid; align-items: start; padding: 10vh var(--gutter) 0; opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility 0s linear .2s; }
.search-overlay.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.search-panel { width: 100%; max-width: 680px; margin-inline: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 20px; transform: translateY(-8px); transition: transform .2s var(--ease); }
.search-overlay.is-open .search-panel { transform: none; }
.search-field { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.search-field input { flex: 1; min-width: 0; border: 0; background: none; font-size: 1.25rem; min-height: 44px; outline: none; }
.search-field input::placeholder { color: var(--ink-3); }
.search-suggest { margin-top: 20px; }

/* ---------- Components ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.cat { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c); text-decoration: none; }
.cat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
a.cat:hover { text-decoration: underline; text-underline-offset: 3px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--ink-3); font-size: .875rem; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta .icon { width: 15px; height: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--surface);
  text-decoration: none; font-weight: 500; font-size: .9375rem; color: var(--ink); line-height: 1.25;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), transform .15s var(--ease);
  touch-action: manipulation;
}
.chip:hover { border-color: var(--c); background: var(--soft); }
.chip:active { transform: scale(.97); }
.chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip .icon { width: 18px; height: 18px; }
.chip[hidden] { display: none; }

.section { padding-block: 56px; }
.section-tight { padding-top: 36px; }
.section-surface { background: var(--surface); border-top: 1px solid var(--line); }
@media (min-width: 768px) { .section { padding-block: 80px; } .section-tight { padding-top: 44px; } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: var(--step-4); }
.section-head .cat + h2 { margin-top: 10px; }
.section-head p { margin-top: 8px; color: var(--ink-2); max-width: 52ch; }
.more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; white-space: nowrap; min-height: 44px; }
.more-link .icon { transition: transform .2s var(--ease); }
.more-link:hover .icon { transform: translateX(3px); }

/* Cards */
.card { position: relative; display: flex; flex-direction: column; gap: 12px; }
.card-body { display: flex; flex-direction: column; gap: 8px; }
.card-media { position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--paper-2); aspect-ratio: 4 / 3; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.03); }
.thumb-fallback { display: grid; place-items: center; width: 100%; height: 100%; background: var(--soft); }
.thumb-fallback .brand-mark { width: 40%; height: auto; opacity: .5; }
.card-title { font-size: 1.3125rem; line-height: 1.22; }
.card-title a { text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.card-title a:focus-visible { outline: none; }
.card:has(.card-title a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: var(--r-md); }
.card-excerpt { color: var(--ink-2); font-size: .9375rem; }

.card-row { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; }
.card-row .card-media { aspect-ratio: 1; border-radius: var(--r-sm); }
.card-row .card-body { gap: 6px; }
.card-row .card-title { font-size: 1.0625rem; line-height: 1.3; }
.card-row .card-excerpt { display: none; }
@media (min-width: 640px) { .card-row .card-excerpt { display: block; } }

/* Ads */
.ad { margin-block: 32px; min-height: var(--ad-h, 280px); text-align: center; }
.ad-label { display: block; font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
@media (min-width: 768px) { .ad { min-height: var(--ad-h-lg, var(--ad-h, 280px)); } }
.ad-article_side { display: none; }
@media (min-width: 1080px) { .ad-article_side { display: block; position: sticky; top: calc(var(--header-h) + 24px); margin: 0; } }

/* ---------- Home ---------- */
.hero { padding-block: 28px 56px; }
.hero-grid { display: grid; gap: 36px; }
.hero-copy h1 { font-size: var(--step-5); margin: 14px 0 16px; }
.hero-copy h1 .soft { color: var(--accent); white-space: nowrap; }
.hero-copy .lede { font-size: var(--step-1); color: var(--ink-2); max-width: 46ch; margin-bottom: 28px; }
.ask { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-1); }
.ask-q { font-size: 1.25rem; margin-bottom: 4px; }
.ask-sub { color: var(--ink-3); font-size: .875rem; margin-bottom: 14px; }
.ask .chip { background: var(--paper); }
.lead-story { position: relative; display: flex; flex-direction: column; gap: 16px; }
.lead-story .card-media { aspect-ratio: 5 / 4; border-radius: var(--r-lg); }
.lead-story .card-title { font-size: var(--step-3); }
.lead-tag { position: absolute; top: 16px; left: 16px; background: var(--surface); color: var(--ink); font-size: .75rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; letter-spacing: .04em; }
@media (min-width: 1024px) {
  .hero { padding-block: 48px 80px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
}

.ruler-wrap { background: var(--surface); border-block: 1px solid var(--line); }
.ruler { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(172px, 1fr); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.ruler::-webkit-scrollbar { display: none; }
.ruler a { position: relative; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; padding: 28px 20px 24px; text-decoration: none; border-left: 1px solid var(--line); transition: background-color .2s var(--ease); }
.ruler a:first-child { border-left: 0; }
.ruler a::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c); transform: scaleX(.18); transform-origin: left; transition: transform .3s var(--ease); }
.ruler a:hover { background: var(--soft); }
.ruler a:hover::before { transform: scaleX(1); }
.ruler .age { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.ruler strong { font-family: var(--font-display); font-weight: 400; font-size: 1.375rem; line-height: 1.2; }
.ruler small { color: var(--ink-3); font-size: .875rem; }

.latest { display: grid; gap: 32px; }
.card-main .card-media { aspect-ratio: 16 / 10; }
.card-main .card-title { font-size: var(--step-3); }
.latest-side { display: grid; gap: 22px; align-content: start; }
.latest-side .card-row + .card-row { padding-top: 22px; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .latest { grid-template-columns: 1.5fr 1fr; gap: 48px; } }

.band { background: var(--soft); }
.band-night { --c: #A9C6EC; background: #1B2A3D; color: #EEF2F8; --ink: #EEF2F8; --ink-2: #C9D3E0; --ink-3: #A9B6C6; --line: #2C3D53; --paper-2: #22344B; --focus: #A9C6EC; }
:root[data-theme="night"] .band-night { background: #18202B; }
.band-night .cat { color: var(--c); }
.grid-4, .grid-3 { display: grid; gap: 32px 28px; }
@media (min-width: 640px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-3.grid-few { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; } }

.split { display: grid; gap: 32px; align-items: center; }
.split-quote { margin: 14px 0 0; padding: 0; border: 0; font-family: var(--font-display); font-size: var(--step-4); line-height: 1.2; }
.split-quote::before { content: "\201C"; display: block; font-size: 4rem; line-height: .6; color: var(--c); margin-bottom: 8px; }
.split-lede { color: var(--ink-2); margin: 18px 0 22px; max-width: 44ch; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.2fr; gap: 64px; } }
.stack-list .card-row { padding-block: 18px; border-top: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }

.trust { display: grid; gap: 24px; }
.trust-item { display: grid; grid-template-columns: 44px 1fr; gap: 14px; }
.ti-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.trust-item h3 { font-size: 1.1875rem; margin-bottom: 4px; }
.trust-item p { color: var(--ink-2); font-size: .9375rem; }
@media (min-width: 900px) { .trust { grid-template-columns: repeat(3, 1fr); gap: 40px; } }

/* Footer */
.site-footer { background: #1E2422; color: #FBF8F3; padding-block: 56px 28px; --ink: #FBF8F3; --ink-2: rgba(251, 248, 243, .72); --accent: #E68A6C; --focus: #8DB7EE; }
:root[data-theme="night"] .site-footer { background: #0E100F; }
.site-footer .brand-mark .arms { stroke: currentColor; }
.footer-grid { display: grid; gap: 36px; }
.footer-grid h2 { font-family: var(--font-text); font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer-grid li a { text-decoration: none; display: inline-block; padding: 6px 0; }
.footer-grid li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-about p { color: var(--ink-2); max-width: 38ch; margin-top: 12px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(251, 248, 243, .16); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .8125rem; color: var(--ink-2); }
.footer-bottom a { text-decoration: none; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }

/* ---------- Article ---------- */
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; background: var(--c, var(--accent)); transform-origin: left; transform: scaleX(0); z-index: 60; pointer-events: none; }
.crumbs { font-size: .875rem; color: var(--ink-3); padding-top: 20px; }
.crumbs ol, .crumbs p { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs .separator { color: var(--line-strong); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .last { display: none; }
.post-head { max-width: 820px; padding-block: 24px 28px; }
.post-head h1 { font-size: var(--step-5); margin: 14px 0 16px; }
.post-dek { font-size: var(--step-1); color: var(--ink-2); margin-bottom: 22px; max-width: 60ch; }
.byline { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.byline-name { display: block; font-weight: 600; font-size: .9375rem; text-decoration: none; }
.byline-name:hover { text-decoration: underline; }
.byline .meta { font-size: .8125rem; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.125rem; flex: none; }
.post-tools { margin-left: auto; display: flex; gap: 6px; }
.post-tools .icon-btn { border: 1px solid var(--line); }
.post-hero { margin: 0; }
.post-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); background: var(--paper-2); }
.post-hero figcaption { font-size: .8125rem; color: var(--ink-3); margin-top: 8px; }

.post-layout { display: grid; gap: 40px; padding-block: 36px 64px; }
.post-layout > * { min-width: 0; }
@media (min-width: 1080px) {
  .post-layout { grid-template-columns: 220px minmax(0, 680px) 1fr; gap: 48px; }
  .post-layout.has-side { grid-template-columns: 220px minmax(0, 680px) 300px; justify-content: space-between; }
}
.toc-rail { display: none; }
@media (min-width: 1080px) { .toc-rail { display: block; } }
.toc-sticky { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
.toc-title { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 7px 0 7px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; font-size: .875rem; line-height: 1.4; color: var(--ink-3); transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--c); font-weight: 600; }

.toc-mobile { position: sticky; top: var(--header-h); z-index: 30; margin: 0 calc(var(--gutter) * -1) 1.5em; padding: 6px var(--gutter); background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); font-size: 1rem; line-height: 1.5; }
.admin-bar .toc-mobile { top: calc(var(--header-h) + var(--wp-admin--admin-bar--height, 0px)); }
@media (min-width: 1080px) { .toc-mobile { display: none; } }
.toc-mobile summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 600; font-size: .9375rem; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile .current { color: var(--ink-3); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.toc-mobile .chev { transition: transform .2s var(--ease); }
.toc-mobile details[open] .chev { transform: rotate(180deg); }
.toc-mobile .toc { padding: 4px 0 12px; max-height: 60vh; overflow-y: auto; }

/* Prose */
.prose { font-size: var(--article-size); line-height: 1.75; color: var(--ink); }
.prose > * { margin-block: 0; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: var(--step-3); margin-top: 2.2em; }
.prose h3 { font-size: 1.375rem; margin-top: 1.8em; line-height: 1.25; }
.prose h4 { font-size: 1.125rem; margin-top: 1.6em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2.5px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li > ul, .prose li > ol { margin-top: .45em; }
.prose li::marker { color: var(--c); }
.prose strong, .prose b { font-weight: 700; }
.prose hr { border: 0; height: 1px; background: var(--line); margin-block: 2.5em; }
.prose blockquote, .prose .wp-block-quote { margin-inline: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--c); font-family: var(--font-display); font-size: 1.3125rem; line-height: 1.5; }
.prose blockquote p + p { margin-top: .6em; }
.prose blockquote cite { display: block; margin-top: 8px; font-family: var(--font-text); font-size: .875rem; font-style: normal; color: var(--ink-3); }
.prose figure, .prose .wp-block-image { margin-inline: 0; }
.prose figure img, .prose .wp-block-image img { border-radius: var(--r-md); height: auto; }
.prose figcaption, .prose .wp-element-caption { font-size: .8125rem; color: var(--ink-3); margin-top: 8px; line-height: 1.5; text-align: left; }
.prose .aligncenter { margin-inline: auto; }
.prose .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.prose iframe, .prose .wp-block-embed { max-width: 100%; }
.prose .wp-block-embed__wrapper iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.prose code { font-size: .9em; background: var(--paper-2); padding: .1em .35em; border-radius: 4px; }
.prose .ad { margin-block: 2em; }

/* Tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.prose .wp-block-table { margin-inline: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th, .prose thead td { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); background: var(--paper-2); font-weight: 700; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--paper); }
.prose .wp-block-table figcaption { margin-top: 8px; }

/* Note / short answer / takeaways (block styles + auto disclaimer) */
.is-style-gft-note { position: relative; padding: 14px 16px 14px 46px; border-radius: var(--r-md); background: var(--baby-soft); font-family: var(--font-text); font-size: .9375rem !important; line-height: 1.6; color: var(--ink); }
.is-style-gft-note::before { content: ""; position: absolute; left: 16px; top: 16px; width: 20px; height: 20px; background: var(--baby); -webkit-mask: var(--i-info) center / contain no-repeat; mask: var(--i-info) center / contain no-repeat; }
.is-style-gft-note > * + * { margin-top: .6em; }
/* Old posts carry inline block colors on the disclaimer; the note style wins. */
.prose .is-style-gft-note { background: var(--baby-soft) !important; color: var(--ink) !important; padding: 14px 16px 14px 46px !important; }
:root { --i-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E"); }

.is-style-gft-answer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-1); }
.is-style-gft-answer::before { content: "The short answer"; display: block; font-family: var(--font-text); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c); margin-bottom: 8px; }
.is-style-gft-answer > * + * { margin-top: .8em; }
.is-style-gft-takeaways { background: var(--play-soft); border-radius: var(--r-lg); padding: 22px; }
.is-style-gft-takeaways > * + * { margin-top: .8em; }
.is-style-gft-takeaways h2, .is-style-gft-takeaways h3 { margin-top: 0; font-size: 1.375rem; }

.prose ol.is-style-gft-steps { list-style: none; padding-left: 0; counter-reset: step; display: grid; gap: 12px; }
.prose ol.is-style-gft-steps > li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 10px; margin: 0; }
.prose ol.is-style-gft-steps > li::before { content: counter(step); width: 28px; height: 28px; margin-top: .2em; border-radius: 50%; background: var(--soft); color: var(--c); font-weight: 700; font-size: .875rem; display: grid; place-items: center; line-height: 1; }
.prose ul.is-style-gft-checks { list-style: none; padding-left: 0; display: grid; gap: 10px; }
.prose ul.is-style-gft-checks > li { position: relative; padding-left: 32px; margin: 0; }
.prose ul.is-style-gft-checks > li::before { content: ""; position: absolute; left: 0; top: .35em; width: 20px; height: 20px; background: var(--play); -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat; }
:root { --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }

/* Rank Math FAQ + HowTo */
.prose .rank-math-block, .prose #rank-math-faq { border-top: 1px solid var(--line); }
.prose .rank-math-list-item { border-bottom: 1px solid var(--line); padding-block: 18px; }
.prose .rank-math-question { font-family: var(--font-display); font-size: 1.1875rem !important; line-height: 1.35; margin: 0 0 8px !important; }
.prose .rank-math-answer { color: var(--ink-2); }
.prose .rank-math-answer > * + * { margin-top: .8em; }
.prose .rank-math-howto-block .rank-math-steps { padding-left: 0; list-style: none; counter-reset: step; }
.prose .rank-math-step { counter-increment: step; position: relative; padding-left: 44px; margin-top: 1.2em; }
.prose .rank-math-step::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--c); font-weight: 700; font-size: .875rem; display: grid; place-items: center; }
.prose .rank-math-step-title { font-size: 1.1875rem; margin: 0 0 6px; }

/* Buttons and columns inside content */
.prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.prose .wp-block-button__link { display: inline-flex; min-height: 44px; align-items: center; padding: 10px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-family: var(--font-text); font-weight: 600; font-size: 1rem; }
.prose .wp-block-columns { display: flex; flex-wrap: wrap; gap: 24px; }
.prose .wp-block-column { flex: 1 1 240px; min-width: 0; }
.prose .wp-block-column > * + * { margin-top: 1em; }

.page-links { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 2.5em !important; padding-top: 1.5em; border-top: 1px solid var(--line); font-size: 1rem; }
.share-row .label { font-weight: 600; margin-right: 6px; width: 100%; }
@media (min-width: 640px) { .share-row .label { width: auto; } }
.prose .chip { color: var(--ink); text-decoration: none; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .875rem; }
.prose .tag-row a { color: var(--ink-3); text-decoration: none; }
.prose .tag-row a:hover { color: var(--ink); text-decoration: underline; }
.author-box { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 24px 0; border-block: 1px solid var(--line); margin-top: 2em !important; }
.author-box .avatar { width: 64px; height: 64px; font-size: 1.5rem; }
.author-box h2 { font-size: 1.25rem; margin: 0 0 4px; }
.prose .author-box h2 a { color: var(--ink); text-decoration: none; }
.author-box p { font-size: .9375rem; color: var(--ink-2); line-height: 1.6; }

/* Pages */
.page-head { max-width: 760px; margin-inline: auto; padding-block: 48px 8px; }
.page-head h1 { font-size: var(--step-5); }
.page-head .post-dek { margin-top: 14px; }
.page-prose { max-width: 760px; margin-inline: auto; padding-block: 24px 80px; }

/* ---------- Archive ---------- */
.cat-hero { background: var(--soft); padding-block: 8px 36px; }
.cat-hero .crumbs { padding-top: 16px; margin-bottom: 18px; }
.cat-hero h1 { font-size: var(--step-5); margin: 12px 0; }
.cat-hero > .wrap > p { font-size: var(--step-1); color: var(--ink-2); max-width: 58ch; margin-bottom: 22px; }
.cat-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--ink-2); font-size: .9375rem; }
.cat-stats strong { color: var(--c); font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; margin-right: 6px; }
.cat-hero .search-form { max-width: 560px; margin-top: 18px; }
.filter-bar { position: sticky; top: var(--header-h); z-index: 20; background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.admin-bar .filter-bar { top: calc(var(--header-h) + var(--wp-admin--admin-bar--height, 0px)); }
.filter-bar .chips { flex-wrap: nowrap; overflow-x: auto; padding-block: 12px; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.filter-bar .chips::-webkit-scrollbar { display: none; }
.filter-bar .chip { flex: none; }
.start-here { display: grid; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; margin-bottom: 48px; }
.start-here h2 { font-size: var(--step-3); margin-top: 8px; }
.start-here > div > p { color: var(--ink-2); margin-top: 10px; }
.start-here ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.start-here li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.start-here li::before { content: counter(s, decimal-leading-zero); font-family: var(--font-display); font-size: 1.25rem; color: var(--c); line-height: 1.3; }
.start-here li a { text-decoration: none; font-weight: 600; }
.start-here li a:hover { text-decoration: underline; }
.start-here .meta { margin-top: 4px; }
@media (min-width: 900px) { .start-here { grid-template-columns: 1fr 2fr; gap: 40px; padding: 32px; } }
.archive-grid + .ad, .ad + .archive-grid { margin-top: 40px; }
.archive-grid .card-title { font-size: 1.3125rem; }
.search-list { display: grid; gap: 24px; max-width: 820px; }
.search-list .card-row { grid-template-columns: 96px 1fr; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .search-list .card-row { grid-template-columns: 160px 1fr; } .search-list .card-row .card-media { aspect-ratio: 4 / 3; } }

.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding-inline: 12px; border-radius: 999px; border: 1.5px solid var(--line-strong); text-decoration: none; font-weight: 600; }
.pagination .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination .page-numbers.dots { border: 0; }
.pagination a.page-numbers:hover { border-color: var(--ink); }

/* Search form + empty state */
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; min-height: 48px; padding: 10px 18px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.search-form input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); }
.search-form .btn span { display: none; }
@media (min-width: 480px) { .search-form .btn span { display: inline; } }
.empty { display: grid; gap: 24px; max-width: 640px; }
.empty-lede { font-size: var(--step-1); color: var(--ink-2); }
.display { font-size: var(--step-5); margin: 14px 0 20px; }

/* Forms (WPForms / comments) */
.prose input[type="text"], .prose input[type="email"], .prose input[type="tel"], .prose input[type="url"], .prose textarea, .prose select {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); font-size: 1rem;
}
.prose textarea { min-height: 160px; }
.prose input:focus, .prose textarea:focus, .prose select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); }
.prose .wpforms-container .wpforms-field-label { font-family: var(--font-text); font-weight: 600; font-size: .9375rem; }
.prose .wpforms-submit, .prose button[type="submit"] { min-height: 48px; padding: 10px 24px; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); font-weight: 600; }
.prose .wpforms-submit:hover, .prose button[type="submit"]:hover { background: var(--accent); color: var(--accent-ink); }

/* ---------- Motion ---------- */
.reveal-pending { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal-pending.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .toc-rail, .toc-mobile, .side-rail, .ad, .share-row, .post-tools, .progress, .section-surface, .sheet, .search-overlay { display: none !important; }
  body { background: #fff; color: #000; }
  .post-layout { display: block; }
}
