/* ==========================================================================
   MRB Plain Numbers — component CSS (Phase 2: header / nav / pills / newsletter / footer)
   Ported from the prototype styles.css. Zero JS.
   Prototype token names are aliased to the WP preset custom properties emitted
   by theme.json, so theme.json remains the single source of truth for values.
   ========================================================================== */

:root {
  --mrb-paper:        var(--wp--preset--color--paper);
  --mrb-surface:      var(--wp--preset--color--surface);
  --mrb-ink:          var(--wp--preset--color--ink);
  --mrb-ink-soft:     var(--wp--preset--color--ink-soft);
  --mrb-muted:        var(--wp--preset--color--muted);
  --mrb-line:         var(--wp--preset--color--line);
  --mrb-line-strong:  var(--wp--preset--color--line-strong);
  --mrb-green-700:    var(--wp--preset--color--green-700);
  --mrb-green-600:    var(--wp--preset--color--green-600);
  --mrb-green-100:    var(--wp--preset--color--green-100);
  --mrb-green-50:     var(--wp--preset--color--green-50);
  --mrb-copper-600:   var(--wp--preset--color--copper-600);
  --mrb-copper-100:   var(--wp--preset--color--copper-100);
  --mrb-navy-900:     var(--wp--preset--color--navy-900);

  --font-display:     var(--wp--preset--font-family--fraunces);
  --font-body:        var(--wp--preset--font-family--inter);

  --text-xs:          var(--wp--preset--font-size--xs);
  --text-sm:          var(--wp--preset--font-size--sm);
  --text-base:        var(--wp--preset--font-size--base);
  --text-body:        var(--wp--preset--font-size--body);
  --text-lede:        var(--wp--preset--font-size--lede);
  --text-h3:          var(--wp--preset--font-size--h3);
  --text-h2:          var(--wp--preset--font-size--h2);
  --text-h1:          var(--wp--preset--font-size--h1);
  --text-hero:        var(--wp--preset--font-size--hero);

  --s-2: var(--wp--preset--spacing--s-2);
  --s-3: var(--wp--preset--spacing--s-3);
  --s-4: var(--wp--preset--spacing--s-4);
  --s-5: var(--wp--preset--spacing--s-5);
  --s-6: var(--wp--preset--spacing--s-6);
  --s-7: var(--wp--preset--spacing--s-7);
  --s-8: var(--wp--preset--spacing--s-8);

  --r-s: 6px;
  --r-m: 12px;
  --r-pill: 999px;
  --maxw-prose: var(--wp--style--global--content-size, 680px);
  --shadow-card: 0 1px 2px rgba(26,36,51,.05), 0 10px 28px -16px rgba(26,36,51,.18);
  --shadow-card-hover: 0 2px 4px rgba(26,36,51,.06), 0 16px 36px -16px rgba(26,36,51,.24);
}

/* Centered max-width wrapper used by header/strip/newsletter/footer (full-bleed parts). */
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 var(--s-5); width: 100%; }

