/*
Theme Name:   SafeMom Astra Child
Theme URI:    https://safemom.ai/
Description:  Child theme for Astra. Adds entity-page (Ingredient, Question, Product, Research, Topic) templates and the SafeMom design system. Phase B/C of the redesign.
Author:       SafeMom — Jamie G
Author URI:   https://safemom.ai/
Template:     astra
Version:      0.9.0
Requires PHP: 7.4
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  safemom
*/

/* =========================================================================
   SafeMom design system — Phase B tokens & components
   Ported verbatim from design-system-mockup.html. Mockup-only chrome
   (.mock-bar, .specimen, .swatch, .device) is intentionally omitted —
   only live-site styles live here.
   ========================================================================= */

:root {
  /* Brand */
  --ac-primary:        #123F55;
  --ac-primary-hover:  #1A4860;
  --ac-primary-dark:   #33302E;
  --ac-accent:         #C7DFEC;
  --ac-bg-pale:        #E3EEF4;
  --ac-bg:             #FCFAF8;

  /* Text */
  --tx-strong:         #33302E;
  --tx:                #33302E;
  --tx-muted:          #5B5856;
  --tx-subtle:         #5B5856;

  /* Lines & surfaces */
  --line:              #C7DFEC;
  --line-strong:       #A3CBDE;
  --surface:           #FCFAF8;
  --surface-alt:       #F1F7FB;

  /* Rating tokens */
  --safe-bg:           #E1EFE6;
  --safe-text:         #237950;
  --safe-border:       #BBDDCB;
  --safe-solid:        #2FA36B;

  --caution-bg:        #FAEDD9;
  --caution-text:      #96610B;
  --caution-border:    #EFD3A4;
  --caution-solid:     #F0A62B;

  --avoid-bg:          #F8DDD8;
  --avoid-text:        #BD311B;
  --avoid-border:      #EFB9AF;
  --avoid-solid:       #E1462E;

  /* Type */
  --font-body:  'Mulish', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Lora', Georgia, "Times New Roman", serif;

  /* Layout */
  --maxw-read:  720px;
  --maxw-wide:  1180px;
  --maxw-grid:  1280px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Shadow */
  --sh-sm: 0 1px 2px rgba(51,48,46,.06);
  --sh-md: 0 4px 14px rgba(51,48,46,.08);
  --sh-lg: 0 18px 44px rgba(51,48,46,.12);

  /* Motion */
  --t-fast: 120ms ease;
  --t-med:  220ms ease;
}

/* -----------------------------------------------------------------
   Scope: entity-page styles apply only on CPT singular/archive
   bodies so we don't bleed into Astra-rendered homepage / blog /
   PMPro / UAGB block layouts.
   ----------------------------------------------------------------- */
body.single-ingredient,
body.post-type-archive-ingredient,
body.single-question,
body.post-type-archive-question,
body.single-product,
body.post-type-archive-product,
body.single-research,
body.post-type-archive-research,
body.tax-topic {
  background: var(--surface-alt);
  color: var(--tx);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.sm-page * { box-sizing: border-box; }
.sm-page a { color: var(--ac-primary); text-decoration: none; }
.sm-page a:hover { color: var(--ac-primary-hover); text-decoration: underline; }
.sm-page p { margin: 0 0 1em; }
.sm-page img { max-width: 100%; display: block; }
.sm-page hr { border: 0; }

/* ====== Page chrome ====== */
.sm-page {
  background: #FCFAF8;
  margin: 0 auto;
}
.sm-page__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  padding: 36px 56px 64px;
  max-width: var(--maxw-wide);
  margin: 0 auto;
}
.sm-page__body--single { grid-template-columns: minmax(0, 1fr); }
.sm-page__body--hub { display: block; padding: 36px 40px 64px; max-width: var(--maxw-grid); }

.sm-main { min-width: 0; }
.sm-main--narrow { max-width: var(--maxw-read); margin: 0 auto; }

.sm-aside {
  position: sticky; top: 80px;
  align-self: start;
  display: flex; flex-direction: column; gap: 20px;
}
.sm-aside__widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}
.sm-aside__widget h4 {
  font-family: var(--font-body); font-weight: 800;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--tx-subtle);
  margin: 0 0 12px;
}
.sm-aside__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sm-aside__list a {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--line);
}
.sm-aside__list a:last-child { border-bottom: 0; }
.sm-aside__list a:hover { text-decoration: none; }
.sm-aside__list a span:first-child { color: var(--tx-strong); font-weight: 500; }

@media (max-width: 1024px) {
  .sm-page__body { grid-template-columns: 1fr; padding: 28px 28px 48px; gap: 32px; }
  .sm-aside { position: static; }
}
@media (max-width: 600px) {
  .sm-page__body { padding: 20px 18px 48px; }
}

/* ====== Breadcrumb ====== */
.sm-breadcrumb {
  font-size: 13px; color: var(--tx-subtle);
  margin: 0 0 12px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.sm-breadcrumb a { color: var(--tx-muted); font-weight: 600; }
.sm-breadcrumb a:hover { color: var(--ac-primary); }
.sm-breadcrumb__sep { color: var(--line-strong); }
.sm-breadcrumb__current { color: var(--tx); font-weight: 600; }

/* ====== Entity hero ====== */
.sm-hero {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
/* Side-by-side hero with featured image on right, content on left */
.sm-hero--with-image {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: 36px;
  align-items: start;
}
.sm-hero--with-image .sm-hero__content { min-width: 0; }
.sm-hero__image {
  position: sticky;
  top: 80px;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-md);
  aspect-ratio: 4 / 3;
  background: var(--ac-bg-pale);
}
.sm-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
@media (max-width: 900px) {
  .sm-hero--with-image {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .sm-hero__image {
    position: static;
    aspect-ratio: 16 / 10;
    margin-bottom: 8px;
  }
}
.sm-hero__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.sm-hero__top .sm-rb { box-shadow: var(--sh-sm); }
.sm-hero__top .sm-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ac-primary);
  background: var(--ac-bg-pale);
  border-radius: var(--r-pill);
  padding: 4px 10px;
}
.sm-hero h1 {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 44px; line-height: 1.08;
  color: var(--tx-strong);
  letter-spacing: -.01em;
  margin: 4px 0 16px;
  max-width: 18ch;
}
.sm-hero__lede {
  font-size: 18px; line-height: 1.55;
  color: var(--tx-muted);
  max-width: 60ch;
  margin: 0 0 22px;
}
.sm-hero-meta {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  padding: 12px 0;
  color: var(--tx-muted);
  font-size: 13px;
  margin: 8px 0 0;
}
.sm-hero-meta strong { color: var(--tx-strong); font-weight: 700; }
.sm-hero-meta__sep { color: var(--line-strong); }

/* ====== Facts strip ====== */
.sm-facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 24px 0 0;
}
.sm-facts__cell { background: var(--surface); padding: 14px 16px; }
.sm-facts__label {
  font-size: 10px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--tx-subtle);
  margin: 0 0 4px;
}
.sm-facts__value {
  font-size: 14px; color: var(--tx-strong); font-weight: 600; margin: 0;
}
.sm-facts__value code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
@media (max-width: 720px) { .sm-facts { grid-template-columns: 1fr 1fr; } }

