/*
 * CHLOM Wave 1 — Surface + Typography Consumer CSS
 * Sprint marker: BP:WAVE1_CONNECT v1
 * Authority: Documentation/CHLOM_WAVE1_PREP_REPORT.md §E.2 + CHLOM_PREP_1_1_PATCH_PLAN.md
 *
 * Scope
 *   - 16 section types × all themes (own-root R + k3 fallback k cells) = 160 cells
 *   - Families: Surface (bg + bg-gradient) + Typography (title + body) ONLY
 *
 * Excluded (intentional, per prep-report freeze §A/§C)
 *   - about_section_section: gold master — Modern About renders via its own inline tokens
 *   - header / nav: chrome
 *   - community / gallery / text-_gal / programs / content_columns / cta / contact: H-blocked
 *   - newspaper / quickads: deferred to Wave 1.1
 *   - cards / accents / buttons / atmosphere / borders / media / layout: not Wave 1
 *
 * Tokens consumed (emitted per-section by toolbar_kit.php on [data-section]):
 *   --mab-bg, --mab-bg-gradient
 *   --mab-title-color, --mab-title-size, --mab-title-weight, --mab-title-family, --mab-title-spacing, --mab-title-line-height
 *   --mab-body-color, --mab-body-size, --mab-body-line-height, --mab-body-spacing
 *
 * Every rule is keyed on [data-section="<key>"] so different sections on the same page
 * cannot bleed styles into one another. Per-section state lives in section_toolkit__<ck>
 * meta (Prep 1.1 §I.2) and hydrates via section_toolbar.php (Prep 1.1 §I.3).
 */

/* ==============================================================
 * Surface — section-level background only (Wave 1 scope)
 * ============================================================== */

[data-section="event_section"],
[data-section="media_podcast_section"],
[data-section="bookable_products_section"],
[data-section="subscription_products_section"],
[data-section="timetable_section"],
[data-section="testimonials_section"],
[data-section="faq_section"],
[data-section="pricing_section"],
[data-section="qualifications_section"],
[data-section="services_section"],
[data-section="team_section"],
[data-section="portfolio_section"],
[data-section="three_displays_section"],
[data-section="adpage_section"],
[data-section="blogs_section"],
[data-section="directoryads_section"],
/* BP:WAVE1_1_CONNECT v1 — newspaper + quickads promoted from M → R */
[data-section="newspaper_section"],
[data-section="quickads_section"],
/* BP:WAVE2_NEXT_BATCH v1 — cta_section mount (Surface-only; Typography deferred) */
[data-section="cta_section"] {
    background-color: var(--mab-bg, transparent);
    background-image: var(--mab-bg-gradient, none);
}

/* ==============================================================
 * Typography — section-header title (scoped to section-header wrapper)
 * Each pair is [data-section="X"] .<header-wrapper-class> h2 — the
 * exact class was verified via grep audit in Wave 1 Connection sprint.
 * ============================================================== */

[data-section="event_section"]                 .k3-evt__header                h2,
[data-section="media_podcast_section"]         .k3-media-podcast-header       h2,
[data-section="bookable_products_section"]     .k3-bookable-header            h2,
[data-section="subscription_products_section"] .k3-sub-header                 h2,
[data-section="timetable_section"]             .k3-timetable-header           h2,
[data-section="testimonials_section"]          .k3-testimonials-header        h2,
[data-section="faq_section"]                   .k3-faq-header                 h2,
[data-section="pricing_section"]               .k3-pricing-header             h2,
[data-section="qualifications_section"]        .k3-qualifications-header      h2,
[data-section="services_section"]              .k3-services-header            h2,
[data-section="team_section"]                  .k3-team-header                h2,
[data-section="portfolio_section"]             .k3-portfolio-header           h2,
[data-section="three_displays_section"]        .k3-three-displays-header      h2,
[data-section="adpage_section"]                .k3-adpage-header              h2,
[data-section="blogs_section"]                 .k3-blog-section-header        h2,
[data-section="directoryads_section"]          .k3-dads-header                h2 {
    color: var(--mab-title-color, inherit);
    font-size: var(--mab-title-size, inherit);
    font-weight: var(--mab-title-weight, inherit);
    font-family: var(--mab-title-family, inherit);
    letter-spacing: var(--mab-title-spacing, normal);
    line-height: var(--mab-title-line-height, inherit);
}

/* ==============================================================
 * Typography — section-header body / subtitle paragraph
 * Descendant `p` inside the section header only. Card-body `p`
 * elements live in separate wrappers (.k3-<short>-body etc.) and
 * are NOT targeted by Wave 1.
 * ============================================================== */

