Check out the :is, :not:, and :where operators. They can help reduce the number of lines of CSS, make it easier to manage, and easier to read.
All are well supported in the latest browser versions. However, only :not is safe to use at the moment. The :is and :where operators should be safe for use in a few months.
An article about the operators (:not works just like :is and :where):https://roilivne14.medium.com/where-is-a-new-css-8cee1141a5f3:is and :where are basically the same except, :is is more specific and more likely to apply the CSS rules, whereas :where is not specific and is easy to override with later CSS rules.
More about specificity:https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
—