/* ==========================================================================
   dosefree — component styles. No raw colours here: tokens only.
   Layers: base → a11y → buttons → header/nav → sections/patterns → footer → motion
   ========================================================================== */

/* ---- base ---------------------------------------------------------------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--ds-color-bg);
  color: var(--ds-color-text);
  font-family: var(--ds-font-body);
  line-height: var(--ds-lh-body);
  text-wrap: pretty;
  accent-color: var(--ds-color-primary);
}
h1, h2, h3, h4, h5, h6 { color: var(--ds-color-heading); text-wrap: balance; scroll-margin-top: calc(var(--ds-header-height) + var(--ds-space-6)); }
h1, h2, h3 { font-family: var(--ds-font-heading); font-variation-settings: "opsz" 72; }
:is(h1,h2,h3,h4,h5,h6) a { color: inherit; }
p { max-width: 72ch; }
.has-text-align-center p, .has-text-align-center { margin-inline: auto; }
p:has(> a.wp-block-button__link), .wp-block-buttons p { max-width: none; }
a { color: var(--ds-color-primary); text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:hover { color: var(--ds-color-primary-hover); }
img, video, svg { max-width: 100%; height: auto; }
[id] { scroll-margin-top: calc(var(--ds-header-height) + var(--ds-space-6)); }
hr.wp-block-separator { border-color: var(--ds-color-border); }
::selection { background: var(--ds-color-primary-subtle); color: var(--ds-color-text); }
:root[data-theme="dark"] ::selection { color: var(--ds-sand-50); }

/* Typography utilities (tokens from research/04 §2) */
.ds-display { font-family: var(--ds-font-heading); font-size: var(--ds-fs-display); line-height: 1.05; font-weight: 500; letter-spacing: -0.01em; }
.ds-overline { font-size: var(--ds-fs-overline); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ds-color-accent-text); line-height: 1.3; }
.ds-lead { font-size: var(--ds-fs-body-lg); color: var(--ds-color-text-secondary); }
.ds-muted { color: var(--ds-color-text-muted); }
.ds-caption { font-size: var(--ds-fs-caption); font-weight: 500; color: var(--ds-color-text-muted); line-height: 1.45; }
.ds-numeric { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.ds-measure { max-width: 65ch; }

/* ---- accessibility ------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--ds-color-focus); outline-offset: 2px; border-radius: inherit; }
:focus:not(:focus-visible) { outline: none; }
.ds-band :focus-visible, .ds-footer :focus-visible, .is-style-band :focus-visible { outline-color: var(--ds-color-band-focus); }
.screen-reader-text, .ds-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* Core prints the skip link (to <main>) for block themes; restyle its focus state with tokens.
   Selector specificity beats core's inline footer CSS (.skip-link.screen-reader-text:focus). */
body .skip-link.screen-reader-text:focus, .screen-reader-text:focus, .ds-sr-only:focus {
  position: absolute; left: var(--ds-space-4); top: var(--ds-space-4); z-index: 100000;
  width: auto; height: auto; margin: 0; padding: var(--ds-space-3) var(--ds-space-5); clip: auto !important; clip-path: none; white-space: normal; overflow: visible;
  background-color: var(--ds-color-surface); color: var(--ds-color-primary); border-radius: var(--ds-radius-md); box-shadow: var(--ds-shadow-lg);
  font-size: var(--ds-fs-body); font-weight: 600; line-height: 1.2; text-decoration: underline;
  outline: 2px solid var(--ds-color-focus); outline-offset: 2px;
}
/* 44px targets for interactive UI */
button, .wp-block-button__link, .wp-element-button, input[type="submit"], input[type="button"], select, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .wp-block-navigation-item__content, .ds-tabs__tab, .wp-block-details > summary {
  min-height: var(--ds-target-min);
}
input[type="checkbox"], input[type="radio"] { width: 1.25rem; height: 1.25rem; }
@media (prefers-contrast: more) { .wp-block-button__link { border: 2px solid currentColor; } }

/* ---- forms ---------------------------------------------------------------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]), textarea, select {
  width: 100%; font: inherit; color: var(--ds-color-text); background: var(--ds-color-surface);
  border: 1px solid var(--ds-color-border-input); border-radius: var(--ds-radius-sm); padding: var(--ds-space-3) var(--ds-space-4);
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--ds-color-focus); outline-offset: 2px; border-color: var(--ds-color-focus); }
label { font-weight: 500; font-size: var(--ds-fs-sm); }
.ds-field__error { color: var(--ds-color-danger); font-size: var(--ds-fs-sm); display: flex; gap: var(--ds-space-2); align-items: flex-start; }
[aria-invalid="true"] { border-color: var(--ds-color-danger) !important; }
.wp-block-search__button { background: var(--ds-color-primary); color: var(--ds-color-on-primary); border: 0; border-radius: var(--ds-radius-md); padding-inline: var(--ds-space-5); font-weight: 600; }
.wp-block-search__button:hover { background: var(--ds-color-primary-hover); }
.wp-block-search__input { border: 1px solid var(--ds-color-border-input) !important; border-radius: var(--ds-radius-sm) !important; background: var(--ds-color-surface); color: var(--ds-color-text); }

/* ---- buttons -------------------------------------------------------------- */
.wp-block-button__link, .wp-element-button, .ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ds-space-2);
  min-height: var(--ds-target-min); padding: .75rem 1.25rem; border-radius: var(--ds-radius-md);
  font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; border: 0;
  background: var(--ds-color-primary); color: var(--ds-color-on-primary);
  transition: background-color var(--ds-dur-fast) var(--ds-ease), color var(--ds-dur-fast) var(--ds-ease), transform var(--ds-dur-fast) var(--ds-ease), box-shadow var(--ds-dur-fast) var(--ds-ease);
}
.wp-block-button__link:hover, .wp-element-button:hover, .ds-btn:hover { background: var(--ds-color-primary-hover); color: var(--ds-color-on-primary); }
.wp-block-button__link:active, .ds-btn:active { transform: scale(.98); }
.wp-block-button__link:focus-visible, .ds-btn:focus-visible { outline: 2px solid var(--ds-color-focus); outline-offset: 2px; }
.wp-block-button__link[aria-disabled="true"], .ds-btn[aria-disabled="true"], .ds-btn:disabled { opacity: .5; cursor: not-allowed; }
.wp-block-button__link[aria-busy="true"] { cursor: progress; }
/* Secondary (navy) */
.is-style-secondary .wp-block-button__link, .ds-btn--secondary { background: var(--ds-color-secondary); color: var(--ds-color-on-secondary); }
.is-style-secondary .wp-block-button__link:hover, .ds-btn--secondary:hover { background: var(--ds-color-secondary-hover); color: var(--ds-color-on-secondary); }
/* Outline */
.is-style-outline .wp-block-button__link, .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
  background: transparent; color: var(--ds-color-primary); border: 2px solid currentColor; padding: calc(.75rem - 2px) calc(1.25rem - 2px);
}
.is-style-outline .wp-block-button__link:hover { background: var(--ds-color-primary-subtle); color: var(--ds-color-primary-hover); }
/* Ghost (text) */
.is-style-ghost .wp-block-button__link, .ds-btn--ghost { background: transparent; color: var(--ds-color-primary); padding-inline: var(--ds-space-3); text-decoration: underline; text-underline-offset: .2em; }
.is-style-ghost .wp-block-button__link:hover, .ds-btn--ghost:hover { background: var(--ds-color-primary-subtle); color: var(--ds-color-primary-hover); }
/* Destructive */
.is-style-destructive .wp-block-button__link, .ds-btn--danger { background: var(--ds-color-danger); color: var(--ds-color-text-inverse); }
/* Pill / small */
.is-style-pill .wp-block-button__link { border-radius: var(--ds-radius-full); }
.ds-btn--sm, .ds-btn--sm .wp-block-button__link { min-height: var(--ds-target-min); padding: .5rem 1rem; font-size: var(--ds-fs-sm); }
.ds-btn--lg, .ds-btn--lg .wp-block-button__link { padding: 1rem 1.75rem; font-size: var(--ds-fs-body-lg); }
.ds-btn--sm.wp-block-button, .ds-btn--lg.wp-block-button { padding: 0; min-height: 0; }
.ds-btn__icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---- header / nav ----------------------------------------------------------- */
/* The template-part wrapper must not trap the sticky header (sticky only works within its parent). */
.wp-block-template-part:has(> .ds-header) { display: contents; }
.ds-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ds-color-header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ds-dur-base) var(--ds-ease), box-shadow var(--ds-dur-base) var(--ds-ease);
}
.ds-header.is-scrolled { border-bottom-color: var(--ds-color-border); box-shadow: var(--ds-shadow-sm); }
.ds-header__inner { min-height: var(--ds-header-height); }
.ds-brand { display: inline-flex; align-items: center; gap: var(--ds-space-3); text-decoration: none; color: var(--ds-color-heading); }
.ds-brand:hover { color: var(--ds-color-primary); }
.ds-brand__mark { width: 36px; height: 36px; flex: none; color: var(--ds-color-primary); }
.ds-brand__lockup { display: flex; flex-direction: column; line-height: 1; }
.ds-brand__name { font-family: var(--ds-font-heading); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--ds-color-heading); }
.ds-brand__tag { font-size: var(--ds-fs-caption); font-weight: 500; color: var(--ds-color-text-secondary); margin-top: 4px; letter-spacing: .01em; }
.wp-block-site-title a, .wp-block-site-title a:hover { text-decoration: none; }
.wp-block-navigation .wp-block-navigation-item__content {
  display: inline-flex; align-items: center; padding: var(--ds-space-2) var(--ds-space-3); border-radius: var(--ds-radius-sm);
  position: relative; text-decoration: none; color: var(--ds-color-heading);
}
.wp-block-navigation .wp-block-navigation-item__content::after {
  content: ""; position: absolute; left: var(--ds-space-3); right: var(--ds-space-3); bottom: 4px; height: 2px; background: var(--ds-color-primary);
  transform: scaleX(0); transform-origin: left; transition: transform var(--ds-dur-base) var(--ds-ease);
}
.wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--ds-color-primary); }
.wp-block-navigation .wp-block-navigation-item__content:hover::after,
.wp-block-navigation .wp-block-navigation-item__content[aria-current="page"]::after,
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content::after { transform: scaleX(1); }
.wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] { color: var(--ds-color-primary); font-weight: 600; }
.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close { min-width: var(--ds-target-min); min-height: var(--ds-target-min); color: var(--ds-color-heading); border-radius: var(--ds-radius-sm); }
.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open,
.wp-block-navigation__responsive-container.is-menu-open { background-color: var(--ds-color-bg); color: var(--ds-color-text); padding: var(--ds-space-6); }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { color: var(--ds-color-heading); }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { min-height: 48px; font-size: var(--ds-fs-body-lg); padding-inline: 0; width: 100%; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content::after { left: 0; right: auto; width: 32px; }
.wp-block-navigation__submenu-container { background: var(--ds-color-surface) !important; color: var(--ds-color-text) !important; border: 1px solid var(--ds-color-border) !important; border-radius: var(--ds-radius-md); box-shadow: var(--ds-shadow-lg); padding: var(--ds-space-2) !important; }
.wp-block-navigation__submenu-container .wp-block-navigation-item__content { color: var(--ds-color-text) !important; }
.ds-header .wp-block-buttons .wp-block-button__link { white-space: nowrap; }
/* Theme toggle */
.ds-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ds-space-2);
  min-width: var(--ds-target-min); min-height: var(--ds-target-min); padding: 0 var(--ds-space-2);
  background: transparent; border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-full); color: var(--ds-color-heading); cursor: pointer;
  transition: background-color var(--ds-dur-fast) var(--ds-ease), border-color var(--ds-dur-fast) var(--ds-ease);
}
.ds-theme-toggle:hover { background: var(--ds-color-bg-subtle); border-color: var(--ds-color-border-strong); }
.ds-theme-toggle svg { width: 20px; height: 20px; }
.ds-theme-toggle__icon--dark, html[data-theme="dark"] .ds-theme-toggle__icon--light { display: none; }
html[data-theme="dark"] .ds-theme-toggle__icon--dark { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .ds-theme-toggle__icon--light { display: none; }
  html:not([data-theme="light"]) .ds-theme-toggle__icon--dark { display: block; }
}
html:not(.js) .ds-theme-toggle { display: none; }
/* Mobile sticky CTA bar */
.ds-mobile-cta { display: none; }
@media (max-width: 639px) {
  .ds-mobile-cta {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; gap: var(--ds-space-3);
    padding: var(--ds-space-3) var(--ds-space-4) calc(var(--ds-space-3) + env(safe-area-inset-bottom));
    background: var(--ds-color-header-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--ds-color-border);
  }
  .ds-mobile-cta .wp-block-button, .ds-mobile-cta .wp-block-button__link { width: 100%; }
  body { padding-bottom: calc(var(--ds-target-min) + var(--ds-space-8)); }
  .ds-header .ds-header__cta { display: none; }
  .ds-brand__tag { display: none; }
}

