Photo: Brian Blanco/Getty Images

For Hillary Clinton, the most damaging aspect of Emailgate Part 3: Revenge of the Weiner may not be the ugly headlines it generated so much as the ugly headlines it displaced.

Voters who find allegations of improper email use more offensive than allegations of serial sexual assault were never going to be a large part of Clinton’s coalition. Recent polls suggest the renewed attention on the Democratic nominee’s mishandling of classified information has cost her only a tiny fraction of her most casual supporters.

But while the FBI’s late-October surprise doesn’t seem to be (significantly) draining Clinton’s support, there’s reason to think it’s boosting Donald Trump’s — by diverting attention away from the mogul’s myriad political liabilities.

In our hyperpartisan era, the GOP nominee’s competitiveness has ebbed and flowed with his consolidation of the Republican vote — and throughout the 2016 race, his support among his co-partisans has gone up whenever he’s been evicted from the media spotlight.

Ever since the final general-election debate, Trump has kept a relatively low profile, giving far fewer television interviews than he did earlier in the cycle, avoiding novel outrages, and even drifting off the campaign trail for a pair of dull photo ops at hotels he owns. And in that time, a significant number of Republicans started migrating back to his camp.

On the night of the third presidential debate, FiveThirtyEight’s national polling average had Clinton leading Trump 45.4 to 38.8 percent, with Libertarian Gary Johnson claiming 6.2 percent of the vote. Those numbers held nearly steady through the first round of post-debate polls. But as the spotlight on the presidential race dimmed with the end of debate season, Trump’s support ticked up, while Johnson’s declined. On Friday, FiveThirtyEight had Clinton at 45.7, Trump at 40.2, and Johnson at 5.1 percent.

Four days after Comey’s letter forced new stories of Trump’s affinity for sexual harassment onto the back burner, Clinton’s support has ticked down marginally to 45.3, while Trump’s has jumped to 41.4, and Johnson has been left with a mere 4.5 percent of the vote.

Gary Johnson. Photo: Bill McCay/Getty Images for SiriusXM

Granted, there are other explanations for this trend. Third-party candidates have a habit of losing steam as Election Day approaches. And both major-party nominees are likely to see boosts in total support as undecideds finally commit. But Trump’s consolidation of the Republican vote can’t purely be a function of November 8’s proximity. At various points in the campaign, Trump has gained — and then lost — a significant chunk of GOP voters. And often these ups and downs have corresponded to Trump’s relative visibility in the media.

The Republican nominee has come within striking distance of Clinton twice this campaign — once, in the immediate aftermath of the Republican National Convention, and a second time right before the first debate.

The first case may seem to contradict the principle that the more Trump hides from attention, the better he performs. After all, a national convention is a multi-day media blitz for a candidate and their party. And there were, of course, a few conspicuous hiccups in the production that generated no small amount of comment. But there is a sense in which that shaky spectacle actually shielded Trump from press scrutiny: During the week of the RNC, the mogul had fewer opportunities to make headlines with high-profile gaffes than nearly any other week of the campaign. Every night, the political world’s attention was fixed on Cleveland’s carnival of Clinton hatred, where Trump’s surrogates devoted far more attention to their enemy’s vices than to their standard-bearer’s virtues. And Trump’s one turn in the spotlight, however terrifying for its authoritarian nationalism, was, nonetheless, tightly scripted.

After that infomercial was executed, the race was statistically tied — and Trump’s campaign manager Paul Manafort advised the candidate to go into hiding.

“The best thing we can do is to have you move into a cave for the next four months,” Manafort told Trump during a summer meeting, Gabriel Sherman reports. “If you’re not on the campaign trail, the focus is on her, and we win. Whoever the focus is on will lose.”

In hindsight, this advice looks more prophetic than hyperbolic.

Former Trump campaign manager Paul Manafort. Photo: Drew Angerer/2016 Getty Images

Clinton, predictably, regained her lead following her own party’s convention. But Trump didn’t lose significant support until the week after the Democratic nominee’s coronation, when he picked a loud, lengthy fight with the Muslim father of a fallen American soldier. By mid-August, Trump’s average national support had fallen from a little over 40 percent to under 37. It’s hard to imagine the mogul would have been worse off had he taken a post-convention vacation to the Galapagos.

A similar pattern played out the second time Trump made Clinton sweat, in the lead-up to the first debate, when stories about Clinton’s family foundation and bout of pneumonia were dominating the news cycle. On September 26, FiveThirtyEight had Trump’s national support at 41 percent, a little over a point behind Clinton’s.

The debates were never going to be kind to Trump — in any 90-minute one-on-one discussion, the mogul’s ill-tempered incompetence was bound to be exposed — but the damage was almost certainly compounded by his decision to spend the ensuing week feuding with a former Miss Universe winner turned Clinton surrogate: The first round of post-debate polling showed Trump losing a half-point of support. By the eve of the Billy Bush tape revelation, his share of the vote had dipped below 40 percent.

Did Crooked Hillary help disgusting (check out sex tape and past) Alicia M become a U.S. citizen so she could use her in the debate? — Donald J. Trump (@realDonaldTrump) September 30, 2016

Donald Trump was always going to be a terrible candidate. The mogul’s recklessness and utter lack of policy knowledge caused him little trouble in the GOP primary, where he could market those qualities as fearless truth-telling and contempt for ineffectual experts.

Fortunately, that stuff doesn’t sell as well with the broader public. And Trump proved himself incapable of “pivoting” to a more inclusive general-election message, as the GOP nominee simply couldn’t help but betray his own ignorance and bigotry in nearly every extemporaneous remark.

Most college-educated Republicans just want to vote for the candidate who will cut their taxes without feeling embarrassed about doing so. If Trump had taken Manafort’s advice and spent the general election attending to his family business — emerging once or twice a week for a carefully stage-managed photo op and/or tightly scripted speech — he would have made that task a lot easier for the socially moderate, fiscally conservative set. And it seems doubtful that he’d have lost a significant amount of support from the base he’d cultivated through the most widely covered primary campaign in history.

It remains unlikely that the latest installment in Clinton’s email nightmare will divert enough attention away from Trump to cost her the election. But if Trump had spent the past four months hiding from the cameras, avoiding any temptation to exacerbate his own liabilities — while cultivating an opaque image of success that low-information voters could project their own hopes onto — things might be different.

If Trump married a conventional Republican’s support from college-educated whites with his strength among whites without college degrees, Clinton would be in a lot more trouble than she is today.

The danger to Clinton, IMO, is that well-educated, white, GOP-leaners come home — Nate Cohn (@Nate_Cohn) October 31, 2016

In the end, the insatiable hunger for media attention that propelled Trump to the summit of conservative politics may keep him from climbing any higher. The mogul could have had a clean shot at the nuclear codes, had he been willing to forfeit the spotlight.