/* ---------- Header / brand ---------- */
.site-header {
  background: var(--mrb-paper);
  border-bottom: 1px solid var(--mrb-line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: var(--s-3); color: var(--mrb-ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mrb-muted);
  margin-top: 2px;
}

/* Primary nav — core Navigation block styled to match the prototype's .site-nav. */
.site-nav { margin-left: auto; }
.site-header .wp-block-navigation .wp-block-navigation__container { gap: var(--s-5); align-items: center; }
.site-header .wp-block-navigation-item__content {
  color: var(--mrb-ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.site-header .wp-block-navigation-item__content:hover { color: var(--mrb-ink); text-decoration: none; }
.site-header .nav-cta .wp-block-navigation-item__content {
  background: var(--mrb-green-700);
  color: #fff;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill);
  font-weight: 600;
}
.site-header .nav-cta .wp-block-navigation-item__content:hover { background: var(--mrb-green-600); color: #fff; }

/* ---------- Category-pill strip ---------- */
.cat-strip { border-bottom: 1px solid var(--mrb-line); background: var(--mrb-surface); }
.cat-strip .wrap {
  display: flex; gap: var(--s-2); align-items: center;
  overflow-x: auto; padding-top: var(--s-3); padding-bottom: var(--s-3);
}
.cat-strip .label {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mrb-muted); margin: 0 var(--s-2) 0 0; flex: none;
}
.cat-strip .wp-block-buttons { display: flex; gap: var(--s-2); margin: 0; }

/* Pill = is-style-pill block style on core/button (registered in functions.php) */
.wp-block-button.is-style-pill > .wp-block-button__link {
  flex: none;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--mrb-green-700);
  background: var(--mrb-green-50);
  border: 1px solid var(--mrb-green-100);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.wp-block-button.is-style-pill > .wp-block-button__link:hover { background: var(--mrb-green-100); }
.wp-block-button.is-style-pill.pill--active > .wp-block-button__link {
  background: var(--mrb-green-700);
  border-color: var(--mrb-green-700);
  color: #fff;
}

/* ---------- Newsletter band ("Refi Brief") ---------- */
.newsletter { background: var(--mrb-green-50); border-top: 1px solid var(--mrb-line); }
.newsletter .wrap {
  padding-top: var(--s-7); padding-bottom: var(--s-7);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s-7); align-items: center;
}
.newsletter h2 { font-family: var(--font-display); font-size: var(--text-h2); font-weight: 600; margin-bottom: var(--s-2); }
.newsletter p { margin: 0; color: var(--mrb-ink-soft); }
.newsletter form { display: flex; gap: var(--s-2); }
.newsletter input {
  flex: 1; font: inherit; padding: 12px 16px;
  border: 1px solid var(--mrb-line-strong); border-radius: var(--r-s);
  background: #fff; color: var(--mrb-ink);
}
.newsletter button {
  font: inherit; font-weight: 600; color: #fff;
  background: var(--mrb-green-700); border: 0; border-radius: var(--r-s);
  padding: 12px 22px; cursor: pointer;
}
.newsletter button:hover { background: var(--mrb-green-600); }
.newsletter button[disabled], .newsletter input[disabled] { opacity: .6; cursor: not-allowed; }
.newsletter .fine { font-size: var(--text-xs); color: var(--mrb-muted); margin-top: var(--s-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--mrb-navy-900); color: #AAB7C6; font-size: var(--text-sm); }
.site-footer .wrap { padding-top: var(--s-8); padding-bottom: var(--s-7); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s-7); margin-bottom: var(--s-7); }
.site-footer .brand { color: #fff; margin-bottom: var(--s-4); }
.site-footer .brand-name small { color: #7E8CA0; }
.site-footer p { color: #AAB7C6; }
.site-footer h4 {
  color: #fff; font-family: var(--font-body); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: var(--s-3);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.site-footer a { color: #C9D3DF; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-disclosure {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: var(--s-5);
  font-size: var(--text-xs); line-height: 1.7; color: #7E8CA0;
}
.footer-disclosure p { margin: 0 0 var(--s-2); color: #7E8CA0; }

/* ---------- Responsive (ported; header/footer/newsletter scope only) ---------- */
@media (max-width: 960px) {
  .newsletter .wrap { grid-template-columns: 1fr; gap: var(--s-5); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-header .site-nav { display: none; } /* prototype: hamburger omitted, no-JS */
}
@media (max-width: 600px) {
  .wrap { padding: 0 var(--s-4); }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter form { flex-direction: column; }
}

/* ==========================================================================
   PHASE 3 — single-post template
   Prose rules are scoped to .entry-content (core/post-content output).
   ========================================================================== */
.single-main .wrap, .home-main .wrap { width: 100%; }
.eyebrow {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--mrb-copper-600);
}

.crumbs { font-size: var(--text-sm); color: var(--mrb-muted); padding: var(--s-5) 0 0; }
.crumbs a { color: var(--mrb-muted); text-decoration: none; }
.crumbs a:hover { color: var(--mrb-green-700); }
.crumbs .sep, .crumbs .separator { margin: 0 6px; color: var(--mrb-line-strong); }

.article-header { padding: var(--s-5) 0 var(--s-6); max-width: 860px; }
.article-header .pill { display: inline-block; font-size: var(--text-xs); padding: 3px 10px; text-decoration: none; }
/* Single-post H1. The core Post Title block does not reliably pick up the h1 token/element
   size, so force it here. !important + class-matched selector wins over any core/global rule;
   the literal clamp fallback guarantees a large value even if the preset var fails to resolve.
   Matches article.html's H1 exactly. */
.article-header h1,
.article-header .wp-block-post-title,
.single-main .wp-block-post-title,
h1.wp-block-post-title {
  font-family: var(--font-display) !important;
  font-size: var(--text-h1, clamp(1.9rem, 3.4vw, 2.6rem)) !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.015em !important;
  color: var(--mrb-ink) !important;
  margin: var(--s-4) 0 var(--s-3);
}
.article-header .dek, .article-header .wp-block-post-excerpt {
  font-size: var(--text-lede); line-height: 1.55; color: var(--mrb-ink-soft); margin: 0 0 var(--s-5); max-width: 60ch;
}
.article-header .wp-block-post-excerpt__more-text { display: none; }

.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5);
  padding: var(--s-4) 0; border-top: 1px solid var(--mrb-line); border-bottom: 1px solid var(--mrb-line);
}
.article-meta .dates { font-size: var(--text-sm); color: var(--mrb-muted); }
.article-meta .dates strong { color: var(--mrb-ink-soft); font-weight: 600; }

.article-figure { margin: var(--s-6) 0 0; }
/* Fixed-ratio container; image crops into it (source files vary in size). */
.article-figure .wp-block-post-featured-image, .article-figure > img {
  display: block; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-m);
}
.article-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-figure figcaption { font-size: var(--text-xs); color: var(--mrb-muted); margin-top: var(--s-2); }

/* Two-column layout */
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-8); padding: var(--s-7) 0 var(--s-8);
}
.article-body { max-width: var(--maxw-prose); font-size: var(--text-body); line-height: 1.75; }
.article-body .entry-content > p { margin: 0 0 var(--s-5); }
.article-body .entry-content h2 {
  font-family: var(--font-display); font-size: var(--text-h2); font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.2; margin: var(--s-7) 0 var(--s-4);
  padding-top: var(--s-5); border-top: 1px solid var(--mrb-line); color: var(--mrb-ink);
}
.article-body .entry-content h2:first-of-type { border-top: 0; padding-top: 0; margin-top: var(--s-5); }
.article-body .entry-content h3 { font-family: var(--font-display); font-size: var(--text-h3); font-weight: 600; margin: var(--s-6) 0 var(--s-3); color: var(--mrb-ink); }
.article-body .entry-content strong { color: var(--mrb-ink); }
.article-body .entry-content table { width: 100%; border-collapse: collapse; font-size: var(--text-base); margin: 0 0 var(--s-5); }
.article-body .entry-content th, .article-body .entry-content td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--mrb-line); }
.article-body .entry-content th { font-size: var(--text-sm); letter-spacing: .03em; text-transform: uppercase; color: var(--mrb-muted); font-weight: 600; }