[data-section="event_section"]                 .k3-evt__header                p,
[data-section="media_podcast_section"]         .k3-media-podcast-header       p,
[data-section="bookable_products_section"]     .k3-bookable-header            p,
[data-section="subscription_products_section"] .k3-sub-header                 p,
[data-section="timetable_section"]             .k3-timetable-header           p,
[data-section="testimonials_section"]          .k3-testimonials-header        p,
[data-section="faq_section"]                   .k3-faq-header                 p,
[data-section="pricing_section"]               .k3-pricing-header             p,
[data-section="qualifications_section"]        .k3-qualifications-header      p,
[data-section="services_section"]              .k3-services-header            p,
[data-section="team_section"]                  .k3-team-header                p,
[data-section="portfolio_section"]             .k3-portfolio-header           p,
[data-section="three_displays_section"]        .k3-three-displays-header      p,
[data-section="adpage_section"]                .k3-adpage-header              p,
[data-section="blogs_section"]                 .k3-blog-section-header        p,
[data-section="directoryads_section"]          .k3-dads-header                p {
    color: var(--mab-body-color, inherit);
    font-size: var(--mab-body-size, inherit);
    line-height: var(--mab-body-line-height, inherit);
    letter-spacing: var(--mab-body-spacing, normal);
}

/* ==============================================================
 * BP:WAVE1_1_CONNECT v1 — newspaper + quickads Typography
 *
 * Wave 1.1 promoted these two section types from M → R. They have
 * per-theme header classes (each theme override uses its own prefix)
 * so the consumer CSS enumerates per-theme targets explicitly.
 *
 * Wrapper prep (k3 only; classic inherits via delegator include):
 *   - k3/newspaper_section.php: added `k3-np-section-header` class
 *     to both header branches (masthead + fallback)
 *   - k3/quickads_section.php: added `.k3-quickads-section-header`
 *     wrapper around the badge
 *
 * Theme overrides already carry their own header wrappers with h2
 * (newspaper) or label-class (quickads). No surgery needed on
 * theme override files — CSS targets existing classes.
 * ============================================================== */

/* ── newspaper Typography — title (h2) ── */
[data-section="newspaper_section"] .k3-np-section-header  h2,
[data-section="newspaper_section"] .u-np-masthead         h2,
[data-section="newspaper_section"] .ed-np__masthead       h2,
[data-section="newspaper_section"] .modern-np-masthead    h2,
[data-section="newspaper_section"] .prime-np-masthead     h2,
[data-section="newspaper_section"] .studio-np-masthead    h2,
[data-section="newspaper_section"] .impact-np-masthead    h2,
[data-section="newspaper_section"] .community-np-masthead h2,
[data-section="newspaper_section"] .hvn-np-masthead       h2 {
    color: var(--mab-title-color, inherit);
    font-size: var(--mab-title-size, inherit);
    font-weight: var(--mab-title-weight, inherit);
    font-family: var(--mab-title-family, inherit);
    letter-spacing: var(--mab-title-spacing, normal);
    line-height: var(--mab-title-line-height, inherit);
}

/* ── newspaper Typography — body (tagline / count p) ── */
[data-section="newspaper_section"] .k3-np-section-header  p,
[data-section="newspaper_section"] .u-np-masthead         p,
[data-section="newspaper_section"] .ed-np__masthead       p,
[data-section="newspaper_section"] .modern-np-masthead    p,
[data-section="newspaper_section"] .prime-np-masthead     p,
[data-section="newspaper_section"] .studio-np-masthead    p,
[data-section="newspaper_section"] .impact-np-masthead    p,
[data-section="newspaper_section"] .community-np-masthead p,
[data-section="newspaper_section"] .hvn-np-masthead       p {
    color: var(--mab-body-color, inherit);
    font-size: var(--mab-body-size, inherit);
    line-height: var(--mab-body-line-height, inherit);
    letter-spacing: var(--mab-body-spacing, normal);
}

/* ── quickads Typography — title (badge / label / themed title) ──
 * Per-theme lookup:
 *   k3 (+ classic inherit) → .k3-quickads-badge inside .k3-quickads-section-header
 *   unity      → .u-quickads-label
 *   editorial  → .ed-quickads__title
 *   prime      → .prime-quickads-label
 *   community  → .community-quickads-label
 *   haven      → .hvn-quickads-label
 * Themes with no title element (modern, studio, impact) are
 * typography.enabled=false via theme_overrides — see manifest.
 */
[data-section="quickads_section"] .k3-quickads-section-header .k3-quickads-badge,
[data-section="quickads_section"] .u-quickads-label,
[data-section="quickads_section"] .ed-quickads__title,
[data-section="quickads_section"] .prime-quickads-label,
[data-section="quickads_section"] .community-quickads-label,
[data-section="quickads_section"] .hvn-quickads-label {
    color: var(--mab-title-color, inherit);
    font-size: var(--mab-title-size, inherit);
    font-weight: var(--mab-title-weight, inherit);
    font-family: var(--mab-title-family, inherit);
    letter-spacing: var(--mab-title-spacing, normal);
    line-height: var(--mab-title-line-height, inherit);
}

/* ── quickads Typography — body (excerpt across all themes) ── */
[data-section="quickads_section"] .k3-quickads-excerpt,
[data-section="quickads_section"] .u-quickads-excerpt,
[data-section="quickads_section"] .ed-quickads__quote,
[data-section="quickads_section"] .modern-quickads-excerpt,
[data-section="quickads_section"] .prime-quickads-excerpt,
[data-section="quickads_section"] .studio-quickads-excerpt,
[data-section="quickads_section"] .impact-quickads-excerpt,
[data-section="quickads_section"] .community-quickads-excerpt,
[data-section="quickads_section"] .hvn-quickads-excerpt {
    color: var(--mab-body-color, inherit);
    font-size: var(--mab-body-size, inherit);
    line-height: var(--mab-body-line-height, inherit);
    letter-spacing: var(--mab-body-spacing, normal);
}

