Textual arguments about what "sex" means as a matter of statutory interpretation took center stage at the Supreme Court today, as the justices listened to attorneys argue whether the Civil Rights Act of 1964 protects LGBT people from workplace discrimination.

Based on today's questioning, it may well be Trump appointee Neil Gorsuch who serves as the swing vote, and he might even be leaning toward including sexual orientation and gender identity under the Civil Rights Act's workplace sex discrimination protections.

This morning, the Supreme Court took two hours to consider three cases of people being fired from their jobs, allegedly for being gay or transgender, to determine whether this was a violation of federal law. Two of the cases focused on men fired for being gay and were combined into one argument: Bostock v. Clayton County and Altitude Express v. Zarda. In these two cases, the employers denied that the employees' sexual orientation contributed to their firings, but even if it had, the employers argued, the firings still did not violate federal law. The third case, R.G. & J.R. Funeral Homes v. Equal Employment Opportunity Commission, which involves a transgender funeral home director, was heard separately, directly after the consolidated oral arguments in the first two cases. In the transgender case, the owners of the funeral home have made it clear they have religious objections to accommodating transgender employees and would not allow Aimee Stephens to switch to wearing women's clothing after her transition.

The overall conflict today pitted civil rights and gay rights advocates (David Cole of the American Civil Liberties Union represented the fired transgender funeral home director) against attorneys for the employers and against U.S. Solicitor General Noel Francisco. The Justice Department under President Trump has taken the position that neither sexual orientation nor gender identity are protected as the law is written and argue that Congress should add the categories through the legislative process.

While it's clear that Congress did not intend to cover sexual orientation or gender identity back when the law at issue was passed in 1964, there was little interest among the justices in discussing what Congress "intended." Much of the discussion and debate was completely "textual"—interpreting the common meaning of what the statute says and how it should be implemented.

Several of the justices made it abundantly clear that they were attempting to decide whether discrimination against LGBT folks could be classified as a type of "sex discrimination" and not what Congress was thinking when it passed the law. At one point, Justice Elena Kagan told Francisco directly, "[T]he lodestar of this Court's statutory interpretation has been the text of a statute, not the legislative history."

Thus, much of the entire debate revolved around the extent that discrimination against gay and transgender people is comparable to discrimination against men and women on the basis of whether they behave in an expected stereotypically masculine or feminine manner.

The distinction is relevant because of a previous Supreme Court precedent from, Price Waterhouse v. Hopkins (1989), in which the Court ruled that discrimination on the basis of whether or not a person behaves in the manner expected of her sex is forbidden under the Civil Rights Act. That case revolved around a woman who said she was discriminated against because she was too masculine and aggressive. The case was invoked repeatedly by all sides as they compared what happened back then to the three LGBT workers in these new cases.

That's where Gorsuch expressed interest in considering that there is, in fact, a textualist argument that sexual orientation and gender identity might be protected under the Civil Rights Act. Solicitor General Francisco argued that sexual orientation and gender identity were different traits than simply sex, but Gorsuch pressed, "at least one contributing cause here appears to be sex," and that in particular, the two gay men seemed to be discriminated against because of the sex of their partners. The same thing would not happen to heterosexual workers, so how could sex not be playing a role here?

But while Gorsuch seemed open to the argument that LGBT discrimination is based on sexual stereotypes, he also seemed to express a bit of hesitation during the second hour when the Court discussed the case of the transgender funeral home employee. Gorsuch asked Cole:

[A]ssume for the moment I'm with you on the textual evidence. It's close, okay? We're not talking about extra-textual stuff. We're talking about the text. It's close. The judge finds it very close. At the end of the day, should he or she take into consideration the massive social upheaval that would be entailed in such a decision, and the possibility that—that Congress didn't think about it and that—that is more effective—more appropriate a legislative rather than a judicial function? That's it. It's a question of judicial modesty.

Cole responded that he didn't think a ruling would result in an upheaval because transgender people already exist in America and have for a while. Employers would still be able to apply sex-based dress codes as long as transgender workers were able to dress as the gender they've chosen and not be forced to dress on the basis of their birth sex. Cole argued:

[A]t the end of the day, the objection to someone for being transgender is the ultimate sex stereotype. It is saying, I object to you because you fail to conform to this stereotype: The stereotype that if you are assigned a male sex at birth, you must live and identify for your entire life as a man. That is a true generalization for most of us, but it is not true for 1.5 million transgender Americans.

Chief Justice John Roberts and Justice Samuel Alito seemed to prefer to leave it up to Congress and state lawmakers to hammer out solutions, but their questioning was not overly hostile. There was also a lot of questioning about the high likelihood that the Supreme Court will have to weigh in on issues relating to which bathrooms and facilities transgender people should use and which team transgender athletes would play for. Justice Brett Kavanaugh asked just one question about how to draw a distinction between the literal and ordinary meanings of the words "because of sex" and the question did not hint at which way he might rule.

Justices Elena Kagan, Sonia Sotomayor, and Ruth Bader Ginsburg, meanwhile, all seemed to support the LGBT side, though Ginsburg asked many questions trying to determine how far a ruling in favor of the three employees might expand beyond just the workplace.

The decisions are expected in June, right in the middle of election season. You can read the transcripts of today's arguments here and here.