/* Master visual foundation. Change these identity tokens, not page palettes.
   A partner may override --theme-* on its verified rendering root. This sheet
   does not provide tenant authentication, persistence, or account isolation. */
:root {
  --theme-cloud: #F7F9FA;
  --theme-deep-teal: #0D4A47;
  --theme-heading: #0D2B29;
  --theme-body: #3D4A48;
  --theme-copper: #B5704A;
  --theme-retail-cta: #F77F00;
  --theme-white: #FFFFFF;
  --theme-font-heading: "Cormorant Garamond", Georgia, serif;
  --theme-font-ui: "Inter", system-ui, sans-serif;
  --theme-portrait-arch: 50% 50% 8px 8px / 40% 40% 8px 8px;
}

/* Bridge older page-local names into the one authoritative identity channel.
   Never override progress values or the isolated branding customizer's inputs. */
html body.dww-brand[data-wellness-theme],
html body.dww-brand[data-wellness-theme] * {
  --white: var(--theme-white) !important;
  --cloud: var(--theme-cloud) !important;
  --pale: var(--theme-cloud) !important;
  --mist: var(--theme-cloud) !important;
  --paper: var(--theme-cloud) !important;
  --soft: var(--theme-cloud) !important;
  --teal-pale: var(--theme-cloud) !important;
  --teal: var(--theme-deep-teal) !important;
  --teal-mid: var(--theme-deep-teal) !important;
  --mid: var(--theme-deep-teal) !important;
  --deep: var(--theme-deep-teal) !important;
  --deeper: var(--theme-heading) !important;
  --head: var(--theme-heading) !important;
  --body: var(--theme-body) !important;
  --ink: var(--theme-body) !important;
  --muted: var(--theme-body) !important;
  --mute: var(--theme-body) !important;
  --accent: var(--theme-copper) !important;
  --gold: var(--theme-copper) !important;
  --cta: var(--theme-retail-cta) !important;
  --border: color-mix(in srgb, var(--theme-deep-teal) 22%, var(--theme-cloud)) !important;
  --line: var(--border) !important;
  --edge: var(--theme-deep-teal) !important;
  --ok: var(--theme-deep-teal) !important;
  --warn: var(--theme-heading) !important;
  --bad: var(--theme-heading) !important;
  --err: var(--theme-heading) !important;
  --warnbg: var(--theme-cloud) !important;
  --badbg: var(--theme-cloud) !important;
  --sp-cream: var(--theme-cloud) !important;
  --sp-alabaster: var(--theme-cloud) !important;
  --sp-card: var(--theme-cloud) !important;
  --sp-line: var(--border) !important;
  --sp-teal: var(--theme-deep-teal) !important;
  --sp-teal-deep: var(--theme-heading) !important;
  --sp-teal-soft: var(--theme-body) !important;
  --sp-coral: var(--theme-copper) !important;
  --sp-coral-hover: var(--theme-deep-teal) !important;
  --sp-coral-press: var(--theme-heading) !important;
  --sp-label: var(--theme-heading) !important;
  --sp-dis-bg: var(--theme-cloud) !important;
  --cs-teal: var(--theme-deep-teal) !important;
  --cs-mid: var(--theme-deep-teal) !important;
  --cs-pale: var(--theme-cloud) !important;
  --cs-bd: var(--border) !important;
  --cs-head: var(--theme-heading) !important;
  --cs-acc: var(--theme-copper) !important;
  --cs-cta: var(--theme-retail-cta) !important;
  --font: var(--theme-font-ui) !important;
  --sans: var(--theme-font-ui) !important;
  --er-sans: var(--theme-font-ui) !important;
  --serif: var(--theme-font-heading) !important;
  --er-serif: var(--theme-font-heading) !important;
}

