/* Inner-page sections: keep headings with their copy instead of stacking full section gutters.
   The custom homepage and heroes keep their spacing; image/grid internals remain intact. */
body:not(.home) #main { --vaisef-prose-space: clamp(32px, 4vw, 48px); }
body:not(.home) #main .vwa-main { --vaisef-prose-space: 24px; }
/* Compact outer gutters across component sections; retain internal image/grid layouts. */
body:not(.home) #main > section:where(.c-text, .c-cards, .c-stats, .c-feature, .c-faq, .c-tabs, .c-quote, .c-events, .c-live, .c-cta, .mission),body:is(.page-id-48, .page-id-49, .page-id-50) #main > section:not(.c-pagehead):where(:not([data-ke-model])){ padding-block: var(--vaisef-prose-space); }
body:not(.home) #main > section.pad-t0 { padding-top: 0; }
body:not(.home) #main > section.pad-b0 { padding-bottom: 0; }
body:not(.home) #main section.c-text { padding-block: var(--vaisef-prose-space); }
body:not(.home) #main section.c-pagehead.layout-plain { padding-block: var(--vaisef-prose-space); }
/* A title and its same-tone introduction are one visual group. */
body:not(.home) #main .c-pagehead.layout-plain.cb-tone-tint + .c-cta.cb-tone-tint { padding-block: 24px var(--vaisef-prose-space); }
/* Imported heading-only text sections must not create an empty section-sized gap. */
body:not(.home) #main section.c-text:has(.c-text-body > :is(h2, h3, h4, .head-row):only-child):not(:has(p, ul, ol, img, figure, table, a, button)) { padding-bottom: 0; }
body:not(.home) #main section.c-text:has(.c-text-body > :is(h2, h3, h4, .head-row):only-child):not(:has(p, ul, ol, img, figure, table, a, button)) .head-row,
body:not(.home) #main section.c-text:has(.c-text-body > :is(h2, h3, h4, .head-row):only-child):not(:has(p, ul, ol, img, figure, table, a, button)) :is(h2, h3, h4) { margin-block: 0; }
body:not(.home) #main section.c-text:has(.c-text-body > :is(h2, h3, h4, .head-row):only-child):not(:has(p, ul, ol, img, figure, table, a, button)) + section.c-text { padding-top: 24px; }
/* Prevent wrapper margins from adding a second gutter around prose. */
body:not(.home) #main .c-text-body > .head-row { margin-bottom: 24px; }
body:not(.home) #main .c-text-body > .head-row :is(h2, h3, h4):first-child { margin-block: 0; }
body:not(.home) #main .c-text-body > :last-child,
body:not(.home) #main .c-text-body > :is(.cb-text, .narrow) > :last-child { margin-bottom: 0; }
body:not(.home) #main .c-text-body > :is(.cb-text, .narrow) > :first-child { margin-top: 0; }
/* Honor explicit zero-padding sections in both normal pages and the member workspace. */
body:not(.home) #main section.c-text.pad-t0 { padding-top: 0; }
body:not(.home) #main section.c-text.pad-b0 { padding-bottom: 0; }

/* Report-style calls to action contain several paragraphs, so use reading order
   rather than the promotional two-column title/button grid. */
body:not(.home) #main .c-cta-words:has(> h3) { display: block; }
body:not(.home) #main .c-cta-words:has(> h3) > h2 { max-width: none; font-size: clamp(28px, 3.2vw, 40px); }
body:not(.home) #main .c-cta-words:has(> h3) > p { max-width: none; margin-block: 16px 0; }
body:not(.home) #main .c-cta-words:has(> h3) > h3 { margin-block: 24px 0; }
body:not(.home) #main .c-cta-words:has(> h3) > .c-actions { margin-top: 24px; }

/* Older staff and committee sections use the same outer rhythm. */
body:not(.home) #main > section:has(> .wrap > .people),body:not(.home) #main .committee-stories > .committee-story:where(:not([data-ke-model])){ padding-block: var(--vaisef-prose-space); }

body.page-id-50 #main > section > .wrap > .head-row:where(:not([data-ke-model])){ margin-bottom: 24px; }