/* ---- layout helpers ---------------------------------------------------------- */
.ds-section { padding-block: var(--ds-space-section); }
.ds-section--tight { padding-block: var(--ds-space-12); }
.ds-section--subtle { background: var(--ds-color-bg-subtle); }
.ds-section__head { margin-bottom: var(--ds-space-10); }
.ds-grid { display: grid; gap: var(--ds-gutter); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ds-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.ds-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.ds-cluster { display: flex; flex-wrap: wrap; gap: var(--ds-space-3); align-items: center; }
.ds-hide-no-js { display: none; } html.js .ds-hide-no-js { display: revert; }

/* ---- cards ------------------------------------------------------------------- */
.ds-card, .is-style-card {
  background: var(--ds-color-surface); color: var(--ds-color-text);
  border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-sm);
  padding: var(--ds-space-6);
  transition: transform var(--ds-dur-fast) var(--ds-ease), box-shadow var(--ds-dur-fast) var(--ds-ease), border-color var(--ds-dur-fast) var(--ds-ease);
}
.ds-card--link:hover, .ds-card:has(> a:hover), .ds-card:has(.ds-card__link:hover) { transform: translateY(-2px); box-shadow: var(--ds-shadow-md); border-color: var(--ds-sage-200); }
:root[data-theme="dark"] .ds-card:has(.ds-card__link:hover) { border-color: var(--ds-sage-700); }
.ds-card:focus-within { box-shadow: var(--ds-shadow-md); }
.ds-card__icon { width: 40px; height: 40px; color: var(--ds-color-primary); margin-bottom: var(--ds-space-4); }
.ds-card__icon svg { width: 28px; height: 28px; stroke-width: 1.75; }
.ds-card h3, .ds-card .wp-block-post-title { margin-top: 0; font-size: var(--ds-fs-h4); font-family: var(--ds-font-body); font-weight: 600; }
.ds-card p { font-size: var(--ds-fs-sm); color: var(--ds-color-text-secondary); }
.ds-card__link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: var(--ds-space-1); min-height: var(--ds-target-min); }
.ds-card__link::after { content: "→"; transition: transform var(--ds-dur-fast) var(--ds-ease); }
.ds-card__link:hover::after { transform: translateX(3px); }
.ds-card__link:hover { text-decoration: underline; }
.ds-skeleton { background: linear-gradient(90deg, var(--ds-stone-100), var(--ds-stone-200), var(--ds-stone-100)); background-size: 200% 100%; animation: ds-shimmer 1.2s linear infinite; border-radius: var(--ds-radius-sm); min-height: 1em; }
@keyframes ds-shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }
/* Surface & tinted groups (block styles) */
.is-style-surface { background: var(--ds-color-surface); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-lg); padding: var(--ds-space-6); }
.ds-tint--success { background: var(--ds-color-success-bg); color: var(--ds-color-text); border-left: 4px solid var(--ds-color-success); }
.ds-tint--warning { background: var(--ds-color-warning-bg); border-left: 4px solid var(--ds-color-warning); }
.ds-tint--danger { background: var(--ds-color-danger-bg); border-left: 4px solid var(--ds-color-danger); }
.ds-tint--info { background: var(--ds-color-info-bg); border-left: 4px solid var(--ds-color-info); }
.ds-tint--success, .ds-tint--warning, .ds-tint--danger, .ds-tint--info { padding: var(--ds-space-4) var(--ds-space-5); border-radius: var(--ds-radius-md); }
.ds-chip { display: inline-flex; align-items: center; gap: var(--ds-space-1); padding: 4px 10px; font-size: var(--ds-fs-caption); font-weight: 500; border-radius: var(--ds-radius-xs); background: var(--ds-color-bg-subtle); color: var(--ds-color-text-secondary); border: 1px solid var(--ds-color-border); }
.ds-chip--success { background: var(--ds-color-success-bg); color: var(--ds-color-success); border-color: transparent; }
.ds-chip--warning { background: var(--ds-color-warning-bg); color: var(--ds-color-warning); border-color: transparent; }
.ds-chip--danger { background: var(--ds-color-danger-bg); color: var(--ds-color-danger); border-color: transparent; }

