/* =========================================================
   CM Academy Dark Theme
   - Default site remains light.
   - Dark theme activates only when html[data-cm-theme="dark"] exists.
   - Preference is saved on the user's device with localStorage.
   - Main public navbar intentionally keeps the current light design.
   ========================================================= */

.cm-theme-toggle {
  border: 1px solid rgba(160, 33, 73, .16);
  background: rgba(251, 237, 242, .82);
  color: #3d0d22;
  font: inherit;
  font-size: .88rem;
  font-weight: 650;
  line-height: 1.2;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.cm-theme-toggle:hover {
  background: #fff;
  border-color: rgba(160, 33, 73, .28);
  box-shadow: 0 10px 24px rgba(61, 13, 34, .08);
  transform: translateY(-1px);
}
.cm-theme-toggle-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: #a02149;
  font-size: .86rem;
  line-height: 1;
}
.cm-theme-toggle-text { font-size: .86rem; }

html[data-cm-theme="dark"] {
  color-scheme: dark;
  --cm-red: #ff7aa2;
  --cm-red-2: #ff8cac;
  --cm-red-dark: #ffd3df;
  --cm-red-soft: rgba(255, 122, 162, .14);
  --cm-ink: #f4f7ff;
  --cm-muted: #bbc4d9;
  --cm-bg: #0f1118;
  --cm-white: #171b25;
  --cm-card: rgba(24, 29, 41, .88);
  --cm-card-solid: #1a2030;
  --cm-border: rgba(219, 228, 255, .14);
  --cm-border-strong: rgba(255, 122, 162, .32);
  --cm-shadow: 0 24px 70px rgba(0, 0, 0, .46);
  --cm-shadow-soft: 0 14px 42px rgba(0, 0, 0, .34);
}