/* ==============================================================
 * BP:WAVE1_TYPO_COMPLETE v1 — Typography coverage for own-root
 * non-k3 theme files (Wave 1 latent gap remediation)
 *
 * Each theme-override file uses its own prefix (u-, ed-, modern-,
 * prime-, studio-, impact-, community-, hvn-/haven-, prm-/prime-,
 * etc.). The original Wave 1 CSS only covered .k3-<short>-header
 * so Typography tokens landed only on k3 cells + k-fallback cells.
 *
 * This block adds per-theme selectors for the 16 Wave 1 section
 * types across 9 non-k3 themes wherever an own-root file exists
 * with a classed header/title that is not overridden by inline
 * `style="color:..."` attributes.
 *
 * Honestly suppressed (theme_overrides in manifest):
 *   - impact/event_section, community/event_section, haven/event_section
 *     → h2 uses inline `style="color:#1e293b; font-size:clamp(...)"`
 *       which wins against external CSS. Surface still active.
 *
 * Inherited via k3 fallback (no new selectors needed):
 *   - classic (all R cells — blogs, directoryads delegate to k3)
 *   - k-fallback cells already covered by Wave 1 k3 rules
 *
 * Audit date: 2026-04-20 (Wave 1 Typography Completion sprint)
 * ============================================================== */