/* ---- hero -------------------------------------------------------------------- */
.ds-hero { position: relative; overflow: clip; padding-block: clamp(3rem, 8vw, 6rem); }
.ds-hero .ds-hero__title { font-size: var(--ds-fs-display); line-height: 1.05; font-weight: 500; letter-spacing: -0.01em; }
.ds-hero__trust { font-size: var(--ds-fs-caption); color: var(--ds-color-text-muted); font-weight: 500; }
.ds-hero__trust span + span::before { content: "·"; margin: 0 var(--ds-space-2); }
/* 3-question pre-screener placeholder card */
.ds-prescreener { background: var(--ds-color-surface); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-xl); box-shadow: var(--ds-shadow-lg); padding: var(--ds-space-8); }
.ds-prescreener__head { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-4); margin-bottom: var(--ds-space-4); }
.ds-prescreener__dots { display: inline-flex; gap: 6px; }
.ds-prescreener__dots span { width: 8px; height: 8px; border-radius: var(--ds-radius-full); background: var(--ds-color-border-strong); }
.ds-prescreener__dots span[aria-current="step"] { background: var(--ds-color-primary); width: 20px; }
.ds-prescreener ol { margin: 0 0 var(--ds-space-5); padding-left: 1.25rem; color: var(--ds-color-text-secondary); font-size: var(--ds-fs-sm); }
.ds-prescreener li + li { margin-top: var(--ds-space-2); }
.ds-prescreener__note { font-size: var(--ds-fs-caption); color: var(--ds-color-text-muted); margin-top: var(--ds-space-3); }

