Elections are always clearer in retrospect than they appeared in prospect. So I thought it might be interesting to imagine the column a pundit like me might write next year, to explain an upset victory by Donald Trump. It’s not a prediction, nor even the most plausible scenario—but it might illuminate the strengths and weaknesses of these candidates as they embark on their general-election campaigns.

November 9, 2016.

As always, the election turned on basic arithmetic. Hillary Clinton’s campaign message aimed at the aspirations of women and girls cost her more votes among Latino males under 40 than it gained her among suburban married white women. It was Donald Trump’s surprising over-performance among the first group—and Clinton’s under-performance with the second—that tipped this election’s battleground states into his column, and with them, the election.

Yet as political observers review the most unexpected election outcome since Truman beat Dewey in 1948, they see a deeper story behind the arithmetic: a series of miscalculations by Hillary Clinton and shrewd moves by Donald Trump that enabled the New York businessman to eke out the narrowest Electoral College victory since George W. Bush’s 271 in the year 2000.

To defeat Bernie Sanders in the Democratic primary contests, Hillary Clinton executed a series of policy left turns—and when she tried to pivot back in the general election, found voters cool to her latest efforts at reinvention.

For instance, Clinton’s attacks on the Vermonter’s record on guns helped the former secretary of state win the New York Democratic primary in April. But they provided rich material for Republican attack ads that pushed up conservative turnout in Colorado and Nevada in November.

Hillary Clinton’s commitment to end Obama-era immigration enforcement and put illegal immigrants on a pathway to citizenship helped clinch the Florida primary in March. That same commitment pushed North Carolina, Nevada, and Ohio securely back into the Republican column eight months later.

Even after it was clear she’d sewn up the nomination in the spring, Clinton delayed tacking back to the center. She campaigned on costly commitments to universal access to pre-K and debt-free access to in-state public colleges. Clinton pledged important tax increases on high-income earners, including a new surtax atop the existing Obamacare surtaxes. For middle-income earners, she offered no tax relief at all.

More damaging than the policy course was the communications strategy. The Clinton campaign embraced a “base mobilization” strategy. It hit Trump hard for offering Americans the same-old Republican platform of the Reagan and Bush years.

The message backfired.

Whatever else Trump is, he’s obviously not an ideological extremist. Ironically, the only people impressed by attacks on Trump as the second coming of Barry Goldwater were conservative Republicans who had worried that Trump was not reliable on their issues. More middle-of-the-road voters simply did not believe that Trump—who’d promised to protect Social Security, Medicaid, and Planned Parenthood—was an ultra-conservative. Instead, soft Republicans and many Democrats rallied to Trump’s claim: “I’m a problem solver, folks. I’m a builder.” The result: Among college-educated voters, male and female, Trump ran exactly equal with Mitt Romney’s 2012 performance.

Among lower-income, less-educated whites, Trump ran ahead of Romney, thanks to his emphatic message against “bad trade deals” and illegal immigration. To that group, Trump effectively argued that it was the Democrats—not he—who were extreme.

The most surprising ballots of 2016, however, were those cast by nonwhite voters. The Clinton campaign had tried to appeal to soft Republicans, especially women, by depicting Trump as dangerous. Trump ads seized on the word “DANGEROUS” and made it their own slogan. They contrasted surging murder rates in some of the country’s largest cities with Hillary Clinton’s commitment to reducing prison populations. Pundits had expected Trump’s anti-China message to cost him Asian American votes. Hillary Clinton’s soft-on-crime message cut deeper, however. While this bloc again voted majority Democrat, Trump’s anti-crime message delivered the GOP its highest share of Asian American votes since George H.W. Bush’s 55 percent in 1992.

It’s harder to understand exactly what happened with male Latino voters. Clinton wooed Latinos ardently, and she won a majority of their support. But her policy-dense message could not overcome reservations among younger Latino men that Hillary Clinton did not represent them. Already in 2012, political scientists observed a very significant Latino gender gap: Although white women were 7 points more likely to vote for Barack Obama than white men, the comparable gap among Latinos was 11 points—the highest of any ethnic grouping, in fact. Like Obama, Clinton carried three-quarters of Latinas. But Obama carried 65 percent of Latino men—and Clinton fell fatally short of that level. Trump’s strong performance among this group, combined with his hefty majorities of white men, delivered the margin of victory in several key states.

The 2016 primaries had delivered many early warnings that Hillary Clinton faced intense resistance among male voters of all ethnicities. “In the states where exit polling breaks down the numbers by sex and race, Mrs. Clinton has won on average 44 percent of the white male vote compared to 56 percent for Mr. Sanders,” reported The Economist in May 2016. Reporters and pundits will argue for years about why men turned away from Clinton. Did they like Trump’s commanding style? Did they endorse his trade message? Or did they just prefer a fellow man on the job? Why they did it, we can debate—but that they did so was the historic fact that delivered the White House to the Republican Party—and Donald Trump.