/* ====== Pregnancy rating badge ====== */
.sm-rb {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-weight: 700; font-size: 13px;
  letter-spacing: .02em;
  border: 1px solid transparent;
}
.sm-rb__icon {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 11px; font-weight: 800;
  flex-shrink: 0;
  color: #FCFAF8;
}
.sm-rb--safe    { background: var(--safe-bg);    color: var(--safe-text);    border-color: var(--safe-border); }
.sm-rb--caution { background: var(--caution-bg); color: var(--caution-text); border-color: var(--caution-border); }
.sm-rb--avoid   { background: var(--avoid-bg);   color: var(--avoid-text);   border-color: var(--avoid-border); }
.sm-rb--unclear { background: var(--surface-alt); color: var(--tx-muted); border-color: var(--line-strong); }
.sm-rb--safe    .sm-rb__icon { background: var(--safe-solid); }
.sm-rb--caution .sm-rb__icon { background: var(--caution-solid); }
.sm-rb--avoid   .sm-rb__icon { background: var(--avoid-solid); }
.sm-rb--unclear .sm-rb__icon { background: var(--tx-subtle); }
.sm-rb--hero { padding: 10px 18px; font-size: 14px; }
.sm-rb--hero .sm-rb__icon { width: 22px; height: 22px; font-size: 13px; }
.sm-rb--dot { padding: 4px 10px 4px 8px; font-size: 12px; }
.sm-rb--dot .sm-rb__icon { width: 14px; height: 14px; font-size: 9px; }

/* ====== Quick answer box ====== */
.sm-qa {
  background: linear-gradient(180deg, var(--ac-bg-pale), #FCFAF8 60%);
  border: 1px solid var(--ac-accent);
  border-left: 4px solid var(--ac-primary);
  border-radius: var(--r-md);
  padding: 22px 26px;
  display: flex; gap: 18px; align-items: flex-start;
}
.sm-qa__icon {
  flex: 0 0 36px; height: 36px;
  border-radius: 50%;
  background: var(--ac-primary); color: #FCFAF8;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 700; font-size: 18px;
}
.sm-qa__body { flex: 1; }
.sm-qa__label {
  font-size: 11px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ac-primary);
  margin: 0 0 4px;
}
.sm-qa__answer {
  font-size: 17px; line-height: 1.55; color: var(--tx-strong);
  margin: 0; font-weight: 500;
}

/* ====== Citation chip ====== */
.sm-cite {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  vertical-align: super;
  background: var(--ac-accent);
  color: var(--ac-primary-dark);
  font-size: 11px; font-weight: 700;
  border-radius: var(--r-pill);
  text-decoration: none;
  position: relative;
  margin: 0 2px;
  transition: background var(--t-fast), color var(--t-fast);
  line-height: 1;
}
.sm-cite:hover { background: var(--ac-primary); color: #FCFAF8; text-decoration: none; }
.sm-cite[data-source]:hover::after {
  content: attr(data-source);
  position: absolute;
  bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: var(--tx-strong); color: #FCFAF8;
  font-size: 12px; font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  white-space: normal;
  width: max-content; max-width: 320px;
  z-index: 20;
  box-shadow: var(--sh-md);
  pointer-events: none;
}
.sm-cite[data-source]:hover::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px); left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--tx-strong);
  z-index: 21;
  pointer-events: none;
}

/* ====== Byline ====== */
.sm-byline {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sm-byline__photo {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--ac-accent) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><circle cx='24' cy='18' r='8' fill='%23123F55'/><path d='M8 44 C 10 32, 38 32, 40 44 Z' fill='%23123F55'/></svg>") center/100% no-repeat;
  flex-shrink: 0;
  border: 2px solid #FCFAF8;
  box-shadow: 0 0 0 1px var(--line);
}
.sm-byline__text { flex: 1; min-width: 0; }
.sm-byline__line1 { font-size: 14px; color: var(--tx-muted); margin: 0 0 2px; }
.sm-byline__line1 strong { color: var(--tx-strong); font-weight: 700; }
.sm-byline__line2 {
  font-size: 12px; color: var(--tx-subtle); margin: 0;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.sm-byline__dot { color: var(--line-strong); }

/* ====== Prose / body sections ====== */
.sm-prose { font-size: 17px; line-height: 1.7; }
.sm-prose p { margin: 0 0 1em; }
.sm-prose ul { padding-left: 1.25em; margin: 0 0 1em; }
.sm-prose li { margin-bottom: 6px; }
.sm-prose strong { color: var(--tx-strong); font-weight: 700; }

.sm-h2 {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 26px; line-height: 1.25;
  color: var(--tx-strong); letter-spacing: -.01em;
  margin: 40px 0 12px;
}
.sm-h3 {
  font-family: var(--font-body);
  font-weight: 700; font-size: 19px; line-height: 1.3;
  color: var(--tx-strong);
  margin: 24px 0 8px;
}

.sm-callout {
  background: var(--ac-bg-pale);
  border-left: 4px solid var(--ac-primary);
  padding: 16px 20px;
  border-radius: var(--r-sm);
  margin: 20px 0;
  font-size: 15px;
}
.sm-callout__label {
  font-size: 11px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ac-primary);
  margin: 0 0 4px;
}
.sm-callout p { margin: 0; }

.sm-ob {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  margin: 32px 0;
}
.sm-ob h3 { margin: 0 0 6px; font-family: var(--font-serif); font-weight: 600; font-size: 22px; color: var(--tx-strong); }
.sm-ob p { margin: 0; color: var(--tx-muted); font-size: 15px; }

