OPINION polls before the mid-term elections on November 4th suggested Barack Obama’s party would be beaten, but this was a thrashing. Republicans captured the Senate easily and their majority in the House of Representatives is now the biggest it has been in most Americans’ lifetimes. A Republican candidate in New York was indicted for 20 counts of fraud, but won anyway.

Close-up, the results are even worse for Democrats. They thought they could bin a bunch of tax-cutting, union-bashing Republican governors, but nearly all survived. Instead, Republicans captured governorships in solidly Democratic states like Maryland and Massachusetts.

Mr Obama cannot escape the humiliating verdict on his presidency. He campaigned in his home state of Illinois, for a Democratic governor running against a Republican who belongs to a wine club that costs over $100,000 to join. The oenophile won by five points.

Yet as Republicans toast their triumph, they should be careful not to over-interpret it. Their campaign did not offer voters much of a positive agenda; rather, it consisted largely of urging them to blame Mr Obama for all the trouble in the world. That was enough to secure victory, but does not give them a mandate to pursue a wishlist of conservative policies. Although more Americans than ever hold partisan views, a larger number are weary of gridlock and would prefer their representatives to compromise to get things done. For the voters to be satisfied, America will need to find new ways to run its politics.

A mandate for moderation
 
Many outsiders will be baffled by the election results. Compared with other rich nations, America is in good shape, with a growing economy, booming stockmarket, falling unemployment and robust public finances, at least by European standards. Why, they wonder, is Mr Obama so disliked that Democrats in swing states asked him not to campaign for them?

The answer is that although the economic headlines look good, voters do not feel that way. Median incomes are in the doldrums and many households feel terribly insecure about the future. A staggering two-thirds of Americans expect their children to be worse off than they are. And when they look at Washington, DC, to see what their political leaders are doing about it, they see a circus of name-calling and irresponsibility. Last year a stand-off between House Republicans and Mr Obama temporarily shut the government down and nearly caused a catastrophic sovereign default.

The outgoing Congress is the least productive since 1947. The proportion of Americans who trust it is a wretched 7%. It may be harsh, but when voters think the country is on the wrong track, the president and his party get the blame.

There is a Republican faction that would like nothing more than to spend the next two years indulging in futile attempts to repeal Obamacare and conducting televised investigations of the president’s supposed abuses of power. If this faction prevails, America can expect yet more dysfunction and Republicans will deserve to lose the White House in 2016.

Optimists are sure the new Congress will be better than that. Now that Republicans are in charge, voters will expect them to govern, rather than merely obstruct. Republican leaders such as Mitch McConnell and John Boehner would probably like to get things done, albeit with a bit of partisan sparring. And that means working with Mr Obama, who will remain president until January 2017 and can veto any bill the new Congress sends him. The two sides will thus have to find common ground—starting with the president. Deals are possible in plenty of areas. Republicans favour free trade; Mr Obama wants the authority, which his own party has denied him, to negotiate trade deals.

Both parties want to fix the corporate-tax code, and to invest more in America’s shoddy infrastructure. Moderates on both sides also want to reform immigration law to unblock the flow of talent on which America depends.

With power comes responsibility
 
Yet, even if the optimists are right, America faces a host of ailments that seem beyond the reach of today’s politics. The personal tax code cannot be simplified without closing middle-class loopholes. Health care and pensions for an ageing population will swallow up the budget unless costs are curbed and the retirement age is raised. In each case, lasting reform will inflict pain on large groups of voters. Reforms are possible only if they have both parties’ fingerprints on them—if one side tried alone, the other would accuse it of throwing Grandma off a cliff. Cool heads in both parties know that the big entitlement programmes, which grow automatically, need fixing. Yet even in the most collaborative Congress, both sides would duck the issue, preferring instead to bicker over the mere 15% of the budget (excluding defence) that it re-authorises each year.

America has changed since the days of Ronald Reagan and Bill Clinton. Money is splurged on elections and, many argue, this corrupts lawmaking. The parties are far more polarised and suspicious of each other. America’s political architecture is part of the problem, for two reasons. First, the electoral system rewards extremists. Many members of the House represent gerrymandered districts which their party cannot lose. Their only fear is that they might lose a party primary to a challenger who accuses them of being soft on the other side. So they pander to the zealots who vote in primaries and treat opportunities for compromise like invitations to burn Old Glory.

Second, the federal government has so many checks and balances that it is all but paralysed. The Senate filibuster gives 41 out of 100 senators the ability to block anything except a budget (they could in theory represent just 11% of the population). Attempts to limit campaign spending tend to fail—and to infringe the constitution’s free-speech guarantee. The best one can hope for is that donors will have to reveal who they are. More can be accomplished with reforms that empower the centre and remove road blocks, without requiring a federal constitutional amendment. Here are three suggestions:

First, scrap the filibuster in the Senate. Second, stop gerrymandering. Four states have already handed control of redistricting to independent commissions. California did so in 2010. Between 2002 and 2010 the state’s House members held on to their seats 99.6% of the time; in 2012 a quarter of them retired or got the boot. The reforms also moderated California’s state legislature. Once dominated by doctrinaire Democrats, last year it rejected 39 out of the 40 bills that the Chamber of Commerce said would kill jobs. One day, with luck, computers will design voting districts without taking party preferences into account.

Third, other states should copy California’s open primaries. Instead of letting just registered Republicans pick a Republican candidate and Democrats pick a Democrat, the Golden State now holds primaries in which anyone can vote. The top two candidates then proceed to the general election, even if they are both of the same party. This gives candidates an incentive to pitch to the political centre from the very start.

None of these reforms will happen soon, as they all need patient agitation in the states. But if Americans want to be better governed—which is what they voted for this week—they need to change the way they elect their leaders.