/* =============================================================================
   أمومة صحية — Brand design system (final presentation layer)
   -----------------------------------------------------------------------------
   Loaded LAST in index.html so it sits above the legacy component and dark
   layers. It defines the design tokens and the redesigned components for both
   themes.

   Rules of this file
   - Presentation only: no selectors depend on new behaviour, and no chatbot
     (#chatbot-*, .chatbot-*) rules live here. The chatbot only inherits the
     palette through the shared legacy tokens (--teal, --white, --border ...).
   - `!important` is used only where an earlier layer already uses it (the
     protected inline <style> blocks and the legacy dark layers) or to beat an
     inline style attribute that must stay in the markup. Each such block is
     marked "beats legacy !important" or "beats inline style".
   - Arabic first: logical properties (inline-start = right in RTL), no
     letter-spacing on Arabic text.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  /* Brand palette */
  --brand:        #C98291;  /* dusty rose — fills, borders, decoration (not text) */
  --brand-deep:   #A95770;  /* deep rose — actions, links (4.8:1 on warm white) */
  --brand-ink:    #7E3D58;  /* rose-plum accent text */
  --plum:         #493642;  /* deep plum — headings */
  --mauve:        #8B6B83;
  --sage:         #829B88;
  --sage-ink:     #3F6B4E;
  --teal-soft:    #6F9F9A;

  /* Surfaces */
  --page:         #FFFCFA;  /* warm white */
  --surface:      #FFFFFF;
  --blush-50:     #FFF5F4;  /* soft blush section */
  --blush-100:    #F8E8EC;  /* pale pink surface / icon wells */
  --blush-200:    #EFD3DA;
  --sage-50:      #F2F6F2;
  --sage-100:     #E3ECE5;
  --line:         #EDE1E4;
  --line-strong:  #E0CDD3;

  /* Text */
  --ink:          #40383C;
  --ink-2:        #574C52;
  --muted-ink:    #6E6268;
  --heading:      #493642;

  /* Actions */
  --action-bg:    #A95770;
  --action-bg-h:  #934660;
  --action-fg:    #FFFFFF;

  /* Semantic medical states (never brand pink) */
  --danger:       #B42318;
  --danger-ink:   #8F1D12;
  --danger-bg:    #FEF3F2;
  --danger-line:  #F4C7C2;
  --caution:      #B7791F;
  --caution-ink:  #7A4A00;
  --caution-bg:   #FDF4E3;
  --caution-line: #EFD7A6;
  --support-ink:  #3F6B4E;
  --support-bg:   #EEF3EF;
  --support-line: #D3E0D6;
  --info-ink:     #2E5F5B;
  --info-bg:      #EBF4F3;
  --info-line:    #CBE1DE;

  /* Type */
  --font-ar: 'Tajawal', 'Cairo', system-ui, sans-serif;
  --font-lat: 'Plus Jakarta Sans', 'Tajawal', system-ui, sans-serif;
  --fs-hero: clamp(2.1rem, 1.4rem + 2.6vw, 3.1rem);
  --fs-h2:   clamp(1.6rem, 1.25rem + 1.3vw, 2.1rem);
  --fs-h3:   clamp(1.12rem, 1.05rem + .3vw, 1.3rem);
  --fs-body: 1rem;        /* 16px */
  --fs-lead: 1.0625rem;   /* 17px */
  --fs-small: .9375rem;   /* 15px */
  --fs-meta: .875rem;     /* 14px */
  --lh-body: 1.8;

  /* Space, shape, depth */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;
  --section-y: clamp(56px, 4vw + 32px, 96px);
  --gutter: clamp(16px, 3vw, 40px);
  --container: 1200px;
  --r-sm: 12px; --r-md: 16px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --shadow-xs: 0 1px 2px rgba(73, 54, 66, .04);
  --shadow-sm: 0 1px 2px rgba(73, 54, 66, .04), 0 6px 18px rgba(73, 54, 66, .05);
  --shadow-md: 0 2px 6px rgba(73, 54, 66, .05), 0 16px 36px rgba(73, 54, 66, .08);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-fast: .18s; --t-med: .3s;
  --focus: 0 0 0 3px rgba(169, 87, 112, .35);
  --nav-h: 72px;

  /* Decorative botanical sprig (sage) */
  --sprig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 170' fill='none'%3E%3Cpath d='M58 168C60 118 64 66 84 8' stroke='%23829B88' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M60 128c-24-3-39-18-44-40 22 2 39 17 44 40z' fill='%23829B88'/%3E%3Cpath d='M63 100c20-8 33-26 35-48-20 7-33 24-35 48z' fill='%23A9BCAD'/%3E%3Cpath d='M67 70c-18-6-28-21-30-39 18 4 28 19 30 39z' fill='%23829B88'/%3E%3Cpath d='M75 40c13-6 20-17 22-30-13 4-20 15-22 30z' fill='%23A9BCAD'/%3E%3C/svg%3E");

  /* Legacy token names, re-pointed at the brand palette (read by PDF export,
     protected chatbot styles and older layers). */
  --teal: var(--brand);
  --teal-dark: var(--brand-deep);
  --teal-deeper: var(--brand-ink);
  --teal-pale: var(--blush-100);
  --teal-light: #EBC9D1;
  --navy: var(--plum);
  --text: var(--ink);
  --muted: var(--muted-ink);
  --border: var(--line);
  --bg: var(--page);
  --white: var(--surface);
  --rose: var(--danger);
  --rose-pale: var(--danger-bg);
  --green: var(--sage);
  --green-pale: var(--support-bg);
  --amber: var(--caution);
  --amber-pale: var(--caution-bg);
  --shadow: var(--shadow-sm);
  --shadow-lg: var(--shadow-md);
}

/* Dark theme tokens: deep warm-plum neutrals, restrained rose. The --dm-*
   names feed the legacy dark layers so every layer resolves to one palette. */
html.dark-mode {
  --dm-bg: #18131A; --dm-surface: #1F1921; --dm-card: #272029; --dm-raised: #322835;
  --dm-text: #F5EEF3; --dm-text-2: #D0C3CC; --dm-text-3: #B8A9B6;
  --dm-pink: #D99AA8; --dm-pink-soft: #E8B7C2; --dm-plum: #B98AAA; --dm-border: #42353F;
  --dm-focus: #E8B7C2;

  --brand: #D99AA8; --brand-deep: #E8B7C2; --brand-ink: #F0C6D0; --plum: #F5EEF3;
  --page: #18131A; --surface: #272029; --blush-50: #1F1921; --blush-100: #3A2833; --blush-200: #4A3340;
  --sage-50: #1F2A23; --sage-100: #2A3A2F;
  --line: #42353F; --line-strong: #56454F;
  --ink: #EDE3E9; --ink-2: #D0C3CC; --muted-ink: #B8A9B6; --heading: #F5EEF3;
  --action-bg: #D99AA8; --action-bg-h: #E8B7C2; --action-fg: #1E1418;
  --danger: #F08F86; --danger-ink: #F6B4AD; --danger-bg: #36191B; --danger-line: #6A3034;
  --caution: #E3B25F; --caution-ink: #EBC57E; --caution-bg: #31271A; --caution-line: #5E4A2A;
  --support-ink: #A9C9B1; --support-bg: #1E2A22; --support-line: #34493B;
  --info-ink: #9FCFC9; --info-bg: #1A2A29; --info-line: #2F4A47;
  --shadow-xs: none;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, .35);
  --focus: 0 0 0 3px rgba(232, 183, 194, .45);

  --teal: var(--brand); --teal-dark: var(--brand-deep); --teal-deeper: var(--brand-ink);
  --teal-pale: var(--blush-100); --teal-light: #8E5568;
  --navy: var(--heading); --text: var(--ink-2); --muted: var(--muted-ink); --border: var(--line);
  --bg: var(--page); --white: var(--surface);
  --rose-pale: var(--danger-bg); --green-pale: var(--support-bg); --amber-pale: var(--caution-bg);
}

/* ---------- 2. Base ------------------------------------------------------ */
html { scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  font-family: var(--font-ar);
  background: var(--page);
  color: var(--ink);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { text-wrap: balance; overflow-wrap: break-word; }
p, li { text-wrap: pretty; }
::selection { background: var(--blush-200); color: var(--plum); }

/* Visible keyboard focus everywhere; no outline on mouse clicks */
:where(a, button, input, select, textarea, [tabindex]):focus { outline: none; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-deep);
  outline-offset: 3px;
  box-shadow: var(--focus);
}