/* ====== Ingredient card ====== */
.sm-ic {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  text-decoration: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.sm-ic:hover {
  border-color: var(--ac-accent);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.sm-ic__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.sm-ic { min-width: 0; }
/* Long single-word names (e.g. Dihydroxyacetone) push the rating badge onto its own row instead of overflowing the card. */
.sm-ic__head { flex-wrap: wrap; }
.sm-ic__head > div:first-child { flex: 1 1 110px; }
.sm-ic__head > :last-child:not(:first-child) { flex-shrink: 0; }
.sm-ic__name {
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 600; line-height: 1.2;
  color: var(--tx-strong); margin: 0;
}
.sm-ic__meta {
  font-size: 12px; color: var(--tx-subtle);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  margin: 2px 0 0;
}
.sm-ic__summary {
  font-size: 14px; line-height: 1.55;
  color: var(--tx-muted); margin: 0;
}
.sm-ic__foot {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--tx-subtle);
  display: flex; justify-content: space-between;
}

/* ====== Product card (Phase G — pre-shipped styles) ====== */
.sm-pc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  display: flex; flex-direction: column;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.sm-pc:hover {
  border-color: var(--ac-accent);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.sm-pc__img {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--ac-bg-pale), #FCFAF8);
  border-bottom: 1px solid var(--line);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.sm-pc__score {
  position: absolute; top: 12px; right: 12px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #FCFAF8;
  border: 2px solid currentColor;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; line-height: 1;
  box-shadow: var(--sh-sm);
}
.sm-pc__score--safe    { color: var(--safe-solid); }
.sm-pc__score--caution { color: var(--caution-solid); }
.sm-pc__score--avoid   { color: var(--avoid-solid); }
.sm-pc__score small { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-top: 1px; }
.sm-pc__body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.sm-pc__brand { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--tx-subtle); margin: 0 0 4px; }
.sm-pc__name { font-family: var(--font-body); font-size: 16px; line-height: 1.3; font-weight: 700; color: var(--tx-strong); margin: 0 0 10px; }

/* ====== App download CTA ====== */
.sm-cta {
  background: linear-gradient(160deg, var(--ac-primary) 0%, #1A4860 100%);
  color: #FCFAF8;
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.sm-cta::before {
  content: "";
  position: absolute; right: -40px; top: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 60%);
  pointer-events: none;
}
.sm-cta__kicker {
  font-size: 11px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ac-accent);
  margin: 0 0 6px;
}
.sm-cta__title {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 600; line-height: 1.2;
  margin: 0 0 8px; color: #FCFAF8;
}
.sm-cta__sub {
  font-size: 14px; line-height: 1.5;
  color: rgba(255,255,255,.85); margin: 0 0 18px;
}
.sm-cta__buttons { display: flex; flex-direction: column; gap: 10px; }
/* App-store / Play-store button.
   Color rules use high specificity (anchor + class + pseudo) so they
   beat any global `a { color: ... }` rule from Astra or our own
   `.sm-page a { color: var(--ac-primary) }` content-link styling. */
a.sm-store,
a.sm-store:link,
a.sm-store:visited,
a.sm-store:hover,
a.sm-store:focus,
a.sm-store:active {
  display: flex; align-items: center; gap: 10px;
  background: #123F55; color: #FCFAF8 !important;
  padding: 10px 14px;
  border-radius: var(--r-md);
  text-decoration: none !important;
  font-weight: 600; font-size: 13px;
  border: 1px solid rgba(255,255,255,.1);
  transition: background var(--t-fast);
}
a.sm-store:hover { background: #000; }
.sm-store__icon { width: 22px; height: 22px; flex-shrink: 0; color: #FCFAF8; }
.sm-store__top { font-size: 10px; color: #FCFAF8; opacity: .8; line-height: 1; }
.sm-store__bot { font-size: 15px; font-weight: 700; color: #FCFAF8; line-height: 1; margin-top: 2px; }
.sm-store__stack { display: flex; flex-direction: column; }

/* Mobile sticky bottom CTA */
.sm-cta--sticky {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  border-radius: 0;
  padding: 12px 16px;
  display: none;
  align-items: center; gap: 12px;
  z-index: 60;
  box-shadow: 0 -4px 14px rgba(51,48,46,.18);
}
.sm-cta--sticky .sm-cta__title { font-size: 14px; margin: 0; font-family: var(--font-body); font-weight: 700; }
.sm-cta--sticky .sm-cta__sub { font-size: 12px; margin: 0; }
.sm-cta--sticky .sm-cta__buttons { flex-direction: row; flex-shrink: 0; }
.sm-cta--sticky .sm-store { padding: 8px 12px; font-size: 12px; }
@media (max-width: 768px) {
  .sm-cta--sticky { display: flex; }
  body.single-ingredient, body.single-question { padding-bottom: 70px; }
}

/* ====== Editorial standards strip ====== */
.sm-eds {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 18px;
  display: flex; flex-wrap: wrap; gap: 18px;
  align-items: center;
  font-size: 13px; color: var(--tx-muted);
  margin: 24px 0 0;
}
.sm-eds__item { display: inline-flex; align-items: center; gap: 8px; }
.sm-eds__item strong { color: var(--tx-strong); font-weight: 700; }
.sm-eds__icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--ac-primary); }
.sm-eds__sep { width: 1px; height: 16px; background: var(--line-strong); }

/* ====== Citations list ====== */
.sm-cites {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  margin: 28px 0 0;
}
.sm-cites h3 {
  font-family: var(--font-body); font-weight: 800;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--tx-subtle);
  margin: 0 0 14px;
}
.sm-cites ol {
  list-style: decimal; margin: 0; padding-left: 22px;
  font-size: 14px; color: var(--tx-muted);
  line-height: 1.55;
}
.sm-cites li { margin-bottom: 8px; }
.sm-cites a { word-break: break-word; }
.sm-cites em { font-style: italic; }

/* ====== Author bio ====== */
.sm-author {
  display: flex; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  margin: 28px 0 0;
}
.sm-author__photo {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--ac-accent) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><circle cx='24' cy='18' r='8' fill='%23123F55'/><path d='M8 44 C 10 32, 38 32, 40 44 Z' fill='%23123F55'/></svg>") center/100% no-repeat;
  flex-shrink: 0;
  border: 2px solid #FCFAF8; box-shadow: 0 0 0 1px var(--line);
}
.sm-author__name {
  font-family: var(--font-serif); font-weight: 600;
  font-size: 18px; margin: 0; color: var(--tx-strong);
}
.sm-author__role {
  font-size: 13px; color: var(--ac-primary); font-weight: 700;
  margin: 2px 0 6px;
}
.sm-author__bio {
  font-size: 14px; color: var(--tx-muted); line-height: 1.55; margin: 0;
}

/* ====== Related list ====== */
.sm-related {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}
.sm-related a {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--tx-strong); font-weight: 600;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.sm-related a:last-child { border-bottom: 0; }
.sm-related a:hover { background: var(--ac-bg-pale); text-decoration: none; }
.sm-related a::after { content: "›"; color: var(--tx-subtle); font-size: 18px; }

/* ====== CPT tags (for Topic hub Phase E — preshipped) ====== */
.sm-cpt-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--ac-bg-pale); color: var(--ac-primary);
}
.sm-cpt-tag--question  { background: #C7DFEC; color: #123F55; }
.sm-cpt-tag--ingredient{ background: var(--ac-bg-pale); color: var(--ac-primary); }
.sm-cpt-tag--product   { background: #E3EEF4; color: #1A4860; }
.sm-cpt-tag--research  { background: #E3EEF4; color: #1A4860; }
.sm-cpt-tag--blog      { background: #F1F7FB; color: #235571; }

/* ====== Topic hub (taxonomy-topic.php) ======
   Cross-CPT discovery surface. Hero with stats bar, tab nav, and
   horizontal strips of mixed CPT cards. */

.sm-hub-hero {
  background: linear-gradient(180deg, var(--ac-bg-pale) 0%, #FCFAF8 100%);
  padding: 32px 40px 28px;
  border-bottom: 1px solid var(--line);
}
.sm-hub-hero__inner {
  max-width: var(--maxw-wide);
  margin: 0 auto;
}
/* Side-by-side variant: text left, image right */
.sm-hub-hero--with-image .sm-hub-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: center;
}
.sm-hub-hero--with-image .sm-hub-hero__text { min-width: 0; }
.sm-hub-hero__image {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--sh-md);
}
.sm-hub-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
@media (max-width: 900px) {
  .sm-hub-hero--with-image .sm-hub-hero__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .sm-hub-hero__image {
    aspect-ratio: 16 / 10;
    order: -1;  /* image moves to top on mobile */
  }
}
.sm-hub-hero__h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 44px;
  line-height: 1.1;
  margin: 8px 0 12px;
  color: var(--tx-strong);
  max-width: 18ch;
  letter-spacing: -.01em;
}
.sm-hub-hero__lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--tx-muted);
  max-width: 60ch;
  margin: 0;
}
.sm-hub-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding: 14px 0 0;
  border-top: 1px dashed var(--line);
  margin-top: 24px;
}
.sm-hub-stat__value {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  color: var(--ac-primary);
  line-height: 1;
}
.sm-hub-stat__label {
  font-size: 12px;
  color: var(--tx-muted);
  margin-top: 4px;
}
@media (max-width: 600px) {
  .sm-hub-hero { padding: 32px 18px 24px; }
  .sm-hub-hero__h1 { font-size: 30px; }
  .sm-hub-stats { gap: 16px; }
}

