For all the legalese that occurs inside a courtroom, SCOTUS decisions are surprisingly accessible. The beginning of the opinion is a lovely bit of prose:

> Sometimes small gestures can have unexpected consequences. Major initiatives practically guarantee them. In our time, few pieces of federal legislation rank in significance with the Civil Rights Act of 1964. There, in Title VII, Congress outlawed discrimination in the workplace on the basis of race, color, religion, sex, or national origin. Today, we must decide whether an employer can fire someone simply for being homosexual or transgender. The answer is clear. An employer who fires an individual for being homosexual or transgender fires that person for traits or actions it would not have questioned in members of a different sex. Sex plays a necessary and undisguisable role in the decision, exactly what Title VII forbids.

> Those who adopted the Civil Rights Act might not have anticipated their work would lead to this particular result. Likely, they weren’t thinking about many of the Act’s consequences that have become apparent over the years, including its prohibition against discrimination on the basis of motherhood or its ban on the sexual harassment of male employees. But the limits of the drafters’ imagination supply no reason to ignore the law’s demands. When the express terms of a statute give us one answer and extra-textual considerations suggest another, it’s no contest. Only the written word is the law, and all persons are entitled to its benefit.

Continuing:

> From the ordinary public meaning of the statute’s language at the time of the law’s adoption, a straightforward rule emerges: An employer violates Title VII when it intentionally fires an individual employee based in part on sex. It doesn’t matter if other factors besides the plaintiff ’s sex contributed to the decision. And it doesn’t matter if the employer treated women as a group the same when compared to men as a group. If the employer intentionally relies in part on an individual employee’s sex when deciding to discharge the employee—put differently, if changing the employee’s sex would have yielded a different choice by the employer—a statutory violation has occurred. Title VII’s message is “simple but momentous”: An individual employee’s sex is “not relevant to the selection, evaluation, or compensation of employees.” Price Waterhouse v. Hopkins, 490 U. S. 228, 239 (1989) (plurality opinion).

> The statute’s message for our cases is equally simple and momentous: 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 individual based on sex. Consider, for example, an employer with two employees, both of whom are attracted to men. The two individuals are, to the employer’s mind, materially identical in all respects, except that one is a man and the other a woman. If the employer fires the male employee for no reason other than the fact he is attracted to men, the employer discriminates against him for traits or actions it tolerates in his female colleague. Put differently, the employer intentionally singles out an employee to fire based in part on the employee’s sex, and the affected employee’s sex is a but-for cause of his discharge. Or take an employer who fires a transgender person who was identified as a male at birth but who now identifies as a female. If the employer retains an otherwise identical employee who was identified as female at birth, the employer intentionally penalizes a person identified as male at birth for traits or actions that it tolerates in an employee identified as female at birth. Again, the individual employee’s sex plays an unmistakable and impermissible role in the discharge decision.

> That distinguishes these cases from countless others where Title VII has nothing to say. Take an employer who fires a female employee for tardiness or incompetence or simply supporting the wrong sports team. Assuming the employer would not have tolerated the same trait in a man, Title VII stands silent. But unlike any of these other traits or actions, 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.

https://www.supremecourt.gov/opinions/19pdf/17-1618_hfci.pdf