But in critiques of O’Rourke’s strategy, the deficiencies of his challenger—and the GOP as a whole—become just as clear. Texas may play host to mostly conservative voters, yes. But massive early-voting numbers and record turnout among minority demographics reveal that the state is shifting not so much in how its citizens decide to vote, but in who decides to show up. “A lot of the patterns last night were predictable,” the Republican strategist Liam Donovan told me. “It was the volume that caught everyone by surprise.” For Cruz, the blind spot was telling: His campaign based its electoral models on 6 million voters, far shy of the 8 million who ultimately turned up to vote. It’s the kind of miscalculation that, if replicated, could spell doom in the future for Republican candidates in Texas and beyond.

All of which is to say that in Texas last night, both parties lost in their own way: one by not recognizing the significant ways in which the state is changing, and one by not taking seriously just how far it still has to go.

Perhaps the best way to understand O’Rourke’s and Cruz’s missteps is to study the Democratic upset in Texas’s Seventh Congressional District. The seventh, which includes the Houston suburbs, has long been one of the most reliable Republican districts in the country. Before last night, it hadn’t gone blue since before 1966, when George H. W. Bush won the seat. John Culberson has represented the seventh for the last 18 years. He was never a familiar face nationally, but as a senior member of the powerful Appropriations Committee, he had an institutional cachet that was tough to challenge.

But as anti-Trump resentment grew in the aftermath of the 2016 election, a lawyer named Lizzie Pannill Fletcher, then 41 years old, decided to do just that. She was certainly liberal, once serving on the board of Planned Parenthood. She was young and inexperienced and felt a high-minded calling to try to check the “culture of cronyism, corruption, and incompetence” that she told me she saw unfolding in Washington.

In other words, she was a lot like Beto O’Rourke. And after Fletcher won the Democratic primary, the race for the Seventh Congressional District began to bear resemblances to the Senate contest. Nationally popular Democrats such as former Vice President Joe Biden started to take notice, and Democratic strategists in Washington began to view the historically deep-red district as one of the key pickups in their path to taking control of the House.

As the interest in Fletcher’s campaign grew, it was as though Culberson had been jolted from a long sleep. “We’ve been trying to tell him all summer, ‘You know, this isn’t a joke. It’s not like all the other times. We need to actually get moving,’” a source close to Culberson, who asked that his name not be used so as not to jeopardize their relationship, told me in August. Suddenly this institutional presence who’d long ago absconded with the need to seriously campaign had to, well, campaign.