/* Tab nav (CPT filter on Topic hub) */
.sm-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sm-tabs::-webkit-scrollbar { display: none; }
.sm-tabs a {
  padding: 12px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--tx-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.sm-tabs a:hover {
  color: var(--tx-strong);
  text-decoration: none;
}
.sm-tabs a.is-active {
  color: var(--ac-primary);
  border-bottom-color: var(--ac-primary);
}
.sm-tabs a span {
  font-weight: 600;
  margin-left: 4px;
}

/* Strip header (section title + see-all link) */
.sm-hub-strip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 36px 0 16px;
  gap: 16px;
}
.sm-hub-strip:first-child { margin-top: 0; }
.sm-hub-strip__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--tx-strong);
  margin: 0;
  letter-spacing: -.005em;
}
.sm-hub-strip__link {
  font-size: 13px;
  font-weight: 700;
  color: var(--ac-primary);
  text-decoration: none;
  white-space: nowrap;
}
.sm-hub-strip__link:hover { color: var(--ac-primary-hover); text-decoration: underline; }

/* Research card (already preshipped in Phase B, normalize prefix) */
.sm-rc {
  background: #FCFAF8;
  border: 1px solid #A3CBDE;
  border-radius: var(--r-lg);
  padding: 22px 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.sm-rc::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #1A4860, #4E8DAE);
}
.sm-rc:hover { box-shadow: var(--sh-md); transform: translateY(-2px); text-decoration: none; }
.sm-rc__title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--tx-strong);
  line-height: 1.25;
  margin: 10px 0 8px;
}

/* Blog mini-card (used in Topic hubs) */
.sm-bc {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  text-decoration: none;
}
.sm-bc:hover { border-color: var(--ac-accent); text-decoration: none; }
.sm-bc__img {
  width: 96px;
  height: 96px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--ac-accent), var(--ac-bg-pale));
  flex-shrink: 0;
}
.sm-bc__body { flex: 1; min-width: 0; }
.sm-bc__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tx-strong);
  margin: 6px 0 4px;
}
.sm-bc__meta {
  font-size: 12px;
  color: var(--tx-subtle);
  margin: 0;
}


/* ====== Question-specific hero ======
   Soft purple-pale band, narrower text column than Ingredient hero. */
.sm-q-hero {
  background: linear-gradient(180deg, var(--ac-bg-pale), #FCFAF8 100%);
  border-bottom: 1px solid var(--line);
  padding: 40px 40px 28px;
}
.sm-q-hero__inner {
  max-width: var(--maxw-read);
  margin: 0 auto;
}
.sm-q-h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.12;
  margin: 12px 0 18px;
  color: var(--tx-strong);
  letter-spacing: -.005em;
}

/* Featured image banner between H1 and quick-answer box on Question pages */
.sm-q-hero__image {
  margin: 16px 0 20px;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 21 / 9;   /* slim banner so the answer box stays above the fold */
  max-height: 250px;
  box-shadow: var(--sh-md);
  background: var(--ac-bg-pale);
}
.sm-q-hero__img,
.sm-q-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
@media (max-width: 600px) {
  .sm-q-hero__image {
    aspect-ratio: 16 / 10;
    margin: 14px 0 18px;
    border-radius: var(--r-md);
  }
}
@media (max-width: 600px) {
  .sm-q-hero { padding: 28px 18px 24px; }
  .sm-q-h1 { font-size: 28px; }
}

/* Pink-pill variant for Question pages */
.sm-pill--question {
  background: #C7DFEC !important;
  color: #123F55 !important;
}

/* Q-card (pink tint, serif H4) — for Topic-hub grid AND /questions/ archive */
.sm-qc {
  background: linear-gradient(135deg, #C7DFEC 0%, #FCFAF8 50%);
  border: 1px solid #A3CBDE;
  border-radius: var(--r-lg);
  padding: 22px 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.sm-qc:hover {
  border-color: #4E8DAE;
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.sm-qc__q {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--tx-strong);
  margin: 10px 0 8px;
}
.sm-qc__a {
  font-size: 14px;
  line-height: 1.5;
  color: var(--tx-muted);
  margin: 0;
}


/* ====== Generic grid utility ====== */
.sm-grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.sm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .sm-grid-2 { grid-template-columns: 1fr; } }

/* ====== Archive (Ingredients index) ====== */
.sm-archive-hero {
  background: linear-gradient(180deg, var(--ac-bg-pale), #FCFAF8);
  padding: 48px 40px 36px;
  border-bottom: 1px solid var(--line);
}
.sm-archive-hero__inner { max-width: var(--maxw-wide); margin: 0 auto; }
.sm-archive-hero h1 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: 44px; line-height: 1.1;
  margin: 8px 0 12px;
  color: var(--tx-strong);
}
.sm-archive-hero__lede {
  font-size: 18px; line-height: 1.55;
  color: var(--tx-muted);
  max-width: 60ch; margin: 0;
}
/* ====== TWO-COLUMN ARCHIVE LAYOUT ======
   Healthline-style: sidebar with breadcrumb/heading/lede/filters on the
   left, cards grid on the right. Stacks vertically on mobile.
   We also forcibly break the Astra ast-blog-grid-3 layout by making
   the page container block-level (the body class set by Astra was
   imposing a 3-column grid that fought our template). */
body.post-type-archive-ingredient .site-content > .ast-container,
body.post-type-archive-question .site-content > .ast-container,
body.tax-topic .site-content > .ast-container {
  display: block !important;
  max-width: none !important;
}
body.post-type-archive-ingredient #content,
body.post-type-archive-question #content,
body.tax-topic #content {
  display: block !important;
}

.sm-archive-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 48px;
  max-width: var(--maxw-grid);
  margin: 40px auto 60px;
  padding: 0 32px;
  background: var(--surface-alt);
}
.sm-archive-layout > * {
  min-width: 0;
}

