President Trump’s coup attempt has failed in every place but his fevered mind.

The president’s claim of comprehensive electoral fraud has been distinguished by a complete lack of supportive evidence. Legal representation by swaggering, bungling windbags has done little to advance the president’s cause. And Trump’s diversion into deranged conspiracy thinking while national challenges mount is a fitting end to this sad, shabby chapter in the American story. One imagines the other 43 presidents in Walt Disney World’s Hall of Presidents pointing and laughing at their most embarrassing successor.

It is thankfully true that American political institutions have survived a time of testing. But this positive judgment is complicated by three factors.

First, the challenge has been a relatively weak one. Trump combines the ambitions of a despot with the strategic planning and operational competence of a hamster. He is an evil mastermind without the mastermind part. Would our system have held firm in a closer election against a more talented authoritarian plotter? We have no idea. And the openness of the question should terrify us. Democracies tend to end not by revolt from below, but by erosion from above. They are less vulnerable to revolutionaries than they are to demagogues. While we have not lost our republic, we have glimpsed how it might eventually be lost.

Second, our democratic culture has only held selectively. The judiciary, to be sure, survived its stress test. State and federal judges swatted away the meritless lawsuits of Trump and his cronies like so many fat, lumbering horseflies. And many state officials charged with organizing and implementing elections rose to the moment as well. They generally did their jobs with integrity and refused to be silent objects of presidential slander.

But this test has also revealed the soft and rotting parts of our democratic system. This begins with a significant portion of voters — mainly Republican voters — who seem determined to believe Trump’s disproven lies. While no sane politician would call these voters to account for their corrupting influence, I am perfectly willing. The determined self-delusions of Trump loyalists egg the president on. By siding with the president’s libels against our constitutional order, they help delegitimize it. Whatever these citizens’ intentions, they are making America a weaker country.

Yet the main responsibility belongs with elected Republicans, who should (and often do) know better. GOP leaders are now divided between the fearful and the deluded — between those who have lost their nerve and those who have lost their minds. After Trump’s decisive defeat, many played along with his fantasies of triumph in order to avoid negative attention from partisans. What could be the harm of a little presidential cosplay? Well, here is the harm: These Republicans have allowed conspiratorial lies to take root that will encourage extremists for decades and cement the GOP’s image as the party of seditious crackpots.

Third, this period of testing has revealed some structural weaknesses in the American system itself. Take, for example, the constitutional procedure allowing state legislatures to override the popular vote and appoint electors in certain exceptional cases. Legal expert Richard Pildes says this provision “lies around like a loaded weapon.” The same could be said of the provision that empowers the House of Representatives to resolve electoral disputes when the normal system is deadlocked. In more powerful and competent hands, these loopholes could turn a presidential election into a parody of democracy. Institutional reform to close these loopholes would be helpful but difficult to achieve.

In all these areas of testing, the greatest need is the restoration of norms. Some of these are political norms — the acts of grace and self-restraint that smooth transitions of power and cultivate a broad belief in democratic legitimacy. Others are professional norms — such as when a judge rules on the basis of law alone, or when a state official ensures a fair election.

Ultimately, the most powerful method to restore norms is the proper application of stigma.

So we should remember the 126 Republican representatives who endorsed a specious lawsuit to overturn the results of the 2020 election. They chose partisanship over patriotism and do not deserve the offices they hold.

We should recall Wisconsin Sen. Ron Johnson’s abuse of his committee chairmanship to spread conspiratorial lies about the election, two days after the electoral college confirmed Joe Biden as the next president. This was Johnson’s nasty little disservice to his country.

We should remember that House Minority Leader Kevin McCarthy refused to recognize Biden as president-elect, even after the electoral college, Vladimir Putin and Senate Majority Leader Mitch McConnell had done so. This was political cowardice of the first order.

And we can never tire of confronting Trump’s mendacious, selfish, disloyal and destructive attacks on our democratic system. He is America’s most un-American president.

Read more: