The Supreme Court ruled 6-3 on Tuesday that states can bar transgender girls from female school sports, upholding laws in West Virginia and Idaho — and the justices spent much of the opinion going at one another.Justice Brett Kavanaugh wrote the majority opinion, holding that neither Title IX nor the Constitution's Equal Protection Clause stops states from limiting girls' teams to students who are female at birth. The decision reversed lower-court wins for Becky Pepper-Jackson, the 15-year-old West Virginia student at the center of the case, and Boise State athlete Lindsay Hecox, whose cases the justices heard in January. Justice Sonia Sotomayor agreed the Title IX claim failed but dissented on the rest, joined by Justices Elena Kagan and Ketanji Brown Jackson.Here are the five sharpest lines the justices aimed at each other.Sotomayor opened fire on the majority's reasoning, writing that it ruled "in an opinion unencumbered by fact or law." She also accused the majority of "moving the goalposts set by precedent," and said its equal protection analysis rested on "contorted logic."Justice Clarence Thomas answered the dissent's premise head-on in a concurrence, writing: "A man does not have a legal right to compete against women just because he believes that he is a woman."Kavanaugh used a section of his opinion answering the dissent of his opinion to fire back at Sotomayor, writing that the court does "not accept the dissent's assumed monopoly on understanding the effects on individuals involved in disputes over transgender athletes." Of her word choices, he added flatly: "that rhetoric is misdirected."Justice Neil Gorsuch, meanwhile, took his own shot in a footnote that opened "Contra JUSTICE JACKSON," rejecting her reading of the court's sex-stereotyping cases.The clash lands a year after the same conservative majority used similar reasoning to let Tennessee's ban on gender-affirming care for minors stand, a decision Sotomayor leans on throughout her dissent to argue the court applied the wrong test. It also caps a term of sharply divided decisions, including another 6-3 ruling a day earlier that drew its own Sotomayor dissent.