.sm-archive-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  padding: 28px 0;
}
.sm-archive-sidebar .sm-breadcrumb {
  margin: 0 0 12px;
}
.sm-archive-sidebar__h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 36px;
  line-height: 1.1;
  color: var(--tx-strong);
  margin: 8px 0 14px;
  letter-spacing: -.01em;
}
.sm-archive-sidebar__lede {
  font-size: 15px;
  line-height: 1.6;
  color: var(--tx-muted);
  margin: 0 0 24px;
}

.sm-archive-main {
  padding: 28px 0;
  background: var(--surface-alt);
}

/* Questions-archive variant — pink-tinted sidebar pill matches CPT identity */
.sm-archive-layout--questions {
  background: linear-gradient(to right, #F1F7FB 0px, #F1F7FB 320px, var(--surface-alt) 320px, var(--surface-alt) 100%);
}
.sm-archive-layout--questions .sm-archive-sidebar {
  background: transparent;
}

/* Compact stat tiles in the sidebar (Questions archive) */
.sm-archive-sidebar__stats {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.sm-archive-sidebar__stat {
  display: flex;
  flex-direction: column;
}
.sm-archive-sidebar__stat-value {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  color: var(--ac-primary);
  line-height: 1;
}
.sm-archive-sidebar__stat-label {
  font-size: 12px;
  color: var(--tx-muted);
  margin-top: 4px;
}

@media (max-width: 900px) {
  .sm-archive-layout--questions {
    background: var(--surface-alt);
  }
}

/* Chips in the sidebar — vertical-friendly layout, wraps if needed */
.sm-archive-filters--sidebar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  list-style: none !important;
  width: 100% !important;
}

/* Legacy single-row filters layout — keep around for any non-sidebar use */
.sm-archive-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 40px;
  max-width: var(--maxw-wide);
  margin: 24px auto 0;
  list-style: none;
}

@media (max-width: 900px) {
  .sm-archive-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 18px;
    margin: 24px auto 40px;
  }
  .sm-archive-sidebar {
    position: static;
    padding: 20px 0 0;
  }
  .sm-archive-main {
    padding: 0 0 24px;
  }
  .sm-archive-sidebar__h1 { font-size: 26px; }
}
/* Aggressive !important overrides — Astra/UAGB injects anchor padding rules
   in .entry-content that bloat these chips to ~400px tall pills. The chip
   styles below force inline-flex sizing regardless of parent influence. */
a.sm-archive-filters__chip,
a.sm-archive-filters__chip:link,
a.sm-archive-filters__chip:visited {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  background: #FCFAF8 !important;
  border: 1px solid #A3CBDE !important;
  color: #5B5856 !important;
  text-decoration: none !important;
  height: auto !important;
  min-height: 0 !important;
  align-self: flex-start !important;
  white-space: nowrap !important;
  margin: 0 !important;
  width: auto !important;
}
a.sm-archive-filters__chip:hover {
  border-color: #123F55 !important;
  color: #123F55 !important;
  text-decoration: none !important;
}
a.sm-archive-filters__chip.is-active,
a.sm-archive-filters__chip.is-active:link,
a.sm-archive-filters__chip.is-active:visited {
  background: #33302E !important;
  color: #FCFAF8 !important;
  border-color: #123F55 !important;
}

/* ====== Mobile H1 shrinkage ====== */
@media (max-width: 600px) {
  .sm-hero h1, .sm-archive-hero h1 { font-size: 30px; }
  .sm-h2 { font-size: 22px; }
}

/* =========================================================================
   PHASE I — Custom site footer (replaces Astra's empty widget rows)
   Rendered via astra_footer action @ priority 5 (before Astra's default
   widget output at priority 10).
   ========================================================================= */

/* Hide Astra's empty 3-column primary footer wrap site-wide. */
.site-primary-footer-wrap { display: none !important; }

/* Our custom 4-column footer */
.sm-footer {
  background: var(--tx-strong);
  color: rgba(255,255,255,.82);
  font-family: var(--font-body);
  padding: 56px 24px 24px;
  line-height: 1.6;
}
.sm-footer__inner {
  max-width: var(--maxw-grid);
  margin: 0 auto;
}
.sm-footer__grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1fr 1.3fr;
  gap: 40px;
  padding-bottom: 40px;
}
.sm-footer__col h4.sm-footer__h {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #FCFAF8;
  margin: 0 0 16px;
}
.sm-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sm-footer__col li {
  margin: 0 0 10px;
  font-size: 14px;
}
.sm-footer__col a {
  color: rgba(255,255,255,.74);
  text-decoration: none;
}
.sm-footer__col a:hover {
  color: var(--ac-accent);
  text-decoration: underline;
}
.sm-footer__col--cta .sm-footer__sub {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  margin: 0 0 14px;
  max-width: 32ch;
}
.sm-footer__stores {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sm-footer__store {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-md);
  color: #FCFAF8 !important;
  text-decoration: none !important;
  transition: background var(--t-fast);
}
.sm-footer__store:hover { background: rgba(255,255,255,.16); }
.sm-footer__store svg { flex-shrink: 0; }
.sm-footer__store span { display: flex; flex-direction: column; line-height: 1.1; }
.sm-footer__store span span { font-size: 10px; opacity: .7; }
.sm-footer__store strong { font-size: 14px; font-weight: 700; }

.sm-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
}
.sm-footer__copy { color: rgba(255,255,255,.7); }
.sm-footer__legal {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  color: rgba(255,255,255,.6);
}
.sm-footer__legal a { color: rgba(255,255,255,.78); text-decoration: none; }
.sm-footer__legal a:hover { color: var(--ac-accent); text-decoration: underline; }
.sm-footer__disclaimer {
  font-style: italic;
  color: rgba(255,255,255,.55);
}

@media (max-width: 900px) {
  .sm-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}
@media (max-width: 600px) {
  .sm-footer { padding: 40px 18px 20px; }
  .sm-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .sm-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* Override the dark Astra below-footer (copyright row) so it doesn't
   sit awkwardly under our dark footer with a different shade. Hide it
   since our footer has its own copyright row. */
.site-below-footer-wrap { display: none !important; }


/* =========================================================================
   AI Writer plugin's inline `<p class="sm-cta">` CTA — class-name collision
   with my Phase B design system .sm-cta (sidebar widget, dark gradient bg).
   When it's used inline as a paragraph, restyle as a pale-lavender callout
   box matching the .sm-qa quick-answer pattern.

   p.sm-cta is more specific than .sm-cta — these rules win without !important
   in most cases, but we use !important to defeat any inline-style overrides
   that may also be in play.
   ========================================================================= */
p.sm-cta {
  display: block !important;
  background: var(--ac-bg-pale) !important;
  background-image: none !important;
  background-color: var(--ac-bg-pale) !important;
  color: var(--tx-strong) !important;
  border: 1px solid var(--ac-accent) !important;
  border-left: 4px solid var(--ac-primary) !important;
  border-radius: var(--r-md) !important;
  padding: 18px 22px !important;
  margin: 24px 0 !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  font-weight: 400 !important;
  box-shadow: none !important;
  font-family: var(--font-body) !important;
}
p.sm-cta::before, p.sm-cta::after { content: none !important; }
p.sm-cta strong {
  color: var(--tx-strong) !important;
  font-weight: 700 !important;
}
p.sm-cta a,
p.sm-cta a:link,
p.sm-cta a:visited {
  color: var(--ac-primary) !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
}
p.sm-cta a:hover {
  color: var(--ac-primary-hover) !important;
}

/* AI Writer plugin also emits .sm-disclaimer paragraph and a few related
   classes. Make those readable too. */
p.sm-disclaimer {
  background: var(--surface-alt) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-sm) !important;
  padding: 14px 18px !important;
  margin: 20px 0 !important;
  font-size: 13px !important;
  color: var(--tx-muted) !important;
  font-style: italic !important;
}