/* Extra scope specificity supersedes the legacy locked-brand presentation,
   including its important declarations, without mutating page stylesheets. */
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] {
  background: var(--theme-cloud) !important;
  color: var(--theme-body) !important;
  font-family: var(--theme-font-ui) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :where(*, *::before, *::after) {
  font-family: var(--theme-font-ui) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(h1,h2,h3,h4,h5,h6,.wordmark,.brand-text,.logo-text,.dww-wordmark,.brand-wordmark,.gx-wordmark,.hx-wordmark),
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(h1,h2,h3,h4,h5,h6,.wordmark,.brand-text,.logo-text,.dww-wordmark,.brand-wordmark,.gx-wordmark,.hx-wordmark) * {
  font-family: var(--theme-font-heading) !important;
  color: var(--theme-heading) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.wordmark,.brand-text,.logo-text,.dww-wordmark,.brand-wordmark,.gx-wordmark,.hx-wordmark) {
  color: var(--theme-deep-teal) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.wordmark,.brand-text,.logo-text,.dww-wordmark,.brand-wordmark,.gx-wordmark,.hx-wordmark) * {
  color: var(--theme-deep-teal) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(button,input,select,textarea,.price,.gx-price,.gs-price,.g-copybox,code,pre,[data-ui-label]),
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(button,input,select,textarea,[data-ui-label]) * {
  font-family: var(--theme-font-ui) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(main,section,header.top,.gx-head,.top,.hero,.gx-hero,.gs-hero,.gx-sec,.gx-tint,.gx-card,.gx-transcript,.gx-product,.gx-product-lead,.gs-limits,.card,.product,.cs-story,.foot,.gx-foot,.gs-foot) {
  background: var(--theme-cloud) !important;
  color: var(--theme-body) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(p,li,dd,dt,td,th,label,legend,small,span,strong,figcaption,.fine,.lede,.note) {
  color: var(--theme-body) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(h1,h2,h3,h4,h5,h6) :is(span,strong,a) {
  color: var(--theme-heading) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(h1,h2) :is(em,.theme-heading-accent,[data-theme-accent]) {
  color: var(--theme-copper) !important;
  font-family: var(--theme-font-heading) !important;
  font-style: italic;
  font-weight: 700;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.eyebrow,.gx-eyebrow,.gs-eyebrow,.cs-eyebrow,a) {
  color: var(--theme-deep-teal) !important;
}

/* Media frames and status chips are deliberate reversed surfaces, not canvas. */
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.cs-screen,.screen,.gx-circle,.demo-banner,.gx-status,.cs-badge,.gs-wk) {
  background: var(--theme-deep-teal) !important;
  color: var(--theme-white) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.cs-screen,.screen,.gx-circle,.demo-banner,.gx-status,.cs-badge,.gs-wk) * {
  color: var(--theme-white) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] .cs-screen .cs-caption,
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] .cs-screen .cs-caption * {
  background: var(--theme-cloud) !important;
  color: var(--theme-body) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.theme-portrait-frame,.hx-arch,.pw-image-placeholder,[data-portrait-placeholder],img[data-portrait]) {
  border-radius: var(--theme-portrait-arch) !important;
  overflow: hidden;
  object-fit: cover;
}

/* Orange is a retail channel, never an affiliate or partner registration fill. */
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.btn,.gx-btn,.gs-btn,.cs-btn,.cs-cart,.cart-btn,.play,.gx-mic) {
  background: var(--theme-deep-teal) !important;
  border-color: var(--theme-deep-teal) !important;
  color: var(--theme-white) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is([data-retail-cta],.gx-course-enroll,.gx-btn-cta) {
  background: var(--theme-retail-cta) !important;
  border-color: var(--theme-retail-cta) !important;
  color: var(--theme-heading) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.ghost,.gx-btn-ghost,.gp-trigger,.gx-partner-toggle,.partner-trigger,[data-partner-action]),
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme][data-theme-actions="partner"] :is(button,.btn,.cta,.dl,input[type="submit"],a[class*="btn"]) {
  background: transparent !important;
  border: 1px solid var(--theme-deep-teal) !important;
  color: var(--theme-deep-teal) !important;
  box-shadow: none !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(button,.btn,.gx-btn,.gs-btn,.cs-btn,.cs-cart,[data-partner-action]) :where(span,strong) {
  color: inherit !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] .cart-btn span {
  background: var(--theme-cloud) !important;
  color: var(--theme-deep-teal) !important;
}
html body.dww-brand[data-wellness-theme] :is(button,a,input,select,textarea):focus-visible {
  outline: 2px solid var(--theme-deep-teal);
  outline-offset: 3px;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(input,select,textarea) {
  color: var(--theme-body) !important;
  border-color: var(--theme-deep-teal) !important;
  accent-color: var(--theme-deep-teal);
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(input,textarea)::placeholder {
  color: var(--theme-body) !important;
}

/* Former reversed marketing panels are now part of the Cloud canvas. Reset
   their legacy descendant overrides as well as the panel itself. */
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.gx-product-lead,.gs-limits,.gx-foot,.gs-foot,.foot) :is(p,li,span,small,strong,em,div) {
  color: var(--theme-body) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.gx-product-lead,.gs-limits,.gx-foot,.gs-foot,.foot) :is(h1,h2,h3,h4,h5,h6) {
  color: var(--theme-heading) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.gx-product-lead,.gs-limits,.gx-foot,.gs-foot,.foot) :is(h1,h2) :is(em,.theme-heading-accent) {
  color: var(--theme-copper) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.gx-product-lead,.gs-limits,.gx-foot,.gs-foot,.foot) a {
  color: var(--theme-deep-teal) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.gx-product-lead,.gs-limits) :is(.gx-btn,.gs-btn) {
  color: var(--theme-white) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme] :is(.gx-product-lead,.gs-limits) :is([data-retail-cta],.gx-btn-cta) {
  color: var(--theme-heading) !important;
}

/* Independent PUBLIC action contract. Pair surface and label at the same
   specificity in EVERY state, overriding older orange-hover and generic-link
   rules. Public navigation identifies the scope; member, campaign, retail and
   partner-only screens do not acquire a new button theme.
   Topic filters deliberately retain their separate light-state contract. */
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme]:has(:where(.nav-cta[href="/resources"]))
  :is(a[class*="btn"],a[class*="button"],button,input[type="submit"],input[type="button"],a.nav-cta,a.nav-mobile-cta,a.gd-footer-cta-back) {
  --public-action-background: var(--theme-white);
  --public-action-foreground: var(--theme-deep-teal);
  --public-action-border: var(--border);
}

/* Filled educational CTAs, including reusable/legacy utilities without .btn. */
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme]:has(:where(.nav-cta[href="/resources"]))
  :is(a.btn,button.btn,a.btn-primary,button.btn-primary,a.button-primary,button.button-primary,a.wellness-button,button.wellness-button,a.nav-cta,a.nav-mobile-cta,a.pc-btn,a.pe-btn,a.ps-btn,a.pa-btn,a.hx-btn,a.ct-btn,a.cf-guides-cta,a.res-btn-primary,a.gd-cta-btn,a.gd-footer-cta-back) {
  --public-action-background: var(--theme-deep-teal);
  --public-action-foreground: var(--theme-white);
  --public-action-border: var(--theme-deep-teal);
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme]:has(:where(.nav-cta[href="/resources"]))
  :is(a.btn,button.btn,a.btn-primary,button.btn-primary,a.button-primary,button.button-primary,a.wellness-button,button.wellness-button,a.nav-cta,a.nav-mobile-cta,a.pc-btn,a.pe-btn,a.ps-btn,a.pa-btn,a.hx-btn,a.ct-btn,a.cf-guides-cta,a.res-btn-primary,a.gd-cta-btn,a.gd-footer-cta-back):is(:hover,:active) {
  --public-action-background: var(--theme-heading);
  --public-action-border: var(--theme-heading);
}

/* Explicit light roles override the filled role when utilities are combined. */
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme]:has(:where(.nav-cta[href="/resources"]))
  :is(a.btn-secondary,button.btn-secondary,a.button-secondary,button.button-secondary,a.wellness-button-secondary,button.wellness-button-secondary,a.ghost,button.ghost,a.pe-btn--ghost,a.ps-btn--ghost,a.ps-btn--light,a.ct-btn--ghost,a.hx-btn--light,a.gd-tool-btn,button.gd-share-btn,button.res-share-btn,a.res-decode-btn) {
  --public-action-background: var(--theme-white);
  --public-action-foreground: var(--theme-deep-teal);
  --public-action-border: var(--theme-deep-teal);
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme]:has(:where(.nav-cta[href="/resources"]))
  :is(a.btn-secondary,button.btn-secondary,a.button-secondary,button.button-secondary,a.wellness-button-secondary,button.wellness-button-secondary,a.ghost,button.ghost,a.pe-btn--ghost,a.ps-btn--ghost,a.ps-btn--light,a.ct-btn--ghost,a.hx-btn--light,a.gd-tool-btn,button.gd-share-btn,button.res-share-btn,a.res-decode-btn):is(:hover,:active) {
  --public-action-background: var(--theme-cloud);
  --public-action-foreground: var(--theme-deep-teal);
  --public-action-border: var(--theme-deep-teal);
}

/* Both the resting selector and explicit state selector consume the same pair.
   :visited cannot inherit the general link color; selected actions remain
   paired too, without converting the light .pe-topics controls to filled CTAs. */
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme]:has(:where(.nav-cta[href="/resources"]))
  :is(a[class*="btn"],a[class*="button"],button,input[type="submit"],input[type="button"],a.nav-cta,a.nav-mobile-cta,a.gd-footer-cta-back),
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme]:has(:where(.nav-cta[href="/resources"]))
  :is(a[class*="btn"],a[class*="button"],button,input[type="submit"],input[type="button"],a.nav-cta,a.nav-mobile-cta,a.gd-footer-cta-back):is(:link,:visited,:hover,:focus,:focus-visible,:active,[aria-current],[aria-selected],[aria-pressed],:disabled,[aria-disabled="true"]) {
  background: var(--public-action-background) !important;
  background-image: none !important;
  color: var(--public-action-foreground) !important;
  border-color: var(--public-action-border) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme]:has(:where(.nav-cta[href="/resources"]))
  :is(a[class*="btn"],a[class*="button"],button,a.nav-cta,a.nav-mobile-cta,a.gd-footer-cta-back) :where(*) {
  color: inherit !important;
}

/* Disabled is a readable light role, not opacity-based fading. No behavior,
   destination, tabindex or disabled semantics are changed by these rules. */
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme]:has(:where(.nav-cta[href="/resources"]))
  :is(a[class*="btn"],a[class*="button"],button,input[type="submit"],input[type="button"],a.nav-cta,a.nav-mobile-cta,a.gd-footer-cta-back):is(:disabled,[aria-disabled="true"]) {
  --public-action-background: var(--theme-cloud);
  --public-action-foreground: var(--theme-deep-teal);
  --public-action-border: var(--theme-deep-teal);
  opacity: 1 !important;
  filter: none !important;
  border-style: dashed !important;
  cursor: not-allowed;
}

