/* Keep heading numbers continuous across generated sibling sections. */
@supports selector(section:has(> h2)) {
  .content,
  .mech-program-body,
  .mech-toc-sections {
    counter-reset: h2;
  }

  .content > .mech-program-section:has(> h2),
  .mech-program-body > .mech-program-section:has(> h2),
  .mech-toc-sections > .mech-program-section:has(> h2),
  .mech-toc > .mech-program-section:has(> h2) {
    counter-increment: h2;
  }

  .content > .mech-program-section > h2::before,
  .mech-program-body > .mech-program-section > h2::before,
  .mech-toc-sections > .mech-program-section > h2::before,
  .mech-toc > .mech-program-section > h2::before {
    counter-increment: none;
  }
}