/* =========================================================================
   Phase I v3 — homepage UAGB card cleanup
   The original homepage has 3 inner UAGB containers configured as
   "white cards" sitting INSIDE other UAGB containers. They render at
   constrained width while their parents are alignfull, creating visible
   side gaps + visual disjoint. Identified by their block_ids in page 9.
   Fix: strip the card's bg/border/shadow + let it span its parent fully.
   The content inside stays at readable width; the visual "card" frame
   disappears, so the parent section reads as one continuous block.
   ========================================================================= */

/* Box 1: "Pregnancy Safe Ingredient Checker" outer showcase container.
   This one has contentWidth: alignwide. Make it match the surrounding
   alignfull rhythm by stripping its background frame so the parent's
   bg flows through. */
.wp-block-uagb-container.uagb-block-c6598d20 {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border: none !important;
  width: 100% !important;
  max-width: 100% !important;
}
/* Make the inner content of box 1 honor the page's normal max content
   width so it doesn't sprawl edge-to-edge when its container goes full. */
.wp-block-uagb-container.uagb-block-c6598d20 > .uagb-container-inner-blocks-wrap {
  max-width: var(--maxw-wide);
  margin: 0 auto;
}

/* Box 2: "Make Informed Choices" inner card. The outer (lavender section)
   stays as-is. Drop the inner white card frame so the CTA flows directly
   on the lavender background. */
.wp-block-uagb-container.uagb-block-63b28c44 {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border: none !important;
  width: 100% !important;
  max-width: var(--maxw-grid) !important;
}

/* Box 3 (v0.5.3 — correctly identified after live DOM inspection):
   The dark side bars come from the OUTER container 47e6ca19, NOT 442e654a
   (which is the "Stay Informed, Stay Safe" section above — my v0.5.1
   wrongly targeted that one and broke the woman+products section).
   The real fix: make 47e6ca19's bg light so the white inner card
   (5d78b710) sits on a continuous light background, eliminating bars.
   Plus drop the inner card frame so it doesn't visually "float". */
.wp-block-uagb-container.uagb-block-47e6ca19 {
  background: #FCFAF8 !important;
  background-color: #FCFAF8 !important;
  background-image: none !important;
}
.wp-block-uagb-container.uagb-block-5d78b710 {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
}


/* =========================================================================
   Homepage discovery BLOCK (Phase I v2 — unified)
   Single full-bleed section wrapping 3 internal strips, replacing the
   v1 design of 3 separate sm-discovery sections. Eliminates width
   mismatch with UAGB containers and visual choppiness between strips.
   ========================================================================= */
.sm-discovery-block {
  /* Full-bleed: break out of Astra's narrower content wrapper to match
     adjacent UAGB alignfull containers. Standard "alignfull" CSS trick. */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  background: var(--ac-bg-pale);
  font-family: var(--font-body);
  color: var(--tx);
  line-height: 1.6;
  padding: 72px 24px;
  /* Visual separator from adjacent UAGB sections — subtle inset edges */
  border-top: 1px solid var(--ac-accent);
  border-bottom: 1px solid var(--ac-accent);
}
.sm-discovery-block__inner {
  max-width: var(--maxw-grid);
  margin: 0 auto;
}

/* Intro block at the top of the discovery section */
.sm-discovery-block__intro {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.sm-discovery-block__kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ac-primary);
  margin: 0 0 12px;
}
.sm-discovery-block__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 38px;
  line-height: 1.15;
  color: var(--tx-strong);
  margin: 0 0 14px;
  letter-spacing: -.01em;
}
.sm-discovery-block__lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--tx-muted);
  margin: 0;
}

/* Each strip = one logical sub-section inside the discovery block */
.sm-strip {
  margin: 48px 0 0;
}
.sm-strip:first-child { margin-top: 0; }
.sm-strip__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sm-strip__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--tx-strong);
  margin: 0;
  letter-spacing: -.005em;
}
.sm-strip__see-all {
  font-size: 14px;
  font-weight: 700;
  color: var(--ac-primary);
  text-decoration: none;
  white-space: nowrap;
}
.sm-strip__see-all:hover {
  color: var(--ac-primary-hover);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .sm-discovery-block { padding: 48px 20px; }
  .sm-discovery-block__title { font-size: 28px; }
  .sm-discovery-block__intro { margin-bottom: 32px; }
  .sm-strip { margin-top: 36px; }
}

/* Link colors inside discovery block (override any Astra/UAGB anchor defaults) */
.sm-discovery-block a {
  color: var(--ac-primary);
  text-decoration: none;
}
.sm-discovery-block a:hover { color: var(--ac-primary-hover); }


/* =========================================================================
   Legacy: v1 individual .sm-discovery sections (now superseded by v2 block).
   Kept around in case anything else uses them. Self-contained wrapper that
   pulls the design tokens onto the homepage without disturbing chrome.
   ========================================================================= */
.sm-discovery {
  background: #FCFAF8;
  padding: 56px 24px;
  margin: 0 auto;
  font-family: var(--font-body);
  color: var(--tx);
  line-height: 1.6;
}
.sm-discovery + .sm-discovery {
  padding-top: 0; /* stack two sections without doubling pad */
}
.sm-discovery__inner {
  max-width: var(--maxw-grid);
  margin: 0 auto;
}
.sm-discovery__kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ac-primary);
  margin: 0 0 8px;
}
.sm-discovery__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.15;
  color: var(--tx-strong);
  margin: 0 0 12px;
  letter-spacing: -.005em;
}
.sm-discovery__lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--tx-muted);
  max-width: 60ch;
  margin: 0 0 28px;
}
.sm-discovery__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.sm-discovery__see-all {
  font-size: 14px;
  font-weight: 700;
  color: var(--ac-primary);
  text-decoration: none;
  white-space: nowrap;
}
.sm-discovery__see-all:hover {
  color: var(--ac-primary-hover);
  text-decoration: underline;
}
.sm-discovery--pale { background: var(--ac-bg-pale); }
.sm-discovery--alt  { background: var(--surface-alt); }
@media (max-width: 600px) {
  .sm-discovery { padding: 40px 18px; }
  .sm-discovery__title { font-size: 26px; }
}

/* Topic card — text-only legacy variant (kept for backward compat) */
.sm-topic-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  padding: 24px;
  background: linear-gradient(135deg, var(--ac-bg-pale), #FCFAF8 80%);
  border: 1px solid var(--ac-accent);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.sm-topic-card:hover {
  border-color: var(--ac-primary);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.sm-topic-card__name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 20px;
  color: var(--tx-strong);
  line-height: 1.2;
  margin: 0 0 8px;
}
.sm-topic-card__count {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ac-primary);
}
.sm-topic-card__arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ac-primary);
  color: #FCFAF8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  align-self: flex-end;
  margin-top: 12px;
}

