The US president and his conservative base will be crushed by this decision, which shows that civil rights law has teeth, and that those teeth bite hard.

There are days when it feels like the sharp forces of regression hold ever-increasing sway, edging us backwards to the rule of the narrow-minded. But then there are moments when we are reminded that the longer march — of progress to equality — goes on and sometimes beats the odds.

The US Supreme Court has just delivered one of those moments in spectacular style. By a 6-3 majority, scooping up several of the court's touted conservatives and with the judgment written by one of Trump's own picks, Neil Gorsuch, the court stared down those who have assumed it will be a reliable ally in the new war on inclusion and tolerance.

Donald Zarda was working as a skydiving instructor in New York. A female customer complained about being tethered to him for a tandem dive (because he was male). To reassure her, he said: "I'm 100% gay!" He was fired.

Gerald Bostock was a long-serving county employee in Georgia. He lost his job soon after joining a gay softball league. Aimee Stephens was terminated from the funeral home she worked for in Michigan after transitioning from male to female.

In these cases the court had to determine whether the sackings contravened the US Civil Rights Act of 1964, which outlaws discrimination in the workplace on the basis of "race, colour, religion, sex, or national origin". The key issue was whether "sex" means only gender, and that in a binary man/woman way rather than any wider definition.

In emphatically declaring the protection of the act extends to LGBTIQ people — not just men and women in their status as men or women — the court killed off the favourite debating points of conservatives.

First, the majority accepted that yes, in 1964, most people thought of "sex" as meaning "biologically male or female". But "that's just a starting point". The question is: what does the act prohibit? The prohibition is a "but for" one: if an employer discriminates against an employee in a way they wouldn't have but for "sex", it's illegal.

Second, the law protects individuals, not classes of people. If an employer does not generally discriminate against women but fires one for rejecting his sexual advances (sexual harassment rather than sexual discrimination, as we'd distinguish it in Australia), he has broken the law by treating that woman worse because of her sex.

The simple point is this, according to the court: "An individual's homosexuality or transgender status is not relevant to employment decisions. That's because it is impossible to discriminate against a person for being homosexual or transgender without discriminating against that person based on sex."

To underline this: "Homosexuality and transgender status are inextricably bound up with sex. Not because homosexuality or transgender status are related to sex in some vague sense, or because discrimination on these bases has some disparate impact on one sex or another, but because to discriminate on these grounds requires an employer to intentionally treat individual employees differently because of their sex."

Third, the majority swept aside the pretences with which bigots seek to mask their oppression. It cited a 1978 precedent case where an employer required women to make larger pension fund contributions than men, a policy which it labelled a "life expectancy" adjustment because women live longer than men.

It's irrelevant, said the court, "what an employer might call its discriminatory practice, how others might label it, or what else might motivate it".

The minority judges (including Brett Kavanaugh) were, naturally, horrified by their colleagues' judicial adventurism. "A more brazen abuse of our authority to interpret statutes is hard to recall," wrote Justice Samuel Alito.

But of course for the objectors it really came down to the same old argument: public toilets. What is it with this frankly weird obsession that reactionary conservatives have with what goes on in toilet cubicles?

But that's where we always end up: with the morbid fear that transgender people are really just toilet predators in drag. We can leave the proponents of that argument festering in their swill — there's no sensible conversation to be had with them until they learn that "sex" isn't just a dirty word.

Attention will now turn to US President Donald Trump's recent move to change the policy of his Health Department to declare that gender can only be male or female as determined by biology at birth.

He has set himself as a protector of the right of his evangelical base to decide all questions of personal identity for everyone else, and they will be crushingly disappointed by this defeat.

We do not disclaim anything about this article. We're quite proud of it really.