Leverage CSS :has() to select all siblings between two element boundaries.
A rather geeky/technical weblog, est. 2001, by Bramus
:has() and ~:has() feature detection with @supports(selector(…)): You want :has(+ *), not :has(*):nth-child(An+B [of S]?) polyfill thanks to CSS :has() and :not():has():has()