America’s political elite remains in shock over Donald Trump’s historic upset. Some blame bad polling while Hillary Clinton herself blames James Comey. Neither explanation is correct. The truth is the reasons for Trump’s path to victory were hiding in plain view all along for anyone with the eyes to see.

Clinton started the race as the most unpopular candidate ever to receive a major party nomination — except Trump. While she quickly unified her party, Trump struggled to unify his. That gave her a massive opportunity to reach out to disaffected Republicans and GOP-leaning moderates and convince them she was an acceptable alternative. She not only did not succeed in doing so: She never even really tried.

Instead, she ran ad after ad demonizing Trump the man rather than contrasting her views with his. This served to reinforce the public’s negative view of him, but it did nothing to convince people who held negative views of both candidates to prefer her to him.

The prestigious GW/Battleground Poll showed this clearly. In both September and October, this poll — conducted by respected Republican pollster Ed Goaes and respected Democratic pollster Celinda Lake — showed that the election would be decided by the 18 percent of Americans who held a negative view of both candidates. These voters were disproportionally male, college-educated and either Republicans or Republican-leaning independents.

Nearly 60 percent of these voters preferred neither candidate. This was the primary source of votes for Gary Johnson, Evan McMullin, or the undecided bloc.

Clinton’s challenge was clear. If she couldn’t move them into her camp, they were susceptible to last-minute changes of heart to return to the party they preferred. Indeed, this is a common and well-recognized pattern in elections. Voters will tell pollsters up to the very last minute they plan to vote for a hopeless third-party candidate, but revert to their partisan behavior when the actual choice becomes real in the voting booth.

She could have talked about issues these voters cared about — taxes or national security. The latter might have been a fruitful path of contrast as Trump had called into question over 70 years of American security policy with his loose talk about NATO and our bilateral defense treaties. But she never chose to emphasize these rather obvious lines of attack.

It was always about women with Clinton. Over and over again we heard about Trump’s admittedly deplorable remarks about women and his vulgar behavior in general. But we never heard why his policies would be a bad fit for the Oval Office.

This approach is typified by an ad her campaign ran in the battleground state of Pennsylvania. That ad ran on sports talk radio, about as male-dominated a venue as one will find. In it, a male voice explained why Trump should be opposed — because men have daughters, too. Even when trying to appeal to men, the Clinton campaign made it about women.

These voters thus had no place to call home as the campaign entered its final days. Even the final polls that showed her well ahead placed the combined third-party and undecided vote at a historic high of about 12 percent. Failing to win these voters over meant she was susceptible to a last-minute change of heart.

That’s what happened. Support for Libertarian nominee Gary Johnson and independent conservative Evan McMullin collapsed overnight, much as support for Green Party nominee Ralph Nader had collapsed from 5 percent to just under 3 percent in 2000 when defecting Democrats had to deal with the seriousness of their choice. In 2000, the collapsing Nader vote propelled Al Gore to a surprising finish the polls hadn’t predicted; in 2016, the collapsing Johnson and McMullin vote pushed Trump over the top.

Trump may have been a political novice, but he alone saw this possibility. His efforts in the final two weeks emphasized points that were designed to reassure wavering Republicans, like alleged Clinton corruption, the Supreme Court, fighting ISIS and repealing ObamaCare. He never persuaded these voters to like him, but he did persuade them to look at the issues they cared about.

It paid off. The exit poll showed 18 percent of voters still did not like either candidate, but now those people backed Trump over Clinton by a 49-29 margin. Their votes put The Donald in the White House.

For pundits, this is a sober reminder that polls are only snapshots in time.

The lesson for Democrats is much harsher. They had a chance to broaden their party’s appeal and win over a group of people who clearly found Trump and his populism unappealing. But to do so, they needed to give these voters a reason to think they could call the Democratic Party home. They just couldn’t bring themselves to do that even when the White House was there for the taking.

Clinton’s events were focused on early voting. She talked about themes that energized progressives and party activists, but held little appeal to the voters who would actually decide the election.

Now leading Democrats look set to double down on Clinton’s failed strategy. The race for the new DNC chair is between progressive Rep. Keith Ellison and former DNC chair and progressive favorite Howard Dean. Neither man is likely to embrace reaching out to less-progressive voters uncomfortable with Trump.

The Democratic Party is choosing to end 2016 the way it started it, facing America with eyes wide shut. That will give Trump a chance to surprise the pundits again and reunify a very fractured nation under the Republican umbrella.

Henry Olsen is a senior fellow at the Ethics and Public Policy Center and a visiting fellow at the Matthew Ryan Center at Villanova University.