/* =====================================================================
   ETS theme-contrast layer (2026-09-26). Loaded LAST (footer.php).
   Purpose: every text/background pair readable in BOTH .theme-light and
   .theme-dark. Root cause fixed here: .xp sets light ink (#e7edf5) on
   <main>; legacy light sections inside .xp pages inherited it (white on
   cream). Also: dim greys too dark on near-black, teal CTAs with white
   text (2.2:1), nav/dropdown links not switching with theme.
   Rule of thumb: dark cinematic bands (heroes, xp-sec, xp-close, footer)
   stay dark in both themes; "paper"/legacy content sections follow theme.
   ===================================================================== */

/* ---------- 1. Top nav + dropdowns ---------- */
.theme-dark .nav-link.active,
.theme-dark .nav-link.dropdown-toggle.active { color: #5eead4; }
.theme-light .nav-link.active { color: #006b76; }
.theme-dark .dropdown-menu { background: #141b28; border-color: rgba(148,163,184,.18); box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.theme-dark .dropdown-menu a,
.theme-dark .dropdown-menu .submenu-toggle { color: #e2e8f0; }
.theme-dark .dropdown-menu a:hover,
.theme-dark .dropdown-menu a:focus-visible,
.theme-dark .dropdown-menu .submenu-toggle:hover { background: rgba(94,234,212,.08); color: #5eead4; }
.theme-dark .dropdown-menu a:focus:not(:focus-visible) { color: #e2e8f0; }

/* ---------- 2. Teal buttons: dark ink on teal (was white, 2.2:1) ---------- */
.btn.btn-primary,
.newsletter-form .btn-primary,
button.btn-primary { color: #04201d !important; }
.btn.btn-primary:hover { color: #04201d !important; }

/* ---------- 3. Dim mono text on near-black ---------- */
.xp { --xp-dim: #8595ab; }
.xp-crumb, .xp-fine, .xp-fine a, .xp-form-note, .xp-roi-fine { color: #8595ab; }
.xp-crumb a { color: #c3cedb; }
.site-footer .footer-heading { color: #94a3b8; }
main.mk-xp .mk-hero .hero-sub { color: #8595ab !important; }
.bl-card .bl-meta span, .cx-x-bar span,
.wg .wg-bar span, .wg-fine, .wg .wg-body p.wg-fine,
.wg-mat-grid .wg-mat span, .wg-mat-detail p b { color: #94a3b8; }
.wg-dial .wg-dial-in b, .wg-dial .wg-dial-in small { color: #1a1204; }

/* ---------- 4. Paper sections (light in light, dark in dark) ---------- */
.xp-sec--paper .xp-k, .xp-sec--paper .xp-h2 em,
.xp-sec--paper .xp-card .xp-ico { color: #08706a; }
.xp-sec--paper .xp-card-meta { color: #9a5b06; }
.cx-asks .xp-r span { color: #08706a; }
.theme-dark .xp-sec--paper .xp-k, .theme-dark .xp-sec--paper .xp-h2 em,
.theme-dark .xp-card .xp-ico, .theme-dark .cx-asks .xp-r span { color: #2ee6d3; }
.theme-dark .xp-sec--paper .xp-card-meta { color: #f5a524; }
.theme-dark .xp-sec--paper .xp-steps li::before { background: #0d141f; color: #2ee6d3; border-color: rgba(46,230,211,.5); }
.theme-dark .xp-sec--paper .xp-steps b { color: #fff; }
.theme-dark .xp-sec--paper .xp-steps span { color: #a9b7c8; }
.theme-dark .xp-sec--paper .xp-tag { color: #a9b7c8; border-color: rgba(148,163,184,.25); }
.theme-dark .xp-sec--paper .xp-cmp td { color: #a9b7c8; border-color: rgba(148,163,184,.14); }
.theme-dark .xp-sec--paper .xp-cmp td:last-child { color: #5eead4; }
.theme-dark .xp-sec--paper .xp-intro p, .theme-dark .xp-sec--paper .xp-ch p,
.theme-dark .xp-sec--paper .xp-checks li { color: #a9b7c8; }
.theme-dark .xp-sec--paper .xp-grid { background: rgba(148,163,184,.14); border-color: rgba(148,163,184,.14); }
.theme-dark .xp-sec--paper .xp-btn--g, .theme-light .xp-sec--paper .xp-btn--g { }
.theme-light .xp-sec--paper .xp-btn--g, .xp-sec--paper .xp-btn--g { color: #0b1220 !important; box-shadow: inset 0 0 0 1px rgba(11,18,32,.3); background: transparent; }
.theme-dark .xp-sec--paper .xp-btn--g { color: #e7edf5 !important; box-shadow: inset 0 0 0 1px rgba(226,232,240,.25); }

/* ---------- 5. Legacy content blocks inside .xp pages ---------- */
/* light theme: dark ink on the cream/white cards */
.theme-light .xp .content-section,
.theme-light .xp .content-section p,
.theme-light .xp .content-section li,
.theme-light .xp .content-section .card p,
.theme-light .xp .content-section .card li { color: #3b4658; }
.theme-light .xp .content-section a:not(.btn):not(.xp-btn),
.theme-light .xp .content-section .btn-text,
.theme-light .xp .card a:not(.btn):not(.xp-btn) { color: #006b76; }
.theme-light .xp .no-content p { color: #44516a; }
.theme-light .buyer a { color: #0f766e !important; }
.theme-light .buyers-head .ets-eyebrow, .theme-light .buyer-role { color: #08706a; }
/* dark theme: light ink on dark cards */
.theme-dark .xp .content-section p, .theme-dark .xp .content-section li { color: #a9b7c8; }
.theme-dark .xp .content-section a:not(.btn):not(.xp-btn) { color: #5eead4; }
.theme-dark .cu-xp .testimonial cite, .theme-dark blockquote footer cite { color: #8a9bb2; }
.theme-dark .no-content { background: #0e1624; }
.theme-dark .no-content p { color: #cbd5e1; }

/* market pages (mk-xp): cream .alt sections go dark in dark theme */
.theme-dark main.mk-xp .mk-sec.alt { background: #0d141f !important; }
.theme-dark main.mk-xp .mk-sec.alt h2, .theme-dark main.mk-xp .mk-sec.alt h3 { color: #fff !important; }
.theme-dark main.mk-xp .mk-sec.alt .sec-sub,
.theme-dark main.mk-xp .mk-sec.alt p, .theme-dark main.mk-xp .mk-sec.alt li { color: #a9b7c8 !important; }
.theme-dark main.mk-xp .mk-sec.alt .mk-card { background: #0a111c !important; }

/* lectures/automotive paper details in dark theme */
.theme-dark .apd .accordion-content, .theme-dark .apd .accordion-content li,
.theme-dark .apd td, .theme-dark .apd li, .theme-dark .apd li strong,
.theme-dark .apd .style3, .theme-dark .apd ul li strong { color: #b6c3d3 !important; }
.theme-dark .apd .group-discount, .theme-dark .apd .group-discount strong { color: #5eead4 !important; }
.theme-light .apd .fee-table h3, .theme-light .apd .fee-table h3 em { color: #08706a; }
.theme-light .apd .card p em { color: #3b4658; }

/* ---------- 6. Plain legacy pages (no .xp) ---------- */
.theme-dark .main-content > .container h1,
.theme-dark .main-content .container > h1 { color: #f1f5f9; }
.theme-dark .breadcrumb a, .theme-dark .breadcrumb-item a,
.theme-dark .card-body a:not(.btn), .theme-dark .text-muted a { color: #5eead4; }
/* lectures/comments header band is light-bg: give it dark ink in light theme */
.theme-light .page-header .page-title, .theme-light .page-header h1 { color: #0b1220; }
.theme-light .page-header .page-subtitle { color: #44516a; }
.theme-light .stats-bar .stat-number { color: #0b1220; }
.theme-light .stats-bar .stat-label { color: #56627a; }
.theme-dark .page-header .page-subtitle { color: #a9b7c8; }
.theme-dark .testimonials-container .no-comments { background: #161d2b; }
.theme-dark .testimonials-container .no-comments p { color: #cbd5e1; }
/* lectures/comments CTA band: white on light purple / orange too weak */
.cta-section .cta-content p.cta-text { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.cta-content .cta-buttons a.btn-primary-cta { background: #c2410c !important; color: #fff !important; }
.cta-content .cta-buttons a.btn-secondary-cta { background: rgba(20,24,60,.35) !important; color: #fff !important; }

/* ---------- 7. Round-2 fixes ---------- */
/* legacy .card blocks inside .xp pages (not in .content-section) */
.theme-light .xp .card p, .theme-light .xp .card li, .theme-light .xp .card p em { color: #3b4658; }
.theme-light .xp .card .btn-text, .theme-light .xp .card a.btn-text { color: #006b76; }
.theme-light .xp .card .fee-table h3 { color: #08706a; }
/* lectures/comments: light header band */
.theme-light .page-header .page-title { color: #0b1220 !important; }
.theme-light .page-header .page-subtitle { color: #44516a !important; }
.theme-light .stats-bar .stat-number { color: #0b1220 !important; }
.theme-light .stats-bar .stat-label { color: #56627a !important; }
.theme-dark .page-header .page-title { color: #f1f5f9 !important; }
.cta-section { background: linear-gradient(135deg, #3b4fc4, #5b3a9e) !important; }
/* feedback page: white panels hardcoded -> follow dark theme */
.theme-dark .feedback-intro, .theme-dark .contact-methods, .theme-dark .contact-form { background: #161d2b !important; color: #e2e8f0; border-color: rgba(148,163,184,.16) !important; }
.theme-dark .contact-methods h3, .theme-dark .contact-form h3, .theme-dark .contact-form label { color: #f1f5f9 !important; }
.theme-dark .contact-form .form-text, .theme-dark .contact-form small { color: #94a3b8 !important; }
/* ets-build standards chips: violet text only on paper, in light theme */
.theme-dark .xp-sec--paper .eb-std span { color: #ddd6fe; border-color: rgba(167,139,250,.4); }
/* muted greys in dark theme */
.theme-dark .xp-sec--paper .xp-r p, .theme-dark .xw .xp-r p { color: #a9b7c8; }
.theme-dark blockquote footer cite { color: #8a9bb2; }
.theme-dark .xp-card-meta { color: #f5a524; }
.theme-dark .xp-sec--paper p[style*="56627a"], .theme-dark .xw p[style*="56627a"] { color: #a9b7c8 !important; }
.theme-dark .apd .testimonial cite, .theme-dark .xp blockquote footer cite { color: #8a9bb2 !important; }
.theme-dark .contact-form .form-note { color: #a9b7c8 !important; }
.theme-dark .contact-form .form-note a { color: #5eead4 !important; }
.theme-light .xp .card .fee-table h3, .theme-light .apd .fee-table h3 { color: #08706a !important; }
.theme-dark .xp-card .xp-card-meta, .theme-dark .xp-grid .xp-card span.xp-card-meta { color: #f5a524 !important; }
/* text-fill overrides (legacy gradient-text rules) */
.theme-light .page-header .page-title, .theme-light .stats-bar .stat-number { -webkit-text-fill-color: #0b1220 !important; }
.theme-dark .page-header .page-title, .theme-dark .stats-bar .stat-number { -webkit-text-fill-color: #f1f5f9 !important; color: #f1f5f9 !important; }
/* feedback page: "What kind" panel follows theme */
.theme-dark .feedback-types, .theme-dark .feedback-intro ~ div, .theme-dark .feedback-type { background: #161d2b !important; color: #cbd5e1; }
.theme-dark .feedback-type h4, .theme-dark .feedback-intro ~ div h3 { color: #f1f5f9 !important; }
.theme-dark .feedback-type p { color: #94a3b8 !important; }
.theme-dark .feedback-info { background: #161d2b !important; border-color: rgba(148,163,184,.16) !important; }
.theme-dark .feedback-info h3 { color: #f1f5f9 !important; }
.theme-dark .feedback-info .feedback-type { background: #0e1624 !important; }
