/* MATSH course-only palette refinements, EN+AR. Does not change fonts, images,
   dimensions, schedules or content. Existing Site Identity plugin remains active. */
body.single-course.matsh-course-professional {
 --prof:#0B2D5B; --course-accent:#0B2D5B; --course-text-on-accent:#fff;
}
body.single-course.matsh-course-youth {
 --youth:#0A674F; --course-accent:#0A674F; --course-text-on-accent:#fff;
}
body.single-course.matsh-course-women {
 --women:#D4AF37; --course-accent:#D4AF37; --course-text-on-accent:#071626;
}
/* Specific English/Arabic professional templates and inline PHP hero gradients.
   Qualifying old hex is required for the generic inline-style match. */
body.single-course.matsh-course-professional :is(.cx-hero.professional,.cx-hero.prof,.professional-hero,.pl-hero,.pla-hero),
body.single-course.matsh-course-professional [style*="linear-gradient" i]:is([style*="#3A5FC4" i],[style*="#1A3A8C" i],[style*="#091540" i]) {
 background:linear-gradient(135deg,#071E3B,#0B2D5B)!important; color:#fff!important;
}
/* Youth templates may use either inline styles or named .cx / .yl template CSS. */
body.single-course.matsh-course-youth :is(.cx-hero.youth,.youth-hero,.yl-hero,.yla-hero,.ya-hero),
body.single-course.matsh-course-youth [style*="linear-gradient" i]:is([style*="#1B8F6E" i],[style*="#0D5F4A" i],[style*="#0a825b" i]) {
 background:linear-gradient(135deg,#064533,#0A674F)!important; color:#fff!important;
}
/* Gold covers womens templates and cross-listed women's courses even where
   their generic WordPress breadcrumb happens to say professional development. */
body.single-course.matsh-course-women :is(.cx-hero.women,.wl-hero,.wla-hero,.bmea-hero,.afaa-hero,.dmfea-hero),
body.single-course.matsh-course-women [style*="linear-gradient" i]:is([style*="#A0336E" i],[style*="#6B1A44" i],[style*="#3D1A4F" i],[style*="#3A0820" i]) {
 background:linear-gradient(135deg,#B38A2F,#D4AF37)!important; color:#071626!important;
}
/* Headline ink on gold must be dark on BOTH ends of the gradient (>=5.7:1). */
body.single-course.matsh-course-women :is(.cx-hero.women,.wl-hero,.wla-hero,.bmea-hero,.afaa-hero,.dmfea-hero) :is(h1,h2,h3,h4,p,strong,span,a),
body.single-course.matsh-course-women [style*="linear-gradient" i]:is([style*="#A0336E" i],[style*="#6B1A44" i],[style*="#3D1A4F" i],[style*="#3A0820" i]) :is(h1,h2,h3,h4,p,strong,span,a) {
 color:#071626!important;
}
/* Course-specific legacy accent panels, progress markers and CTAs. */
body.single-course.matsh-course-women :is(.wl-cta,.wla-cta,.bmea-cta,.afaa-cta,.dmfea-cta),
body.single-course.matsh-course-women .cx-cta.women {
 background:linear-gradient(135deg,#B38A2F,#D4AF37)!important; color:#071626!important;
}
body.single-course.matsh-course-women :is(.wl-cta,.wla-cta,.bmea-cta,.afaa-cta,.dmfea-cta,.cx-cta.women) :is(h2,h3,h4,p,strong,span) {color:#071626!important}
body.single-course.matsh-course-women :is(.wl-pain,.wla-pain,.bmea-pain,.afaa-pain,.dmfea-pain,.cx-pain.women,.wl-quote,.wla-quote,.wls-intro) {
 background:#FFF8E5!important;border-color:#D4AF37!important;
}
body.single-course.matsh-course-women :is(.wl-section-h,.wla-section-h,.bmea-section-h,.afaa-section-h,.dmfea-section-h,.wls-h2) {
 color:#071D32!important;border-color:#D4AF37!important;
}
body.single-course.matsh-course-women :is(.wl-check,.wla-check,.bmea-check,.afaa-check,.dmfea-check,.wls-h3,.cx-btn-p.women) {color:#806017!important}
body.single-course.matsh-course-women :is(.wl-day-head,.wla-day-head,.bmea-day-head,.afaa-day-head,.dmfea-day-head),
body.single-course.matsh-course-women :is(.wl-day-num,.wla-day-num,.bmea-day-num,.afaa-day-num,.dmfea-day-num) {
 background:#805E1B!important;color:#fff!important;
}
/* Course layouts created with older youth/professional color blocks. Only
   matching old color gradients are changed; other content styling is preserved. */
body.single-course.matsh-course-professional :is(.cx-section-h.professional,.cx-check.professional) {color:#0B2D5B!important;border-color:#0B2D5B!important}
body.single-course.matsh-course-youth :is(.cx-section-h.youth,.cx-check.youth) {color:#0A674F!important;border-color:#0A674F!important}
/* Existing badge colors: prevent rose/plum and overly royal-blue labels. */
body.single-course .bw {background:rgba(212,175,55,.16)!important;color:#806017!important}
body.single-course .bp {background:rgba(11,45,91,.12)!important;color:#0B2D5B!important}
body.single-course .by {background:rgba(10,103,79,.12)!important;color:#0A674F!important}


/* Cross-listed classes: generic course PHP can still output a blue hero even
   for a course that belongs in Women's or Youth's training catalogue. Match
   ONLY the original brand-gradient inline styles under a resolved pillar. */
body.single-course.matsh-course-youth [style*="linear-gradient" i]:is([style*="#3A5FC4" i],[style*="#1A3A8C" i],[style*="#091540" i]),
body.single-course.matsh-course-youth [style*="linear-gradient" i]:is([style*="#A0336E" i],[style*="#6B1A44" i]) {
 background:linear-gradient(135deg,#064533,#0A674F)!important;color:#fff!important;
}
body.single-course.matsh-course-women [style*="linear-gradient" i]:is([style*="#3A5FC4" i],[style*="#1A3A8C" i],[style*="#091540" i],[style*="#1B8F6E" i]) {
 background:linear-gradient(135deg,#B38A2F,#D4AF37)!important;color:#071626!important;
}
body.single-course.matsh-course-women [style*="linear-gradient" i]:is([style*="#3A5FC4" i],[style*="#1A3A8C" i],[style*="#091540" i],[style*="#1B8F6E" i]) :is(h1,h2,h3,h4,p,strong,span,a) {color:#071626!important}

/* 0.1.3: legacy course bodies may embed their own <style> with distinct
   prefixes (.ds-, .lfa-, .wla-, and other course-specific families). The
   section classes below are component-role-specific, never a global palette
   substitution; layout, content and CTA targets remain unchanged. */
body.single-course.matsh-course-professional {
 --matsh-course-shade:#071E3B;--matsh-course-hero-start:#071E3B;--matsh-course-ink:#0B2D5B;
 --matsh-course-soft:#ECF2F8;--matsh-course-border:#AAC3D8;
 --matsh-course-light-ink:#D5E9F8;
}
body.single-course.matsh-course-youth {
 --matsh-course-shade:#064533;--matsh-course-hero-start:#064533;--matsh-course-ink:#0A674F;
 --matsh-course-soft:#E7F4EE;--matsh-course-border:#9CCCBD;
 --matsh-course-light-ink:#B5E9D2;
}
body.single-course.matsh-course-women {
 --matsh-course-shade:#805E1B;--matsh-course-hero-start:#B38A2F;--matsh-course-ink:#806017;
 --matsh-course-soft:#FFF8E5;--matsh-course-border:#E7CA80;
 --matsh-course-light-ink:#F8E5B2;
}
/* Role-based legacy component corrections from actual course HTML. */
body.single-course:is(.matsh-course-professional,.matsh-course-youth,.matsh-course-women)
  :is([class*="-hero"],[class*="-cta"]) {
 background:linear-gradient(135deg,var(--matsh-course-hero-start),var(--course-accent))!important;
 color:var(--course-text-on-accent)!important;
}
body.single-course:is(.matsh-course-professional,.matsh-course-youth,.matsh-course-women)
  :is([class*="-hero"],[class*="-cta"]) :is(h1,h2,h3,h4,p,strong,span) {
 color:var(--course-text-on-accent)!important;
}
body.single-course:is(.matsh-course-professional,.matsh-course-youth,.matsh-course-women)
  :is([class*="-pain"],[class*="-gains"],[class*="-org"]) {
 background:var(--matsh-course-soft)!important;
}
body.single-course:is(.matsh-course-professional,.matsh-course-youth,.matsh-course-women)
  :is([class*="-pain"],[class*="-quote"]) {border-color:var(--course-accent)!important;}
body.single-course:is(.matsh-course-professional,.matsh-course-youth,.matsh-course-women)
  :is([class*="-section-h"],[class*="-check"],[class*="-faq-q"]) {
 color:var(--matsh-course-ink)!important;border-color:var(--course-accent)!important;
}
body.single-course:is(.matsh-course-professional,.matsh-course-youth,.matsh-course-women)
  :is([class*="-card"],[class*="-day"],[class*="-faq"],[class*="-rel"]) {
 border-color:var(--matsh-course-border)!important;
}
body.single-course:is(.matsh-course-professional,.matsh-course-youth,.matsh-course-women)
  [class*="-day-head"] {
 background:var(--matsh-course-shade)!important;color:#fff!important;
}
body.single-course:is(.matsh-course-professional,.matsh-course-youth,.matsh-course-women)
  [class*="-day-num"] {
 background:var(--course-accent)!important;color:var(--course-text-on-accent)!important;
}
body.single-course:is(.matsh-course-professional,.matsh-course-youth,.matsh-course-women)
  [class*="-stat"]:not(.ch-stat):not(.ch-stat-ar):not([class*="-stat-"]) {
 background:var(--matsh-course-shade)!important;color:#fff!important;
}
body.single-course:is(.matsh-course-professional,.matsh-course-youth,.matsh-course-women)
  [class*="-stat-item"] strong {color:var(--matsh-course-light-ink)!important;}
body.single-course:is(.matsh-course-professional,.matsh-course-youth,.matsh-course-women)
  :is([class*="-org-item"]::before,[class*="-btn-p"]) {color:var(--matsh-course-ink)!important;}
body.single-course:is(.matsh-course-professional,.matsh-course-youth,.matsh-course-women)
  :is(.ch-stat strong,.ch-stat-ar strong) {color:var(--matsh-course-ink)!important;}
/* Women gold on pale/white uses darker ink, never bright yellow-gold text. */
body.single-course.matsh-course-women [class*="-hero"] :is(a):not([class*="-btn-"]),
body.single-course.matsh-course-women [class*="-cta"] :is(a):not([class*="-btn-"]) {
 color:#071626!important;
}

/* Verified legacy abbreviations: EN Finance (if-) and Female Entrepreneurs
   (bme-). These are brand accents, not typography/layout changes. */
body.single-course.matsh-course-professional :is(.if-h,.if-g i,.if-faq b,.if-stat strong),
body.single-course.matsh-course-women :is(.bme-sh,.bme-ck,.bme-fq) {
 color:var(--matsh-course-ink)!important;
}
body.single-course.matsh-course-professional :is(.if-h,.if-m,.if-tbl td,.if-rel a),
body.single-course.matsh-course-women :is(.bme-sh,.bme-qt,.bme-rel) {
 border-color:var(--matsh-course-border)!important;
}
body.single-course.matsh-course-professional .if-mh,
body.single-course.matsh-course-women .bme-dh {
 background:var(--matsh-course-shade)!important;color:#fff!important;
}
body.single-course.matsh-course-professional .if-mn,
body.single-course.matsh-course-women .bme-dn {
 background:var(--course-accent)!important;color:var(--course-text-on-accent)!important;
}
body.single-course.matsh-course-women .bme-ctx {background:var(--matsh-course-soft)!important;}
body.single-course.matsh-course-women .bme-si strong {color:var(--matsh-course-light-ink)!important;}
body.single-course.matsh-course-professional .if-stat strong {color:var(--matsh-course-ink)!important;}
body.single-course:is(.matsh-course-professional,.matsh-course-youth,.matsh-course-women)
 [class*="-card"] :is(h3,h4) {color:var(--matsh-course-ink)!important;}