/* Two-color keyboard ring remains visible on light AND reversed surfaces.
   In particular, a teal outline alone disappears outside a white CTA on teal.
   Existing topic outlines/selection styling are left untouched. */
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme]:has(:where(.nav-cta[href="/resources"]))
  :is(a[class*="btn"],a[class*="button"],button,input[type="submit"],input[type="button"],a.nav-cta,a.nav-mobile-cta,a.gd-footer-cta-back,.er-choices a,a.res-tool-card):focus-visible {
  outline: 3px solid var(--theme-deep-teal) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px var(--theme-white), 0 0 0 8px var(--theme-white) !important;
}

/* Reversed CTA-card copy must not inherit the generic dark heading/body rule.
   Button labels within the panel keep their own paired light/filled roles. */
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme]:has(:where(.nav-cta[href="/resources"]))
  :is(.res-decode-cta,[data-public-action-panel="dark"]) {
  background: var(--theme-deep-teal) !important;
  color: var(--theme-white) !important;
}
html body.dww-brand[data-wellness-theme][data-wellness-theme][data-wellness-theme]:has(:where(.nav-cta[href="/resources"]))
  :is(.res-decode-cta,[data-public-action-panel="dark"]) :is(h1,h2,h3,h4,p,span,strong,em):not(:where(a,button) *) {
  color: var(--theme-white) !important;
}