html[data-cm-theme="dark"] body {
  color: var(--cm-ink);
  background:
    radial-gradient(circle at top left, rgba(255, 122, 162, .10), transparent 34rem),
    radial-gradient(circle at 80% 8%, rgba(125, 184, 255, .09), transparent 28rem),
    linear-gradient(180deg, #0f1118, #111522 48%, #0d1018);
}
html[data-cm-theme="dark"] p,
html[data-cm-theme="dark"] li,
html[data-cm-theme="dark"] small,
html[data-cm-theme="dark"] span { color: inherit; }
html[data-cm-theme="dark"] p { color: var(--cm-muted); }
html[data-cm-theme="dark"] strong { color: #fff; }
html[data-cm-theme="dark"] a { color: inherit; }
html[data-cm-theme="dark"] hr { border-color: var(--cm-border); }

/* Keep the main public navbar visually light as requested */
html[data-cm-theme="dark"] .cm-site-header {
  --cm-red: #a02149;
  --cm-red-2: #c92b55;
  --cm-red-dark: #3d0d22;
  --cm-red-soft: #fbedf2;
  --cm-ink: #201821;
  --cm-muted: #625863;
  --cm-bg: #fffafb;
  --cm-white: #ffffff;
  --cm-card: rgba(255, 255, 255, .78);
  --cm-card-solid: #ffffff;
  --cm-border: rgba(160, 33, 73, .13);
  --cm-border-strong: rgba(160, 33, 73, .22);
  --cm-shadow-soft: 0 12px 34px rgba(61, 13, 34, .09);
  color: #2a2029;
}
html[data-cm-theme="dark"] .cm-topbar {
  background: linear-gradient(90deg, #3b0b20, #a02149, #7d1739);
  color: #fff;
}
html[data-cm-theme="dark"] .cm-navbar {
  background: rgba(255, 255, 255, .86);
  border-bottom-color: rgba(160, 33, 73, .10);
  box-shadow: 0 12px 34px rgba(61, 13, 34, .055);
}
html[data-cm-theme="dark"] .cm-nav-menu > a,
html[data-cm-theme="dark"] .cm-dropdown > button { color: #2a2029; }
html[data-cm-theme="dark"] .cm-dropdown-menu {
  background: rgba(255, 255, 255, .98);
  border-color: rgba(160, 33, 73, .13);
  box-shadow: 0 24px 70px rgba(61, 13, 34, .16);
}
html[data-cm-theme="dark"] .cm-dropdown-menu a { color: #625863; }
html[data-cm-theme="dark"] .cm-dropdown-menu a:hover { color: #3d0d22; background: #fbedf2; }
html[data-cm-theme="dark"] .cm-site-header .cm-theme-toggle {
  background: #26131d;
  border-color: rgba(160, 33, 73, .28);
  color: #fff;
}
html[data-cm-theme="dark"] .cm-site-header .cm-theme-toggle-icon {
  background: #ffdce7;
  color: #7d1739;
}
html[data-cm-theme="dark"] .cm-site-header .cm-nav-toggle { background: #fbedf2; }
html[data-cm-theme="dark"] .cm-site-header .cm-nav-toggle span { background: #3d0d22; }
@media (max-width: 900px) {
  html[data-cm-theme="dark"] .cm-site-header .cm-nav-menu {
    background: rgba(255, 255, 255, .985);
    border-color: rgba(160, 33, 73, .13);
  }
  .cm-theme-toggle { width: 100%; justify-content: flex-start; padding: 10px 12px; }
}

/* Shared dark surface system */
html[data-cm-theme="dark"] .cm-glass,
html[data-cm-theme="dark"] .cm-course-card,
html[data-cm-theme="dark"] .cm-final-cta-card,
html[data-cm-theme="dark"] .cm-footer-card,
html[data-cm-theme="dark"] .cm-contact-form,
html[data-cm-theme="dark"] .cm-lesson-main,
html[data-cm-theme="dark"] .cm-course-sidebar,
html[data-cm-theme="dark"] .cm-ad-box,
html[data-cm-theme="dark"] .cm-question-box,
html[data-cm-theme="dark"] .cm-caremedox-cta,
html[data-cm-theme="dark"] .cm-public-card,
html[data-cm-theme="dark"] .cm-public-aside-card,
html[data-cm-theme="dark"] .cm-community-search,
html[data-cm-theme="dark"] .cm-community-ask,
html[data-cm-theme="dark"] .cm-community-question,
html[data-cm-theme="dark"] .cm-community-empty,
html[data-cm-theme="dark"] .cm-community-side,
html[data-cm-theme="dark"] .cm-portal-card,
html[data-cm-theme="dark"] .cm-auth-card,
html[data-cm-theme="dark"] .cm-portal-table,
html[data-cm-theme="dark"] .cm-comment-thread,
html[data-cm-theme="dark"] .cm-message-card,
html[data-cm-theme="dark"] .cm-submission-card {
  background: var(--cm-card) !important;
  border-color: var(--cm-border) !important;
  box-shadow: var(--cm-shadow-soft) !important;
  color: var(--cm-ink) !important;
}
html[data-cm-theme="dark"] .cm-site-header .cm-glass { background: rgba(255,255,255,.82) !important; color: #2a2029 !important; }

html[data-cm-theme="dark"] :where(h1,h2,h3,h4,h5,h6),
html[data-cm-theme="dark"] .cm-course-card h3,
html[data-cm-theme="dark"] .cm-course-card h4,
html[data-cm-theme="dark"] .cm-contact-form h2,
html[data-cm-theme="dark"] .cm-footer-grid h3,
html[data-cm-theme="dark"] .cm-lesson-main h1,
html[data-cm-theme="dark"] .lesson-section h2,
html[data-cm-theme="dark"] .cm-public-card h2,
html[data-cm-theme="dark"] .cm-public-card h3,
html[data-cm-theme="dark"] .cm-community-hero-card h1,
html[data-cm-theme="dark"] .cm-community-side h2,
html[data-cm-theme="dark"] .cm-meta strong,
html[data-cm-theme="dark"] .cm-empty-chat strong {
  color: #f7f9ff !important;
}
html[data-cm-theme="dark"] .lesson-heading,
html[data-cm-theme="dark"] .cm-public-hero-card h1 {
  color: #fff !important;
}
html[data-cm-theme="dark"] .cm-kicker,
html[data-cm-theme="dark"] .cm-level,
html[data-cm-theme="dark"] .cm-badge {
  background: rgba(255, 122, 162, .16) !important;
  border-color: rgba(255, 122, 162, .26) !important;
  color: #ffc6d6 !important;
}
html[data-cm-theme="dark"] .cm-btn-soft,
html[data-cm-theme="dark"] .cm-portal-btn-soft {
  background: rgba(255, 255, 255, .08) !important;
  border-color: var(--cm-border) !important;
  color: #f2f5ff !important;
}
html[data-cm-theme="dark"] .cm-btn-primary,
html[data-cm-theme="dark"] .cm-portal-btn,
html[data-cm-theme="dark"] .cm-nav-cta {
  box-shadow: 0 16px 36px rgba(255, 122, 162, .18) !important;
}

/* Inputs/forms */
html[data-cm-theme="dark"] input,
html[data-cm-theme="dark"] select,
html[data-cm-theme="dark"] textarea,
html[data-cm-theme="dark"] .cm-contact-form input,
html[data-cm-theme="dark"] .cm-contact-form select,
html[data-cm-theme="dark"] .cm-contact-form textarea,
html[data-cm-theme="dark"] .cm-community-search input,
html[data-cm-theme="dark"] .cm-community-search select,
html[data-cm-theme="dark"] .cm-community-form input,
html[data-cm-theme="dark"] .cm-community-form textarea,
html[data-cm-theme="dark"] .cm-portal-form input,
html[data-cm-theme="dark"] .cm-portal-form select,
html[data-cm-theme="dark"] .cm-portal-form textarea,
html[data-cm-theme="dark"] .cm-chat-user-search input,
html[data-cm-theme="dark"] .cm-chat-user-search select,
html[data-cm-theme="dark"] .cm-chat-filters input {
  background: rgba(9, 12, 20, .72) !important;
  border-color: rgba(219, 228, 255, .18) !important;
  color: #f5f7ff !important;
}
html[data-cm-theme="dark"] input::placeholder,
html[data-cm-theme="dark"] textarea::placeholder { color: rgba(219, 228, 255, .50) !important; }
html[data-cm-theme="dark"] label,
html[data-cm-theme="dark"] .cm-community-search label,
html[data-cm-theme="dark"] .cm-community-form label,
html[data-cm-theme="dark"] .cm-portal-form label { color: #d3daec !important; }

/* Lesson pages */
html[data-cm-theme="dark"] .cm-lesson-shell { background: transparent !important; }
html[data-cm-theme="dark"] .cm-lesson-topline,
html[data-cm-theme="dark"] .cm-sidebar-current small,
html[data-cm-theme="dark"] .cm-lesson-author-box { color: #b8c1d9 !important; }
html[data-cm-theme="dark"] .cm-lesson-author-box b { color: #dfe6f8 !important; }
html[data-cm-theme="dark"] .cm-lesson-link { color: #c8d1e8 !important; border-color: transparent !important; }
html[data-cm-theme="dark"] .cm-lesson-link:hover { background: rgba(255, 255, 255, .07) !important; color: #fff !important; }
html[data-cm-theme="dark"] .cm-lesson-link span { background: rgba(255, 122, 162, .16) !important; color: #ffc6d6 !important; }
html[data-cm-theme="dark"] .cm-lesson-link.is-active {
  background: linear-gradient(135deg, #d43c69, #8c54ff) !important;
  color: #fff !important;
}
html[data-cm-theme="dark"] .cm-sidebar-current { background: rgba(10, 13, 22, .50) !important; border-color: var(--cm-border) !important; }
html[data-cm-theme="dark"] .cm-content-ad,
html[data-cm-theme="dark"] .cm-community-ad {
  background: rgba(19, 24, 35, .70) !important;
  border-color: rgba(255, 122, 162, .28) !important;
  color: var(--cm-muted) !important;
}

/* Lesson content color variations with readable contrast */
html[data-cm-theme="dark"] .content-section { background: rgba(24, 29, 41, .88) !important; border-color: var(--cm-border) !important; color: var(--cm-ink) !important; }
html[data-cm-theme="dark"] .content-section.section-red,
html[data-cm-theme="dark"] .addoninfo.addon-red,
html[data-cm-theme="dark"] .do-red { background: #3a1724 !important; border-color: #ff7aa2 !important; color: #ffe9f0 !important; }
html[data-cm-theme="dark"] .content-section.section-blue,
html[data-cm-theme="dark"] .addoninfo.addon-blue,
html[data-cm-theme="dark"] .do-blue { background: #11243b !important; border-color: #7db8ff !important; color: #e4f1ff !important; }
html[data-cm-theme="dark"] .content-section.section-green,
html[data-cm-theme="dark"] .addoninfo.addon-green,
html[data-cm-theme="dark"] .do-green { background: #113323 !important; border-color: #7ee89d !important; color: #e6ffee !important; }
html[data-cm-theme="dark"] .content-section.section-purple,
html[data-cm-theme="dark"] .addoninfo.addon-purple,
html[data-cm-theme="dark"] .do-purple { background: #271b40 !important; border-color: #c99cff !important; color: #f1e9ff !important; }
html[data-cm-theme="dark"] .content-section.section-orange,
html[data-cm-theme="dark"] .addoninfo.addon-orange,
html[data-cm-theme="dark"] .do-orange { background: #3b2914 !important; border-color: #ffca7a !important; color: #fff2dd !important; }
html[data-cm-theme="dark"] .section-red :is(h1,h2,h3,h4,h5,h6),
html[data-cm-theme="dark"] .addon-red :is(h1,h2,h3,h4,h5,h6) { color: #ff9db9 !important; }
html[data-cm-theme="dark"] .section-blue :is(h1,h2,h3,h4,h5,h6),
html[data-cm-theme="dark"] .addon-blue :is(h1,h2,h3,h4,h5,h6) { color: #96caff !important; }
html[data-cm-theme="dark"] .section-green :is(h1,h2,h3,h4,h5,h6),
html[data-cm-theme="dark"] .addon-green :is(h1,h2,h3,h4,h5,h6) { color: #91f4ae !important; }
html[data-cm-theme="dark"] .section-purple :is(h1,h2,h3,h4,h5,h6),
html[data-cm-theme="dark"] .addon-purple :is(h1,h2,h3,h4,h5,h6) { color: #d8bbff !important; }
html[data-cm-theme="dark"] .section-orange :is(h1,h2,h3,h4,h5,h6),
html[data-cm-theme="dark"] .addon-orange :is(h1,h2,h3,h4,h5,h6) { color: #ffd38c !important; }
html[data-cm-theme="dark"] .cm-lesson-content p,
html[data-cm-theme="dark"] .cm-lesson-content li,
html[data-cm-theme="dark"] .addoninfo > p,
html[data-cm-theme="dark"] .example-content { color: #d7deee !important; }
html[data-cm-theme="dark"] .headings { color: #f7f9ff !important; border-bottom-color: rgba(219, 228, 255, .16) !important; }
html[data-cm-theme="dark"] .quote blockquote::before { color: rgba(255,255,255,.55) !important; }

/* Tables */
html[data-cm-theme="dark"] table,
html[data-cm-theme="dark"] .modern-table-red,
html[data-cm-theme="dark"] .modern-table-blue,
html[data-cm-theme="dark"] .my-fix-table { background: #121722 !important; color: #e9eefc !important; }
html[data-cm-theme="dark"] th,
html[data-cm-theme="dark"] td,
html[data-cm-theme="dark"] .modern-table-red tbody td,
html[data-cm-theme="dark"] .modern-table-blue tbody td,
html[data-cm-theme="dark"] .my-fix-table th,
html[data-cm-theme="dark"] .my-fix-table td { color: #e9eefc !important; border-color: rgba(219, 228, 255, .12) !important; }
html[data-cm-theme="dark"] th { background: rgba(255, 122, 162, .15) !important; color: #ffd3df !important; }
html[data-cm-theme="dark"] .modern-table-blue thead th { background: #245f9f !important; color: #fff !important; }
html[data-cm-theme="dark"] .modern-table-red thead th { background: #b92f57 !important; color: #fff !important; }
html[data-cm-theme="dark"] .modern-table-blue tbody tr,
html[data-cm-theme="dark"] .modern-table-red tbody tr { border-color: rgba(219, 228, 255, .13) !important; }
html[data-cm-theme="dark"] .my-fix-table tr:nth-child(odd) { background: rgba(255, 202, 122, .12) !important; }

/* Public pages */
html[data-cm-theme="dark"] .cm-public-page,
html[data-cm-theme="dark"] .cm-community-page { background: transparent !important; }
html[data-cm-theme="dark"] .cm-public-hero-card,
html[data-cm-theme="dark"] .cm-community-hero-card {
  background: linear-gradient(135deg, #1a2030, #3a1724 62%, #2f2351) !important;
  border: 1px solid var(--cm-border) !important;
  box-shadow: var(--cm-shadow-soft) !important;
}
html[data-cm-theme="dark"] .cm-public-hero-card p,
html[data-cm-theme="dark"] .cm-community-hero-card p { color: #d8deee !important; }
html[data-cm-theme="dark"] .cm-public-note,
html[data-cm-theme="dark"] .cm-public-warning { background: rgba(255, 122, 162, .10) !important; border-color: rgba(255, 122, 162, .40) !important; }

/* Community */
html[data-cm-theme="dark"] .cm-community-alert { background: var(--cm-card-solid) !important; color: var(--cm-ink) !important; border-color: var(--cm-border) !important; }
html[data-cm-theme="dark"] .cm-community-alert-success { background:#12331f !important; color:#a4f5bb !important; border-color:#7ee89d !important; }
html[data-cm-theme="dark"] .cm-community-alert-error { background:#3a1724 !important; color:#ffc4d5 !important; border-color:#ff7aa2 !important; }
html[data-cm-theme="dark"] .cm-community-question-meta,
html[data-cm-theme="dark"] .cm-community-response-meta { color: #b8c1d9 !important; }
html[data-cm-theme="dark"] .cm-community-response { background: rgba(255,255,255,.055) !important; border-color: var(--cm-border) !important; }

/* Portal */
html[data-cm-theme="dark"] .cm-portal-body { background: #0f1118 !important; color: var(--cm-ink) !important; }
html[data-cm-theme="dark"] .cm-portal-shell { background: transparent !important; }
html[data-cm-theme="dark"] .cm-portal-sidebar {
  background: rgba(18, 22, 32, .96) !important;
  border-color: var(--cm-border) !important;
  box-shadow: var(--cm-shadow-soft) !important;
}
html[data-cm-theme="dark"] .cm-portal-main { background: transparent !important; }
html[data-cm-theme="dark"] .cm-portal-top h1 { color: #f7f9ff !important; }
html[data-cm-theme="dark"] .cm-portal-nav a { color: #c8d1e8 !important; }
html[data-cm-theme="dark"] .cm-portal-nav a:hover,
html[data-cm-theme="dark"] .cm-portal-nav a.is-active { color: #fff !important; background: linear-gradient(135deg, #d43c69, #8c54ff) !important; }
html[data-cm-theme="dark"] .cm-portal-user-mini { background: rgba(255,255,255,.06) !important; border-color: var(--cm-border) !important; }
html[data-cm-theme="dark"] .cm-portal-user-mini strong { color: #fff !important; }
html[data-cm-theme="dark"] .cm-portal-user-mini span { color: #b8c1d9 !important; }
html[data-cm-theme="dark"] .cm-portal-alert-success { background:#12331f !important; color:#a4f5bb !important; border-color:#7ee89d !important; }
html[data-cm-theme="dark"] .cm-portal-alert-error { background:#3a1724 !important; color:#ffc4d5 !important; border-color:#ff7aa2 !important; }
html[data-cm-theme="dark"] .cm-admin-reply,
html[data-cm-theme="dark"] .cm-reply-card,
html[data-cm-theme="dark"] .cm-quoted-message,
html[data-cm-theme="dark"] .cm-reply-preview,
html[data-cm-theme="dark"] .cm-empty-chat { background: rgba(255, 255, 255, .06) !important; border-color: var(--cm-border) !important; color: var(--cm-muted) !important; }
html[data-cm-theme="dark"] .cm-message-card.is-me { background: linear-gradient(135deg, rgba(255,122,162,.16), rgba(140,84,255,.12)) !important; }
html[data-cm-theme="dark"] .cm-message-card.is-other { background: rgba(255,255,255,.055) !important; }
html[data-cm-theme="dark"] .cm-team-mini { background: rgba(255,122,162,.16) !important; color: #ffc6d6 !important; }
html[data-cm-theme="dark"] .cm-portal-theme-toggle {
  margin-left: auto;
  background: rgba(255,255,255,.08);
  border-color: var(--cm-border);
  color: #f4f7ff;
}
html[data-cm-theme="dark"] .cm-portal-theme-toggle .cm-theme-toggle-icon { background: rgba(255,255,255,.11); color: #ffd3df; }

/* Misc hard-coded white/light pieces */
html[data-cm-theme="dark"] .cm-hero-panel,
html[data-cm-theme="dark"] .cm-hero-panel div,
html[data-cm-theme="dark"] .cm-auth-guide,
html[data-cm-theme="dark"] .cm-portal-inline-form,
html[data-cm-theme="dark"] .cm-chat-user-search,
html[data-cm-theme="dark"] .cm-chat-filters,
html[data-cm-theme="dark"] .cm-chat-compose,
html[data-cm-theme="dark"] .cm-chat-scroll {
  background: rgba(255,255,255,.055) !important;
  border-color: var(--cm-border) !important;
  color: var(--cm-ink) !important;
}
html[data-cm-theme="dark"] .cm-hero-panel strong { color: #fff !important; }
html[data-cm-theme="dark"] .cm-hero-panel span { color: #cbd4e8 !important; }
html[data-cm-theme="dark"] .cm-footer-grid a,
html[data-cm-theme="dark"] .cm-footer-contact a,
html[data-cm-theme="dark"] .cm-public-aside-card a,
html[data-cm-theme="dark"] .cm-file-link { color: #d6deef !important; }
html[data-cm-theme="dark"] .cm-footer-grid a:hover,
html[data-cm-theme="dark"] .cm-public-aside-card a:hover,
html[data-cm-theme="dark"] .cm-file-link:hover { color: #ffb0c8 !important; }

@media (max-width: 700px) {
  .cm-theme-toggle-text { font-size: .84rem; }
  html[data-cm-theme="dark"] .cm-portal-top { gap: 10px; }
  html[data-cm-theme="dark"] .cm-portal-theme-toggle { margin-left: 0; width: auto; }
}


/* Dark fix v2: stronger mobile menu + toggle contrast */
html[data-cm-theme="dark"] .cm-site-header .cm-nav-menu .cm-theme-toggle {
  background: #3d0d22 !important;
  color: #ffffff !important;
  border-color: rgba(160, 33, 73, .34) !important;
}
html[data-cm-theme="dark"] .cm-site-header .cm-nav-menu .cm-theme-toggle-icon {
  background: #ffdce7 !important;
  color: #7d1739 !important;
}
html[data-cm-theme="dark"] body:not(.cm-portal-body) main,
html[data-cm-theme="dark"] .cm-main,
html[data-cm-theme="dark"] #main-content {
  color: var(--cm-ink);
}

/* =========================================================
   Dark theme visibility fix v3
   Goal: true black/dark transparent background + light readable accents.
   This section intentionally overrides earlier dark rules.
   ========================================================= */
html[data-cm-theme="dark"] {
  --cm-dark-page: #030711;
  --cm-dark-page-2: #070b16;
  --cm-dark-surface: rgba(13, 18, 31, .88);
  --cm-dark-surface-2: rgba(18, 26, 43, .82);
  --cm-dark-surface-solid: #111827;
  --cm-dark-border: rgba(226, 232, 240, .16);
  --cm-dark-border-soft: rgba(226, 232, 240, .09);
  --cm-dark-text: #f8fafc;
  --cm-dark-text-2: #e5edf9;
  --cm-dark-muted: #cbd5e1;
  --cm-dark-soft: #aebbd0;
  --cm-dark-red: #ff8ab0;
  --cm-dark-blue: #8fcaff;
  --cm-dark-green: #8ff0b1;
  --cm-dark-purple: #d5b6ff;
  --cm-dark-orange: #ffd38a;
  --cm-dark-pink: #ffb7d0;
  --cm-bg: #030711;
  --cm-card: rgba(13, 18, 31, .88);
  --cm-card-solid: #111827;
  --cm-ink: #f8fafc;
  --cm-muted: #cbd5e1;
  --cm-border: rgba(226, 232, 240, .16);
  --cm-border-strong: rgba(255, 138, 176, .42);
}

html[data-cm-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 5%, rgba(255, 138, 176, .12), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(143, 202, 255, .10), transparent 30rem),
    linear-gradient(180deg, var(--cm-dark-page), var(--cm-dark-page-2) 46%, #02050c) !important;
  color: var(--cm-dark-text) !important;
}

html[data-cm-theme="dark"] body:not(.cm-portal-body) main,
html[data-cm-theme="dark"] .cm-main,
html[data-cm-theme="dark"] #main-content,
html[data-cm-theme="dark"] .cm-section,
html[data-cm-theme="dark"] .cm-courses-section,
html[data-cm-theme="dark"] .cm-final-cta,
html[data-cm-theme="dark"] .cm-lesson-shell,
html[data-cm-theme="dark"] .cm-public-page,
html[data-cm-theme="dark"] .cm-community-page {
  background: transparent !important;
  color: var(--cm-dark-text) !important;
}

html[data-cm-theme="dark"] :where(p, li, dd, small, span, div) {
  color: inherit;
}
html[data-cm-theme="dark"] :where(p, li, dd) {
  color: var(--cm-dark-muted) !important;
}
html[data-cm-theme="dark"] :where(h1,h2,h3,h4,h5,h6,strong,b) {
  color: var(--cm-dark-text) !important;
}
html[data-cm-theme="dark"] .cm-muted,
html[data-cm-theme="dark"] .cm-course-subtitle,
html[data-cm-theme="dark"] .cm-lesson-author-box,
html[data-cm-theme="dark"] .cm-lesson-topline,
html[data-cm-theme="dark"] .cm-public-card p,
html[data-cm-theme="dark"] .cm-community-question-meta,
html[data-cm-theme="dark"] .cm-community-response-meta {
  color: var(--cm-dark-soft) !important;
}

/* Keep top navbar light, but make its mobile menu readable. */
html[data-cm-theme="dark"] .cm-site-header,
html[data-cm-theme="dark"] .cm-site-header :where(a,button,span,div) {
  color: #241923;
}
html[data-cm-theme="dark"] .cm-site-header .cm-nav-menu {
  color: #241923 !important;
}
html[data-cm-theme="dark"] .cm-site-header .cm-theme-toggle {
  background: #3d0d22 !important;
  color: #ffffff !important;
  border-color: rgba(160,33,73,.35) !important;
}
html[data-cm-theme="dark"] .cm-site-header .cm-nav-cta,
html[data-cm-theme="dark"] .cm-site-header .cm-nav-cta * {
  color: #ffffff !important;
}

/* Main dark surfaces: black transparent, not dull grey. */
html[data-cm-theme="dark"] .cm-glass:not(.cm-navbar),
html[data-cm-theme="dark"] .cm-course-card,
html[data-cm-theme="dark"] .cm-final-cta-card,
html[data-cm-theme="dark"] .cm-footer-card,
html[data-cm-theme="dark"] .cm-contact-form,
html[data-cm-theme="dark"] .cm-contact-copy,
html[data-cm-theme="dark"] .cm-contact-info-card,
html[data-cm-theme="dark"] .cm-lesson-main,
html[data-cm-theme="dark"] .cm-course-sidebar,
html[data-cm-theme="dark"] .cm-ad-box,
html[data-cm-theme="dark"] .cm-question-box,
html[data-cm-theme="dark"] .cm-caremedox-cta,
html[data-cm-theme="dark"] .cm-public-card,
html[data-cm-theme="dark"] .cm-public-aside-card,
html[data-cm-theme="dark"] .cm-community-search,
html[data-cm-theme="dark"] .cm-community-ask,
html[data-cm-theme="dark"] .cm-community-question,
html[data-cm-theme="dark"] .cm-community-empty,
html[data-cm-theme="dark"] .cm-community-side,
html[data-cm-theme="dark"] .cm-comments,
html[data-cm-theme="dark"] .cm-comment-form,
html[data-cm-theme="dark"] .cm-comment-card,
html[data-cm-theme="dark"] .cm-empty-comments {
  background: linear-gradient(180deg, rgba(17, 24, 39, .88), rgba(8, 13, 25, .90)) !important;
  border-color: var(--cm-dark-border) !important;
  box-shadow: 0 22px 60px rgba(0,0,0,.45) !important;
  color: var(--cm-dark-text) !important;
}

html[data-cm-theme="dark"] .cm-course-card::before,
html[data-cm-theme="dark"] .cm-final-cta-card::before {
  background: linear-gradient(90deg, var(--cm-dark-red), var(--cm-dark-purple), var(--cm-dark-blue)) !important;
}
html[data-cm-theme="dark"] .cm-section-head h2,
html[data-cm-theme="dark"] .cm-course-card h3,
html[data-cm-theme="dark"] .cm-course-card h4,
html[data-cm-theme="dark"] .cm-final-cta-card h2,
html[data-cm-theme="dark"] .cm-footer-grid h3,
html[data-cm-theme="dark"] .cm-comments-head h2 {
  color: #ffffff !important;
  text-shadow: none !important;
}
html[data-cm-theme="dark"] .cm-section-head p,
html[data-cm-theme="dark"] .cm-course-card p,
html[data-cm-theme="dark"] .cm-course-card li,
html[data-cm-theme="dark"] .cm-final-cta-card p,
html[data-cm-theme="dark"] .cm-footer-brand p,
html[data-cm-theme="dark"] .cm-footer-bottom,
html[data-cm-theme="dark"] .cm-footer-bottom p {
  color: var(--cm-dark-muted) !important;
  text-shadow: none !important;
}

/* Kicker/labels should not fade into dark background. */
html[data-cm-theme="dark"] .cm-kicker,
html[data-cm-theme="dark"] .cm-level,
html[data-cm-theme="dark"] .cm-badge,
html[data-cm-theme="dark"] .status {
  background: rgba(255, 138, 176, .12) !important;
  border-color: rgba(255, 138, 176, .42) !important;
  color: var(--cm-dark-pink) !important;
}

/* Lesson main typography and navigation */
html[data-cm-theme="dark"] .cm-lesson-main h1,
html[data-cm-theme="dark"] .lesson-heading {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: none !important;
}
html[data-cm-theme="dark"] .cm-lesson-nav a,
html[data-cm-theme="dark"] .cm-btn-soft,
html[data-cm-theme="dark"] .cm-portal-btn-soft {
  background: rgba(255,255,255,.08) !important;
  border-color: var(--cm-dark-border) !important;
  color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-content-ad,
html[data-cm-theme="dark"] .cm-community-ad {
  background: rgba(5, 9, 18, .64) !important;
  border-color: rgba(255, 138, 176, .42) !important;
  color: var(--cm-dark-muted) !important;
}
html[data-cm-theme="dark"] .cm-content-ad strong,
html[data-cm-theme="dark"] .cm-ad-box strong {
  color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-content-ad span,
html[data-cm-theme="dark"] .cm-ad-box span {
  color: var(--cm-dark-pink) !important;
}

/* Lesson content: colored boxes use dark transparent backgrounds with light accent text. */
html[data-cm-theme="dark"] .cm-lesson-content,
html[data-cm-theme="dark"] .cm-lesson-content :where(p,li,td,dd) {
  color: #e8eefc !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .content-section,
html[data-cm-theme="dark"] .cm-lesson-content .addoninfo,
html[data-cm-theme="dark"] .cm-lesson-content .example-box,
html[data-cm-theme="dark"] .cm-lesson-content .quote,
html[data-cm-theme="dark"] .cm-lesson-content blockquote.quote {
  background: rgba(13, 18, 31, .74) !important;
  border-color: var(--cm-dark-border) !important;
  color: #e8eefc !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.32) !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .section-red,
html[data-cm-theme="dark"] .cm-lesson-content .addon-red,
html[data-cm-theme="dark"] .cm-lesson-content .do-red,
html[data-cm-theme="dark"] .cm-lesson-content .example-red.example-box {
  background: rgba(255, 138, 176, .09) !important;
  border-color: rgba(255, 138, 176, .72) !important;
  color: #fff1f6 !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .section-blue,
html[data-cm-theme="dark"] .cm-lesson-content .addon-blue,
html[data-cm-theme="dark"] .cm-lesson-content .do-blue,
html[data-cm-theme="dark"] .cm-lesson-content .example-blue.example-box {
  background: rgba(143, 202, 255, .10) !important;
  border-color: rgba(143, 202, 255, .76) !important;
  color: #eff8ff !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .section-green,
html[data-cm-theme="dark"] .cm-lesson-content .addon-green,
html[data-cm-theme="dark"] .cm-lesson-content .do-green {
  background: rgba(143, 240, 177, .10) !important;
  border-color: rgba(143, 240, 177, .76) !important;
  color: #effff5 !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .section-purple,
html[data-cm-theme="dark"] .cm-lesson-content .addon-purple,
html[data-cm-theme="dark"] .cm-lesson-content .do-purple {
  background: rgba(213, 182, 255, .11) !important;
  border-color: rgba(213, 182, 255, .76) !important;
  color: #f8f2ff !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .section-orange,
html[data-cm-theme="dark"] .cm-lesson-content .addon-orange,
html[data-cm-theme="dark"] .cm-lesson-content .do-orange {
  background: rgba(255, 211, 138, .11) !important;
  border-color: rgba(255, 211, 138, .76) !important;
  color: #fff8ea !important;
}

/* Convert dark accent text classes to light accents in dark mode. */
html[data-cm-theme="dark"] .cm-lesson-content .red,
html[data-cm-theme="dark"] .cm-lesson-content .marker-red li::before,
html[data-cm-theme="dark"] .cm-lesson-content .red-list li,
html[data-cm-theme="dark"] .cm-lesson-content .example-red .example-title,
html[data-cm-theme="dark"] .cm-lesson-content .section-red :where(h1,h2,h3,h4,h5,h6,strong,b) { color: var(--cm-dark-red) !important; }
html[data-cm-theme="dark"] .cm-lesson-content .blue,
html[data-cm-theme="dark"] .cm-lesson-content .marker-blue li::before,
html[data-cm-theme="dark"] .cm-lesson-content .blue-list li,
html[data-cm-theme="dark"] .cm-lesson-content .example-blue .example-title,
html[data-cm-theme="dark"] .cm-lesson-content .section-blue :where(h1,h2,h3,h4,h5,h6,strong,b) { color: var(--cm-dark-blue) !important; }
html[data-cm-theme="dark"] .cm-lesson-content .green,
html[data-cm-theme="dark"] .cm-lesson-content .marker-green li::before,
html[data-cm-theme="dark"] .cm-lesson-content .green-list li,
html[data-cm-theme="dark"] .cm-lesson-content .section-green :where(h1,h2,h3,h4,h5,h6,strong,b) { color: var(--cm-dark-green) !important; }
html[data-cm-theme="dark"] .cm-lesson-content .purple,
html[data-cm-theme="dark"] .cm-lesson-content .marker-purple li::before,
html[data-cm-theme="dark"] .cm-lesson-content .purple-list li,
html[data-cm-theme="dark"] .cm-lesson-content .section-purple :where(h1,h2,h3,h4,h5,h6,strong,b) { color: var(--cm-dark-purple) !important; }
html[data-cm-theme="dark"] .cm-lesson-content .orange,
html[data-cm-theme="dark"] .cm-lesson-content .marker-orange li::before,
html[data-cm-theme="dark"] .cm-lesson-content .orange-list li,
html[data-cm-theme="dark"] .cm-lesson-content .section-orange :where(h1,h2,h3,h4,h5,h6,strong,b) { color: var(--cm-dark-orange) !important; }

html[data-cm-theme="dark"] .cm-lesson-content .do-you-know,
html[data-cm-theme="dark"] .cm-lesson-content .do-you-know :where(p,span,li) {
  color: #e8eefc !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .do-you-know strong { color: inherit !important; }
html[data-cm-theme="dark"] .cm-lesson-content .do-blue strong { color: var(--cm-dark-blue) !important; }
html[data-cm-theme="dark"] .cm-lesson-content .do-green strong { color: var(--cm-dark-green) !important; }
html[data-cm-theme="dark"] .cm-lesson-content .do-orange strong { color: var(--cm-dark-orange) !important; }
html[data-cm-theme="dark"] .cm-lesson-content .do-red strong { color: var(--cm-dark-red) !important; }
html[data-cm-theme="dark"] .cm-lesson-content .do-purple strong { color: var(--cm-dark-purple) !important; }

/* Example boxes and highlight/result blocks. */
html[data-cm-theme="dark"] .cm-lesson-content .example-title { color: #ffffff !important; }
html[data-cm-theme="dark"] .cm-lesson-content .example-content,
html[data-cm-theme="dark"] .cm-lesson-content .example-box p { color: #e8eefc !important; }
html[data-cm-theme="dark"] .cm-lesson-content .example-highlight {
  background: rgba(255,255,255,.08) !important;
  color: #f8fafc !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .example-result {
  color: #ffffff !important;
  background: linear-gradient(135deg, rgba(143,202,255,.86), rgba(213,182,255,.82)) !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .example-red .example-result {
  background: linear-gradient(135deg, rgba(255,138,176,.86), rgba(255,183,208,.75)) !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .example-blue .example-result {
  background: linear-gradient(135deg, rgba(80,165,255,.86), rgba(143,202,255,.75)) !important;
}

/* Accordions / plus cards: no white-on-white or dark-blue text in dark mode. */
html[data-cm-theme="dark"] .cm-lesson-content .theme-red { --theme-color: var(--cm-dark-red); --bg-closed: rgba(255,138,176,.10); --bg-open: rgba(255,138,176,.08); }
html[data-cm-theme="dark"] .cm-lesson-content .theme-blue { --theme-color: var(--cm-dark-blue); --bg-closed: rgba(143,202,255,.10); --bg-open: rgba(143,202,255,.08); }
html[data-cm-theme="dark"] .cm-lesson-content .theme-green { --theme-color: var(--cm-dark-green); --bg-closed: rgba(143,240,177,.10); --bg-open: rgba(143,240,177,.08); }
html[data-cm-theme="dark"] .cm-lesson-content .theme-purple { --theme-color: var(--cm-dark-purple); --bg-closed: rgba(213,182,255,.10); --bg-open: rgba(213,182,255,.08); }
html[data-cm-theme="dark"] .cm-lesson-content .theme-orange { --theme-color: var(--cm-dark-orange); --bg-closed: rgba(255,211,138,.10); --bg-open: rgba(255,211,138,.08); }
html[data-cm-theme="dark"] .cm-lesson-content .accordion {
  background: rgba(11, 17, 30, .88) !important;
  border-color: rgba(226,232,240,.16) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.32) !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .accordion summary,
html[data-cm-theme="dark"] .cm-lesson-content .accordion[open] summary {
  background: var(--bg-closed) !important;
  color: var(--theme-color) !important;
  border-bottom-color: var(--theme-color) !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .acc-content-wrapper,
html[data-cm-theme="dark"] .cm-lesson-content .acc-content-wrapper :where(p,li,span) {
  color: #e8eefc !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .acc-toggle-icon { background-color: var(--theme-color) !important; }
html[data-cm-theme="dark"] .cm-lesson-content .acc-toggle-icon::before,
html[data-cm-theme="dark"] .cm-lesson-content .acc-toggle-icon::after { background-color: #06101f !important; }

/* Tables: dark body, bright header. */
html[data-cm-theme="dark"] .cm-lesson-content .table-scroll-fix {
  background: rgba(3,7,17,.38) !important;
  border-color: var(--cm-dark-border) !important;
}
html[data-cm-theme="dark"] .cm-lesson-content :where(table,.modern-table-red,.modern-table-blue,.my-fix-table) {
  background: #0b1120 !important;
  color: #f8fafc !important;
}
html[data-cm-theme="dark"] .cm-lesson-content :where(td,th) {
  color: #f8fafc !important;
  border-color: rgba(226,232,240,.14) !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .modern-table-blue thead th,
html[data-cm-theme="dark"] .cm-lesson-content .my-fix-table tr th { background: #2478d9 !important; color:#ffffff !important; }
html[data-cm-theme="dark"] .cm-lesson-content .modern-table-red thead th { background: #d43c69 !important; color:#ffffff !important; }
html[data-cm-theme="dark"] .cm-lesson-content .modern-table-blue tbody tr:hover,
html[data-cm-theme="dark"] .cm-lesson-content .modern-table-red tbody tr:hover { background: rgba(143,202,255,.12) !important; }
html[data-cm-theme="dark"] .cm-lesson-content .my-fix-table tr:nth-child(odd) { background: rgba(255,255,255,.035) !important; }

/* Buttons keep strong visual action without washed out text. */
html[data-cm-theme="dark"] .cm-btn-primary,
html[data-cm-theme="dark"] .cm-nav-cta,
html[data-cm-theme="dark"] .cm-portal-btn,
html[data-cm-theme="dark"] .cm-lesson-content .one {
  color: #ffffff !important;
  background: linear-gradient(135deg, #ff5f8e, #b45dff) !important;
  box-shadow: 0 18px 42px rgba(255,95,142,.22) !important;
}

/* Footer dark logo placeholder.
   Put your white footer logo here:
   CM-Academy-Assets/images/Academy_logo_full_white.png
*/
.cm-brand-logo-dark { display: none; }
html[data-cm-theme="dark"] .cm-footer .cm-brand-logo-light { display: none !important; }
html[data-cm-theme="dark"] .cm-footer .cm-brand-logo-dark { display: block !important; }
html[data-cm-theme="dark"] .cm-footer .cm-brand-logo-dark[src=""] { display: none !important; }
html[data-cm-theme="dark"] .cm-footer-contact a,
html[data-cm-theme="dark"] .cm-footer-grid a { color: #d9e2f4 !important; }
html[data-cm-theme="dark"] .cm-footer-contact span { color: var(--cm-dark-muted) !important; }
html[data-cm-theme="dark"] .cm-footer-grid a:hover,
html[data-cm-theme="dark"] .cm-footer-contact a:hover { color: var(--cm-dark-pink) !important; }

/* Mobile-specific readability tightening. */
@media (max-width: 700px) {
  html[data-cm-theme="dark"] .cm-course-card,
  html[data-cm-theme="dark"] .cm-lesson-main,
  html[data-cm-theme="dark"] .cm-lesson-content .content-section,
  html[data-cm-theme="dark"] .cm-lesson-content .addoninfo,
  html[data-cm-theme="dark"] .cm-lesson-content .example-box,
  html[data-cm-theme="dark"] .cm-lesson-content .do-you-know {
    background-color: rgba(13, 18, 31, .92) !important;
  }
  html[data-cm-theme="dark"] .cm-lesson-content :where(p,li,td,dd) {
    color: #edf3ff !important;
  }
}

/* =========================================================
   Dark theme contrast fix v4
   Fixes: final CTA brightness, portal/auth logo, community login box,
   mobile menu buttons unreadable in dark mode.
   ========================================================= */

/* A more reliable black/dark base and readable normal text */
html[data-cm-theme="dark"] body {
  background: #02050d !important;
  color: #f8fafc !important;
}
html[data-cm-theme="dark"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 105, 150, .11), transparent 32rem),
    radial-gradient(circle at 88% 18%, rgba(108, 184, 255, .10), transparent 34rem),
    linear-gradient(180deg, #02050d, #060b16 55%, #02050d);
}

/* Keep mobile nav menu light but make it solid and readable. */
@media (max-width: 900px) {
  html[data-cm-theme="dark"] .cm-site-header .cm-nav-menu {
    background: #ffffff !important;
    color: #1f1720 !important;
    border: 1px solid rgba(80, 16, 36, .12) !important;
    box-shadow: 0 28px 80px rgba(0,0,0,.26) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html[data-cm-theme="dark"] .cm-site-header .cm-nav-menu :where(a,button,span,div) {
    color: #1f1720 !important;
    opacity: 1 !important;
    text-shadow: none !important;
  }
  html[data-cm-theme="dark"] .cm-site-header .cm-nav-menu > a,
  html[data-cm-theme="dark"] .cm-site-header .cm-dropdown > button {
    color: #1f1720 !important;
    font-weight: 760 !important;
  }
  html[data-cm-theme="dark"] .cm-site-header .cm-nav-menu .cm-theme-toggle,
  html[data-cm-theme="dark"] .cm-site-header .cm-nav-menu .cm-theme-toggle * {
    color: #ffffff !important;
  }
  html[data-cm-theme="dark"] .cm-site-header .cm-nav-menu .cm-theme-toggle {
    background: linear-gradient(135deg, #5b0825, #360416) !important;
    border-color: #5b0825 !important;
    justify-content: center !important;
    box-shadow: 0 14px 32px rgba(91, 8, 37, .24) !important;
  }
  html[data-cm-theme="dark"] .cm-site-header .cm-nav-menu .cm-theme-toggle-icon {
    background: rgba(255,255,255,.92) !important;
    color: #5b0825 !important;
  }
  html[data-cm-theme="dark"] .cm-site-header .cm-nav-menu .cm-nav-cta,
  html[data-cm-theme="dark"] .cm-site-header .cm-nav-menu .cm-nav-cta * {
    color: #ffffff !important;
  }
}

/* The top Lessons pill must stay readable in dark mode. */
html[data-cm-theme="dark"] .cm-site-header .cm-lesson-toggle,
html[data-cm-theme="dark"] .cm-site-header .cm-lesson-toggle:visited,
html[data-cm-theme="dark"] .cm-site-header .cm-lesson-toggle * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
html[data-cm-theme="dark"] .cm-site-header .cm-lesson-toggle {
  background: linear-gradient(135deg, #5b0825, #3a0619) !important;
  border-color: #5b0825 !important;
  box-shadow: 0 14px 28px rgba(91, 8, 37, .22) !important;
}

/* Index final CTA: remove washed-out pastel image/gradient in dark mode. */
html[data-cm-theme="dark"] .cm-final-cta {
  background: transparent !important;
}
html[data-cm-theme="dark"] .cm-final-cta-card {
  background:
    radial-gradient(circle at top left, rgba(255, 108, 154, .13), transparent 18rem),
    linear-gradient(180deg, rgba(12, 18, 31, .96), rgba(4, 8, 16, .98)) !important;
  background-image:
    radial-gradient(circle at top left, rgba(255, 108, 154, .13), transparent 18rem),
    linear-gradient(180deg, rgba(12, 18, 31, .96), rgba(4, 8, 16, .98)) !important;
  border: 1px solid rgba(226, 232, 240, .16) !important;
  box-shadow: 0 30px 80px rgba(0,0,0,.48) !important;
  color: #ffffff !important;
  background-attachment: scroll !important;
}
html[data-cm-theme="dark"] .cm-final-cta-card::before {
  border-color: rgba(255, 255, 255, .13) !important;
  background: transparent !important;
}
html[data-cm-theme="dark"] .cm-final-cta-card h2,
html[data-cm-theme="dark"] .cm-final-cta-card p,
html[data-cm-theme="dark"] .cm-final-cta-card *:not(.cm-btn):not(.cm-btn *) {
  color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
html[data-cm-theme="dark"] .cm-final-cta-card p {
  color: #dbe4f5 !important;
}

/* Community login required box: no dull grey / low contrast. */
html[data-cm-theme="dark"] .cm-community-login-box,
html[data-cm-theme="dark"] .cm-community-login-note {
  background: rgba(255,255,255,.065) !important;
  border: 1px solid rgba(226,232,240,.15) !important;
  color: #e8eefc !important;
  box-shadow: none !important;
}
html[data-cm-theme="dark"] .cm-community-login-box strong,
html[data-cm-theme="dark"] .cm-community-login-box b {
  color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-community-login-box p,
html[data-cm-theme="dark"] .cm-community-login-box span,
html[data-cm-theme="dark"] .cm-community-login-note {
  color: #d7e0f2 !important;
}
html[data-cm-theme="dark"] .cm-community-login-box .cm-btn,
html[data-cm-theme="dark"] .cm-community-login-box .cm-btn * {
  color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-community-login-box .cm-btn-soft {
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(226,232,240,.22) !important;
  color: #ffffff !important;
}

/* Community empty/rules cards: clearer black surfaces. */
html[data-cm-theme="dark"] .cm-community-empty,
html[data-cm-theme="dark"] .cm-community-side,
html[data-cm-theme="dark"] .cm-community-search,
html[data-cm-theme="dark"] .cm-community-ask,
html[data-cm-theme="dark"] .cm-community-question {
  background: linear-gradient(180deg, rgba(12,18,31,.94), rgba(5,9,18,.95)) !important;
  color: #f8fafc !important;
}
html[data-cm-theme="dark"] .cm-community-empty p,
html[data-cm-theme="dark"] .cm-community-side li,
html[data-cm-theme="dark"] .cm-community-side p {
  color: #d7e0f2 !important;
}

/* Portal/auth logo readability. Until a white logo is uploaded, show normal logo on a clean white base. */
html[data-cm-theme="dark"] .cm-auth-card > img,
html[data-cm-theme="dark"] .cm-portal-brand img {
  background: rgba(255,255,255,.96) !important;
  border: 1px solid rgba(255,255,255,.20) !important;
  border-radius: 18px !important;
  padding: 10px 14px !important;
  box-shadow: 0 16px 34px rgba(0,0,0,.22) !important;
}
html[data-cm-theme="dark"] .cm-auth-card h1,
html[data-cm-theme="dark"] .cm-auth-card label,
html[data-cm-theme="dark"] .cm-auth-card .cm-small,
html[data-cm-theme="dark"] .cm-auth-card .cm-small a {
  color: #f8fafc !important;
}
html[data-cm-theme="dark"] .cm-auth-card p {
  color: #cbd5e1 !important;
}
html[data-cm-theme="dark"] .cm-auth-card input {
  background: rgba(3,7,17,.72) !important;
  color: #f8fafc !important;
  border-color: rgba(226,232,240,.22) !important;
}

/* Optional white-logo placeholders. Prepare these files later if wanted:
   CM-Academy-Assets/images/Academy_logo_full_white.png
   CM-Academy-Assets/images/Academy_logo_full_portal_white.png
   Current CSS still keeps the normal logo readable using a white logo base.
*/

/* Extra safety: hard-coded light cards inside lesson content should either become dark or use black text. */
html[data-cm-theme="dark"] .cm-lesson-content .example-box,
html[data-cm-theme="dark"] .cm-lesson-content .example-highlight,
html[data-cm-theme="dark"] .cm-lesson-content .accordion,
html[data-cm-theme="dark"] .cm-lesson-content .accordion[open],
html[data-cm-theme="dark"] .cm-lesson-content .acc-content-wrapper {
  background: rgba(12, 18, 31, .92) !important;
  color: #f8fafc !important;
  border-color: rgba(226,232,240,.16) !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .example-box :where(p,li,span,td,dd),
html[data-cm-theme="dark"] .cm-lesson-content .accordion :where(p,li,span,td,dd),
html[data-cm-theme="dark"] .cm-lesson-content .acc-content-wrapper :where(p,li,span,td,dd) {
  color: #e8eefc !important;
}
html[data-cm-theme="dark"] .cm-lesson-content .example-box :where(h1,h2,h3,h4,h5,h6,strong,b),
html[data-cm-theme="dark"] .cm-lesson-content .accordion :where(h1,h2,h3,h4,h5,h6,strong,b) {
  color: #ffffff !important;
}

/* Theme toggle in portal top bar remains visible. */
html[data-cm-theme="dark"] .cm-portal-theme-toggle,
html[data-cm-theme="dark"] .cm-portal-theme-toggle * {
  color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-portal-theme-toggle {
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(226,232,240,.18) !important;
}

/* White/black fallback mode philosophy: in dark theme, non-special cards must be near-black with white text. */
html[data-cm-theme="dark"] .cm-card,
html[data-cm-theme="dark"] .cm-public-card,
html[data-cm-theme="dark"] .cm-public-aside-card,
html[data-cm-theme="dark"] .cm-contact-info-card {
  background: linear-gradient(180deg, rgba(12,18,31,.94), rgba(5,9,18,.95)) !important;
  color: #f8fafc !important;
}
html[data-cm-theme="dark"] .cm-card p,
html[data-cm-theme="dark"] .cm-public-card p,
html[data-cm-theme="dark"] .cm-public-aside-card p,
html[data-cm-theme="dark"] .cm-contact-info-card p {
  color: #d7e0f2 !important;
}

/* CM Tools dark mode support */
html[data-cm-theme="dark"] .cm-tools-section {
  background: linear-gradient(180deg, #050914, rgba(12,18,31,.98), #050914) !important;
}
html[data-cm-theme="dark"] .cm-tool-card,
html[data-cm-theme="dark"] .cm-denial-list-card {
  background: linear-gradient(180deg, rgba(12,18,31,.94), rgba(5,9,18,.96)) !important;
  border-color: rgba(226,232,240,.16) !important;
  color: #f8fafc !important;
}
html[data-cm-theme="dark"] .cm-tool-card h3,
html[data-cm-theme="dark"] .cm-tool-card h4,
html[data-cm-theme="dark"] .cm-denial-list-card strong {
  color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-tool-card p,
html[data-cm-theme="dark"] .cm-tool-card li,
html[data-cm-theme="dark"] .cm-denial-list-card small {
  color: #d7e0f2 !important;
}
html[data-cm-theme="dark"] .cm-tool-symbol,
html[data-cm-theme="dark"] .cm-denial-list-card span {
  background: rgba(255,255,255,.09) !important;
  color: #ff8fb2 !important;
}
html[data-cm-theme="dark"] .cm-tool-sidebar .cm-sidebar-head p {
  color: #cbd5e1 !important;
}

/* === Dark theme contrast fix v5 === */
html[data-cm-theme="dark"] .cm-topbar,
html[data-cm-theme="dark"] .cm-topbar *,
html[data-cm-theme="dark"] .cm-topbar a,
html[data-cm-theme="dark"] .cm-topbar span {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
html[data-cm-theme="dark"] .cm-topbar {
  background: linear-gradient(90deg, #3a0618, #8f153e, #4e0925) !important;
}
html[data-cm-theme="dark"] .cm-site-header .cm-theme-toggle,
html[data-cm-theme="dark"] .cm-site-header .cm-theme-toggle:visited,
html[data-cm-theme="dark"] .cm-site-header .cm-theme-toggle * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}
html[data-cm-theme="dark"] .cm-site-header .cm-theme-toggle {
  background: linear-gradient(135deg, #5b0825, #320313) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
}
html[data-cm-theme="dark"] .cm-site-header .cm-theme-toggle-icon {
  background: rgba(255,255,255,.95) !important;
  color: #5b0825 !important;
  -webkit-text-fill-color: #5b0825 !important;
}
html[data-cm-theme="dark"] .cm-hero {
  background:
    linear-gradient(90deg, rgba(3,7,17,.56) 0%, rgba(61,13,34,.46) 44%, rgba(3,7,17,.20) 100%),
    url('../images/hero-20.webp') center/cover no-repeat !important;
}
html[data-cm-theme="dark"] .cm-hero::after {
  background: linear-gradient(180deg, transparent, #050914) !important;
}
html[data-cm-theme="dark"] .cm-hero-copy h1,
html[data-cm-theme="dark"] .cm-hero-copy p,
html[data-cm-theme="dark"] .cm-hero-subtitle {
  color: #ffffff !important;
  text-shadow: 0 12px 28px rgba(0,0,0,.32) !important;
}
html[data-cm-theme="dark"] .cm-tools-section {
  background:
    radial-gradient(circle at top left, rgba(255,122,162,.09), transparent 32rem),
    linear-gradient(180deg, #050914, #090e1a 60%, #050914) !important;
}
html[data-cm-theme="dark"] .cm-tools-section .cm-section-head h2,
html[data-cm-theme="dark"] .cm-tools-section .cm-section-head p {
  color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-tool-card {
  display: grid !important;
  grid-template-columns: 64px minmax(0, 1fr) !important;
  gap: 18px !important;
  background: linear-gradient(180deg, rgba(15,23,42,.96), rgba(2,6,23,.97)) !important;
  border: 1px solid rgba(226,232,240,.17) !important;
  border-radius: 28px !important;
  color: #f8fafc !important;
  box-shadow: 0 28px 72px rgba(0,0,0,.42) !important;
}
html[data-cm-theme="dark"] .cm-tool-card::before {
  height: 4px !important;
  background: linear-gradient(90deg, #ff7aa2, #a78bfa, #7dd3fc) !important;
}
html[data-cm-theme="dark"] .cm-tool-symbol {
  width: 62px !important;
  height: 62px !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.13) !important;
  color: #ffb0c8 !important;
  -webkit-text-fill-color: #ffb0c8 !important;
  font-weight: 900 !important;
}
html[data-cm-theme="dark"] .cm-tool-card h3,
html[data-cm-theme="dark"] .cm-tool-card h4,
html[data-cm-theme="dark"] .cm-tool-card strong {
  color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-tool-card p,
html[data-cm-theme="dark"] .cm-tool-card li {
  color: #dbe4f5 !important;
}
html[data-cm-theme="dark"] .cm-tool-card .cm-level {
  background: rgba(255,122,162,.16) !important;
  border-color: rgba(255,122,162,.30) !important;
  color: #ffc6d6 !important;
}
@media (max-width: 700px) {
  html[data-cm-theme="dark"] .cm-tool-card { grid-template-columns: 1fr !important; }
}
html[data-cm-theme="dark"] .cm-denial-directory,
html[data-cm-theme="dark"] .cm-denial-intro {
  background: linear-gradient(180deg, rgba(15,23,42,.96), rgba(2,6,23,.96)) !important;
  border-color: rgba(125,184,255,.40) !important;
  color: #f8fafc !important;
}
html[data-cm-theme="dark"] .cm-denial-search-row input {
  background: rgba(2,6,23,.82) !important;
  border-color: rgba(226,232,240,.22) !important;
  color: #f8fafc !important;
}
html[data-cm-theme="dark"] .cm-denial-search-help { color: #cbd5e1 !important; }
html[data-cm-theme="dark"] .cm-denial-table tbody tr:hover td { color: #ffffff !important; }
html[data-cm-theme="dark"] .cm-denial-code-link {
  background: linear-gradient(135deg, #ff5f8f, #8b5cf6) !important;
  color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-denial-no-results {
  background: rgba(255,122,162,.14) !important;
  color: #ffd3df !important;
}
html[data-cm-theme="dark"] .cm-auth-card > img,
html[data-cm-theme="dark"] .cm-portal-brand img {
  background: #ffffff !important;
}

/* Auth buttons in dark mode */
html[data-cm-theme="dark"] .cm-google-btn {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: rgba(255,255,255,.18) !important;
  box-shadow: 0 18px 38px rgba(0,0,0,.26) !important;
}
html[data-cm-theme="dark"] .cm-google-btn * { color: inherit !important; }
html[data-cm-theme="dark"] .cm-google-mark { color: #4285f4 !important; }
html[data-cm-theme="dark"] .cm-auth-divider { color: #cbd5e1 !important; }
html[data-cm-theme="dark"] .cm-auth-divider::before,
html[data-cm-theme="dark"] .cm-auth-divider::after { background: rgba(226,232,240,.18) !important; }
html[data-cm-theme="dark"] .cm-auth-row a { color: #ffb0c8 !important; }

/* === Dark theme fix v6: recover CTA image, improve denials search + code badges === */
html[data-cm-theme="dark"] .cm-final-cta-card {
  background:
    linear-gradient(135deg, rgba(13, 18, 31, .68), rgba(160, 33, 73, .54)),
    url('../images/hero-13.webp') center 45% / cover no-repeat !important;
  background-attachment: scroll !important;
  border-color: rgba(255,255,255,.22) !important;
  box-shadow: 0 26px 70px rgba(0,0,0,.48) !important;
}
html[data-cm-theme="dark"] .cm-final-cta-card::before {
  background: transparent !important;
  inset: 18px !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 22px !important;
}
html[data-cm-theme="dark"] .cm-final-cta-card h2,
html[data-cm-theme="dark"] .cm-final-cta-card p {
  color: #fff !important;
  text-shadow: 0 10px 28px rgba(0,0,0,.45) !important;
}
html[data-cm-theme="dark"] .cm-final-cta-card p { color: rgba(255,255,255,.92) !important; }

html[data-cm-theme="dark"] .cm-denial-directory {
  background: rgba(12, 18, 32, .88) !important;
  border-color: rgba(125,184,255,.34) !important;
}
html[data-cm-theme="dark"] .cm-denial-search-row label {
  color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-denial-search-row input,
html[data-cm-theme="dark"] input#denialSearch {
  display: block !important;
  width: 100% !important;
  min-height: 52px !important;
  margin-top: 8px !important;
  padding: 13px 16px !important;
  border-radius: 16px !important;
  background: rgba(3, 7, 18, .92) !important;
  border: 1px solid rgba(148, 163, 184, .40) !important;
  color: #f8fafc !important;
  caret-color: #93c5fd !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 22px rgba(0,0,0,.24) !important;
}
html[data-cm-theme="dark"] .cm-denial-search-row input::placeholder,
html[data-cm-theme="dark"] input#denialSearch::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}
html[data-cm-theme="dark"] .cm-denial-search-row input:focus,
html[data-cm-theme="dark"] input#denialSearch:focus {
  outline: none !important;
  border-color: rgba(147, 197, 253, .88) !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .18), 0 14px 30px rgba(0,0,0,.28) !important;
}
html[data-cm-theme="dark"] .cm-denial-code-link {
  background: rgba(96, 165, 250, .14) !important;
  border: 1px solid rgba(147, 197, 253, .50) !important;
  color: #bfdbfe !important;
  box-shadow: none !important;
}
html[data-cm-theme="dark"] .cm-denial-code-link:hover {
  background: rgba(96, 165, 250, .24) !important;
  color: #ffffff !important;
  border-color: rgba(147, 197, 253, .82) !important;
}
html[data-cm-theme="dark"] .cm-denial-table tbody td {
  color: #e5ecfb !important;
}

/* Unified ad slots in dark theme */
html[data-cm-theme="dark"] .cm-ad-wrap,
html[data-cm-theme="dark"] .cm-ad-slot {
  background: rgba(15,23,42,.86) !important;
  border-color: rgba(148,163,184,.24) !important;
  box-shadow: 0 18px 46px rgba(0,0,0,.32) !important;
}
html[data-cm-theme="dark"] .cm-ad-placeholder {
  background: linear-gradient(135deg, rgba(15,23,42,.92), rgba(2,6,23,.84)) !important;
}
html[data-cm-theme="dark"] .cm-ad-label { color: #f9a8d4 !important; }
html[data-cm-theme="dark"] .cm-ad-placeholder strong { color: #f8fafc !important; }
html[data-cm-theme="dark"] .cm-ad-placeholder p,
html[data-cm-theme="dark"] .cm-ad-placeholder code { color: #cbd5e1 !important; }

/* === Dark/theme/header/ad contrast fixes v8 === */
html[data-cm-theme="dark"] .cm-topbar,
html[data-cm-theme="dark"] .cm-topbar * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-topbar a:hover {
  color: #ffffff !important;
  text-decoration-color: rgba(255,255,255,.85) !important;
}
html[data-cm-theme="dark"] .cm-site-header .cm-theme-toggle,
html[data-cm-theme="dark"] .cm-site-header .cm-theme-toggle * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-site-header .cm-theme-toggle {
  background: linear-gradient(135deg, #5b0825, #350515) !important;
  border-color: rgba(91,8,37,.85) !important;
}
html[data-cm-theme="dark"] .cm-site-header .cm-theme-toggle-icon {
  color: #5b0825 !important;
  -webkit-text-fill-color: #5b0825 !important;
  background: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-lesson-author-box {
  color: #aeb9d1 !important;
}
html[data-cm-theme="dark"] .cm-lesson-author-box b,
html[data-cm-theme="dark"] .cm-lesson-author-box strong {
  color: #dce5f8 !important;
}
html[data-cm-theme="dark"] .cm-ad-wrap,
html[data-cm-theme="dark"] .cm-ad-slot {
  background: rgba(15, 23, 42, .86) !important;
  border-color: rgba(226, 232, 240, .16) !important;
  box-shadow: 0 18px 44px rgba(0,0,0,.28) !important;
}
html[data-cm-theme="dark"] .cm-ad-placeholder {
  background: linear-gradient(135deg, rgba(15,23,42,.88), rgba(30,41,59,.72)) !important;
  color: #dce5f8 !important;
}
html[data-cm-theme="dark"] .cm-ad-placeholder strong,
html[data-cm-theme="dark"] .cm-ad-placeholder code {
  color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-ad-placeholder p { color: #b8c3dc !important; }
html[data-cm-theme="dark"] .cm-ad-label { color: #ffb3c8 !important; }
html[data-cm-theme="dark"] .cm-caremedox-rcm-ad {
  background:
    radial-gradient(circle at 85% 8%, rgba(255,255,255,.16), transparent 12rem),
    linear-gradient(135deg, #2b0614, #6e0f33 54%, #9f244b) !important;
  border-color: rgba(255, 179, 200, .24) !important;
  color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-caremedox-rcm-ad :where(h2,h3,p,li,small,span) {
  color: inherit !important;
}
html[data-cm-theme="dark"] .cm-caremedox-rcm-ad p,
html[data-cm-theme="dark"] .cm-caremedox-rcm-ad li,
html[data-cm-theme="dark"] .cm-caremedox-rcm-ad small {
  color: rgba(255,255,255,.86) !important;
}
html[data-cm-theme="dark"] .cm-community-side-card {
  background: rgba(15, 23, 42, .88) !important;
  border: 1px solid rgba(226,232,240,.14) !important;
}

/* === Dark v9: community sidebar + blue CareMedox ad final contrast === */
html[data-cm-theme="dark"] .cm-community-side-card {
  background: rgba(15, 23, 42, .92) !important;
  border-color: rgba(148, 163, 184, .22) !important;
  box-shadow: 0 22px 54px rgba(0,0,0,.34) !important;
}
html[data-cm-theme="dark"] .cm-community-side-card h2 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-community-side-card ul,
html[data-cm-theme="dark"] .cm-community-side-card li {
  color: #d8e2f3 !important;
  -webkit-text-fill-color: #d8e2f3 !important;
}
html[data-cm-theme="dark"] .cm-caremedox-blue-ad,
html[data-cm-theme="dark"] .cm-caremedox-rcm-ad.cm-caremedox-blue-ad {
  background:
    radial-gradient(circle at 88% 5%, rgba(56, 189, 248, .30), transparent 12rem),
    radial-gradient(circle at 6% 100%, rgba(20, 184, 166, .18), transparent 12rem),
    linear-gradient(135deg, #061a2e 0%, #082f49 48%, #064e7a 100%) !important;
  border-color: rgba(125, 211, 252, .26) !important;
  box-shadow: 0 24px 60px rgba(0,0,0,.44) !important;
  color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-caremedox-blue-ad :where(h2,h3,p,small,span,a),
html[data-cm-theme="dark"] .cm-caremedox-rcm-ad.cm-caremedox-blue-ad :where(h2,h3,p,small,span,a) {
  opacity: 1 !important;
}
html[data-cm-theme="dark"] .cm-caremedox-blue-ad h2,
html[data-cm-theme="dark"] .cm-caremedox-blue-ad h3 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-caremedox-blue-ad p,
html[data-cm-theme="dark"] .cm-caremedox-blue-ad small {
  color: #e0f2fe !important;
  -webkit-text-fill-color: #e0f2fe !important;
}
html[data-cm-theme="dark"] .cm-caremedox-blue-ad .cm-caremedox-ad-pill,
html[data-cm-theme="dark"] .cm-caremedox-blue-ad .cm-caremedox-ad-points span {
  color: #e0f2fe !important;
  -webkit-text-fill-color: #e0f2fe !important;
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.18) !important;
}
html[data-cm-theme="dark"] .cm-caremedox-blue-ad .cm-caremedox-ad-actions a {
  background: #f8fafc !important;
  color: #075985 !important;
  -webkit-text-fill-color: #075985 !important;
}
html[data-cm-theme="dark"] .cm-caremedox-blue-ad .cm-caremedox-ad-actions a.is-secondary {
  background: rgba(255,255,255,.10) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* === Dark v10: referral sidebar ad contrast + height control === */
html[data-cm-theme="dark"] .cm-caremedox-referral-ad {
  background:
    radial-gradient(circle at 100% 0%, rgba(56,189,248,.28), transparent 10rem),
    radial-gradient(circle at 0% 100%, rgba(20,184,166,.18), transparent 9rem),
    linear-gradient(135deg, #061a2e 0%, #082f49 48%, #064e7a 100%) !important;
  border-color: rgba(125,211,252,.24) !important;
  box-shadow: 0 24px 58px rgba(0,0,0,.45) !important;
}
html[data-cm-theme="dark"] .cm-caremedox-referral-ad :where(h3,p,small,span,a) {
  text-shadow: none !important;
}
html[data-cm-theme="dark"] .cm-caremedox-referral-ad h3 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-cm-theme="dark"] .cm-caremedox-referral-ad p,
html[data-cm-theme="dark"] .cm-caremedox-referral-ad small {
  color: #dbeafe !important;
}
html[data-cm-theme="dark"] .cm-referral-kicker,
html[data-cm-theme="dark"] .cm-referral-mini-points span {
  color: #e0f2fe !important;
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.16) !important;
}
html[data-cm-theme="dark"] .cm-referral-actions a {
  color: #064e7a !important;
  -webkit-text-fill-color: #064e7a !important;
}
html[data-cm-theme="dark"] .cm-referral-actions a.is-secondary {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
