Hillary Clinton walks in front of Donald Trump. (Gary He/European Pressphoto Agency)

IF PRESENT trends continue — and we emphasize “if” — Hillary Clinton will be elected president on Nov. 8, in an ironic conclusion to a political year that supposedly belonged to outsiders and populists such as Donald Trump and Sen. Bernie Sanders (I-Vt.).

Why has Ms. Clinton, the “establishment” alternative facing the voters, wound up in the lead at this late date? According to much conventional wisdom, she is the beneficiary of structural factors, such as voter demographics, and of good fortune — in the form of the Republican Party’s spectacularly irresponsible choice of an incompetent nominee. No doubt a different GOP candidate might have run a stronger general-election race than Mr. Trump; anyone with a modicum of civility and political talent could have.

Nevertheless, it is time to point out another reason Ms. Clinton is winning: She is earning it. She and her campaign have remained disciplined and even-keeled through tempests large and small — and through the tests of political communication and argument known as the presidential debates, both against Mr. Sanders and against Mr. Trump. It is not easy to stand on a stage for 90 minutes and parry words with an opponent, moderators and town-hall invitees; still less is it easy to do so while keeping one’s cool amid sleazy provocations and unpredictable insults from Mr. Trump. Through it all, Ms. Clinton has stayed focused on issues, laying out a program for the country that we don’t accept in every particular but that is well within the broad mainstream of plausible policy alternatives.

Perhaps most important, she has kept her rhetoric civil and inclusive, in the face of an opponent bent on trashing the norms of democratic discourse. This is no mere style point. It is in a way substantive too, because this election has taken on importance beyond the already-high stakes for national policy; it has turned into a trial of our democratic culture. Certainly, Ms. Clinton has found ways to needle her opponent. But by preparing for the debates, using them to advance rational arguments and refraining from responding in kind to Mr. Trump’s lowest blows, Ms. Clinton has exemplified what’s still good about that culture. In fact, you might say she has reminded people of what’s good about “establishment” politicians — about people who understand that it takes skill to survive and advance their causes in the public square, and who make it their business to polish those skills.

In no sense do we suggest that her campaign is exemplary in all respects, or that she has answered all legitimate doubts about her record. Her failure to squarely answer moderator Chris Wallace’s questions about alleged conflicts of interest involving the Clinton Foundation, like her previous equivocations about her evasion of the State Department email system, continue to weigh on her campaign and may haunt her presidency if there is one.

Here are key moments from the third and final presidential debate between Democrat Hillary Clinton and Republican Donald Trump, Oct. 19, in Las Vegas. (Sarah Parnass/The Washington Post)

However, we question the common assumption that any conventional Republican would be trouncing Ms. Clinton — especially because most of the Republicans usually cited were themselves trounced by the man now trailing the Democratic nominee. Ms. Clinton’s performance has apparently won her more appreciation from the electorate — a precious measure of political capital she will badly need if it does indeed fall to her to unite the country next year.