/* Content-to-content spacing: a boundary gets half from each neighbour.
   A break inside one wrapper gets the full distance, exactly once. */
.site-layout,
.site-layout.layout-home { --section-space: 150px; }
@media (max-width: 991px) {
 .site-layout, .site-layout.layout-home { --section-space: 80px; }
}
@media (max-width: 767px) {
 .site-layout, .site-layout.layout-home { --section-space: 64px; }
}

.site-layout .section_main.content-section,
.site-layout .section_main.footer_wrap {
 padding-block: calc(var(--section-space) / 2);
 margin-block: 0;
 min-height: 0;
}
.site-layout .section_main.resources-hero,
.site-layout .section_main.article-page,
.site-layout .policy-page,
.site-layout.layout-contact .hero.pricing_hero {
 padding-bottom: calc(var(--section-space) / 2);
 min-height: 0;
}
.site-layout.layout-resources .section_main.content-section._0tm,
.site-layout.layout-about #team.section_main,
.site-layout.layout-about .section_main.light_black_bg._1remtbm {
 padding-top: calc(var(--section-space) / 2);
}
.site-layout .site-footer .footer-grid {
 padding-top: calc(var(--section-space) / 2);
}
.site-layout .footer_wrap .cta_section { margin-block: 0; }

/* Remove text's default outer margins from the measured section edges. */
.site-layout .content-section h2:first-child,
.site-layout .resources-hero h1:first-child,
.site-layout .footer_wrap h3:first-child { margin-top: 0; }
.site-layout .content-section > .container_main > p:last-child,
.site-layout .content-section > .container_main > div > p:last-child,
.site-layout .article-page .rte > :last-child,
.site-layout .policy-content > :last-child { margin-bottom: 0; }

/* Home's intro/stats, features/presence and comparison/industries breaks. */
.site-layout.layout-home #about.content-section > .spacer._4rem,
.site-layout.layout-home .content-section .spacer.home-presence-gap,
.site-layout.layout-home .home-industries > .spacer._4rem,
.site-layout.layout-about .container_main.grid._2_column:has(> .div-block-203) + .spacer {
 height: var(--section-space);
 padding: 0;
 margin: 0;
 flex: none;
}
.site-layout.layout-home .div-block-2 {
 padding-block: calc(var(--section-space) / 2);
 margin-block: 0;
 gap: 2rem;
}
.site-layout.layout-home .div-block-2 .section_main.loop.solutions {
 padding-block: 0;
 margin-block: 0;
}
/* The technology ticker belongs to the hero and stays compact. */
.site-layout.layout-home .technology-strip {
 padding-block: 24px;
 margin-block: 0;
}
.site-layout.layout-home .technology-strip .section_main.loop {
 padding-block: 0;
 margin-block: 0;
 min-height: 0;
}

/* Dividers between services do not add a grid gap to the section padding. */
.site-layout.layout-solutions .div-block-349 { row-gap: 0; }
.site-layout.layout-solutions .div-block-349 > .container_main.solutions {
 padding-block: calc(var(--section-space) / 2);
 margin-block: 0;
 min-height: 0;
}
.site-layout.layout-solutions .div-block-349 > .container_main.solutions:first-child { padding-top: 0; }
.site-layout.layout-solutions .div-block-349 > .container_main.solutions:last-child { padding-bottom: 0; }
.site-layout.layout-solutions .div-block-349 > .divider_line { margin: 0; }
.site-layout.layout-solutions .div-block-349 + .spacer._4rem { display: none; }

/* Article topics use the same boundary distance, with or without a divider.
   Put spacing on the wrapper rather than a collapsing HR margin. */
.site-layout .article-page .rte h2,
.site-layout .policy-content h2 {
 margin-top: var(--section-space);
 margin-bottom: 1rem;
}
.site-layout .article-page .rte > h2:first-child,
.site-layout .policy-content > h2:first-child { margin-top: 0; }
.site-layout .article-page .rte > .w-embed:has(> hr) {
 display: flow-root;
 height: var(--section-space);
 padding: calc(var(--section-space) / 2) 0 0;
 margin: 0;
 box-sizing: border-box;
}
.site-layout .article-page .rte > .w-embed > hr {
 margin: 0;
}
.site-layout .article-page .rte > hr {
 margin: calc(var(--section-space) / 2) 0;
}
.site-layout .article-page .rte > :has(+ .w-embed > hr),
.site-layout .article-page .rte > :has(+ hr) { margin-bottom: 0; }
.site-layout .article-page .rte > .w-embed:has(> hr) + h2,
.site-layout .article-page .rte > hr + h2 { margin-top: 0; }
.site-layout .article-page .spacer._4rem {
 height: var(--section-space);
 padding: 0;
 margin: 0;
 flex: none;
}
/* Newer article templates have no spacer before the body; give them the
   same title-to-body distance, replacing planning.css's extra 2rem margin. */
.site-layout .article-page .rte.planning-content {
 margin-top: var(--section-space);
}
/* Older articles retain an empty cover-image slot and its spacer. It must
   not add another 16px (plus paragraph margins) to the shared lead gap. */
.site-layout .article-page .spacer._1rem:has(+ .imagewrap:empty) { display: none; }
.site-layout .article-page p:has(+ .spacer._1rem + .imagewrap:empty) { margin-bottom: 0; }
.site-layout .article-page .rte > :first-child { margin-top: 0; }