/* ---- trust bar ---------------------------------------------------------------- */
.ds-trust-bar { border-block: 1px solid var(--ds-color-border); background: var(--ds-color-bg-subtle); padding-block: var(--ds-space-4); }
.ds-trust-bar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ds-space-3) var(--ds-space-8); }
.ds-trust-bar li { display: inline-flex; align-items: center; gap: var(--ds-space-2); color: var(--ds-color-text-muted); font-size: var(--ds-fs-sm); font-weight: 500; min-height: 32px; }
.ds-trust-bar svg { width: 20px; height: 20px; color: var(--ds-color-border-strong); flex: none; }

/* ---- services / providers ------------------------------------------------------- */
.ds-services .wp-block-columns, .ds-providers .wp-block-post-template { gap: var(--ds-gutter); }
.ds-provider-card .wp-block-post-featured-image img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--ds-radius-lg); filter: saturate(.95) sepia(.06); }
.ds-provider-card .wp-block-post-title { font-size: var(--ds-fs-h4); margin: var(--ds-space-4) 0 var(--ds-space-1); }
.ds-provider-card .wp-block-post-excerpt { font-size: var(--ds-fs-sm); }
.ds-provider-card .wp-block-post-excerpt__excerpt { margin: 0; }
.ds-credentials { color: var(--ds-color-text-secondary); font-size: var(--ds-fs-sm); font-weight: 500; }
.ds-empty { text-align: center; padding: var(--ds-space-12) var(--ds-space-6); border: 1px dashed var(--ds-color-border-strong); border-radius: var(--ds-radius-lg); color: var(--ds-color-text-secondary); }
.ds-empty p { margin-inline: auto; }