.sec-inner { max-width: var(--container); }

/* ---------- 3. Header ---------------------------------------------------- */
nav {
  height: var(--nav-h);
  padding: 0 var(--gutter);
  background: rgba(255, 252, 250, .9);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.logo-wrapper {
  flex-direction: row;
  gap: var(--s-4);
  max-width: var(--container);
  margin-inline: auto;
}
.nav-logo { order: 1; color: var(--plum); font-size: 22px; font-weight: 800; gap: 10px; }
.nav-logo .dot { color: var(--brand-deep); }
.nav-logo:hover .nav-logo-text { color: var(--brand-deep); }
.nav-logo-img { width: 46px; height: 46px; }
.nav-links {
  order: 2;
  display: flex;
  gap: 2px;
  margin-inline: auto;
  list-style: none;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: var(--fs-small);
  font-weight: 600;
  position: relative;
}
.nav-links a:hover { background: var(--blush-100); color: var(--brand-ink); }
.logo-wrapper > .ask-btn { order: 3; }
.nav-controls { order: 4; gap: 6px; }

/* Header pills keep inline styles in the markup (the chatbot entry is
   protected), so these rules beat inline style. */
.logo-wrapper .ask-btn {
  min-height: 44px;
  padding: 0 18px !important;
  border-radius: var(--r-pill) !important;
  font-size: var(--fs-small) !important;
  font-weight: 700 !important;
  gap: 8px !important;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.logo-wrapper > .ask-btn { /* chatbot entry: primary utility */
  background: var(--action-bg) !important;
  color: var(--action-fg) !important;
  box-shadow: 0 6px 16px rgba(169, 87, 112, .22);
}
.logo-wrapper > .ask-btn:hover { background: var(--action-bg-h) !important; }
.nav-controls .ask-btn { /* share: quiet */
  background: transparent !important;
  color: var(--plum) !important;
  border: 1px solid var(--line-strong) !important;
}
.nav-controls .ask-btn:hover { background: var(--blush-100) !important; border-color: var(--brand) !important; }
.logo-wrapper .ask-btn span[style] { font-size: 1.05em !important; display: inline-flex; }

.theme-toggle,
.hamburger-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  border-radius: var(--r-pill);
  color: var(--plum);
  background: transparent;
  border: 1px solid transparent;
}
.theme-toggle:hover, .hamburger-btn:hover { background: var(--blush-100); transform: none; }
.theme-toggle:focus { outline: none; }

@media (max-width: 1099px) { .nav-links { display: none; } .nav-logo { margin-inline-end: auto; } }
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  nav { padding: 0 12px; }
  .logo-wrapper { gap: 6px; }
  .nav-logo { font-size: 17px !important; gap: 6px; }           /* beats legacy !important */
  .nav-logo-img { width: 34px; height: 34px; }
  .logo-wrapper .ask-btn { min-height: 40px; padding: 0 12px !important; font-size: 13px !important; }
  .nav-controls { gap: 2px; }
  .theme-toggle, .hamburger-btn { width: 40px; height: 40px; }
  .top-menu-content { top: var(--nav-h); max-height: calc(100vh - var(--nav-h)); }
  .top-menu-backdrop { inset: var(--nav-h) 0 0; }
}
@media (max-width: 480px) {
  .nav-controls .ask-btn > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav-controls .ask-btn { width: 40px; padding: 0 !important; justify-content: center; border-color: transparent !important; }
  .logo-wrapper .ask-btn { padding: 0 12px !important; }
}
@media (max-width: 360px) {
  .logo-wrapper > .ask-btn > span[style] { display: none !important; } /* text label stays */
  .nav-logo-text { font-size: 15px; }
  .logo-wrapper { gap: 2px; }
  .theme-toggle, .hamburger-btn, .nav-controls .ask-btn { width: 36px; }
}

/* While the chatbot is open its overlay (z-index 999) must cover the sticky
   header too. Uses the class the chatbot already sets; no chatbot code involved. */
html.chatbot-scroll-lock nav { z-index: 990; }

/* Slide-in menu
   The closed menu sits off-screen (translateX(-100%)). Because the nav has backdrop-filter, it is the
   containing block of this fixed panel, so in an RTL page the off-screen panel used to widen the
   document by ~320px to the left: on phones the page could be dragged sideways and the browser could
   restore/scroll to the wrong horizontal position on load. Clipping the nav horizontally removes that
   phantom width without affecting the open menu (which lies inside the nav's width, below it).
   visibility keeps the closed menu's links out of the keyboard/screen-reader order. */
nav { overflow-x: clip; }
.top-menu-content { visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s; }
.top-menu-content.is-open { visibility: visible; transition: transform .3s ease, visibility 0s; }
.top-menu-content {
  top: var(--nav-h);
  max-height: calc(100vh - var(--nav-h));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  box-shadow: var(--shadow-md);
  padding: var(--s-2);
}
.top-menu-backdrop { inset: var(--nav-h) 0 0; background: rgba(42, 28, 37, .32); }
.top-menu-content a {
  min-height: 48px;
  padding: 10px 14px;
  border-bottom: 0;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 600;
}
.top-menu-content a .ic { color: var(--brand-deep); width: 20px; height: 20px; }
.top-menu-content a:hover { background: var(--blush-100); color: var(--brand-ink); }
.top-menu-content hr { display: none; }