/* Key takeaways (meta-driven, render-if-present) */
.takeaways {
  background: var(--mrb-green-50); border: 1px solid var(--mrb-green-100);
  border-left: 4px solid var(--mrb-green-700); border-radius: var(--r-s);
  padding: var(--s-5); margin: 0 0 var(--s-6);
}
.takeaways h2 {
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--mrb-green-700);
  border: 0; margin: 0 0 var(--s-3); padding: 0;
}
.takeaways ul { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s-2); font-size: var(--text-base); }

/* In-content callouts + stat pull (pipeline emits this markup inside post_content) */
.callout { border: 1px solid var(--mrb-line); border-radius: var(--r-m); background: var(--mrb-surface); padding: var(--s-5); margin: 0 0 var(--s-5); }
.callout .callout-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: var(--s-3); }
.callout--example .callout-label { color: var(--mrb-green-700); }
.callout--note { background: var(--mrb-copper-100); border-color: #ECD9CB; }
.callout--note .callout-label { color: var(--mrb-copper-600); }
.callout p { margin: 0 0 var(--s-3); font-size: var(--text-base); }
.callout p:last-child { margin-bottom: 0; }
.stat-pull { display: grid; gap: 2px; border-top: 2px solid var(--mrb-ink); border-bottom: 1px solid var(--mrb-line); padding: var(--s-4) 0; margin: 0 0 var(--s-5); }
.stat-pull .stat { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: var(--mrb-copper-600); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-pull .stat-label { font-size: var(--text-sm); color: var(--mrb-muted); }

/* Ad slots */
.ad-slot {
  display: grid; place-items: center; border: 1px dashed var(--mrb-line-strong); border-radius: var(--r-s);
  background: repeating-linear-gradient(45deg, transparent 0 12px, rgba(26,36,51,.015) 12px 24px);
  color: var(--mrb-muted); font-size: var(--text-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 var(--s-5);
}
.ad-slot--inline { min-height: 110px; }
.ad-slot--rail { min-height: 250px; }

/* Sources (pipeline emits as end-of-content markup) + disclosure + tags + author card */
.sources { margin: var(--s-7) 0 0; border-top: 1px solid var(--mrb-line); padding-top: var(--s-5); }
.sources h2 { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mrb-ink); border: 0; padding: 0; margin: 0 0 var(--s-3); }
.sources ol { margin: 0; padding-left: 1.3em; font-size: var(--text-sm); color: var(--mrb-muted); display: grid; gap: var(--s-2); }
.disclosure-box { background: var(--mrb-surface); border: 1px solid var(--mrb-line); border-radius: var(--r-s); padding: var(--s-4) var(--s-5); font-size: var(--text-sm); color: var(--mrb-muted); margin: var(--s-6) 0 0; }
.disclosure-box strong { color: var(--mrb-ink-soft); }
.tag-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-5) 0 0; }
.tag-row a, .tag { font-size: var(--text-xs); font-weight: 600; color: var(--mrb-muted); border: 1px solid var(--mrb-line); border-radius: var(--r-pill); padding: 3px 10px; text-decoration: none; }
.tag-row a:hover, .tag:hover { color: var(--mrb-green-700); border-color: var(--mrb-green-600); }
.author-card { display: flex; gap: var(--s-5); align-items: flex-start; background: var(--mrb-surface); border: 1px solid var(--mrb-line); border-radius: var(--r-m); padding: var(--s-5); margin: var(--s-7) 0 0; }
.author-card .avatar { width: 64px; height: 64px; font-size: 1.1rem; }
.author-card h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--mrb-ink); }
.author-card .role { font-size: var(--text-sm); color: var(--mrb-copper-600); font-weight: 600; margin: 1px 0 var(--s-2); }
.author-card p { margin: 0 0 var(--s-2); font-size: var(--text-sm); line-height: 1.65; }
.author-card .links { font-size: var(--text-sm); font-weight: 600; }