/* ====== Topic card — IMAGE-HEADED variant (Phase I v3) ======
   Healthline-style: photo fills the top of the card, text below.
   Used on homepage discovery block. */
.sm-topic-card--image {
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  padding: 0;
  background: #FCFAF8;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.sm-topic-card--image:hover {
  border-color: var(--ac-primary);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}
.sm-topic-card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  background-color: var(--ac-bg-pale);
  position: relative;
  /* Subtle overlay tint that adds visual cohesion across diverse photos */
}
.sm-topic-card__img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(18,63,85, 0.08));
  pointer-events: none;
}
.sm-topic-card--image .sm-topic-card__body {
  padding: 18px 20px 20px;
}
.sm-topic-card--image .sm-topic-card__name {
  margin: 0 0 6px;
  font-size: 18px;
}
.sm-topic-card--image .sm-topic-card__count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}
.sm-topic-card--image .sm-topic-card__arrow {
  width: 24px;
  height: 24px;
  font-size: 12px;
  align-self: center;
  margin: 0;
}


/* ====== Side-by-side hero on discovery intro ====== */
.sm-discovery-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--ac-accent);
}
.sm-discovery-hero__text { max-width: 580px; }
.sm-discovery-hero__text .sm-discovery-block__kicker { text-align: left; margin: 0 0 12px; }
.sm-discovery-hero__text .sm-discovery-block__title { text-align: left; margin: 0 0 14px; max-width: 18ch; }
.sm-discovery-hero__text .sm-discovery-block__lede { text-align: left; margin: 0 0 24px; }

.sm-discovery-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.sm-discovery-hero__btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 700;
  background: var(--ac-primary);
  color: #FCFAF8 !important;
  text-decoration: none !important;
  border: 1px solid var(--ac-primary);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.sm-discovery-hero__btn:hover {
  background: var(--ac-primary-hover);
  border-color: var(--ac-primary-hover);
  text-decoration: none !important;
}
.sm-discovery-hero__btn--ghost {
  background: transparent;
  color: var(--ac-primary) !important;
  border: 1px solid var(--ac-accent);
}
.sm-discovery-hero__btn--ghost:hover {
  background: var(--ac-bg-pale);
  color: var(--ac-primary-hover) !important;
}

.sm-discovery-hero__image {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--sh-md);
}
.sm-discovery-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 900px) {
  .sm-discovery-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 36px;
  }
  .sm-discovery-hero__image { aspect-ratio: 16 / 10; }
  /* Use revised intro alignment on mobile (centered like v2) */
  .sm-discovery-hero__text .sm-discovery-block__kicker,
  .sm-discovery-hero__text .sm-discovery-block__title,
  .sm-discovery-hero__text .sm-discovery-block__lede { text-align: left; }
}


.sm-discovery-credits {
  text-align: center;
  font-size: 11px;
  color: var(--tx-subtle);
  margin: 32px 0 0;
  letter-spacing: .04em;
}

/* Grid utilities that work OUTSIDE .sm-page scope (homepage context) */
.sm-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.sm-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .sm-grid-3, .sm-grid-5 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .sm-grid-3, .sm-grid-5 { grid-template-columns: 1fr; }
}

/* When sm-* card classes are used inside .sm-discovery (i.e. on homepage),
   the .sm-page resets for link colors don't apply. Replicate the minimum. */
.sm-discovery .sm-qc, .sm-discovery .sm-ic, .sm-discovery .sm-topic-card { box-sizing: border-box; }
.sm-discovery a { color: var(--ac-primary); text-decoration: none; }
.sm-discovery a:hover { color: var(--ac-primary-hover); }


/* ====== Surgical fix: .safemom-related-hub ======
   The custom safemom-seo-enhancements plugin injects a "Keep Reading"
   block with inline `background:var(--ast-global-color-7,#E3EEF4)`.
   --ast-global-color-7 resolves to #33302E (dark text) on this site,
   not the pale lavender the plugin author intended. That makes the
   block dark-on-dark and unreadable. We override with the SafeMom
   design tokens AND restyle to match the entity-page aesthetic.
   The plugin can be fixed at source later — this works site-wide. */
.safemom-related-hub {
  margin: 32px 0 !important;
  padding: 22px 26px !important;
  background: var(--ac-bg-pale) !important;
  border: 1px solid var(--ac-accent) !important;
  border-left: 4px solid var(--ac-primary) !important;
  border-radius: var(--r-md) !important;
  color: var(--tx) !important;
}
.safemom-related-hub > p:first-child {
  margin: 0 0 12px !important;
  font-family: var(--font-body) !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  color: var(--ac-primary) !important;
}
.safemom-related-hub ul {
  margin: 0 !important;
  padding-left: 0 !important;
  list-style: none !important;
}
.safemom-related-hub li {
  padding: 8px 0 !important;
  border-bottom: 1px dashed var(--line) !important;
  font-size: 15px !important;
}
.safemom-related-hub li:last-child { border-bottom: 0 !important; }
.safemom-related-hub a {
  color: var(--ac-primary) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}
.safemom-related-hub a:hover {
  color: var(--ac-primary-hover) !important;
  text-decoration: underline !important;
}


/* ====== Defensive: other auto-injected related-post widgets ======
   Several plugins (SEO Autopilot, related-post add-ons) may hook into
   the_content() and append their own "Related" block. On Ingredient
   pages they often pick up a dark Astra block-editor color scheme
   that yields dark text on dark background. We force a light theme. */
