/* Shared builder spacing. Keep module internals independent of their placement. */
.omega-home{--omega-module-gap:24px;--omega-detail-gap:20px}
@media(max-width:1024px){.omega-home{--omega-module-gap:20px}}
/* Wrapped hero rows already get their spacing from each module. */
.omega-home .omega-hero{row-gap:0}
.omega-home .omega-module{margin-top:0;margin-bottom:var(--omega-module-gap)}
.omega-home .omega-content,.omega-home .omega-sidebar{display:flow-root}
.omega-home.omega-article-builder .omega-content>.omega-module{margin-bottom:var(--omega-module-gap)}
.omega-home.omega-article-builder .omega-content>:is(.omega-type-article_heading,.omega-type-article_title,.omega-type-article_lead,.omega-type-article_meta,.omega-type-article_image,.omega-type-article_content,.omega-type-gallery_heading,.omega-type-gallery_lead,.omega-type-gallery_meta,.omega-type-gallery_image,.omega-type-gallery_description){margin-bottom:var(--omega-detail-gap)}
.omega-home.omega-article-builder .omega-content>.omega-type-article_categories{margin-bottom:8px}
.omega-home.omega-article-builder .omega-content>.omega-type-article_title{margin-bottom:12px}
/* The label belongs to the ad; it must not add another gap below it. */
.omega-home .omega-module.omega-type-ad,.omega-home.omega-article-builder .omega-content>.omega-type-ad{margin-bottom:var(--omega-module-gap)}
/* The sidebar owns one gap for every module, including ads and future modules.
   Cancel legacy module margins so they cannot stack with the container gap. */
.omega-home .omega-sidebar{display:flex;flex-direction:column;align-items:stretch;gap:var(--omega-module-gap)}
/* Gap separates sidebar children only. Reserve its trailing gap as well so
   the bottom zone clears the last sidebar module when the columns stack. */
.omega-home .omega-sidebar:has(>.omega-module){padding-bottom:var(--omega-module-gap)}
.omega-home .omega-sidebar>.omega-module{margin-block:0!important}
.omega-home .omega-sidebar>.omega-module>:first-child{margin-top:0}
.omega-home .omega-sidebar>.omega-module>:last-child{margin-bottom:0}
/* A middle zone owns its separators and outer spacing; children must not add a second gap. */
.omega-home :is(.omega-content-ad,.omega-gallery-inline-ad,.omega-category-middle){margin-block:var(--omega-module-gap);padding-block:12px;display:flow-root}
.omega-home :is(.omega-content-ad,.omega-gallery-inline-ad,.omega-category-middle)>.omega-module{margin-top:0;margin-bottom:0}
.omega-home :is(.omega-content-ad,.omega-gallery-inline-ad,.omega-category-middle)>.omega-module+.omega-module{margin-top:var(--omega-module-gap)}
.omega-home :is(.omega-content-ad,.omega-gallery-inline-ad,.omega-category-middle)>.omega-type-ad:last-child::after{content:none}

/* Ad boundaries use module spacing even after compact article/gallery details. */
.omega-home.omega-article-builder .omega-content>.omega-module:has(+.omega-type-ad){margin-bottom:var(--omega-module-gap)}
/* Paragraph margins must not escape the gallery description module. */
.omega-home.omega-article-builder .omega-type-gallery_description>.article-content{display:flow-root}
.omega-home.omega-article-builder .omega-type-gallery_description>.article-content>:first-child{margin-top:0}
.omega-home.omega-article-builder .omega-type-gallery_description>.article-content>:last-child{margin-bottom:0}

/* TEC resets nested div margins; retain the parallax's full-width phone alignment. */
@media(max-width:650px){
 .omega-event-list-builder .omega-event-list-middle .omega-parallax-ad{margin-left:calc((100% - var(--ad-screen-width,100%))/2)}
}