/* Right rail */
.rail { display: grid; gap: var(--s-5); align-content: start; }
.rail-box { background: var(--mrb-surface); border: 1px solid var(--mrb-line); border-radius: var(--r-m); padding: var(--s-5); }
.rail-box h3 { font-size: var(--text-xs); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--mrb-muted); margin-bottom: var(--s-3); }
.toc { position: sticky; top: 92px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; font-size: var(--text-sm); color: var(--mrb-ink-soft); padding: 6px 8px; border-radius: var(--r-s); line-height: 1.4; text-decoration: none; }
.toc a::before { content: counter(toc, decimal-leading-zero); color: var(--mrb-copper-600); font-weight: 600; font-size: var(--text-xs); padding-top: 2px; }
.toc a:hover { background: var(--mrb-green-50); color: var(--mrb-ink); }
.key-facts dl { margin: 0; display: grid; gap: var(--s-3); }
.key-facts dt { font-size: var(--text-xs); color: var(--mrb-muted); }
.key-facts dd { margin: 0; font-weight: 600; color: var(--mrb-ink); font-variant-numeric: tabular-nums; }

/* Brand chip (byline monogram) — a rounded SQUARE, deliberately logo-like, NOT a headshot. */
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.avatar { width: 36px; height: 36px; border-radius: 9px; flex: none; background: var(--mrb-green-700); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 700; letter-spacing: .04em; }
.avatar--sm { width: 28px; height: 28px; font-size: 0.56rem; border-radius: 7px; }
.byline-meta { font-size: var(--text-sm); line-height: 1.35; }
.byline-meta .name { font-weight: 600; color: var(--mrb-ink); }
.byline-meta .name a { color: inherit; text-decoration: none; }
.byline-meta .sub { color: var(--mrb-muted); }
.byline-meta .sub .dot { margin: 0 5px; color: var(--mrb-line-strong); }
.review-chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); font-weight: 600; color: var(--mrb-green-700); background: var(--mrb-green-50); border: 1px solid var(--mrb-green-100); border-radius: var(--r-pill); padding: 3px 10px; }
.review-chip svg { width: 12px; height: 12px; }