/* ---- life-stage tabs -------------------------------------------------------------- */
.ds-tabs__list { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); border-bottom: 1px solid var(--ds-color-border); margin-bottom: var(--ds-space-6); padding: 0; }
.ds-tabs__tab {
  appearance: none; background: transparent; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
  padding: var(--ds-space-3) var(--ds-space-4); font: inherit; font-weight: 600; color: var(--ds-color-text-secondary); cursor: pointer; border-radius: var(--ds-radius-sm) var(--ds-radius-sm) 0 0;
  transition: color var(--ds-dur-fast) var(--ds-ease), border-color var(--ds-dur-fast) var(--ds-ease);
}
.ds-tabs__tab:hover { color: var(--ds-color-primary); background: var(--ds-color-bg-subtle); }
.ds-tabs__tab[aria-selected="true"] { color: var(--ds-color-primary); border-bottom-color: var(--ds-color-primary); }
.ds-tabs__panel[hidden] { display: none; }
html:not(.js) .ds-tabs__panel + .ds-tabs__panel { margin-top: var(--ds-space-8); padding-top: var(--ds-space-8); border-top: 1px solid var(--ds-color-border); }

/* ---- FAQ accordion (core/details) -------------------------------------------------- */
.ds-faq .wp-block-details { border-bottom: 1px solid var(--ds-color-border); padding: 0; margin: 0; }
.ds-faq .wp-block-details:first-of-type { border-top: 1px solid var(--ds-color-border); }
.ds-faq summary, .wp-block-details > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-4);
  min-height: 56px; padding: var(--ds-space-3) var(--ds-space-2); cursor: pointer; list-style: none;
  font-weight: 600; color: var(--ds-color-heading); border-radius: var(--ds-radius-sm);
}
.wp-block-details > summary::-webkit-details-marker { display: none; }
.wp-block-details > summary::after {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 2px;
  background: currentColor; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") center / contain no-repeat;
  transition: transform var(--ds-dur-base) var(--ds-ease);
}
.wp-block-details[open] > summary::after { transform: rotate(180deg); }
.wp-block-details > summary:hover { color: var(--ds-color-primary); }
.wp-block-details > summary:focus-visible { outline: 2px solid var(--ds-color-focus); outline-offset: -2px; }
.wp-block-details > :not(summary) { padding: 0 var(--ds-space-2) var(--ds-space-5); color: var(--ds-color-text-secondary); }
.wp-block-details > :not(summary):last-child { margin-bottom: 0; }