/* ── Title role — per-theme targets (~100 cells) ── */
/* unity */
[data-section="event_section"]                 .ev-header                     h2,
[data-section="media_podcast_section"]         .unity-media-podcast-header    h2,
[data-section="bookable_products_section"]     .u-bookable-header             h2,
[data-section="subscription_products_section"] .us-header                     h2,
[data-section="timetable_section"]             .u-head                        h2,
[data-section="testimonials_section"]          .t-head                        h2,
[data-section="faq_section"]                   .faq-head                      h2,
[data-section="pricing_section"]               .u-head                        h2,
[data-section="qualifications_section"]        .u-head                        h2,
[data-section="services_section"]              .svc-head                      h2,
[data-section="team_section"]                  .tm-head                       h2,
[data-section="portfolio_section"]             .u-head                        h2,
[data-section="three_displays_section"]        .u-head                        h2,
[data-section="adpage_section"]                .u-ap-header                   h2,
[data-section="blogs_section"]                 .uni-blog-header               h2,
[data-section="directoryads_section"]          .u-dads-heading                h2,
/* editorial */
[data-section="event_section"]                 h2.ed-event__title,
[data-section="media_podcast_section"]         .ed-media-podcast-header       h2,
[data-section="bookable_products_section"]     .ed-bookable__header           h2,
[data-section="subscription_products_section"] .eds-header                    h2,
[data-section="timetable_section"]             .ed-timetable__header          h2,
[data-section="testimonials_section"]          .ed-testimonials__header       h2,
[data-section="faq_section"]                   .ed-faq__header                h2,
[data-section="pricing_section"]               .ed-pricing__header            h2,
[data-section="qualifications_section"]        .ed-quals__header              h2,
[data-section="services_section"]              .ed-services__header           h2,
[data-section="team_section"]                  .ed-team__header               h2,
[data-section="portfolio_section"]             .ed-portfolio__header          h2,
[data-section="three_displays_section"]        .ed-displays__header           h2,
[data-section="adpage_section"]                .ed-adpage__masthead           h2,
[data-section="blogs_section"]                 .ed-blog__header               h2,
[data-section="directoryads_section"]          .ed-dads__header               h2,
/* modern (own-root — 14 cells; event/media_podcast fall back to k3 and are already covered) */
[data-section="media_podcast_section"]         .modern-media-podcast-header   h2,
[data-section="bookable_products_section"]     .modern-bookable-header        h2,
[data-section="subscription_products_section"] .ms-header                     h2,
[data-section="timetable_section"]             .modern-timetable-header       h2,
[data-section="testimonials_section"]          .modern-testi-hd               h2,
[data-section="faq_section"]                   .modern-faq-header             h2,
[data-section="pricing_section"]               .modern-pricing-header         h2,
[data-section="qualifications_section"]        .modern-qual-header            h2,
[data-section="services_section"]              .modern-svc-hdr                h2,
[data-section="team_section"]                  .modern-team-hd                h2,
[data-section="portfolio_section"]             .modern-pf-header              h2,
[data-section="three_displays_section"]        .modern-media-header           h2,
[data-section="adpage_section"]                .modern-adpage-header          h2,
[data-section="blogs_section"]                 .modern-blog-header            h2,
[data-section="directoryads_section"]          h2.modern-dads-title,
/* prime (own-root — 13 cells) */
[data-section="bookable_products_section"]     .prime-bookable-header         h2,
[data-section="subscription_products_section"] .ps-header                     h2,
[data-section="timetable_section"]             .prime-timetable-header        h2,
[data-section="testimonials_section"]          .prm-testi-hd                  h2,
[data-section="faq_section"]                   .prime-faq-header              h2,
[data-section="pricing_section"]               .prime-pricing-header          h2,
[data-section="qualifications_section"]        .prm-qual-header               h2,
[data-section="services_section"]              .prime-svc-hdr                 h2,
[data-section="team_section"]                  .prm-team-hd                   h2,
[data-section="three_displays_section"]        .prime-media-header            h2,
[data-section="adpage_section"]                .prime-adpage-header           h2,
[data-section="blogs_section"]                 .prm-blog-header               h2,
[data-section="directoryads_section"]          .prime-dads-header             h2,
/* studio (own-root — 15 cells; media_podcast falls back to k3) */
[data-section="event_section"]                 h2.s-evt__title,
[data-section="bookable_products_section"]     .studio-bookable-header        h2,
[data-section="subscription_products_section"] .studio-subs-header            h2,
[data-section="timetable_section"]             .studio-timetable-header       h2,
[data-section="testimonials_section"]          .stu-testi-hd                  h2,
[data-section="faq_section"]                   .studio-faq-header             h2,
[data-section="pricing_section"]               .studio-pricing-header         h2,
[data-section="qualifications_section"]        .stu-qual-header               h2,
[data-section="services_section"]              .studio-svc-hdr                h2,
[data-section="team_section"]                  .stu-team-hd                   h2,
[data-section="portfolio_section"]             .stu-pf-header                 h2,
[data-section="three_displays_section"]        .studio-media-header           h2,
[data-section="adpage_section"]                .studio-adpage-header          h2,
[data-section="blogs_section"]                 .stu-blog-header               h2,
[data-section="directoryads_section"]          .studio-dads-header            h2,
/* impact (own-root — 14 cells; event SUPPRESSED via manifest theme_overrides) */
[data-section="bookable_products_section"]     .impact-bookable-header        h2,
[data-section="subscription_products_section"] .impact-subs-header            h2,
[data-section="timetable_section"]             .impact-timetable-header       h2,
[data-section="testimonials_section"]          .imp-testi-hd                  h2,
[data-section="faq_section"]                   .impact-faq-header             h2,
[data-section="pricing_section"]               .impact-pricing-header         h2,
[data-section="qualifications_section"]        .imp-qual-header               h2,
[data-section="services_section"]              .impact-svc-hdr                h2,
[data-section="team_section"]                  .imp-team-hd                   h2,
[data-section="portfolio_section"]             .imp-pf-header                 h2,
[data-section="adpage_section"]                .impact-adpage-header          h2,
[data-section="blogs_section"]                 .imp-blog-header               h2,
[data-section="directoryads_section"]          .impact-dads-header            h2,
/* community (own-root — 14 cells; event SUPPRESSED via manifest theme_overrides) */
[data-section="bookable_products_section"]     .community-bookable-header     h2,
[data-section="subscription_products_section"] .community-subs-header         h2,
[data-section="timetable_section"]             .community-timetable-header    h2,
[data-section="testimonials_section"]          .com-testi-hd                  h2,
[data-section="faq_section"]                   .community-faq-header          h2,
[data-section="pricing_section"]               .community-pricing-header      h2,
[data-section="qualifications_section"]        .cmn-qual-header               h2,
[data-section="services_section"]              .community-svc-hdr             h2,
[data-section="team_section"]                  .com-team-hd                   h2,
[data-section="portfolio_section"]             .cmty-pf-header                h2,
[data-section="adpage_section"]                .community-adpage-header       h2,
[data-section="blogs_section"]                 .com-blog-header               h2,
[data-section="directoryads_section"]          .community-dads-header         h2,
/* haven (own-root — 14 cells; event SUPPRESSED via manifest theme_overrides; portfolio falls back to k3) */
[data-section="media_podcast_section"]         .haven-media-podcast-header    h2,
[data-section="bookable_products_section"]     .hvn-bookable-header           h2,
[data-section="subscription_products_section"] .haven-subs-header             h2,
[data-section="timetable_section"]             .haven-timetable-header        h2,
[data-section="testimonials_section"]          .hvn-testi-hd                  h2,
[data-section="faq_section"]                   .haven-faq-header              h2,
[data-section="pricing_section"]               .haven-pricing-header          h2,
[data-section="qualifications_section"]        .hvn-qual-header               h2,
[data-section="services_section"]              .haven-svc-hdr                 h2,
[data-section="team_section"]                  .hvn-team-hd                   h2,
[data-section="three_displays_section"]        .haven-media-header            h2,
[data-section="adpage_section"]                .hvn-adpage-header             h2,
[data-section="blogs_section"]                 .hvn-blog-header               h2,
[data-section="directoryads_section"]          .hvn-dads-header               h2 {
    color: var(--mab-title-color, inherit);
    font-size: var(--mab-title-size, inherit);
    font-weight: var(--mab-title-weight, inherit);
    font-family: var(--mab-title-family, inherit);
    letter-spacing: var(--mab-title-spacing, normal);
    line-height: var(--mab-title-line-height, inherit);
}

/* ── Body role — per-theme targets ──
 * Same wrapper classes as the title block above, targeting direct `p`
 * descendants. Many themes place an h2 + p pair inside the header
 * wrapper for title + subtitle. Themes without a p in that wrapper
 * simply have no body-role target and the rule matches nothing —
 * graceful.
 */
[data-section="event_section"]                 .ev-header                     p,
[data-section="media_podcast_section"]         .unity-media-podcast-header    p,
[data-section="bookable_products_section"]     .u-bookable-header             p,
[data-section="subscription_products_section"] .us-header                     p,
[data-section="timetable_section"]             .u-head                        p,
[data-section="testimonials_section"]          .t-head                        p,
[data-section="faq_section"]                   .faq-head                      p,
[data-section="pricing_section"]               .u-head                        p,
[data-section="qualifications_section"]        .u-head                        p,
[data-section="services_section"]              .svc-head                      p,
[data-section="team_section"]                  .tm-head                       p,
[data-section="portfolio_section"]             .u-head                        p,
[data-section="three_displays_section"]        .u-head                        p,
[data-section="adpage_section"]                .u-ap-header                   p,
[data-section="blogs_section"]                 .uni-blog-header               p,
[data-section="directoryads_section"]          .u-dads-heading                p,
/* editorial */
[data-section="media_podcast_section"]         .ed-media-podcast-header       p,
[data-section="bookable_products_section"]     .ed-bookable__header           p,
[data-section="subscription_products_section"] .eds-header                    p,
[data-section="timetable_section"]             .ed-timetable__header          p,
[data-section="testimonials_section"]          .ed-testimonials__header       p,
[data-section="faq_section"]                   .ed-faq__header                p,
[data-section="pricing_section"]               .ed-pricing__header            p,
[data-section="qualifications_section"]        .ed-quals__header              p,
[data-section="services_section"]              .ed-services__header           p,
[data-section="team_section"]                  .ed-team__header               p,
[data-section="portfolio_section"]             .ed-portfolio__header          p,
[data-section="three_displays_section"]        .ed-displays__header           p,
[data-section="adpage_section"]                .ed-adpage__masthead           p,
[data-section="blogs_section"]                 .ed-blog__header               p,
[data-section="directoryads_section"]          .ed-dads__header               p,
/* modern */
[data-section="media_podcast_section"]         .modern-media-podcast-header   p,
[data-section="bookable_products_section"]     .modern-bookable-header        p,
[data-section="subscription_products_section"] .ms-header                     p,
[data-section="timetable_section"]             .modern-timetable-header       p,
[data-section="testimonials_section"]          .modern-testi-hd               p,
[data-section="faq_section"]                   .modern-faq-header             p,
[data-section="pricing_section"]               .modern-pricing-header         p,
[data-section="qualifications_section"]        .modern-qual-header            p,
[data-section="services_section"]              .modern-svc-hdr                p,
[data-section="team_section"]                  .modern-team-hd                p,
[data-section="portfolio_section"]             .modern-pf-header              p,
[data-section="three_displays_section"]        .modern-media-header           p,
[data-section="adpage_section"]                .modern-adpage-header          p,
[data-section="blogs_section"]                 .modern-blog-header            p,
/* prime */
[data-section="bookable_products_section"]     .prime-bookable-header         p,
[data-section="subscription_products_section"] .ps-header                     p,
[data-section="timetable_section"]             .prime-timetable-header        p,
[data-section="testimonials_section"]          .prm-testi-hd                  p,
[data-section="faq_section"]                   .prime-faq-header              p,
[data-section="pricing_section"]               .prime-pricing-header          p,
[data-section="qualifications_section"]        .prm-qual-header               p,
[data-section="services_section"]              .prime-svc-hdr                 p,
[data-section="team_section"]                  .prm-team-hd                   p,
[data-section="three_displays_section"]        .prime-media-header            p,
[data-section="adpage_section"]                .prime-adpage-header           p,
[data-section="blogs_section"]                 .prm-blog-header               p,
[data-section="directoryads_section"]          .prime-dads-header             p,
/* studio */
[data-section="bookable_products_section"]     .studio-bookable-header        p,
[data-section="subscription_products_section"] .studio-subs-header            p,
[data-section="timetable_section"]             .studio-timetable-header       p,
[data-section="testimonials_section"]          .stu-testi-hd                  p,
[data-section="faq_section"]                   .studio-faq-header             p,
[data-section="pricing_section"]               .studio-pricing-header         p,
[data-section="qualifications_section"]        .stu-qual-header               p,
[data-section="services_section"]              .studio-svc-hdr                p,
[data-section="team_section"]                  .stu-team-hd                   p,
[data-section="portfolio_section"]             .stu-pf-header                 p,
[data-section="three_displays_section"]        .studio-media-header           p,
[data-section="adpage_section"]                .studio-adpage-header          p,
[data-section="blogs_section"]                 .stu-blog-header               p,
[data-section="directoryads_section"]          .studio-dads-header            p,
/* impact */
[data-section="bookable_products_section"]     .impact-bookable-header        p,
[data-section="subscription_products_section"] .impact-subs-header            p,
[data-section="timetable_section"]             .impact-timetable-header       p,
[data-section="testimonials_section"]          .imp-testi-hd                  p,
[data-section="faq_section"]                   .impact-faq-header             p,
[data-section="pricing_section"]               .impact-pricing-header         p,
[data-section="qualifications_section"]        .imp-qual-header               p,
[data-section="services_section"]              .impact-svc-hdr                p,
[data-section="team_section"]                  .imp-team-hd                   p,
[data-section="portfolio_section"]             .imp-pf-header                 p,
[data-section="adpage_section"]                .impact-adpage-header          p,
[data-section="blogs_section"]                 .imp-blog-header               p,
[data-section="directoryads_section"]          .impact-dads-header            p,
/* community */
[data-section="bookable_products_section"]     .community-bookable-header     p,
[data-section="subscription_products_section"] .community-subs-header         p,
[data-section="timetable_section"]             .community-timetable-header    p,
[data-section="testimonials_section"]          .com-testi-hd                  p,
[data-section="faq_section"]                   .community-faq-header          p,
[data-section="pricing_section"]               .community-pricing-header      p,
[data-section="qualifications_section"]        .cmn-qual-header               p,
[data-section="services_section"]              .community-svc-hdr             p,
[data-section="team_section"]                  .com-team-hd                   p,
[data-section="portfolio_section"]             .cmty-pf-header                p,
[data-section="adpage_section"]                .community-adpage-header       p,
[data-section="blogs_section"]                 .com-blog-header               p,
[data-section="directoryads_section"]          .community-dads-header         p,
/* haven */
[data-section="media_podcast_section"]         .haven-media-podcast-header    p,
[data-section="bookable_products_section"]     .hvn-bookable-header           p,
[data-section="subscription_products_section"] .haven-subs-header             p,
[data-section="timetable_section"]             .haven-timetable-header        p,
[data-section="testimonials_section"]          .hvn-testi-hd                  p,
[data-section="faq_section"]                   .haven-faq-header              p,
[data-section="pricing_section"]               .haven-pricing-header          p,
[data-section="qualifications_section"]        .hvn-qual-header               p,
[data-section="services_section"]              .haven-svc-hdr                 p,
[data-section="team_section"]                  .hvn-team-hd                   p,
[data-section="three_displays_section"]        .haven-media-header            p,
[data-section="adpage_section"]                .hvn-adpage-header             p,
[data-section="blogs_section"]                 .hvn-blog-header               p,
[data-section="directoryads_section"]          .hvn-dads-header               p {
    color: var(--mab-body-color, inherit);
    font-size: var(--mab-body-size, inherit);
    line-height: var(--mab-body-line-height, inherit);
    letter-spacing: var(--mab-body-spacing, normal);
}

/* ==============================================================
 * BP:WAVE1_CASCADE_FIX v1 — specificity override (2026-04-21)
 *
 * ROOT CAUSE (diagnosed post-deploy):
 *   Each Wave 1 section PHP file contains an internal <style> block
 *   declaring e.g. `.k3-services-section { background: var(--cv-bg,…); }`
 *   at specificity (0,1,0). The Wave 1 surface rules above use
 *   `[data-section="X"]` — ALSO specificity (0,1,0). At equal
 *   specificity, the internal <style> (declared later in the document)
 *   wins, and its `background:` shorthand clobbers --mab-bg changes.
 *
 * Fix: bump Wave 1 selectors to `body.bpage [data-section="X"]`
 * (specificity (0,2,1), same convention `section-tokens.css` uses)
 * and thread `--cv-bg` into the fallback so unedited sections keep
 * their variant background identity.
 *
 * Scope: 18 Wave 1 + 1.1 active section types. Does not touch
 * Modern About (its own gold-master consumer chain handles bg
 * separately via modern-about--variant-* rules).
 * ============================================================== */

body.bpage [data-section="event_section"],
body.bpage [data-section="media_podcast_section"],
body.bpage [data-section="bookable_products_section"],
body.bpage [data-section="subscription_products_section"],
body.bpage [data-section="timetable_section"],
body.bpage [data-section="testimonials_section"],
body.bpage [data-section="faq_section"],
body.bpage [data-section="pricing_section"],
body.bpage [data-section="qualifications_section"],
body.bpage [data-section="services_section"],
body.bpage [data-section="team_section"],
body.bpage [data-section="portfolio_section"],
body.bpage [data-section="three_displays_section"],
body.bpage [data-section="adpage_section"],
body.bpage [data-section="blogs_section"],
body.bpage [data-section="directoryads_section"],
body.bpage [data-section="newspaper_section"],
body.bpage [data-section="quickads_section"],
body.bpage [data-section="content_columns_section"],
body.bpage [data-section="gallery_section"],
body.bpage [data-section="contact_section"],
body.bpage [data-section="text-_gal"],
/* BP:WAVE2_SURFACE_MOUNT_CHROME v1 — header + nav chrome Surface-only */
body.bpage [data-section="header_section"],
body.bpage [data-section="nav_section"],
/* BP:WAVE2_SURFACE_MOUNT_REMAINING_CONTENT v1 — Feature Columns + About Company */
body.bpage [data-section="community_section"],
body.bpage [data-section="programs_section"],
/* BP:WAVE2_SURFACE_MOUNT_SIMPLE v1 — info + banner + video */
body.bpage [data-section="info_section"],
body.bpage [data-section="banner_section"],
body.bpage [data-section="video_section"] {
    background-color: var(--mab-bg, var(--cv-bg, transparent));
    background-image: var(--mab-bg-gradient, none);
}

