Hillary Clinton’s polls have been sliding for months — ground she has lost mostly to the Vermont Senator’s populist attacks on “the billionaire class” he points out has scooped up most of the income resulting from productivity gains over the last 40 years.

At last night’s first Democratic presidential debate, it quickly became clear that her priority was to reverse Sanders’ momentum.

As I predicted, Hillary took pains to humanize herself, as when she joked about her longer-than-the-boys bathroom break. I expected Sanders to emphasize black issues.

He did.

Things got wonky — saw that one coming too.

And much of the talk was about the post-9/11 permanent war on terror, including an unexpected reference to the Patriot Act.

The big surprise was Hillary’s ferocity.

Overall, the exchanges between Clinton, Sanders, and the three other white guys — ex-Baltimore mayor Martin O’Malley, suffering the self-inflicted wound of supporting aggressive cops in the aftermath of the murder of Freddie Gray and resulting unrest; Rhode Island Senator Lincoln Chafee, a genial man who might be doing better if not for his former branding as a Republican; and Jim Webb, a twitchy war veteran from Virginia who for a moment enjoyed the attention of Democratic pundits — were much less heated, and certainly free of the kind of ad hominem attacks that characterized the Republican debates in the age of Donald Trump.

Nevertheless, Hillary’s aggressiveness clearly came as a surprise to Bernie. While she didn’t succeed in knocking him out — far from it — he was clearly off balance.

As is the par for these things (Reagan: “There you go again”), it was a vacuous remark delivered with a smirk that somehow connected.

After Sanders pointed out that Scandinavian socialist countries like Denmark, Sweden and Norway offer free, fully taxpayer-funded socialized medicine to their citizens, Clinton echoed the cadence of Lloyd Bentsen’s 1988 jab at Dan Quayle that he knew Jack Kennedy, Kennedy was a friend of his, and Quayle was no Jack Kennedy: “We are not Denmark. I love Denmark. We are the United States of America.”

If I’d been whispering in Sanders’ ear providing the kind of surreptitious coaching George W. Bush apparently received in his 2004 debate against John Kerry, I would have told him to shoot back: “That’s right, and the greatest nation in the world can do better than Denmark!”

He let it lie. But why?

Like him, Democratic primary voters want single-payer socialized healthcare, which they didn’t get because Obama didn’t try for it, which was because his plan was based on Hillarycare, 1993 edition. He could have pinned that one back on her.

Whether it was Hillary or her advisers, someone in the campaign sensed that the latest mass shooting, in Roseburg, Oregon, seems to have marked a tipping point on guns within the Democratic Party.

Until recently Sanders, who pointed to his D- rating by the NRA, could point to his relatively pro-Second Amendment stance as proof that he wasn’t a liberal ideologue, but someone who understands rural America and could thus attract swing voters in a general election.

Within the Democrats, however, such nuance is no longer tolerated.

Sanders defended his vote to indemnify gun makers and dealers from lawsuits stemming from gun violence by saying the bill was “large and complicated.” Seeing an opening from Sanders’ apparent weaselry — a better response would have been a simple declarative along the lines of “in America, we go after those who are actually responsible for crimes, we punish the axe murderer, not the poor slob at the hardware store who sold him the axe” — Hillary pounced. “I was in the Senate at the same time. It wasn’t that complicated. It was pretty straightforward.”

Bernie’s worst moment of the night was the one the corporate media — which doesn’t want a “democratic socialist” to succeed — most applauded.

The crowd applauded, and I cringed, when Sanders defended Clinton against Emailgate, in which she used a private email account maintained on a server in her personal home for thousands of classified communications as secretary of state between 2009 and 2013. “Let me say something that may not be great politics,” Sanders said.

He was right. It wasn’t great politics.

“But I think the secretary is right, and that the American people are sick and tired of hearing about your damn emails.”

It’s fun to watch rivals making nice. Party unity is swell. Who knows, maybe Bernie really does think Emailgate is no big deal. But I think it was a mistake.

First and foremost, the investigation has just begun. It isn’t wise to defend someone before all the facts are in, especially when that person’s resume is punctuated by multiple scandals.

Also, I take offense at the argument that, because the American people don’t care about an issue, that it ought not to be discussed (assuming that it is true that voters are tiring of the coverage, which may or may not be the case).

Americans don’t care much about drones, the NSA, or turning Libya into a failed state (which Hillary helped do), or Guantánamo. Should we ignore those issues? Leadership is in large part about pointing to a problem and convincing people why they should care and what we should do to fix it.

For me, and I suspect many other non-Republicans, Emailgate points to a problem with Hillary Clinton’s ability to make judgment calls. She knew, in 2009 when she began as secretary of state, that she would soon run for president.

Given that the GOP always targets her, it’s crazy that she didn’t play everything by the book. Examined along with her vote in favor of invading Iraq — another bad political decision since it was obvious to everyone intelligent that the war would go badly for the U.S. — it raises serious questions about Clinton’s fitness for the presidency and, as such, should not have prompted a full-throated defense from her chief rival.