I struggle a lot with the potentially nonzero overlap between a) "just legislate that being racist/sexist to people is illegal, then have judges interpret" (which is what seems to be simply necessary to actually make progress against the endlessly inventive evil of racism/sexism), and b) "but also don't simply make everything illegal because then abusers can selectively enforce the law to punish groups they dislike".…
The current rules are that [in specific listed contexts] you are not allowed to treat individuals differently on the basis of [explicit list of characteristics].
That's essentially your (a), except it's not up to interpretation. Pretending that it is up to interpretation is how you get things like what the article is about (in that case by measuring group statistics rather than comparing individual experiences).