/* CED Clinic contrast, dark-mode, and mobile-menu layer. Change CL-002 (H-06, H-07, H-08, M-05, M-06, M-02 part). 2026-09-10.
   Enqueued from functions.php after ced-additional.css. Rollback: restore functions.php.bak_20260910 and delete this file.
   Basis: audit/render_audit.json; prototype verified by injection (1,381 failing text nodes to 249 across 36 page views). */

:root {
  --ced-green-700: #0F6B62;
  --ced-green-800: #0B4F49;
  --ced-green-300: #7FD1B9;
  --ced-ink: #1F2933;
  --ced-ink-muted: #52606D;
  --ced-surface: #FFFFFF;
  --ced-surface-2: #F4F6F5;
  --ced-border: #D9E2DF;
  --ced-orange-700: #B84A00;
  --ced-focus: #2F6FEB;
}
html[scheme="dark"] {
  --ced-green-700: #7FD1B9;
  --ced-green-800: #A6E3D1;
  --ced-green-300: #7FD1B9;
  --ced-ink: #E6EAF0;
  --ced-ink-muted: #AAB4C0;
  --ced-surface: #111B2E;
  --ced-surface-2: #182339;
  --ced-border: #2B374D;
  --ced-orange-700: #FFB27A;
}

/* ---- Light mode ---- */
.single-content-inner a:not(.ced-button-hero):not(.ced-btn):not(.button):not(.mega-menu-link):not(.wp-block-button__link),
.entry-content a:not(.ced-button-hero):not(.ced-btn):not(.button):not(.mega-menu-link):not(.wp-block-button__link),
#af-wrapper a, .jp-relatedposts-post-a, .forum-title, .profile-link, .home-link, .subscriptions-link, .activity-link, .logout-link,
.ced-read-next__card-title, .blogsy-news-ticker-title-text, .tab-label, strong.lk, a.af,
.ced-rail-link { color: var(--ced-green-700); }
.single-content-inner a:not(.ced-button-hero):not(.ced-btn):not(.button):not(.mega-menu-link):not(.wp-block-button__link):hover, .entry-content a:not(.ced-button-hero):not(.ced-btn):not(.button):not(.mega-menu-link):not(.wp-block-button__link):hover { color: var(--ced-green-800); }
.ced-fnav-post-date, .ced-fnav-cat-sub, .ced-fnav-sec-ttl, .ced-advnav-sec-ttl, .title-text, .cedx-related-section-label { color: var(--ced-ink-muted) !important; }
.blogsy-breadcrumbs span.current, .breadcrumbs span.current { color: var(--ced-ink) !important; }
a.ced-substack-follow-link, .ced-substack-follow-link { color: var(--ced-orange-700) !important; }
/* Substack pill: keep the brand orange, switch the label and icon to near-black (7.2:1 on #FF6719); outranks the WPCode "Subscribe Button Size" snippet by specificity */
html body a.ced-substack-pill.blogsy-btn.button .ced-sub-text, html body a.ced-substack-pill .ced-sub-text, html body a.ced-substack-pill .ced-substack-icon { color: #111111 !important; text-shadow: none !important; }
html body a.ced-substack-pill.blogsy-btn.button { background-color: #FF6719 !important; }
.ced-mobile-bar-text { color: #FFFFFF !important; }
.single-content-inner a.button, .ced-article-wrap a.button, #af-wrapper a.button { background: var(--ced-green-700) !important; color: #FFFFFF !important; }
.single-content-inner a.btn:not([class*="cca-"]), .ced-discounts-page a.btn { background: var(--ced-orange-700) !important; color: #FFFFFF !important; }
td, th { color: var(--ced-ink); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ced-focus); outline-offset: 2px; }
a.ced-btn, .ced-btn, .ced-btn-primary, .ced-btn-block { background: var(--ced-green-700) !important; color: #FFFFFF !important; border-color: var(--ced-green-700) !important; }
a.ced-btn-outline, .ced-btn-outline { background: transparent !important; color: var(--ced-green-700) !important; border: 2px solid var(--ced-green-700) !important; }
.ced-advnav-cta { color: var(--ced-green-700) !important; }
.ced-mobile-bar-btn { background: #FFFFFF !important; color: #12261a !important; }

/* ---- Dark mode ---- */
html[scheme="dark"] #mega-menu-wrap-primary_menu #mega-menu-primary_menu > li.mega-menu-item > a.mega-menu-link,
html[scheme="dark"] #mega-menu-wrap-primary_menu #mega-menu-primary_menu li.mega-menu-item a.mega-menu-link { color: var(--ced-ink) !important; }
html[scheme="dark"] #mega-menu-wrap-primary_menu #mega-menu-primary_menu li.mega-menu-item a.mega-menu-link:hover,
html[scheme="dark"] #mega-menu-wrap-primary_menu #mega-menu-primary_menu li.mega-menu-item.mega-toggle-on > a.mega-menu-link { color: var(--ced-green-300) !important; background: var(--ced-surface-2) !important; }
html[scheme="dark"] #mega-menu-wrap-primary_menu #mega-menu-primary_menu ul.mega-sub-menu { background: var(--ced-surface) !important; border-color: var(--ced-border) !important; }
html[scheme="dark"] .ced-article-wrap [style*="background"]:not([style*="url("]),
html[scheme="dark"] .single-content-inner [style*="background:#fff"], html[scheme="dark"] .single-content-inner [style*="background: #fff"],
html[scheme="dark"] .single-content-inner [style*="background-color:#fff"], html[scheme="dark"] .single-content-inner [style*="background-color: #fff"],
html[scheme="dark"] .ced-perspective-lens-card, html[scheme="dark"] .cedx-related-reading-module, html[scheme="dark"] .ced-newsletter-embed,
html[scheme="dark"] .ced-color-topics-section, html[scheme="dark"] .ced-color-topics-section > div,
html[scheme="dark"] .ced-discounts-page .ced-hero, html[scheme="dark"] .ced-discounts-page section, html[scheme="dark"] .ced-discounts-page article,
html[scheme="dark"] .cca-section, html[scheme="dark"] .cca-card, html[scheme="dark"] .cca-form,
html[scheme="dark"] .ced-navtab, html[scheme="dark"] .ced-care-pill { background: var(--ced-surface-2) !important; background-image: none !important; color: var(--ced-ink) !important; border-color: var(--ced-border) !important; }
html[scheme="dark"] .ced-article-wrap [style*="background"]:not([style*="url("]) *:not(a):not(.ced-btn):not(.button),
html[scheme="dark"] .ced-perspective-lens-card *:not(a), html[scheme="dark"] .cedx-related-reading-module *:not(a),
html[scheme="dark"] .ced-color-topics-section *:not(a), html[scheme="dark"] .ced-discounts-page *:not(a):not(.ced-btn):not(.btn),
html[scheme="dark"] .cca-section *:not(a), html[scheme="dark"] .cca-form label, html[scheme="dark"] .ced-navtab__label { color: var(--ced-ink) !important; }
html[scheme="dark"] .ced-article-wrap [style*="color:#"], html[scheme="dark"] .ced-article-wrap [style*="color: #"] { color: var(--ced-ink) !important; }
html[scheme="dark"] .cedx-related-desc, html[scheme="dark"] .ced-pl-strip-label { color: var(--ced-ink-muted) !important; }
html[scheme="dark"] details.cedm-faq-item, html[scheme="dark"] .newsjack-faq .cedm-faq-item { background: var(--ced-surface-2) !important; border-color: var(--ced-border) !important; }
html[scheme="dark"] details.cedm-faq-item summary, html[scheme="dark"] .cedm-faq-item summary, html[scheme="dark"] .cedm-faq-item p,
html[scheme="dark"] .rank-math-answer, html[scheme="dark"] .rank-math-question { color: var(--ced-ink) !important; }
html[scheme="dark"] #af-wrapper .forum-stats, html[scheme="dark"] #af-wrapper .forum-lastpost-small, html[scheme="dark"] #af-wrapper .no-topics,
html[scheme="dark"] #af-wrapper .element-name, html[scheme="dark"] #af-wrapper .title-element { color: var(--ced-ink-muted) !important; }
html[scheme="dark"] #af-wrapper .forum-title, html[scheme="dark"] #af-wrapper a { color: var(--ced-green-300) !important; }
html[scheme="dark"] #af-wrapper .content-container, html[scheme="dark"] #af-wrapper .forum, html[scheme="dark"] #af-wrapper .topic { background: var(--ced-surface) !important; border-color: var(--ced-border) !important; }
html[scheme="dark"] #ced-fnav, html[scheme="dark"] #ced-fnav-wrap { background: var(--ced-surface) !important; color: var(--ced-ink) !important; border-color: var(--ced-border) !important; }
html[scheme="dark"] .ced-fnav-post-date, html[scheme="dark"] .ced-fnav-cat-sub, html[scheme="dark"] .ced-fnav-sec-ttl { color: var(--ced-ink-muted) !important; }
html[scheme="dark"] a.ced-button-hero { background: var(--ced-green-700) !important; color: #0B1220 !important; }
html[scheme="dark"] a.ced-btn, html[scheme="dark"] .ced-code-badge { background: var(--ced-green-700) !important; color: #0B1220 !important; }
html[scheme="dark"] .single-content-inner img[src$=".png"]:not(.blogsy-logo-image):not(.dark-logo):not(.wp-post-image):not(.attachment-full):not(.size-full):not(.ced-hero-image) { background: #F4F6F5; border-radius: 8px; padding: 4px; }
html[scheme="dark"] .ced-fnav-cat-name, html[scheme="dark"] .ced-fnav-post-cat, html[scheme="dark"] #ced-fnav a, html[scheme="dark"] #ced-fnav div { color: var(--ced-ink) !important; }
html[scheme="dark"] [class^="ced-pl-"], html[scheme="dark"] .ced-pl-strip, html[scheme="dark"] .ced-pl-panel { background: var(--ced-surface-2) !important; color: var(--ced-ink) !important; border-color: var(--ced-border) !important; }
html[scheme="dark"] button.ced-pl-btn { background: var(--ced-surface) !important; color: var(--ced-green-300) !important; border: 1px solid var(--ced-border) !important; }
html[scheme="dark"] a.btn, html[scheme="dark"] a[class*="lightbox-"], html[scheme="dark"] a.button.more-articles, html[scheme="dark"] .ced-code-badge, html[scheme="dark"] a.ced-mobile-bar-btn { background: var(--ced-green-300) !important; color: #0B1220 !important; }
html[scheme="dark"] #toc_container, html[scheme="dark"] .toc_title, html[scheme="dark"] #toc_container a { background: var(--ced-surface-2) !important; color: var(--ced-ink) !important; }
html[scheme="dark"] details, html[scheme="dark"] summary, html[scheme="dark"] details p { background: var(--ced-surface-2) !important; color: var(--ced-ink) !important; }
html[scheme="dark"] .ced-cta-subtitle, html[scheme="dark"] .cca-mobile-intro, html[scheme="dark"] .cca-eyebrow, html[scheme="dark"] .cca-mobile-text-link, html[scheme="dark"] .cca-section-note, html[scheme="dark"] .forum-description, html[scheme="dark"] .element-number, html[scheme="dark"] #af-wrapper i, html[scheme="dark"] #af-wrapper small, html[scheme="dark"] .title-text { color: var(--ced-ink-muted) !important; }
html[scheme="dark"] .cca-button, html[scheme="dark"] .cca-button.cca-secondary { background: var(--ced-surface) !important; color: var(--ced-green-300) !important; border-color: var(--ced-border) !important; }
html[scheme="dark"] body a.ced-substack-pill .ced-sub-text, html[scheme="dark"] body a.ced-substack-pill .ced-substack-icon { color: #111111 !important; text-shadow: none; }
html[scheme="dark"] .single-content-inner span[style*="color"], html[scheme="dark"] .single-content-inner strong[style*="color"], html[scheme="dark"] .single-content-inner p[style*="color"], html[scheme="dark"] .single-content-inner div[style*="color"] { color: var(--ced-ink) !important; }
html[scheme="dark"] .single-content-inner [style*="background:#"]:not([style*="url("]), html[scheme="dark"] .single-content-inner [style*="background: #"]:not([style*="url("]),
html[scheme="dark"] .single-content-inner [style*="background-color:#"]:not([style*="url("]), html[scheme="dark"] .single-content-inner [style*="background-color: #"]:not([style*="url("]),
html[scheme="dark"] .single-content-inner [style*="linear-gradient"]:not([style*="url("]), html[scheme="dark"] .single-content-inner [style*="background:rgb"]:not([style*="url("]), html[scheme="dark"] .single-content-inner [style*="background: rgb"]:not([style*="url("]) { background: var(--ced-surface-2) !important; background-image: none !important; color: var(--ced-ink) !important; border-color: var(--ced-border) !important; }
html[scheme="dark"] .single-content-inner [style*="background:#"] *, html[scheme="dark"] .single-content-inner [style*="background: #"] *, html[scheme="dark"] .single-content-inner [style*="linear-gradient"] * { color: var(--ced-ink) !important; }
html[scheme="dark"] .single-content-inner [style*="background:#"] a, html[scheme="dark"] .single-content-inner [style*="background: #"] a, html[scheme="dark"] .cedx-related-reading-module a { color: var(--ced-green-300) !important; }
html[scheme="dark"] a.ced-button-hero, html[scheme="dark"] a.ced-button-hero *, html[scheme="dark"] .ced-fnav-btn, html[scheme="dark"] .ced-fnav-btn * { color: #0B1220 !important; }
html[scheme="dark"] .ced-color-topics-section span[style*="background"] { background: var(--ced-surface) !important; color: var(--ced-ink) !important; }
html[scheme="dark"] .single-content-inner img[style*="background"] { background: #F4F6F5 !important; }

/* ---- Phone menu opens expanded; header and overflow fixes ---- */
@media (max-width: 1024px) {
  .offcanvas-content #mega-menu-wrap-primary_menu .mega-menu-toggle { display: none !important; }
  .offcanvas-content #mega-menu-wrap-primary_menu #mega-menu-primary_menu { display: block !important; position: static !important; width: 100% !important; }
  .offcanvas-content #mega-menu-primary_menu > li.mega-menu-item { display: block !important; width: 100% !important; border-bottom: 1px solid var(--ced-border, #D9E2DF); }
  .offcanvas-content #mega-menu-primary_menu > li.mega-menu-item > a.mega-menu-link { display: flex !important; align-items: center; min-height: 48px !important; line-height: 1.3 !important; padding: 12px 16px !important; font-size: 17px !important; font-weight: 600; }
  .offcanvas-content #mega-menu-primary_menu li.mega-menu-item ul.mega-sub-menu { position: static !important; display: none; width: 100% !important; padding: 0 0 8px 16px !important; box-shadow: none !important; }
  .offcanvas-content #mega-menu-primary_menu li.mega-menu-item.mega-toggle-on > ul.mega-sub-menu { display: block !important; }
  .offcanvas-content #mega-menu-primary_menu li.mega-menu-item ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link { min-height: 44px !important; padding: 10px 12px !important; font-size: 16px !important; font-weight: 400; }
  .offcanvas-content nav.blogsy-header-v-nav-wrapper, .offcanvas-content #mega-menu-wrap-primary_menu { width: 100% !important; margin: 0 !important; }
  .offcanvas-content #mega-menu-wrap-primary_menu #mega-menu-primary_menu { background: var(--ced-surface, #fff) !important; }
  .offcanvas-content #mega-menu-primary_menu > li.mega-menu-item > a.mega-menu-link { color: var(--ced-ink, #1F2933) !important; background: transparent !important; }
  .offcanvas-content #mega-menu-primary_menu li.mega-menu-item ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link { color: var(--ced-ink, #1F2933) !important; background: transparent !important; }
  .offcanvas-content .pt-logo { padding: 8px 0 12px; }
  .offcanvas-content .site-description { display: none; }
  .offcanvas-container { overflow-y: auto !important; -webkit-overflow-scrolling: touch; }
  .offcanvas-content #mega-menu-primary_menu a.mega-menu-link:focus-visible { outline: 3px solid var(--ced-focus, #2F6FEB) !important; outline-offset: -2px; }
}
@media (max-width: 767px) { .pt-header-container .mega-menu-toggle { display: none !important; } }
.blogsy-news-ticker-items { overflow: hidden !important; }
.blogsy-news-ticker-item .item-title a { white-space: nowrap; }
@media (max-width: 767px) { .cca-ambient, .cca-ambient-b { max-width: 100vw; overflow: hidden; } }
.grecaptcha-badge { bottom: 96px !important; }
@media (min-width: 768px) { .wpconsent-container, .wpconsent-banner, .wpconsent-banner-holder, #wpconsent-root .wpconsent-banner-holder, .wpconsent-banner-holder-top { top: auto !important; bottom: 16px !important; } }
@media (max-width: 767px) {
  .blogsy-social-icons a, .blogsy-social-icons-widget a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .cat-links a, .entry-meta a, .post-meta a, .blogsy-entry-meta a { padding: 6px 8px; display: inline-block; }
  .blogsy-news-ticker-item a { padding: 8px 4px; display: inline-block; }
}
/* Horizontal overflow safety net (ticker wrapper on archives; Mailchimp banner and hero heading on phones) */
html, body { overflow-x: hidden; }
.blogsy-news-ticker-wrapper, .blogsy-card-items.blogsy-news-ticker-wrapper { overflow: hidden !important; max-width: 100%; }
.mc-banner, .mc-layout__bannerContent { max-width: 100vw !important; box-sizing: border-box; }
@media (max-width: 767px) { .cca-mobile-hero h1, .cca-mobile-hero h1 span { max-width: 100%; overflow-wrap: anywhere; } }