/* Typography title-role re-statement with `body.bpage` prefix.
   Specificity was already (0,2,1) which theoretically beat the
   inline <style> (0,1,1), but bumping to (0,3,1) here provides
   a belt-and-suspenders guarantee across all themes. */
body.bpage [data-section="event_section"]                 .k3-evt__header                h2,
body.bpage [data-section="media_podcast_section"]         .k3-media-podcast-header       h2,
body.bpage [data-section="bookable_products_section"]     .k3-bookable-header            h2,
body.bpage [data-section="subscription_products_section"] .k3-sub-header                 h2,
body.bpage [data-section="timetable_section"]             .k3-timetable-header           h2,
body.bpage [data-section="testimonials_section"]          .k3-testimonials-header        h2,
body.bpage [data-section="faq_section"]                   .k3-faq-header                 h2,
body.bpage [data-section="pricing_section"]               .k3-pricing-header             h2,
body.bpage [data-section="qualifications_section"]        .k3-qualifications-header      h2,
body.bpage [data-section="services_section"]              .k3-services-header            h2,
body.bpage [data-section="team_section"]                  .k3-team-header                h2,
body.bpage [data-section="portfolio_section"]             .k3-portfolio-header           h2,
body.bpage [data-section="three_displays_section"]        .k3-three-displays-header      h2,
body.bpage [data-section="adpage_section"]                .k3-adpage-header              h2,
body.bpage [data-section="blogs_section"]                 .k3-blog-section-header        h2,
body.bpage [data-section="directoryads_section"]          .k3-dads-header                h2,
body.bpage [data-section="newspaper_section"]             .k3-np-section-header          h2,
body.bpage [data-section="quickads_section"]              .k3-quickads-section-header    .k3-quickads-badge {
    color: var(--mab-title-color, var(--cv-text, inherit));
    font-size: var(--mab-title-size, inherit);
    font-weight: var(--mab-title-weight, inherit);
    font-family: var(--mab-title-family, inherit);
    letter-spacing: var(--mab-title-spacing, normal);
    line-height: var(--mab-title-line-height, inherit);
}

/* Typography body-role re-statement with `body.bpage` prefix. */
body.bpage [data-section="event_section"]                 .k3-evt__header                p,
body.bpage [data-section="media_podcast_section"]         .k3-media-podcast-header       p,
body.bpage [data-section="bookable_products_section"]     .k3-bookable-header            p,
body.bpage [data-section="subscription_products_section"] .k3-sub-header                 p,
body.bpage [data-section="timetable_section"]             .k3-timetable-header           p,
body.bpage [data-section="testimonials_section"]          .k3-testimonials-header        p,
body.bpage [data-section="faq_section"]                   .k3-faq-header                 p,
body.bpage [data-section="pricing_section"]               .k3-pricing-header             p,
body.bpage [data-section="qualifications_section"]        .k3-qualifications-header      p,
body.bpage [data-section="services_section"]              .k3-services-header            p,
body.bpage [data-section="team_section"]                  .k3-team-header                p,
body.bpage [data-section="portfolio_section"]             .k3-portfolio-header           p,
body.bpage [data-section="three_displays_section"]        .k3-three-displays-header      p,
body.bpage [data-section="adpage_section"]                .k3-adpage-header              p,
body.bpage [data-section="blogs_section"]                 .k3-blog-section-header        p,
body.bpage [data-section="directoryads_section"]          .k3-dads-header                p,
body.bpage [data-section="newspaper_section"]             .k3-np-section-header          p,
body.bpage [data-section="quickads_section"]              .k3-quickads-excerpt {
    color: var(--mab-body-color, var(--cv-text-muted, inherit));
    font-size: var(--mab-body-size, inherit);
    line-height: var(--mab-body-line-height, inherit);
    letter-spacing: var(--mab-body-spacing, normal);
}

/* ==============================================================
 * BP:CONTENT_COLUMNS_TYPO_WIRE v1 — Typography consumer for
 * content_columns_section (k3 + classic-delegator cells).
 *
 * Header wrapper verified at k3/content_columns_section.php:374
 * (`.k3-ccol-hd` containing `<h2>` and `<p class="k3-ccol-intro">`).
 *
 * Token namespace: --mab-typo-* (distinct from the legacy
 * --mab-title-* / --mab-body-* token bus used by Wave 1 sections).
 * Tokens emitted by the Typography family of section_toolbar.php
 * for content_columns_section only; no other section consumes them.
 * ============================================================== */

