The legal battle over which bathrooms transgender people can use in North Carolina turns on a deceptively simple question: Can a law, written in the heat of the civil rights movement generations ago, apply to people the drafters never intended to cover?

The federal Civil Rights Act of 1964 was passed after years of marches, beatings, sit-ins and lynchings, part of the convulsive change across the country that gave African-Americans the same rights that white citizens had to drink at water fountains, get jobs, buy homes, stay at hotels and vote. A creature of its time, the law prohibits discrimination because of “race, color, religion, sex or national origin.”

The word sex made it into the bill at the last minute, almost accidentally. It was inserted only after the drafting and congressional hearings, when the bill went to the House floor. Representative Howard W. Smith, a Virginia Democrat who opposed the bill, introduced an amendment adding sex discrimination, prompting laughter from his colleagues, who mockingly offered other suggested additions.

Despite speculation that Mr. Smith meant to weaken support for the bill — he said his concern for women was sincere — his amendment passed, and so did the act. The rights of transgender people never came up.