Wait.
Firefox actually supports :has() now?!
:has()
https://developer.mozilla.org/en-US/docs/Web/CSS/:has