body.bpage [data-section="content_columns_section"] .k3-ccol-hd h2 {
    color:           var(--mab-typo-title-color,   var(--chl-override-title-color, var(--k3-text-color, var(--k3-primary, #7c3aed))));
    font-size:       var(--mab-typo-title-size,    var(--chl-override-title-size, clamp(1.875rem, 3.5vw, 2.625rem)));
    font-weight:     var(--mab-typo-title-weight,  var(--chl-override-title-weight, 800));
    font-family:     var(--mab-typo-title-family,  var(--bpage-font-display, 'DM Sans', sans-serif));
    letter-spacing:  var(--mab-typo-title-spacing, -0.03em);
    line-height:     var(--mab-typo-title-leading, 1.12);
}

body.bpage [data-section="content_columns_section"] .k3-ccol-hd .k3-ccol-intro {
    color:           var(--mab-typo-body-color,    var(--chl-override-body-color, #6b7280));
    font-size:       var(--mab-typo-body-size,     var(--chl-override-body-size, 1.0625rem));
    font-weight:     var(--mab-typo-body-weight,   inherit);
    font-family:     var(--mab-typo-body-family,   inherit);
    letter-spacing:  var(--mab-typo-body-spacing,  normal);
    line-height:     var(--mab-typo-body-leading,  1.75);
}

/* ==============================================================
 * BP:SURFACE_DERIVE_CARDS v1 — Surface-derived card tinting
 *
 * Derives --mab-card-bg from --mab-bg via color-mix() on sections
 * where opaque inner children mask the section root. No new UI, no
 * new manifest capabilities — pure Surface-driven visual propagation.
 *
 * Contract: var(--mab-bg) with NO fallback. When --mab-bg is unset,
 * the var() resolves invalid-at-computed-value → --mab-card-bg stays
 * unset → consumers fall back to their per-section defaults. Zero
 * regression when vendor hasn't set a Surface color.
 *
 * Cards already reading --mab-card-bg (k3-premium.css §A card list:
 * .k3-sub-card, .k3-testimonial-card, .k3-portfolio-item, .k3-*) pick
 * up the tint via custom-property inheritance from the section element.
 * Cards NOT in that list (.k3-testimonials-shell slab, .k3-quickads-card
 * single-card design) get explicit consumers below.
 *
 * P1 batch (this commit): testimonials, quickads, subscription_products.
 * P2 batch (deferred): portfolio, three_displays, newspaper.
 * ============================================================== */

/* P1 — section-scoped --mab-card-bg derivation.
   Seeded at (0,3,0) on section roots. Descendants inherit. */
body.bpage [data-section="testimonials_section"],
body.bpage [data-section="quickads_section"],
body.bpage [data-section="subscription_products_section"] {
    --mab-card-bg: color-mix(in srgb, var(--mab-bg) 12%, #ffffff 88%);
}

/* P1 — testimonials full-width slab.
   Single-authority rule: Surface drives the shell wrapper; Cards is bound
   only to `.k3-testimonial-card` items. Double-bind removed 2026-04-23. */
body.bpage [data-section="testimonials_section"] .k3-testimonials-shell {
    background: transparent;
}

/* P1 — explicit consumer for the quickads single-card design.
   .k3-quickads-card is NOT in k3-premium.css card list. Default fallback
   preserves the subtle brand gradient when vendor hasn't set Surface. */
body.bpage [data-section="quickads_section"] .k3-quickads-card {
    background: var(--mab-card-bg, linear-gradient(135deg, #fafafa 0%, #f8fafc 100%));
}

/* ==============================================================
 * BP:ATMOSPHERE_OVERLAY v1 — atmosphere overlay (5-section pilot)
 *
 * Token: --mab-atmosphere-overlay (default: none → no paint cost when
 * vendor hasn't set a wash). Bound only as ::before on section root.
 *
 * Rules of engagement (from spec):
 *   - background-image (NOT shorthand) — leaves --mab-bg / --mab-bg-gradient
 *     untouched on the section element so Surface is preserved.
 *   - Never on cards, text, or buttons.
 *   - opacity 0.12 keeps text contrast intact.
 *   - pointer-events:none so the overlay never eats clicks.
 *
 * Position contract: section root is forced to position:relative so the
 * absolutely-positioned ::before is contained. Specificity (0,1,0) ties
 * with theme rules that already set position:relative (e.g., .prime-pricing)
 * — both declare the same value, harmless.
 *
 * Conflict (.prime-pricing::before, prime-theme.css:820):
 *   Prime already binds its section root ::before for a decorative offset
 *   blob (radial gradient, top:-40% right:-20%). Wave1 loads after prime,
 *   so at equal specificity (0,1,1) our rule would overwrite the blob's
 *   geometry and background-image. The :not(.prime-pricing) exclusion on
 *   the pricing selector preserves the existing prime decoration; the
 *   atmosphere overlay is therefore deferred for the prime theme until
 *   the prime decoration is migrated to ::after or to a child element.
 * ============================================================== */

[data-section="services_section"],
[data-section="pricing_section"],
[data-section="testimonials_section"],
[data-section="team_section"],
[data-section="content_columns_section"] {
    position: relative;
}

[data-section="services_section"]::before,
[data-section="pricing_section"]:not(.prime-pricing)::before,
[data-section="testimonials_section"]::before,
[data-section="team_section"]::before,
[data-section="content_columns_section"]::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--mab-atmosphere-overlay, none);
    opacity: 0.12;
    pointer-events: none;
}
