/* One heading-to-copy rhythm across static pages and dynamic test results.
   These two boundary rules intentionally override legacy component margins.
   Flex card gaps are subtracted, so they do not add a second interval. */
:root{--heading-copy-space:24px}
.card,.tests-card{--heading-stack-gap:18px}
:is(h1,h2,h3,h4):has(+ :is(p,ul,ol,blockquote,.prose,.crisis-template,.footer-links)){
  margin-bottom:0!important;
}
:is(h1,h2,h3,h4)+:is(p,ul,ol,blockquote,.prose,.crisis-template,.footer-links){
  margin-top:calc(var(--heading-copy-space) - var(--heading-stack-gap,0px))!important;
}
/* News titles can be wrapped in their own link. */
a:has(> :is(h2,h3):last-child)+p{
  margin-top:var(--heading-copy-space)!important;
}
/* The embedded news feed exposes its card spacing as public CSS tokens. */
ilikemedia-feed{--ilm-card-body-gap:var(--heading-copy-space);--ilm-card-title-margin:0;--ilm-summary-margin:0;--ilm-modal-title-margin:10px 0 var(--heading-copy-space)}

/* The page introduction already supplies the gap before the first content block. */
.page-head + .content-section > .prose > :first-child{margin-top:0}