body.single-ingredient .yarpp-related,
body.single-ingredient .crp_related,
body.single-ingredient .related-posts,
body.single-ingredient .wp-block-latest-posts,
body.single-ingredient .seoap-related-posts,
body.single-ingredient .safemom-related,
body.single-ingredient .keep-reading,
body.single-ingredient [class*="related-post"],
body.single-ingredient [class*="keep-reading"] {
  background: var(--surface) !important;
  color: var(--tx) !important;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px 24px;
}
body.single-ingredient .yarpp-related h3,
body.single-ingredient .crp_related h3,
body.single-ingredient .related-posts h3,
body.single-ingredient .seoap-related-posts h3,
body.single-ingredient .safemom-related h3,
body.single-ingredient .keep-reading h3,
body.single-ingredient [class*="related-post"] h3,
body.single-ingredient [class*="keep-reading"] h3,
body.single-ingredient .yarpp-related h4,
body.single-ingredient .related-posts h4,
body.single-ingredient [class*="related-post"] h4 {
  color: var(--tx-strong) !important;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
body.single-ingredient .yarpp-related a,
body.single-ingredient .crp_related a,
body.single-ingredient .related-posts a,
body.single-ingredient .seoap-related-posts a,
body.single-ingredient .safemom-related a,
body.single-ingredient .keep-reading a,
body.single-ingredient [class*="related-post"] a,
body.single-ingredient [class*="keep-reading"] a {
  color: var(--ac-primary) !important;
  font-weight: 600;
}


/* ====== Astra global overrides — keep the rest of the site untouched ======
   We intentionally avoid changing Astra defaults at root. Only the
   entity-page body classes inherit our typography stack. Existing
   homepage / blog / PMPro pages keep their current look.
   ========================================================================= */


/* =========================================================================
   MEGA-NAV — Ingredients + Questions dropdowns in the primary nav.
   Healthline-style multi-column hover panel anchored under the trigger.
   Astra's main-nav class is `.main-navigation`; sub-menu items live in
   `ul.sub-menu`. We scope tightly so we don't disturb other nav items.
   ========================================================================= */

/* The injected top-level items themselves */
.main-navigation .sm-mega-item { position: static; }
.main-navigation .sm-mega-item > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  /* Match the other nav items: white on the dark header. `inherit` picked up
     a dark li color, making Ingredients/Questions unreadable (v0.8.8). */
  color: #FCFAF8 !important;
}
.main-navigation .sm-mega-item > a:hover,
.main-navigation .sm-mega-item > a:focus { color: #FCFAF8 !important; }
.main-navigation .sm-mega-item .sm-mega-arrow { font-size: 11px; opacity: .65; transition: transform .15s ease; color: inherit; }
.main-navigation .sm-mega-item:hover > a .sm-mega-arrow,
.main-navigation .sm-mega-item:focus-within > a .sm-mega-arrow { transform: rotate(180deg); opacity: 1; }

/* The dropdown panel itself (full-width-ish, centered under the nav) */
.main-navigation .sm-mega-item > .sub-menu.sm-mega {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(-6px) !important;
  top: 100% !important;
  width: min(1180px, calc(100vw - 48px)) !important;
  max-width: none !important;
  background: #FCFAF8 !important;
  background-color: #FCFAF8 !important;
  border-radius: 0 0 var(--r-lg) var(--r-lg) !important;
  box-shadow: 0 24px 56px -16px rgba(51,48,46, .22), 0 4px 10px rgba(51,48,46, .06) !important;
  border: 1px solid rgba(51,48,46, .08) !important;
  border-top: none !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 9999 !important;

  /* Hidden by default, shown on hover/focus */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
.main-navigation .sm-mega-item:hover > .sub-menu.sm-mega,
.main-navigation .sm-mega-item:focus-within > .sub-menu.sm-mega {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateX(-50%) translateY(0) !important;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear 0s;
}

/* Kill Astra's row/link backgrounds INSIDE the panel — but NEVER the panel itself.
   (Previously we included the panel root here, which wiped our #FCFAF8 background.) */
.main-navigation .sm-mega-item > .sub-menu.sm-mega li,
.main-navigation .sm-mega-item > .sub-menu.sm-mega a {
  background: transparent !important;
  box-shadow: none !important;
}
.main-navigation .sm-mega-item > .sub-menu.sm-mega .sm-mega__panel {
  background: #FCFAF8 !important;
}
.main-navigation .sm-mega-item > .sub-menu.sm-mega .sm-mega__panel {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
  width: 100%;
}

.sm-mega__cols {
  display: grid;
  grid-template-columns: 1.05fr 1.05fr 1.25fr;
  gap: 0;
  padding: 32px 36px 28px;
}
.sm-mega__col { padding: 0 24px; border-left: 1px solid rgba(51,48,46, .06); }
.sm-mega__col:first-child { padding-left: 0; border-left: 0; }
.sm-mega__col:last-child { padding-right: 0; }

.sm-mega__col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(51,48,46, .08);
}
.sm-mega__col-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tx-strong);
}
.sm-mega__col-all {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ac-primary);
  text-decoration: none;
  white-space: nowrap;
}
.sm-mega__col-all:hover { color: var(--ac-primary-hover, #1A4860); }

.main-navigation .sm-mega__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.main-navigation .sm-mega__list li { margin: 0; padding: 0; width: 100%; }
.main-navigation .sm-mega__list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--tx-strong);
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.main-navigation .sm-mega__list a:hover,
.main-navigation .sm-mega__list a:focus {
  background: rgba(18,63,85, 0.07);
  color: var(--ac-primary);
}

.sm-mega__count {
  display: inline-block;
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--tx-muted);
  background: rgba(51,48,46, .05);
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: .02em;
}

/* Colored rating chips inside the mega-menu */
.sm-mega__rating--safe::before,
.sm-mega__rating--caution::before,
.sm-mega__rating--avoid::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 2px;
  flex-shrink: 0;
}
.sm-mega__rating--safe::before    { background: #2FA36B; }
.sm-mega__rating--caution::before { background: #F0A62B; }
.sm-mega__rating--avoid::before   { background: #E1462E; }

/* The featured column (cards with thumbnails) */
.main-navigation .sm-mega__featured-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.main-navigation .sm-mega__featured-list li { margin: 0; padding: 0; }

.main-navigation a.sm-mega__featured {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--tx-strong);
  transition: background .14s ease;
}
.main-navigation a.sm-mega__featured:hover {
  background: rgba(18,63,85, 0.06);
}

.sm-mega__featured-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--ac-bg-pale, #E3EEF4) center/cover no-repeat;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(51,48,46, .06);
}
.sm-mega__featured-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.sm-mega__featured-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  color: var(--tx-strong);
}
.sm-mega__featured-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tx-muted);
  width: max-content;
}
.sm-mega__featured-rating--question {
  color: var(--ac-navy, #123F55);
  background: rgba(18,63,85, .08);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: .04em;
}

/* Mobile: collapse mega-menu down to a normal vertical sub-menu.
   Astra already toggles .main-header-bar-navigation for mobile. */
@media (max-width: 921px) {
  .main-navigation .sm-mega-item > .sub-menu.sm-mega {
    position: static;
    transform: none;
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: rgba(51,48,46, .02);
  }
  .sm-mega__cols { display: block; padding: 12px 16px; }
  .sm-mega__col { padding: 12px 0; border-left: 0; border-top: 1px solid rgba(51,48,46, .08); }
  .sm-mega__col:first-child { border-top: 0; }
  .main-navigation .sm-mega__featured-list { gap: 4px; }
  .sm-mega__featured-thumb { width: 44px; height: 44px; }
}


/* v0.8.12 — pages whose content carries its own <h1> (privacy, terms, account, mcp, authors)
   were showing the theme page title as a second, cramped headline above it. */
body.page .entry-header:has(+ .entry-content h1) { display: none; }

/* ---- Brand Guide v1.0 contrast overrides (rebrand 0.9.0) ----
   Verdict glyph discs use the guide's on-fill colours so bone glyphs clear 4.5:1. */
.sm-rb--safe    .sm-rb__icon { background: #237950; }
.sm-rb--caution .sm-rb__icon { background: #96610B; }
.sm-rb--avoid   .sm-rb__icon { background: #BD311B; }
.sm-discovery-credits { color: #5B5856; }
.sm-breadcrumb__sep, .sm-hero-meta__sep { color: #73716F; }
.sm-footer { background: #123F55; color: #FCFAF8; }
.sm-footer__col a { color: #E3EEF4; }
