The most telling moment in a Supreme Court case called U.S. v. Skrmetti happened toward the end of Wednesday’s arguments.

The case involves a Tennessee law prohibiting teens from taking puberty blockers or hormones for the purposes of gender transition, but the court’s decision will impact youths in 24 states that have similar laws. For hours, advocates and justices sparred over whether that law violates the Constitution’s guarantee of equal protection by treating people differently on the basis of sex or transgender status, and should therefore face heightened scrutiny from courts.

Two hours in, Tennessee Solicitor General J. Matthew Rice remarked that giving testosterone to a biological male with a hormone deficiency is different from giving it to a biological female with gender dysphoria. Justice Ketanji Brown Jackson asked what basis he had for saying that. Didn’t they do the same thing in the body?

No, said the solicitor general, who sounded faintly surprised. “If you give a boy testosterone … that allows him to go through and develop the reproductive organs associated with being a male,” Rice said. “If you give it to a girl, it renders the girl infertile.”

While hormones may not always compromise fertility, it is a known risk of these interventions, particularly if it follows early use of puberty blockers so that the sexual organs don’t fully develop. This kind of meaningful difference was the core problem with arguments offered by U.S. Solicitor General Elizabeth B. Prelogar and Chase Strangio of the ACLU. Our civil rights regime is supposed to ensure that people are treated equally without regard to irrelevancies such as race or sex. It is a poor fit for situations where biology obviously matters. And in medicine, biology is king.

This isn’t the first time civil rights enforcers have struggled with biology. For example, it’s not unreasonable to fear that if you hire and promote women, you might lose a key employee to maternity leave at a critical moment.

But if employers act on those fears, women can’t achieve equality in the workplace. So Congress passed a law telling employers that pregnancy or childbirth may not influence hiring or promotion decisions, effectively directing them to ignore biological reality and its possible consequences.

But it’s one thing to say “ignore biology” to employers worried about temporary and manageable disruptions. It’s quite another to say “ignore biology” to legislators regulating medical treatments.

That’s an issue with many of the trans rights questions being debated in legislatures and courts, and in the court of public opinion. Those debates have grown more contentious because biological reality is no longer peripheral or irrelevant, as in work and housing, but central.

That’s most obvious in sports, but it’s arguably a more pressing issue when considering where to house trans inmates.

The differences between males and females aren’t just physical but also behavioral: The National Crime Victimization Survey indicates that men commit the overwhelming majority of violent crime, and greater male aggression is found across cultures, suggesting at least some biological basis for the difference, though culture and environment clearly play a large role.

While hormone therapy reduces some physical differences, it’s unclear how gender identity or hormone therapies might affect aggression, making it hard to tell female inmates that biology is a trivial problem they’ll have to ignore.

Modesty taboos are cultural norms rather than biological behaviors, but they’re different from the earlier gender norms that civil rights law took on: An aversion to sharing your golf course or boardroom is not the same thing as an aversion to being naked with people who have different genitals, especially when your reluctance is rooted in (constitutionally protected) religious belief.

The civil rights framework is simply ill-equipped to handle those questions. You can try to shoehorn them in by stringing together a series of increasingly strained analogies to earlier cases, as Jackson did with a comparison to Loving v. Virginia, a 1967 case in which the Supreme Court struck down state bans on interracial marriage.

That comparison is what led to her exchange with Rice. But this wasn’t terribly convincing legally. The Tennessee law bans transition care whether you’re a boy or a girl, making an inapt parallel to laws that let people marry but only within their own race. It wasn’t convincing medically, either, because the same hormones affect the sexes very differently, even when they’re aimed at producing similar effects.

And that comparison certainly isn’t working politically, because even many folks who support laws protecting trans people from hate crimes, or workplace and housing discrimination, are reluctant to go along when asked to act as if biology doesn’t matter in sports or prisons or medicine. We’re going to have to make it work on a combination of common sense, compromise and — I hope — a healthy dose of compassion and respect.

Megan McArdle is a Washington Post columnist.