/* ---- testimonial ------------------------------------------------------------------------ */
.ds-testimonial { background: var(--ds-color-surface); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-lg); padding: var(--ds-space-8); }
.ds-testimonial .wp-block-quote { border-left: 0; padding-left: 0; margin: 0; }
.ds-testimonial .wp-block-quote p { font-family: var(--ds-font-heading); font-size: var(--ds-fs-h4); font-style: italic; color: var(--ds-color-heading); line-height: 1.45; }
.ds-testimonial cite { font-style: normal; font-size: var(--ds-fs-sm); color: var(--ds-color-text-secondary); font-weight: 500; }
.ds-testimonial__disclosure, .ds-disclosure { font-size: var(--ds-fs-caption); color: var(--ds-color-text-muted); border-top: 1px solid var(--ds-color-border); padding-top: var(--ds-space-3); margin-top: var(--ds-space-4); }

/* ---- CTA band (navy) — fixed contrast recipe, same in both schemes -------------------------- */
.ds-band, .is-style-band {
  background: var(--ds-color-band-bg); color: var(--ds-color-band-text); border-radius: var(--ds-radius-xl);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
}
.ds-band.alignfull, .is-style-band.alignfull { border-radius: 0; }
.ds-band :is(h1,h2,h3,h4,p), .is-style-band :is(h1,h2,h3,h4,p) { color: var(--ds-color-band-text); }
.ds-band .ds-muted, .is-style-band .ds-muted { color: var(--ds-color-band-text-muted); }
.ds-band a:not(.wp-block-button__link), .is-style-band a:not(.wp-block-button__link) { color: var(--ds-color-band-text); }
.ds-band .wp-block-button__link, .is-style-band .wp-block-button__link { background: var(--ds-color-band-primary); color: var(--ds-color-on-band-primary); }
.ds-band .wp-block-button__link:hover, .is-style-band .wp-block-button__link:hover { background: var(--ds-color-band-primary-hover); color: var(--ds-color-on-band-primary); }
.ds-band .is-style-ghost .wp-block-button__link, .is-style-band .is-style-ghost .wp-block-button__link { background: transparent; color: var(--ds-color-band-text); }
.ds-band .is-style-ghost .wp-block-button__link:hover { background: var(--ds-color-band-border); }
.ds-band .is-style-outline .wp-block-button__link { background: transparent; color: var(--ds-color-band-text); border-color: var(--ds-color-band-text); }

/* ---- blog grid ---------------------------------------------------------------------------- */
.ds-blog-card { display: flex; flex-direction: column; gap: var(--ds-space-3); height: 100%; }
.ds-blog-card .wp-block-post-featured-image { overflow: hidden; border-radius: var(--ds-radius-lg); }
.ds-blog-card .wp-block-post-featured-image img { aspect-ratio: 16 / 9; object-fit: cover; transition: transform var(--ds-dur-slow) var(--ds-ease); }
.ds-blog-card:hover .wp-block-post-featured-image img { transform: scale(1.03); }
.ds-blog-card .wp-block-post-title { font-size: var(--ds-fs-h4); font-family: var(--ds-font-body); font-weight: 600; margin: 0; }
.ds-blog-card .wp-block-post-excerpt { font-size: var(--ds-fs-sm); }
.ds-blog-card .wp-block-post-excerpt__more-text { margin-top: var(--ds-space-2); }
.ds-blog-meta { display: flex; flex-wrap: wrap; gap: var(--ds-space-1) var(--ds-space-3); align-items: center; font-size: var(--ds-fs-caption); color: var(--ds-color-text-muted); }
.wp-block-post-excerpt__more-link { font-weight: 600; text-decoration: none; }
.wp-block-post-excerpt__more-link:hover { text-decoration: underline; }
.wp-block-query-pagination .page-numbers, .wp-block-query-pagination-next, .wp-block-query-pagination-previous { display: inline-flex; align-items: center; min-height: var(--ds-target-min); padding: 0 var(--ds-space-3); border-radius: var(--ds-radius-sm); }
.wp-block-query-pagination .page-numbers.current { background: var(--ds-color-primary-subtle); color: var(--ds-color-primary-hover); font-weight: 600; }