/* Related posts */
.related { border-top: 1px solid var(--mrb-line); background: var(--mrb-surface); }
.related .wrap { padding-top: var(--s-7); padding-bottom: var(--s-8); }
.related .card { background: var(--mrb-paper); }

/* ==========================================================================
   PHASE 4 — homepage tiers
   ========================================================================== */
.hero { padding: var(--s-7) 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--s-7); align-items: center; }
.hero .eyebrow { display: block; margin-bottom: var(--s-3); }
.hero h1, .hero .wp-block-post-title { font-family: var(--font-display); font-size: var(--text-hero); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; margin: var(--s-3) 0 var(--s-4); color: var(--mrb-ink); }
.hero h1 a, .hero .wp-block-post-title a { color: inherit; text-decoration: none; }
.hero .dek, .hero .wp-block-post-excerpt { font-size: var(--text-lede); line-height: 1.55; color: var(--mrb-ink-soft); margin: 0 0 var(--s-5); }
.hero .wp-block-post-excerpt__more-text { display: none; }
.hero-figure, .hero .wp-block-post-featured-image { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--r-m); margin: 0; }
.hero-figure img, .hero .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Start-here */
.start-here { border-top: 1px solid var(--mrb-line); border-bottom: 1px solid var(--mrb-line); background: var(--mrb-surface); }
.start-here .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.start-item { display: flex; gap: var(--s-4); align-items: flex-start; padding: var(--s-5); color: inherit; text-decoration: none; }
.start-item + .start-item { border-left: 1px solid var(--mrb-line); }
.start-item:hover { background: var(--mrb-green-50); }
.start-item .num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--mrb-copper-600); line-height: 1; }
.start-item h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 600; margin-bottom: 2px; color: var(--mrb-ink); }
.start-item p { margin: 0; font-size: var(--text-sm); color: var(--mrb-muted); }

/* Sections + cards */
.section { padding: var(--s-8) 0 var(--s-6); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-6); padding-bottom: var(--s-3); border-bottom: 2px solid var(--mrb-ink); }
.section-head h2 { font-family: var(--font-display); font-size: var(--text-h2); font-weight: 600; letter-spacing: -0.01em; color: var(--mrb-ink); }
.section-head .more { font-size: var(--text-sm); font-weight: 600; text-decoration: none; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); list-style: none; margin: 0; padding: 0; }
.card-grid > li { display: flex; }
.card { background: var(--mrb-surface); border: 1px solid var(--mrb-line); border-radius: var(--r-m); box-shadow: var(--shadow-card); overflow: hidden; display: flex; flex-direction: column; width: 100%; transition: box-shadow .18s ease, transform .18s ease; }
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
/* Fixed-ratio container (16:9, matching prototype .ph--16x9); image crops in via object-fit.
   flex:0 0 auto so the media box never grows in the card's flex column (no gap below image). */
