
/* Theme spacing belongs to editorial pages; full-page apps provide their own spacing. */
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #main { padding-top:0!important; padding-bottom:0!important; background:#0e0b09!important; }
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #main > .wf-wrap,
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #main .wf-container-main,
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #main #content { padding-top:0!important; padding-bottom:0!important; margin-top:0!important; margin-bottom:0!important; }
/* Only builder wrappers around a full-page app, never the app's internal sections. */
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #main .vc_column-inner:has(:is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) { padding-top:0!important; padding-bottom:0!important; }
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #main :is(.wpb_raw_html,.wpb_content_element):has(:is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) { margin-top:0!important; margin-bottom:0!important; }
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #main :is(.wpb_raw_html,.wpb_content_element):has(.kepma-text-version) { margin-bottom:0!important; }
/* Empty raw-code blocks after the last builder row also carry a 35px margin. */
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #content .wpb-content-wrapper > .wpb_content_element:last-child { margin-bottom:0!important; }
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #content > :is(.kepma-service-links,.kps-article-resources) { margin-bottom:0!important; }
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #content > .kepma-service-links { display:flow-root; color:#f5efe4; }
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #content > .kepma-service-links :is(p,h1,h2,h3) { color:inherit!important; }
/* Keep the spectrum app's own dark/light theme switch functional. */
body:has(#main canvas#scope) #main { background:var(--bg,#0a0e13)!important; }
/* Remove the old negative-margin compensation and empty Gutenberg spacer paragraphs. */
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #content .kepma-video-hero { margin-top:0!important; margin-bottom:0!important; }
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #content > p:empty,
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #content > .entry-content > p:empty { display:none!important; }
/* The visible transcript stays readable and its spacing is inside the dark surface. */
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #content .kepma-text-version { margin-top:0!important; margin-bottom:0!important; padding:24px 20px; color:#f5efe4; background:#0e0b09; }
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #content .kepma-text-version :is(h1,h2,h3,h4,p,li) { color:inherit; }
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #content .kepma-text-version a { color:#d1a66c; }
/* The footer keeps its own menu padding without another theme gap outside it. */
body:has(#main :is(.kepma-bk,.kepma-bk-ns,.kepma-bk-dark,.kepma-hrow,#kepma-hero,#kepma-wp-hero,.kpg-catalog,.kp-product,#kprp-app,.kfaq,.kdl,.kt,kepma-tools-page,.kepma-fullheight-container,.kepma-cup-2026-widget,canvas#scope)) #footer { margin-top:0!important; }