/* ---- single post / article ---------------------------------------------------------------- */
.ds-article .entry-content, .ds-prose { font-size: var(--ds-fs-body-lg); }
.ds-prose > * { max-width: 72ch; margin-inline: auto; }
.ds-prose :is(h2, h3) { margin-top: 1.5em; }
.ds-prose img, .ds-prose figure { max-width: 100%; }
.ds-article-header { padding-block: var(--ds-space-12) var(--ds-space-8); }
.ds-article-header .wp-block-post-title { font-size: var(--ds-fs-h1); }
.ds-byline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2) var(--ds-space-4); font-size: var(--ds-fs-sm); color: var(--ds-color-text-secondary); }
.ds-byline--reviewed { background: var(--ds-color-success-bg); border-left: 4px solid var(--ds-color-success); border-radius: var(--ds-radius-md); padding: var(--ds-space-3) var(--ds-space-4); }
.ds-byline--reviewed svg { width: 20px; height: 20px; color: var(--ds-color-success); flex: none; }
.ds-byline strong { color: var(--ds-color-text); font-weight: 600; }
.ds-byline a { color: var(--ds-color-primary); }
.ds-reading-level { font-size: var(--ds-fs-caption); }

/* ---- disclaimer / safety -------------------------------------------------------------------- */
.ds-disclaimer { background: var(--ds-color-bg-subtle); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-md); padding: var(--ds-space-5) var(--ds-space-6); font-size: var(--ds-fs-sm); color: var(--ds-color-text-secondary); }
.ds-disclaimer p { max-width: none; }
.ds-disclaimer p:last-child { margin-bottom: 0; }
.ds-disclaimer strong { color: var(--ds-color-text); }
.ds-crisis { font-weight: 600; color: var(--ds-color-text); }
.ds-crisis a { color: var(--ds-color-danger); text-decoration-thickness: 2px; }
.ds-footer .ds-disclaimer { background: transparent; border-color: var(--ds-color-footer-border); color: var(--ds-color-footer-text-muted); }
.ds-footer .ds-disclaimer strong, .ds-footer .ds-crisis { color: var(--ds-color-footer-text); }
.ds-footer .ds-crisis a { color: var(--ds-color-footer-text); }

/* ---- BMI placeholder ----------------------------------------------------------------------- */
.ds-bmi { background: var(--ds-color-surface); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-lg); padding: var(--ds-space-8); }
.ds-bmi__placeholder { border: 1px dashed var(--ds-color-border-strong); border-radius: var(--ds-radius-md); padding: var(--ds-space-6); text-align: center; color: var(--ds-color-text-secondary); font-size: var(--ds-fs-sm); }
.ds-bmi__placeholder p { margin-inline: auto; }
.ds-bmi__placeholder code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--ds-color-bg-subtle); padding: 2px 6px; border-radius: var(--ds-radius-xs); }