.card .card-media { display: block; width: 100%; line-height: 0; aspect-ratio: 16 / 9; overflow: hidden; flex: 0 0 auto; }
.card .card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .card-media--empty { background:
  radial-gradient(120% 90% at 85% 10%, rgba(27,122,95,.16), transparent 55%),
  radial-gradient(110% 100% at 10% 95%, rgba(178,92,56,.10), transparent 50%),
  linear-gradient(150deg, #EFE9DE 0%, #E4EBE4 100%); }
.card-body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.card .pill { align-self: flex-start; font-size: var(--text-xs); padding: 3px 10px; text-decoration: none; }
.card h3, .card .wp-block-post-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; color: var(--mrb-ink); margin: 0; }
.card h3 a, .card .wp-block-post-title a { color: inherit; text-decoration: none; }
.card h3 a:hover, .card .wp-block-post-title a:hover { text-decoration: underline; text-decoration-color: var(--mrb-green-600); }
.card .dek, .card .wp-block-post-excerpt { margin: 0; font-size: 0.95rem; color: var(--mrb-ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .byline { margin-top: auto; padding-top: var(--s-3); border-top: 1px solid var(--mrb-line); }

/* Topic tiles */
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.topic-tile { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); background: var(--mrb-surface); border: 1px solid var(--mrb-line); border-radius: var(--r-m); padding: var(--s-4) var(--s-5); color: var(--mrb-ink); font-weight: 600; text-decoration: none; }
.topic-tile:hover { border-color: var(--mrb-green-600); box-shadow: var(--shadow-card); }
.topic-tile .count { font-size: var(--text-sm); font-weight: 500; color: var(--mrb-muted); }

/* Trust band */
.trust { background: var(--mrb-navy-900); color: #C9D3DF; }
.trust .wrap { padding-top: var(--s-8); padding-bottom: var(--s-8); }
.trust h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--text-h2); color: #fff; margin-bottom: var(--s-2); }
.trust .intro { max-width: 56ch; margin: 0 0 var(--s-6); color: #AAB7C6; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.trust-item h3 { color: #fff; font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; margin-bottom: var(--s-2); display: flex; gap: var(--s-2); align-items: center; }
.trust-item h3 svg { width: 18px; height: 18px; color: #5FB89A; flex: none; }
.trust-item p { margin: 0; font-size: var(--text-sm); line-height: 1.65; color: #AAB7C6; }
.trust-item a { color: #7CC7AC; }

/* ---------- Phase 3/4 responsive (ported) ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .card-grid, .trust-grid, .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .start-here .wrap { grid-template-columns: 1fr; }
  .start-item + .start-item { border-left: 0; border-top: 1px solid var(--mrb-line); }
  .article-layout { grid-template-columns: 1fr; gap: var(--s-6); padding-bottom: var(--s-7); }
  .toc { position: static; } /* rail (incl. ad) drops BELOW content, reading-flow first */
}
@media (max-width: 600px) {
  .card-grid, .trust-grid, .topic-grid { grid-template-columns: 1fr; }
  .article-body .entry-content table { display: block; overflow-x: auto; }
}

/* ==========================================================================
   Archive / posts-index pages (category, tag, date, search, "All guides")
   Reuses .card-grid + .card; adds the page heading + pagination.
   ========================================================================== */
.archive-main .wrap { padding-top: var(--s-7); padding-bottom: var(--s-8); }
.archive-head { border-bottom: 2px solid var(--mrb-ink); padding-bottom: var(--s-3); margin-bottom: var(--s-6); }
.archive-head h1, .archive-head .wp-block-query-title {
  font-family: var(--font-display); font-size: var(--text-h1, clamp(1.9rem, 3.4vw, 2.6rem));
  font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; color: var(--mrb-ink); margin: 0;
}
.archive-head .wp-block-term-description { margin: var(--s-3) 0 0; color: var(--mrb-muted); font-size: var(--text-base); max-width: 60ch; }
.card-grid--archive { margin-bottom: var(--s-7); }
.archive-empty { padding: var(--s-7) 0; color: var(--mrb-muted); font-size: var(--text-body); }

.archive-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; align-items: center; }
.archive-pagination a.page-numbers, .archive-pagination span.page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px;
  border: 1px solid var(--mrb-line); border-radius: var(--r-s); font-size: var(--text-sm); font-weight: 600;
  color: var(--mrb-green-700); background: var(--mrb-surface); text-decoration: none;
}
.archive-pagination a.page-numbers:hover { background: var(--mrb-green-50); border-color: var(--mrb-green-600); }
.archive-pagination span.current { background: var(--mrb-green-700); border-color: var(--mrb-green-700); color: #fff; }
.archive-pagination span.dots { border: 0; background: transparent; min-width: auto; }