/* ---------- 4. Site search band ------------------------------------------ */
.ss-overlay { padding: 14px var(--gutter) 0; background: var(--page); }
.ss-box { max-width: 680px; }
.ss-form { gap: 8px; }
.ss-form input {
  min-height: 50px;
  padding: 12px 50px 12px 18px;
  font-size: var(--fs-body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.ss-form input:hover { box-shadow: var(--shadow-sm); }
.ss-form input:focus { border-color: var(--brand-deep); box-shadow: var(--focus); }
.ss-form input::placeholder { color: var(--muted-ink); }
.ss-field .ss-icon { right: 18px; opacity: 1; }
.ss-icon .ic { color: var(--brand-deep); }
.ss-form button { min-height: 50px; padding: 0 24px; background: var(--action-bg); color: var(--action-fg); font-size: var(--fs-body); }
.ss-form button:hover { background: var(--action-bg-h); }
.ss-drop { border: 1px solid var(--line); box-shadow: var(--shadow-md); border-radius: var(--r-lg); }
.ss-status, .ss-snip { color: var(--muted-ink); }
.ss-sec { color: var(--brand-deep); }
.ss-title { color: var(--plum); }
.ss-results mark { background: var(--blush-200); }
.ss-hit { outline-color: var(--brand); }

/* ---------- 5. Hero ------------------------------------------------------ */
.splash-hero {
  min-height: 0;
  align-items: center;
  padding: clamp(28px, 5vw, 72px) 0 clamp(40px, 6vw, 96px);
  background:
    radial-gradient(ellipse 60% 70% at 22% 46%, rgba(248, 232, 236, .95) 0%, rgba(248, 232, 236, 0) 70%),
    linear-gradient(180deg, var(--page) 0%, var(--blush-50) 100%);
}
.splash-hero::before { background: none; }
.splash-hero::after {
  content: '';
  position: absolute;
  inset-inline-end: clamp(-24px, 2vw, 40px); /* = left in RTL */
  bottom: -10px;
  width: clamp(80px, 9vw, 130px);
  aspect-ratio: 120 / 170;
  background: var(--sprig) center / contain no-repeat;
  opacity: .5;
  pointer-events: none;
}
.splash-ambient { display: none; }

.splash-shell { max-width: var(--container); padding: 0 var(--gutter); }

/* Logo lockup column (approved logo + animation, unchanged) */
.splash-copy { position: relative; gap: 12px; }
.splash-heart {
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.splash-heart svg { width: 18px; height: 18px; fill: var(--brand-deep); }
.splash-portrait-wrap { width: clamp(176px, 22vw, 268px); height: clamp(176px, 22vw, 268px); }
.splash-portrait-ring {               /* soft blush disc behind the logo */
  display: block;
  inset: -16%;
  background: radial-gradient(circle at 50% 50%, #FFFFFF 0%, rgba(248, 232, 236, .9) 58%, rgba(248, 232, 236, 0) 72%);
  z-index: 0;
}
.splash-portrait-shell { z-index: 1; filter: drop-shadow(0 10px 22px rgba(106, 36, 77, .14)); }
.splash-title {
  font-size: clamp(2.2rem, 1.6rem + 2.2vw, 3.1rem);
  font-weight: 900;
  line-height: 1.3;
  background: linear-gradient(120deg, #5A2246 0%, #7E3D58 55%, #A95770 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.splash-subtitle { color: var(--mauve); font-size: .95rem; font-weight: 600; margin-top: -6px; }
.splash-divider { width: 56px; height: 2px; background: var(--brand); opacity: .7; }

/* Message column */
.hero-kicker, .hero-lead, .hero-scope { margin: 0; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--brand-deep);
  font-size: var(--fs-lead);
  font-weight: 600;
}
.hero-kicker::before { content: ''; width: 36px; height: 1.5px; background: currentColor; opacity: .7; }
.splash-side-content h2 {
  font-family: var(--font-ar);
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 1.32;
  color: var(--plum);
  margin: 14px 0 16px;
}
.splash-side-content .hero-lead {
  font-family: var(--font-ar);
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 34em;
}
.splash-side-content .hero-scope {
  font-family: var(--font-ar);
  margin-top: 8px;
  font-size: var(--fs-small);
  font-weight: 400;
  line-height: 1.85;
  color: var(--muted-ink);
  max-width: 36em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-cta .ic { width: 20px; height: 20px; margin: 0; }
.splash-badges { margin-top: 22px; gap: 10px; justify-content: flex-start; }
.splash-badge {
  min-height: 40px;
  padding: 6px 14px;
  font-family: var(--font-lat);
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--plum);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.splash-badge:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.splash-badge .check .ic { color: var(--sage-ink); }

@media (min-width: 768px) {
  .splash-shell {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(24px, 4vw, 72px);
  }
  .splash-side.is-left { display: none; }
  .splash-copy { max-width: none; }
  .splash-side.is-right { width: auto; margin: 0; justify-content: flex-start; }
  .splash-side-content {
    max-width: 600px;
    align-items: flex-start;
    text-align: right;
    direction: rtl;
  }
}
@media (max-width: 767px) {
  .splash-hero { padding: 20px 0 48px; }
  .splash-hero::after { width: 70px; opacity: .35; }
  .splash-shell { gap: 18px; padding: 0 16px; }
  .splash-copy { gap: 8px; }
  .splash-heart { display: flex; }
  .splash-portrait-wrap { width: 150px; height: 150px; }
  .splash-title { font-size: 2.1rem; }
  .splash-side.is-right { max-width: 520px; }
  .splash-side-content {             /* undo the old framed mobile card */
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    align-items: center;
    text-align: center;
  }
  .hero-kicker { font-size: var(--fs-small); }
  .hero-kicker::before { display: none; }
  .splash-side-content h2 { font-size: 1.9rem; margin: 6px 0 10px; }
  .splash-side-content .hero-lead { font-size: var(--fs-small); }
  .splash-side-content .hero-scope { font-size: var(--fs-meta); }
  .hero-actions { justify-content: center; width: 100%; margin-top: 20px; }
  .hero-actions .btn { flex: 1 1 160px; justify-content: center; }
  .splash-badges { flex-direction: row; justify-content: center; max-width: none; }
  .splash-badge { flex: 0 1 auto; }
}

/* ---------- 6. Buttons --------------------------------------------------- */
.btn {
  min-height: 48px;
  padding: 10px 24px;
  border-radius: var(--r-pill);
  font-family: var(--font-ar);
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.3;
  gap: 10px;
  justify-content: center;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn .ic { width: 20px; height: 20px; }
.btn-teal {
  background: var(--action-bg);
  color: var(--action-fg);
  box-shadow: 0 8px 20px rgba(169, 87, 112, .22);
}
.btn-teal:hover { background: var(--action-bg-h); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(169, 87, 112, .28); }
.btn-quiet,
.sec-dl-wrap .btn,
.sec-actions .btn {
  background: var(--surface);
  color: var(--brand-ink);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.btn-quiet:hover,
.sec-dl-wrap .btn:hover,
.sec-actions .btn:hover { border-color: var(--brand); background: var(--blush-50); transform: none; box-shadow: var(--shadow-sm); }
.btn-block { width: 100%; margin-top: var(--s-4); }
.sec-dl-wrap, .sec-actions { display: flex; justify-content: center; margin: 0 0 var(--s-8); padding: 0; }
.sec-dl-wrap .btn { width: auto; min-height: 48px; padding: 10px 22px; font-size: var(--fs-small); }

/* ---------- 7. Sections & headings --------------------------------------- */
.sec { padding: var(--section-y) var(--gutter); background: var(--page); }
.sec--compact { padding-block: clamp(40px, 5vw, 64px); }
.sec--tint { background: var(--blush-50); }
.sec--sage { background: var(--sage-50); }
.sec--urgent { background: #FFF8F7; }
.sec-head { text-align: center; margin-bottom: var(--s-8); }

.sec-pill {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  margin: 0 auto 10px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--brand-deep);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.sec-pill::before, .sec-pill::after { content: ''; width: 32px; height: 1.5px; background: currentColor; opacity: .55; }
.sec-pill .ic { width: 18px; height: 18px; margin: 0 !important; }
.sec-title {
  text-align: center;
  font-size: var(--fs-h2);
  font-weight: 800;
  color: var(--heading);
  line-height: 1.4;
  margin-bottom: 12px;
}
.sec-sub {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--s-10);
  font-size: var(--fs-lead);
  line-height: 1.85;
  color: var(--muted-ink);
}
#warnings .sec-pill, #postpartum-problems .sec-pill { color: var(--danger); }
.sec--sage .sec-pill { color: var(--brand-ink); }

/* ---------- 8. Intro media, journey, audio note, TOC, stats ------------- */
.intro-media { position: relative; max-width: 880px; margin: clamp(32px, 5vw, 64px) auto 0; padding: 0 16px; }
.intro-media video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--blush-100);
  box-shadow: var(--shadow-md);
}
.intro-mute {
  position: absolute;
  bottom: 16px;
  left: 32px;
  z-index: 2;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(42, 28, 37, .62);
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.intro-mute:hover { background: rgba(42, 28, 37, .8); }

.journey-picker { margin: 0 auto; padding: clamp(40px, 6vw, 72px) 16px 0; max-width: calc(var(--container) + 32px); scroll-margin-top: calc(var(--nav-h) + 8px); }
.journey-picker-inner {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.journey-picker-kicker { color: var(--brand-deep); font-size: var(--fs-small); font-weight: 600; letter-spacing: 0; }
.journey-picker-kicker .ic { color: var(--sage); }
.journey-picker-title { font-family: var(--font-ar); font-size: var(--fs-h2); font-weight: 800; color: var(--heading); margin: 6px 0 8px; }
.journey-picker-subtitle { font-size: var(--fs-body); color: var(--muted-ink); margin-bottom: 28px; }
.journey-options { gap: 16px; }
.journey-option {
  min-height: 0;
  gap: 6px;
  padding: 24px 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.journey-option:hover, .journey-option:focus-visible { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-md); }
.journey-option-icon {
  width: 60px; height: 60px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--blush-100);
  color: var(--brand-deep);
}
.journey-option-icon .ic { width: 28px; height: 28px; margin: 0; }
.journey-option strong { color: var(--heading); font-size: 1.0625rem; font-weight: 700; }
.journey-option span:last-child { color: var(--muted-ink); font-size: var(--fs-meta); }

.speech-tip-wrap { max-width: 920px; margin: clamp(28px, 4vw, 40px) auto 0; padding: 0 16px; }
.speech-tip-box {
  margin: 0;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.speech-tip-icon {
  flex: 0 0 48px;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blush-100);
  color: var(--brand-deep);
}
.speech-tip-icon .ic { width: 22px; height: 22px; margin: 0; }
.speech-tip-title { margin: 0 0 4px; font-size: 1.0625rem; font-weight: 800; color: var(--heading); }
.speech-tip-text { margin: 0; font-size: var(--fs-small); line-height: 1.8; color: var(--ink-2); }
.speech-tip-text .ic { color: var(--brand-deep); }

.toc-inner { max-width: 960px; }
.toc-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.toc-link {
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--plum);
  font-size: var(--fs-small);
  font-weight: 600;
  box-shadow: none;
}
.toc-link .ic { color: var(--brand-deep); }
.toc-link:hover { transform: none; background: var(--blush-100); border-color: var(--brand); box-shadow: none; }

.stats-ribbon {
  padding: 0 16px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--page) 0 50%, var(--blush-50) 50% 100%);
}
.stats-inner {
  max-width: 1080px;
  padding: 22px 12px;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
}
.stats-inner > div { padding: 4px 16px; }
.stats-inner > div + div { border-inline-start: 1px solid var(--line); }
.stat-num { font-family: var(--font-lat); font-size: 1.75rem; font-weight: 800; color: var(--brand-ink); line-height: 1.3; }
.stat-lbl { display: block; font-size: var(--fs-meta); opacity: 1; color: var(--muted-ink); }
@media (max-width: 768px) {
  .stats-inner { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .stats-inner > div:nth-child(3) { border-inline-start: 0; }
}

/* ---------- 9. Tabs ------------------------------------------------------ */
.tabs-wrap { justify-content: center; gap: 8px; margin-bottom: var(--s-8); }
.tab-btn {
  min-height: 44px;
  padding: 8px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-family: var(--font-ar);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.4;
}
.tab-btn.safe { background: var(--surface); color: var(--ink-2); border-color: var(--line-strong); }
.tab-btn.safe:hover { border-color: var(--brand); color: var(--brand-ink); }
.tab-btn.safe.active { background: var(--blush-100); color: var(--brand-ink); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.tab-btn.avoid { background: var(--surface); color: var(--danger); border-color: var(--danger-line); }
.tab-btn.avoid.active { background: var(--danger-bg); color: var(--danger-ink); border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.tab-panel.active { gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.tab-panel.active:has(> .benefits-grid) { display: block; }
#favorites .tab-panel.active { display: block; }
@media (max-width: 640px) {
  .tabs-wrap {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 2px 2px 6px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .tabs-wrap::-webkit-scrollbar { display: none; }
  .tab-btn { flex: 0 0 auto; scroll-snap-align: start; }
}

/* ---------- 10. Cards ---------------------------------------------------- */
.benefits-grid { gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
/* Cards that open with an icon carry their listen/save actions in the icon
   row, so the title gets the full card width and a 4-up grid stays readable. */
.benefits-grid:has(> .bcard > .bcard-icon:first-child) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.benefits-grid:not(:has(> .bcard > .bcard-icon:first-child)):has(> .bcard:nth-child(4):last-child) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.bcard { position: relative; }
.bcard > .bcard-icon:first-child ~ .card-header > .speech-btn,
.bcard > .bcard-icon:first-child ~ .card-header > .fav-btn { position: absolute; top: 30px; }
.bcard > .bcard-icon:first-child ~ .card-header > .fav-btn { left: 22px; }
.bcard > .bcard-icon:first-child ~ .card-header > .speech-btn { left: 70px; }
.card-body { flex: 1 1 auto; min-width: 0; width: 100%; }
.bcard, .ex-card, .tip-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.bcard { padding: 24px; overflow: visible; }
.bcard::after { display: none; }
.bcard:hover, .ex-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.bcard-icon, .ex-card-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--blush-100);
  color: var(--brand-deep);
  font-size: 24px;
  margin-bottom: 16px;
}
.c1 .bcard-icon, .c2 .bcard-icon, .c3 .bcard-icon, .c4 .bcard-icon { background: var(--blush-100); }
.bcard-icon .ic, .ex-card-icon .ic { width: 24px; height: 24px; margin: 0; }
.bcard h4, .ex-card h4, .tip-card h4, .tl-row h4 {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.5;
  color: var(--heading);
}
.bcard p, .ex-card p, .tip-card p, .tl-row p { font-size: var(--fs-small); line-height: 1.85; color: var(--ink-2); }
.card-header { margin-bottom: 10px; }
.card-list { margin: 0; padding-inline-start: 1.15em; list-style: disc; font-size: var(--fs-small); line-height: 1.85; color: var(--ink-2); }
.card-list li + li { margin-top: 4px; }
.card-list li::marker, .med-list li::marker { color: var(--brand); }
.card-list strong { color: var(--heading); }

/* Listen / save actions */
.speech-btn, .fav-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  box-shadow: none;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.speech-btn { background: var(--blush-100); color: var(--brand-ink); border: 1px solid transparent; }
.speech-btn:hover { background: var(--action-bg); color: var(--action-fg); transform: none; }
.speech-btn.playing { background: var(--action-bg); color: var(--action-fg); animation: brand-pulse 1.6s ease-out infinite; }
.fav-btn { background: var(--surface); color: var(--muted-ink); border: 1px solid var(--line-strong); }
.fav-btn:hover { background: var(--blush-50); color: var(--brand-deep); border-color: var(--brand); transform: none; }
.fav-btn.saved { background: var(--blush-100); color: var(--brand-deep); border-color: var(--brand); }
@keyframes brand-pulse { 0% { box-shadow: 0 0 0 0 rgba(169, 87, 112, .45); } 100% { box-shadow: 0 0 0 12px rgba(169, 87, 112, 0); } }

/* Exercise cards */
.ex-card { padding: 20px; gap: 16px; }
.safe-panel .ex-card-icon { background: var(--support-bg); color: var(--support-ink); }
.avoid-panel .ex-card { border-color: var(--danger-line); }
.avoid-panel .ex-card-icon { background: var(--danger-bg); color: var(--danger); }
.ex-card h4 { margin-bottom: 4px; }

/* Safety tips */
.tips-grid { gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.tip-card { position: relative; padding: 22px; border-right: 1px solid var(--line); }
.tip-card h4::before { content: none; }
.tip-card::before {
  content: '';
  display: block;
  margin-bottom: 14px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--support-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B4E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.tip-card > .card-header > .speech-btn, .tip-card > .card-header > .fav-btn { position: absolute; top: 24px; }
.tip-card > .card-header > .fav-btn { left: 22px; }
.tip-card > .card-header > .speech-btn { left: 70px; }

/* Myths vs facts */
.bcard--myth .card-header { margin-bottom: 4px; }
.myth-mark { width: 40px; height: 40px; margin-bottom: 0; }
.myth-mark .ic { width: 20px; height: 20px; }
.bcard .myth-mark--false { background: var(--danger-bg); color: var(--danger); }
.bcard .myth-mark--true { background: var(--support-bg); color: var(--support-ink); margin-bottom: 6px; }
.myth-label { font-size: var(--fs-meta) !important; font-weight: 800 !important; margin: 10px 0 4px; }
.myth-label--false { color: var(--danger) !important; }
.myth-label--true { color: var(--support-ink) !important; }
.bcard--myth .myth-label--false + p { color: var(--heading); font-weight: 500; }
.myth-divider { margin: 16px 0 14px; border: 0; border-top: 1px dashed var(--line-strong); }

/* ---------- 11. Personal tools ------------------------------------------ */
.tool-panel {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.tool-panel--edd { max-width: 860px; margin: 0 auto; }
#fetal-tab .tool-panel { max-width: 640px; margin: 0 auto; }
.tool-hint { margin-bottom: 16px; font-size: var(--fs-small); color: var(--muted-ink); }
.tool-hint .ic { color: var(--brand-deep); }
.favorites-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.fav-empty, #favorites-list > div[style*="grid-column"] {
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--blush-50) !important;   /* beats inline style written by displayFavorites() */
  color: var(--muted-ink);
  text-align: center;
}
#favorites-list > div:not([style*="grid-column"]) { border-radius: var(--r-md) !important; box-shadow: var(--shadow-xs) !important; } /* beats inline style (generated) */
.fetal-result { margin-top: 20px; padding: 18px 20px; border-radius: var(--r-md); background: var(--blush-50); border: 1px solid var(--line); }
.fetal-content { font-size: var(--fs-body); line-height: 1.85; color: var(--ink); }

.fp-group label { font-size: var(--fs-small); font-weight: 700; color: var(--heading); }
.fp-group select, .fp-group input, .fp-group textarea {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--fs-body);
  color: var(--ink);
}
.fp-group select:focus, .fp-group input:focus, .fp-group textarea:focus { border-color: var(--brand-deep); box-shadow: var(--focus); }

.edd-result-card { border-radius: var(--r-lg); background: var(--support-bg); border: 1px solid var(--support-line); }
.edd-result-card .edd-label, .edd-result-card .edd-weeks, .edd-progress-label { color: var(--support-ink); font-size: var(--fs-small); }
.edd-result-card .edd-date { color: var(--heading); }
.edd-progress { background: var(--surface); }
.edd-progress-bar { background: var(--sage-ink); }

/* Pregnancy timeline */
.pregnancy-journey { padding: 28px 8px 8px; margin-top: 24px; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.pregnancy-journey-title { text-align: center; font-size: var(--fs-h3); font-weight: 800; color: var(--heading); }
.pregnancy-journey-title .ic { color: var(--brand-deep); }
.pregnancy-journey-legend { font-size: var(--fs-meta); color: var(--ink-2); }
.pregnancy-journey-legend .trimester-one::before { background: var(--brand); }
.pregnancy-journey-legend .trimester-two::before { background: var(--mauve); }
.pregnancy-journey-legend .trimester-three::before { background: var(--sage); }
.pregnancy-timeline-line { height: 6px; top: calc(var(--pt-top) + var(--pt-mk) / 2 - 3px); background: linear-gradient(to left, var(--brand) 0 30%, var(--mauve) 30% 68%, var(--sage) 68% 100%); opacity: .85; }
.pregnancy-week-marker { background: var(--surface); color: var(--plum); border: 2px solid var(--brand); box-shadow: var(--shadow-sm); }
.pregnancy-week-marker:hover { background: var(--blush-100); }
.pregnancy-week-marker.is-selected { background: var(--action-bg); color: var(--action-fg); border-color: var(--action-bg); }
.pregnancy-week-marker.is-current { background: var(--plum); color: #fff; border-color: var(--plum); box-shadow: 0 0 0 4px var(--blush-200); }
.pregnancy-week-marker small { font-size: 12px; color: var(--muted-ink); }
.pregnancy-current-marker .pcm-badge { background: var(--plum); }
.pregnancy-current-marker .pcm-guide, .pregnancy-current-marker .pcm-guide::before { background: var(--plum); border-top-color: var(--plum); }
.pregnancy-current-marker .pcm-guide::before { background: none; }
.pregnancy-current-marker .pcm-dot { border-color: var(--plum); box-shadow: 0 0 0 3px var(--blush-200); }
.pregnancy-weekly-list { gap: 10px; }
.pregnancy-weekly-item { padding: 2px; border-radius: var(--r-md); }
.pregnancy-weekly-number { width: 34px; height: 34px; background: var(--blush-100); color: var(--brand-ink); }
.pregnancy-weekly-item.is-highlighted { background: var(--blush-50); border-inline-start-color: var(--brand); box-shadow: 0 0 0 1px var(--line-strong); }
.pregnancy-weekly-item.is-highlighted .pregnancy-weekly-number { background: var(--action-bg); color: var(--action-fg); box-shadow: none; }
.pregnancy-weekly-link:hover, .pregnancy-weekly-link:focus-visible { background: var(--blush-50); transform: none; }
.pregnancy-weekly-item strong { color: var(--heading); font-size: var(--fs-small); }
.pregnancy-weekly-item p { font-size: var(--fs-small); color: var(--ink-2); }
.pregnancy-weekly-source { color: var(--brand-deep) !important; font-size: 13px !important; font-weight: 600; } /* beats legacy !important */

/* ---------- 12. Urgent warning signs ------------------------------------ */
.warn-banner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: clamp(22px, 3vw, 32px) clamp(20px, 4vw, 40px);
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, #A3221C, #8C1D18);
  box-shadow: 0 14px 34px rgba(140, 29, 24, .18);
  margin-bottom: 24px;
}
.warn-banner h3 { display: flex; align-items: center; gap: 12px; margin: 0; color: #fff; font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); font-weight: 800; }
.warn-banner h3 .ic {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  padding: 10px;
  margin: 0 !important;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}
.warn-banner p { color: #FFE9E7; font-size: var(--fs-body); margin: 0; padding-inline-start: 56px; }
.warn-grid { gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.warn-item {
  padding: 22px 18px;
  gap: 12px;
  border: 1px solid var(--danger-line);
  border-top: 4px solid var(--danger);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.warn-item span:first-child {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 24px;
}
.warn-item span:first-child .ic { width: 24px; height: 24px; margin: 0; }
.warn-item span:last-child { font-size: var(--fs-body); font-weight: 700; color: var(--danger-ink); line-height: 1.6; }
@media (max-width: 560px) { .warn-banner p { padding-inline-start: 0; } .warn-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- 13. Postnatal timeline --------------------------------------- */
.timeline { counter-reset: tl; gap: 14px; }
.timeline::before { right: 23px; width: 2px; top: 24px; bottom: 24px; background: var(--support-line); }
.tl-row { gap: 18px; padding: 0; align-items: stretch; counter-increment: tl; }
.tl-dot,
.tl-row:nth-child(n) .tl-dot {
  width: 48px; height: 48px;
  margin-top: 18px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 2px solid var(--sage);
  box-shadow: 0 0 0 6px var(--sage-50);
  font-size: var(--fs-body);
}
.tl-dot::before { content: counter(tl); font-family: var(--font-lat); font-weight: 800; color: var(--support-ink); }
.tl-row > .card-body {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.card-header--tl { justify-content: flex-start; gap: 10px; }
.tl-tag,
.tl-row:nth-child(n) .tl-tag {
  margin: 0;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--support-bg);
  color: var(--support-ink);
  font-size: var(--fs-meta);
  font-weight: 700;
}
.tl-row h4 { margin: 6px 0 4px; }

/* ---------- 14. Medical condition cards (postpartum) -------------------- */
.med-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.med-card { --sev: var(--danger); padding: 24px 22px 22px; display: flex; flex-direction: column; box-shadow: inset 0 4px 0 var(--sev), var(--shadow-xs); }
.med-card:hover { transform: none; box-shadow: inset 0 4px 0 var(--sev), var(--shadow-md); }
.med-card--caution { --sev: var(--caution); }
.med-card .card-header h4 { display: block; font-size: 1.2rem; font-weight: 800; color: var(--heading); }
.med-term {
  display: inline-block;
  margin-inline-start: 4px;
  padding: 1px 10px;
  border-radius: var(--r-pill);
  background: var(--blush-50);
  border: 1px solid var(--line);
  color: var(--muted-ink);
  font-family: var(--font-lat);
  font-size: 12.5px;
  font-weight: 600;
  vertical-align: 3px;
  white-space: nowrap;
}
.med-block { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-md); }
.med-block--symptoms, .med-block--topics { background: var(--page); border: 1px solid var(--line); }
.med-block--action { background: var(--support-bg); border: 1px solid var(--support-line); }
.med-label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: var(--fs-small) !important; font-weight: 800; color: var(--heading); }
.med-label .ic { margin: 0 !important; width: 18px; height: 18px; }
.med-block--symptoms .med-label .ic { color: var(--sev); }
.med-block--action .med-label, .med-block--action .med-label .ic { color: var(--support-ink); }
.med-list { margin: 0; padding-inline-start: 1.2em; list-style: disc; }
.med-list li { font-size: var(--fs-small); line-height: 1.8; color: var(--ink-2); }
.med-list li::marker { color: var(--sev); }
.med-block--action p:not(.med-label) { margin: 0; font-size: var(--fs-small); line-height: 1.8; color: var(--ink); }
.med-subtitle { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-size: var(--fs-small); font-weight: 800; color: var(--heading); }
.med-subtitle .ic { width: 12px; height: 12px; color: var(--caution); margin: 0 !important; }
.med-subtext { margin: 0 0 12px; font-size: var(--fs-small) !important; line-height: 1.8; color: var(--ink-2); }
.med-block--topics .med-subtext:last-child { margin-bottom: 0; }
.med-alert { margin-top: auto; padding-top: 16px; }
.med-alert p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: var(--fs-body);
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}
.med-alert p .ic { margin: 0 !important; width: 20px; height: 20px; flex: 0 0 auto; }
.med-alert--urgent p { background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger-ink); }
.med-alert--urgent p .ic { color: var(--danger); }
.med-alert--caution p { background: var(--caution-bg); border: 1px solid var(--caution-line); color: var(--caution-ink); }
.med-alert--caution p .ic { color: var(--caution); }

.med-reminder {
  margin-top: 40px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--danger-line);
  border-inline-start: 6px solid var(--danger);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.med-reminder-title { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--danger); font-size: 1.15rem; font-weight: 800; }
.med-reminder-title .ic { margin: 0 !important; }
.med-reminder-text { margin: 0; color: var(--heading); font-size: var(--fs-lead); font-weight: 600; line-height: 1.9; }
.med-reminder-text strong { color: var(--danger-ink); font-size: 1.12em; }
.med-reminder-note { margin: 12px 0 0; color: var(--muted-ink); font-size: var(--fs-meta); }

/* Newborn danger-signs card */
.bcard--urgent { box-shadow: inset 0 4px 0 var(--danger), var(--shadow-xs); }
.bcard--urgent:hover { box-shadow: inset 0 4px 0 var(--danger), var(--shadow-md); }
.card-urgent-line {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-ink) !important;   /* beats legacy dark "p" colour */
  font-size: var(--fs-small) !important;
  font-weight: 800;
}
.card-urgent-line .ic { color: var(--danger); margin: 0 !important; }

/* ---------- 15. Family planning ----------------------------------------- */
.family-planning-intro, .family-form-intro {
  max-width: 820px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  font-size: var(--fs-body);
  box-shadow: var(--shadow-xs);
}
.family-planning-intro-icon, .family-form-intro-icon {
  flex: 0 0 48px;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blush-100);
  color: var(--brand-deep);
  font-size: 22px;
}
.family-planning-intro-icon .ic, .family-form-intro-icon .ic { margin: 0; }
.family-form-intro h3 { color: var(--heading); font-size: var(--fs-h3); }
.family-form-intro p { font-size: var(--fs-small); color: var(--ink-2); }
#family-planning > .sec-inner > .sec-sub { margin-bottom: var(--s-8); }
.family-duration-chart {
  max-width: 920px;
  margin: 0 auto var(--s-10);
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.family-duration-title { color: var(--heading); font-size: var(--fs-h3); font-weight: 800; }
.family-duration-title .ic { color: var(--brand-deep); }
.family-duration-row { min-height: 40px; }
.family-duration-row:hover, .family-duration-row:focus-visible { background: var(--blush-50); transform: none; }
.family-duration-name { font-size: var(--fs-meta); font-weight: 700; color: var(--ink); }
.family-duration-track { height: 10px; background: var(--blush-100); box-shadow: none; }
.family-duration-bar,
.family-duration-row:nth-child(n) .family-duration-bar { background: linear-gradient(90deg, var(--brand), var(--brand-ink)); box-shadow: none; }
.family-duration-value { font-size: 13px; color: var(--ink-2); }
.family-duration-note { font-size: 13px; color: var(--muted-ink); }
.fp-label { margin: 8px 0 4px; font-size: var(--fs-meta); font-weight: 800; color: var(--brand-ink); }
.fp-desc { margin: 0 0 12px; font-size: var(--fs-small) !important; line-height: 1.8; color: var(--ink-2); }
.fp-pro, .fp-con { margin: 0 0 8px; font-size: var(--fs-small) !important; line-height: 1.75; color: var(--ink-2); }
.fp-pro .ic { color: var(--support-ink); }
.fp-con .ic { color: var(--danger); }
.fp-pro strong, .fp-con strong { color: var(--heading); }
.source-note {
  max-width: 920px;
  margin: 24px auto 32px;
  padding: 14px 18px;
  border: 1px solid var(--info-line);
  border-radius: var(--r-md);
  background: var(--info-bg);
}
.source-note p { margin: 0; color: var(--info-ink); font-size: var(--fs-small); font-weight: 700; }
.family-form-divider { color: var(--muted-ink); font-size: var(--fs-meta); }
.fp-form { max-width: 760px; margin-inline: auto; padding: clamp(20px, 3vw, 32px); border-radius: var(--r-xl); border-color: var(--line); box-shadow: var(--shadow-sm); }
.fp-form-title { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: var(--fs-h3); font-weight: 800; color: var(--heading); }
.fp-form-title .ic { color: var(--brand-deep); margin: 0 !important; }

/* ---------- 16. Weekly schedule ----------------------------------------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-sm); }
.schedule-table { border-radius: 0; box-shadow: none; }
.schedule-table th { background: var(--blush-100); color: var(--heading); font-size: var(--fs-small); font-weight: 800; padding: 16px 12px; }
.schedule-table td { padding: 14px 12px; font-size: var(--fs-small); color: var(--ink-2); border-bottom: 1px solid var(--line); vertical-align: middle; }
.schedule-table tr:nth-child(even) td { background: var(--page); }
.day-label { color: var(--heading); font-size: var(--fs-small); }
.ex-tag { padding: 3px 10px; border-radius: var(--r-pill); font-size: 13px; }
.ex-tag.t { background: var(--blush-100); color: var(--brand-ink); }
.ex-tag.g { background: var(--support-bg); color: var(--support-ink); }
.intensity-badge { padding: 3px 12px; border-radius: var(--r-pill); font-size: 13px; }
.intensity-badge.low { background: var(--support-bg); color: var(--support-ink); }
.intensity-badge.medium { background: var(--caution-bg); color: var(--caution-ink); }
.intensity-badge.rest { background: var(--blush-50); color: var(--muted-ink); border: 1px solid var(--line); }
.rest-day { font-style: normal; color: var(--muted-ink); }
.note-callout {
  margin-top: 20px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--fs-small);
  color: var(--ink-2);
  line-height: 1.8;
}
.note-callout .ic { color: var(--caution); }
.note-callout strong { color: var(--heading); }
@media (max-width: 700px) {
  .table-scroll { overflow: visible; border: 0; background: none; box-shadow: none; }
  .schedule-table, .schedule-table tbody, .schedule-table tr, .schedule-table td { display: block; width: 100%; }
  .schedule-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .schedule-table tr {
    margin-bottom: 12px;
    padding: 6px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
  }
  .schedule-table td,
  .schedule-table tr:nth-child(even) td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; text-align: start; background: none; }
  .schedule-table td::before { content: attr(data-label); flex: 0 0 auto; color: var(--muted-ink); font-size: var(--fs-meta); font-weight: 600; }
  .schedule-table td > * { text-align: left; }
  .schedule-table td:first-child { border-bottom: 1px solid var(--line); }
  .schedule-table td:first-child::before { display: none; }
  .schedule-table td:first-child .day-label { font-size: 1.05rem; }
  .schedule-table tr td:last-child { border-bottom: 0; }
}

/* ---------- 17. Videos --------------------------------------------------- */
.vids-bg { background: linear-gradient(160deg, #3A2432 0%, #2C1B27 100%) !important; } /* beats legacy !important */
.vids-bg::before { background: radial-gradient(circle at 85% 10%, rgba(201, 130, 145, .18), transparent 40%); }
.vids-bg .sec-pill { color: #F0C6D0; background: none; border: 0; }
.vids-bg .sec-sub { color: rgba(255, 255, 255, .78) !important; }
.vid-card { min-height: 0; border-radius: var(--r-lg); background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); box-shadow: none; }
.vid-card:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .1); border-color: rgba(240, 198, 208, .55); }
.vid-thumb, .vid-card:nth-child(n) .vid-thumb {
  min-height: 150px;
  flex-basis: 150px;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, .16), transparent 45%),
    linear-gradient(135deg, #A95770, #6B3456);
}
.vid-card:nth-child(2) .vid-thumb { background: radial-gradient(circle at 78% 22%, rgba(255,255,255,.16), transparent 45%), linear-gradient(135deg, #8B6B83, #553A50); }
.vid-card:nth-child(3) .vid-thumb { background: radial-gradient(circle at 78% 22%, rgba(255,255,255,.16), transparent 45%), linear-gradient(135deg, #C98291, #8B4A64); }
.vid-card:nth-child(4) .vid-thumb { background: radial-gradient(circle at 78% 22%, rgba(255,255,255,.16), transparent 45%), linear-gradient(135deg, #6F9F9A, #3E6461); }
.play-btn { width: 56px; height: 56px; border: 0; background: rgba(255, 255, 255, .95); box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
.play-btn svg { fill: var(--brand-deep); }
.vid-card:hover .play-btn { background: #fff; }
.vid-body { padding: 16px 18px 18px; }
.vid-title { font-size: var(--fs-body); font-weight: 700; }
.vid-ch { font-size: var(--fs-meta); color: rgba(255, 255, 255, .72) !important; }

/* ---------- 18. Feedback ------------------------------------------------- */
.feedback-form {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.feedback-form .btn-block { margin-top: 4px; }

/* ---------- 19. About ---------------------------------------------------- */
.about-section { background: linear-gradient(180deg, var(--blush-50) 0%, var(--page) 100%) !important; } /* beats legacy !important */
.about-icon {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blush-100);
  color: var(--brand-deep);
  font-size: 32px;
}
.about-icon .ic { margin: 0; }
.about-header h2 { font-size: var(--fs-h2); font-weight: 800; color: var(--heading); }
.about-header p { font-size: var(--fs-lead); color: var(--ink-2); }
.team-grid { gap: 16px; }
.team-card, .about-section .team-card {
  padding: 24px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.team-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.team-avatar { width: 60px; height: 60px; background: var(--blush-100); color: var(--brand-deep); }
.team-card h3 { font-size: 1.05rem; font-weight: 800; color: var(--heading); }
.team-role { color: var(--brand-ink); font-size: var(--fs-meta); font-weight: 700; }
.team-role small, .about-section .team-role small { color: var(--muted-ink); font-weight: 500; }
.team-linkedin { min-height: 36px; padding: 6px 12px; border-radius: var(--r-pill); }
.about-copy { max-width: 760px; }
.about-text { margin: 0 0 20px; font-size: var(--fs-body); line-height: 1.9; color: var(--ink); }
.about-text a, .about-disclaimer a { color: var(--brand-deep); font-weight: 700; }
.source-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 24px; }
.source-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px;
  padding: 6px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--plum);
  font-family: var(--font-lat);
  font-size: var(--fs-meta);
  font-weight: 600;
}
.source-chip .ic { color: var(--sage-ink); }
.about-disclaimer {
  padding: 18px 22px;
  border: 1px solid var(--caution-line);
  border-inline-start: 4px solid var(--caution);
  border-radius: var(--r-md);
  background: var(--caution-bg);
  color: var(--ink);
  font-size: var(--fs-small);
  line-height: 1.85;
  text-align: start;
}
.about-disclaimer > .ic:first-child { color: var(--caution); }

/* ---------- 20. Footer --------------------------------------------------- */
.site-footer, html.dark-mode .site-footer { color: #E9DCE3 !important; } /* beats legacy !important */
html.dark-mode .footer-brand { color: #fff !important; }
.site-footer { padding: 40px var(--gutter) 48px; background: #33232E; color: #E9DCE3; font-size: var(--fs-meta); line-height: 1.9; }
.footer-inner { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-size: 1.2rem; font-weight: 800; text-decoration: none; }
.footer-brand img { width: 44px; height: 44px; padding: 4px; border-radius: 50%; background: #FFF5F4; }
.footer-brand .dot { color: #E8B7C2; }
.site-footer p { margin: 0; color: #E9DCE3; }
.site-footer strong { color: #fff; }

/* ---------- 21. Floating support, modals -------------------------------- */
.support-btn {
  bottom: 20px; left: 20px;
  min-height: 44px;
  padding: 8px 16px;
  gap: 8px;
  background: var(--surface);
  color: var(--brand-ink);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
}
.support-btn:hover { background: var(--blush-50); border-color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.support-btn span.text { font-size: var(--fs-meta); font-weight: 700; letter-spacing: 0; }
.support-btn span.icon { font-size: 18px; display: inline-flex; }

.modal-overlay { background: rgba(42, 28, 37, .5); }
.modal-box { border-radius: var(--r-xl); border: 1px solid var(--line) !important; box-shadow: 0 24px 60px rgba(42, 28, 37, .25); } /* beats inline style */
.modal-title { color: var(--heading); font-size: 1.35rem; }
.modal-text { color: var(--ink-2); font-size: var(--fs-body); }
.modal-close { min-height: 48px; border-radius: var(--r-pill); background: var(--blush-100); color: var(--brand-ink); font-size: var(--fs-body); }
.modal-close:hover { background: var(--action-bg); color: var(--action-fg); }
.modal-box > button[onclick^="closeModal"] {   /* beats inline style */
  width: 40px !important; height: 40px !important;
  background: var(--blush-100) !important;
  color: var(--brand-ink) !important;
}
.cliq-box { border: 1px dashed var(--brand); border-radius: var(--r-md); background: var(--blush-50); }
.cliq-alias { color: var(--brand-ink); border-color: var(--line); font-family: var(--font-lat); letter-spacing: .04em; }
#fpResultDetails > div { border-radius: var(--r-md) !important; } /* beats inline style written by calculateFP() */

/* ---------- 22. Responsive sections -------------------------------------- */
@media (max-width: 768px) {
  .sec { padding: 56px 16px; }
  .sec-sub { font-size: var(--fs-body); margin-bottom: var(--s-8); }
  .journey-options { gap: 10px; }
  .journey-option { padding: 18px 10px 16px; }
  .journey-option-icon { width: 52px; height: 52px; }
  .bcard { padding: 20px; }
  .support-btn { bottom: 16px; left: 16px; padding: 8px 14px; }
  .intro-mute { left: 28px; bottom: 12px; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
  .journey-option strong { font-size: var(--fs-body); }
  .speech-tip-box { align-items: flex-start; }
}

/* ---------- 23. Dark theme components ----------------------------------- */
/* Most components follow the tokens above. These rules beat legacy
   !important dark rules (inline <style> blocks and theme-dark-*.css). */
html.dark-mode nav { background: rgba(24, 19, 26, .92) !important; border-bottom-color: var(--line) !important; }
html.dark-mode .nav-logo { color: var(--heading) !important; }
html.dark-mode .nav-links a { color: var(--ink-2) !important; }
html.dark-mode .nav-links a:hover { background: var(--blush-100); color: var(--heading); }
html.dark-mode .logo-wrapper > .ask-btn { background: var(--action-bg) !important; color: var(--action-fg) !important; }
html.dark-mode .nav-controls .ask-btn { background: transparent !important; color: var(--heading) !important; border: 1px solid var(--line-strong) !important; }
html.dark-mode .theme-toggle, html.dark-mode .hamburger-btn { background: transparent !important; border-color: transparent !important; }
html.dark-mode .theme-toggle:hover, html.dark-mode .hamburger-btn:hover { background: var(--blush-100) !important; }
html.dark-mode .ss-overlay { background: var(--page); }

html.dark-mode .splash-hero {
  background:
    radial-gradient(ellipse 60% 70% at 22% 46%, rgba(58, 40, 51, .9) 0%, rgba(58, 40, 51, 0) 70%),
    linear-gradient(180deg, var(--page) 0%, var(--blush-50) 100%) !important;
}
html.dark-mode .splash-hero::before { background: none !important; }
html.dark-mode .splash-hero::after { opacity: .25; }
html.dark-mode .splash-portrait-ring { background: radial-gradient(circle, rgba(245, 238, 243, .1) 0%, rgba(58, 40, 51, .6) 58%, rgba(58, 40, 51, 0) 72%) !important; }
html.dark-mode .splash-portrait-shell { background: transparent !important; }
html.dark-mode .splash-title { background: linear-gradient(120deg, #F5EEF3 0%, #E8B7C2 100%); -webkit-background-clip: text; background-clip: text; }
html.dark-mode .splash-heart { background: var(--surface); border-color: var(--line); }
html.dark-mode .splash-side-content h2 { -webkit-text-fill-color: currentColor; background: none !important; color: var(--heading) !important; }
html.dark-mode .splash-side-content .hero-kicker { color: var(--brand-deep) !important; }
html.dark-mode .splash-side-content .hero-lead { color: var(--ink-2) !important; }
html.dark-mode .splash-side-content .hero-scope { color: var(--muted-ink) !important; }
html.dark-mode .splash-badge { background: var(--surface) !important; border: 1px solid var(--line-strong) !important; color: var(--heading) !important; padding: 6px 14px !important; min-height: 40px; }
html.dark-mode .splash-badge .check .ic { color: var(--support-ink) !important; }

html.dark-mode .btn-teal { background: var(--action-bg) !important; color: var(--action-fg) !important; }
html.dark-mode .btn-teal:hover { background: var(--action-bg-h) !important; }
html.dark-mode .btn-quiet,
html.dark-mode .sec-dl-wrap .btn,
html.dark-mode .sec-actions .btn { background: var(--surface) !important; color: var(--heading) !important; border: 1px solid var(--line-strong) !important; }
html.dark-mode .btn-quiet:hover,
html.dark-mode .sec-dl-wrap .btn:hover,
html.dark-mode .sec-actions .btn:hover { border-color: var(--brand) !important; }

html.dark-mode .sec-pill { background: none !important; border: 0 !important; color: var(--brand-deep) !important; }
html.dark-mode #warnings .sec-pill, html.dark-mode #postpartum-problems .sec-pill { color: var(--danger-ink) !important; }
html.dark-mode .sec--tint:not(.vids-bg) { background-color: var(--blush-50) !important; }
html.dark-mode .sec:not(.vids-bg) .sec-inner { background-color: transparent !important; }

html.dark-mode .tab-btn.safe { background: var(--surface) !important; color: var(--ink-2) !important; border-color: var(--line-strong) !important; box-shadow: none !important; }
html.dark-mode .tab-btn.safe.active { background: var(--blush-100) !important; color: var(--heading) !important; border-color: var(--brand) !important; box-shadow: inset 0 0 0 1px var(--brand) !important; }
html.dark-mode .tab-btn.avoid { background: var(--surface) !important; color: var(--danger-ink) !important; border-color: var(--danger-line) !important; box-shadow: none !important; }
html.dark-mode .tab-btn.avoid.active { background: var(--danger-bg) !important; border-color: var(--danger) !important; box-shadow: inset 0 0 0 1px var(--danger) !important; }

html.dark-mode .bcard, html.dark-mode .ex-card, html.dark-mode .tip-card, html.dark-mode .team-card, html.dark-mode .journey-option, html.dark-mode .tl-row {
  box-shadow: none !important;
}
html.dark-mode .tl-row { background: transparent !important; border: 0 !important; }
html.dark-mode .tl-row > .card-body { background: var(--surface); border-color: var(--line); }
html.dark-mode .med-card { box-shadow: inset 0 4px 0 var(--sev) !important; }
html.dark-mode .bcard--urgent { box-shadow: inset 0 4px 0 var(--danger) !important; }
html.dark-mode .bcard-icon, html.dark-mode .ex-card-icon, html.dark-mode .journey-option-icon, html.dark-mode .team-avatar { background-color: var(--blush-100) !important; color: var(--brand-deep) !important; }
html.dark-mode .safe-panel .ex-card-icon, html.dark-mode .bcard .myth-mark--true { background-color: var(--support-bg) !important; color: var(--support-ink) !important; }
html.dark-mode .avoid-panel .ex-card-icon, html.dark-mode .bcard .myth-mark--false { background-color: var(--danger-bg) !important; color: var(--danger-ink) !important; }
html.dark-mode .avoid-panel .ex-card { border-color: var(--danger-line) !important; }
html.dark-mode .tl-tag { background: var(--support-bg) !important; color: var(--support-ink) !important; border: 0 !important; }
html.dark-mode .ex-tag.t { background: var(--blush-100) !important; color: var(--brand-ink) !important; border: 0 !important; }
html.dark-mode .ex-tag.g, html.dark-mode .intensity-badge.low { background: var(--support-bg) !important; color: var(--support-ink) !important; border: 0 !important; }
html.dark-mode .intensity-badge.medium { background: var(--caution-bg) !important; color: var(--caution-ink) !important; border: 0 !important; }
html.dark-mode .intensity-badge.rest, html.dark-mode .rest-day { background: transparent !important; color: var(--muted-ink) !important; }

html.dark-mode .warn-banner { background: linear-gradient(135deg, #7C1D1A, #61181A) !important; }
html.dark-mode .warn-item { background: var(--surface) !important; border: 1px solid var(--danger-line) !important; border-top: 4px solid var(--danger) !important; }
html.dark-mode .warn-item span:last-child { color: var(--danger-ink) !important; }

html.dark-mode .med-block--symptoms, html.dark-mode .med-block--topics { background: var(--page); }
html.dark-mode .med-alert--urgent p { color: var(--danger-ink); }
html.dark-mode .med-alert--caution p { color: var(--caution-ink); }
html.dark-mode .med-block--action .med-label, html.dark-mode .med-block--action .med-label .ic { color: var(--support-ink); }
html.dark-mode .med-reminder-text strong { color: var(--danger-ink); }

html.dark-mode .speech-btn { background: var(--blush-100) !important; color: var(--brand-ink) !important; border: 1px solid transparent !important; }
html.dark-mode .speech-btn:hover, html.dark-mode .speech-btn.playing { background: var(--action-bg) !important; color: var(--action-fg) !important; }
html.dark-mode .fav-btn { background: transparent !important; color: var(--ink-2) !important; border: 1px solid var(--line-strong) !important; }
html.dark-mode .fav-btn.saved, html.dark-mode .fav-btn:hover { background: var(--blush-100) !important; color: var(--brand-ink) !important; border-color: var(--brand) !important; }

html.dark-mode .stats-ribbon { background: linear-gradient(180deg, var(--page) 0 50%, var(--blush-50) 50% 100%) !important; }
html.dark-mode .stat-num { color: var(--brand-ink) !important; }

html.dark-mode .family-planning-intro, html.dark-mode .family-form-intro { background: var(--surface) !important; border: 1px solid var(--line) !important; }
html.dark-mode .family-duration-chart { border-top-color: var(--line) !important; }
html.dark-mode .pregnancy-week-marker { background: var(--surface) !important; color: var(--heading) !important; border-color: var(--brand) !important; }
html.dark-mode .pregnancy-week-marker.is-current { background: var(--brand) !important; color: #1E1418 !important; }
html.dark-mode .pregnancy-week-marker.is-selected { background: var(--action-bg) !important; color: var(--action-fg) !important; }
html.dark-mode .pregnancy-weekly-number { background: var(--blush-100) !important; color: var(--brand-ink) !important; }
html.dark-mode .pregnancy-weekly-item { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
html.dark-mode .pregnancy-weekly-item.is-highlighted { background: var(--blush-50) !important; border-inline-start-color: var(--brand) !important; }

html.dark-mode .schedule-table th { background: var(--blush-100) !important; color: var(--heading) !important; }
html.dark-mode .schedule-table td { background: var(--surface) !important; }
html.dark-mode .schedule-table tr:nth-child(even) td { background: var(--blush-50) !important; }
html.dark-mode .note-callout { background: var(--surface) !important; }
@media (max-width: 700px) {
  html.dark-mode .schedule-table td, html.dark-mode .schedule-table tr:nth-child(even) td { background: transparent !important; }
}

html.dark-mode .vids-bg { background: linear-gradient(160deg, #24161F 0%, #181118 100%) !important; }
html.dark-mode .about-section { background: linear-gradient(180deg, var(--blush-50) 0%, var(--page) 100%) !important; }
html.dark-mode .about-disclaimer { color: var(--ink) !important; }
html.dark-mode .source-chip { color: var(--heading); }
html.dark-mode .site-footer { background: #120E13 !important; border-top: 1px solid var(--line); }
html.dark-mode .footer-brand img { background: #F8E8EC; }
html.dark-mode .support-btn { background: var(--surface); color: var(--heading); border-color: var(--line-strong); }
html.dark-mode .modal-box > button[onclick^="closeModal"] { background: var(--blush-100) !important; color: var(--heading) !important; }
html.dark-mode .speech-tip-box, html.dark-mode .tool-panel, html.dark-mode .feedback-form, html.dark-mode .stats-inner, html.dark-mode .journey-picker-inner { background: var(--surface); border-color: var(--line); }
html.dark-mode .fav-empty, html.dark-mode #favorites-list > div[style*="grid-column"] { background: var(--blush-50) !important; }
html.dark-mode .toc-link { background: var(--surface) !important; color: var(--heading) !important; border-color: var(--line) !important; box-shadow: none !important; }
html.dark-mode .toc-link:hover { background: var(--blush-100) !important; }
html.dark-mode .fp-form { box-shadow: none !important; }
html.dark-mode .card-urgent-line { color: var(--danger-ink) !important; }

/* ---------- 24. Motion preferences -------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .bcard:hover, .ex-card:hover, .journey-option:hover, .team-card:hover, .vid-card:hover, .btn-teal:hover { transform: none; }
  .speech-btn.playing { animation: none; box-shadow: 0 0 0 3px var(--blush-200); }
}