/* ---- app landing ---------------------------------------------------------------------------- */
.ds-app-hero .ds-app-badge { display: inline-flex; align-items: center; gap: var(--ds-space-2); background: var(--ds-color-primary-subtle); color: var(--ds-color-primary-hover); font-weight: 600; font-size: var(--ds-fs-caption); padding: 6px 12px; border-radius: var(--ds-radius-full); }
:root[data-theme="dark"] .ds-app-badge { color: var(--ds-sage-200); }
.wp-block-column:has(.ds-app-hero__shot) .ds-device { display: none; }
.ds-app-hero__shot img { border-radius: var(--ds-radius-xl); box-shadow: var(--ds-shadow-xl); }
.ds-device { background: var(--ds-color-bg-subtle); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-xl); aspect-ratio: 9 / 16; max-width: 320px; margin-inline: auto; display: grid; place-items: center; color: var(--ds-color-text-muted); font-size: var(--ds-fs-sm); text-align: center; padding: var(--ds-space-6); }
.ds-steps { counter-reset: ds-step; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--ds-space-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.ds-steps li { counter-increment: ds-step; position: relative; padding-left: 56px; }
.ds-steps li::before { content: counter(ds-step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: var(--ds-radius-full); display: grid; place-items: center; background: var(--ds-color-primary-subtle); color: var(--ds-color-primary-hover); font-family: var(--ds-font-heading); font-weight: 600; font-size: 1.125rem; }
.ds-steps strong { display: block; color: var(--ds-color-heading); margin-bottom: var(--ds-space-1); }
.ds-steps p { font-size: var(--ds-fs-sm); color: var(--ds-color-text-secondary); margin: 0; }

/* ---- footer --------------------------------------------------------------------------------- */
.ds-footer { background: var(--ds-color-footer-bg); color: var(--ds-color-footer-text); padding-block: var(--ds-space-16) var(--ds-space-8); font-size: var(--ds-fs-sm); }
.ds-footer :is(h2,h3,h4,p,li,cite) { color: var(--ds-color-footer-text); }
.ds-footer .ds-footer__heading { font-family: var(--ds-font-body); font-size: var(--ds-fs-overline); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ds-color-footer-text-muted); margin: 0 0 var(--ds-space-3); }
.ds-footer a { color: var(--ds-color-footer-text); text-decoration: none; }
.ds-footer a:hover { color: var(--ds-color-band-primary); text-decoration: underline; }
.ds-footer .wp-block-navigation .wp-block-navigation-item__content { color: var(--ds-color-footer-text); padding-inline: 0; min-height: 36px; }
.ds-footer .wp-block-navigation .wp-block-navigation-item__content::after { background: var(--ds-color-band-primary); left: 0; right: auto; width: 100%; }
.ds-footer .wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--ds-color-band-primary); }
.ds-footer ul { list-style: none; padding: 0; margin: 0; }
.ds-footer .wp-block-navigation.is-vertical li { margin: 0; }
.ds-footer .ds-brand__name, .ds-footer .ds-brand { color: var(--ds-color-footer-text); }
.ds-footer .ds-brand__tag { color: var(--ds-color-footer-text-muted); }
.ds-footer .ds-brand__mark { color: var(--ds-color-band-primary); }
.ds-footer__legal { border-top: 1px solid var(--ds-color-footer-border); padding-top: var(--ds-space-6); margin-top: var(--ds-space-10); font-size: var(--ds-fs-caption); color: var(--ds-color-footer-text-muted); }
.ds-footer__legal a { color: var(--ds-color-footer-text-muted); }
.ds-footer__legal p { max-width: none; }
.ds-footer hr.wp-block-separator { border-color: var(--ds-color-footer-border); }
.ds-footer .wp-block-button__link { background: var(--ds-color-band-primary); color: var(--ds-color-on-band-primary); }
.ds-footer .wp-block-button__link:hover { background: var(--ds-color-band-primary-hover); }
.ds-footer input { background: var(--ds-color-band-bg); color: var(--ds-color-footer-text); border-color: var(--ds-color-band-border); }

/* ---- 404 / search ------------------------------------------------------------------------------ */
.ds-404 { text-align: center; padding-block: var(--ds-space-24); }
.ds-404 .ds-display { margin-bottom: var(--ds-space-4); }
.ds-404 p, .ds-404 .wp-block-search { margin-inline: auto; }
.ds-404 .wp-block-search { max-width: 480px; }

/* ---- motion ----------------------------------------------------------------------------------- */
html.js .ds-reveal { opacity: 0; transform: translateY(8px); transition: opacity var(--ds-dur-slow) var(--ds-ease), transform var(--ds-dur-slow) var(--ds-ease); }
html.js .ds-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  html.js .ds-reveal { opacity: 1; transform: none; }
  .ds-card:hover, .wp-block-button__link:active, .ds-blog-card:hover .wp-block-post-featured-image img, .ds-card__link:hover::after { transform: none; }
  .ds-skeleton { animation: none; }
}

/* ---- print ------------------------------------------------------------------------------------ */
@media print {
  .ds-header, .ds-mobile-cta, .ds-theme-toggle, .ds-band, .wp-block-navigation { display: none !important; }
  body { background: none; color: CanvasText; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
}
