I had absolutely no idea that the :has() and :not() pseudo selectors in #CSS take on the specificity of whatever selector you pass into them, which is batshit crazy.
I've never encountered issues, because 99% of the time I'm just passing a single class into :not(), but if you do something like this, it is nearly impossible to override:
.something:not(#thisonething)
Specificity - CSS | MDN
Specificity is the algorithm used by browsers to determine the CSS declaration that is the most relevant to an element, which in turn, determines the property value to apply to the element. The specificity algorithm calculates the weight of a CSS selector to determine which rule from competing CSS declarations gets applied to an element.