A STRANGE PATTERN has marked the past two years in American politics. The party on top has often behaved as if it is losing, and the loser as if it is winning. Republicans have the presidency, both chambers of Congress and most state governments, yet they are forever inveighing against their opponents and the media. Democrats, while largely powerless to stop the changes President Donald Trump and his party are making to the country, most of which they abhor, struggle meanwhile to suppress a feeling of euphoria. Many consider Mr Trump so awful, and his base-rallying tactics so obviously aimed at a minority of voters, that the imminent collapse of his project is assured. A trickle of Democratic victories in special elections—including some astonishing ones, like the capture of a Senate seat in Alabama last year—have bolstered that view.

As the mid-terms loom on November 6th, the Democrats’ recovery looks likely to continue. Mr Trump and the Republican Party remain unpopular. Publicly available statistical models give Democrats a 70-90% chance of winning the House of Representatives. They also look well-placed in state races. According to Nate Silver, a prognosticator, 59% of Americans could soon have a Democratic governor. Texas is the only large state which the Republican candidate for governor is favoured to win. According to Carl Klarner, a political scientist, 12 Republican-held state legislative chambers, including Arizona, Colorado and Florida, are in play. If the Democrats won only half of them, that would take a big bite out of the Republicans’ 1,000-seat advantage in the states.

After the Democrats’ defeats in 2016, this would be a creditable performance, especially at a time of decent economic growth and near-zero unemployment. A House majority would give them control of its committees and the subpoena power that comes with them. That would augur the first real congressional oversight of Mr Trump’s administration. Yet it would also be only a limited success. Assuming the Senate remains under Republican control (which looks about as likely as the House is to change hands), and with the president fixed in place, the Democrats would have no hope of passing legislation. Nor could they vet Mr Trump’s appointments. Many might consider this a poor return on the “blue wave” that many Democrats are currently anticipating.

In a febrile moment, such a disappointment would intensify the party’s internal disagreements. And if the Democrats fail to win the House, which is possible, more serious feuding is likely. In search of a magic bullet to slay Mr Trump, they would probably also veer to the left. Indeed, the left-wing positions adopted by early contenders for the party’s presidential ticket in 2020—for example, the demands for Medicare for all and free college tuition from Senators Cory Booker and Kamala Harris—suggest they already expect this.

Infighting and panicked over-reaction are in the Democrats’ nature. As a roughly tripartite coalition of college-educated whites, unionised working-class whites and non-whites, the party is a conglomeration of interests thrown together by the twists of political history. It is much less ideological than its opponent. Democrats are significantly less likely to call themselves liberals (as Americans call left-wingers) than Republicans are to consider themselves conservative. A steady loss of working-class whites, who tend to be more conservative than other parts of the coalition, has sapped this ideological diversity. It has also caused the party to gravitate to the left.

Yet it remains a three-legged stool lightly tacked together, with a governing philosophy that is more functional than uplifting. Whereas conservatives stand for God and liberty, Democrats want to make the country a bit fairer and the government more effective. The upside of this, in place of ideological head-banging, is a tradition of pragmatism. The downside is a tendency to fall apart whenever the party lacks a charismatic leader such as Barack Obama or Bill Clinton. Yet pragmatism has been far more evident in the party’s mid-term campaign. Though rudderless and more-than-usually ideologically adrift after their failures in 2016, Democrats have found in resisting Mr Trump a compelling reason to hang together.

An unprecedented surge of leftist activism and fundraising is evidence of that. One in five Americans has taken part in a street or other form of protest since his election, mostly to oppose the president. Thousands of local groups have formed for the same purpose. The best-known activist network, Indivisible, which began as an online handbook for anti-Trump protest, has almost 6,000 branches, including at least two in every House district. Democratic candidates have raised almost $1.3bn in small contributions through an online fundraising platform called ActBlue. That is more than five times as much as they had managed by the same stage in 2014.

There was an obvious risk (or, some would say, opportunity) that outrage and activism alone would radicalise the Democrats. Provoking them to insanity was the strategy Mr Trump’s former chief political adviser, Steve Bannon, articulated for him. And on one important issue, immigration, which has dominated the Republican campaign in the mid-terms just as it did in 2016, the president seems to have succeeded. Democrats are not, as Republicans claim, for open borders. Only a minority want to abolish the Immigration and Customs Enforcement agency ( ICE ). Yet the fact that even moderate Democrats seem unable to say how many immigrants America should take, and whom they should turn away, is a weakness the party is about to suffer for yet again. That was true even before a crowd of poor Central Americans, marching north towards San Diego, gave the Republicans their closing argument. Yet it is not representative of the Democrats’ overall response to Mr Trump, which has been more moderate and disciplined.

Indivisible’s founders, Leah Greenberg and Ezra Levin, saw their movement as a rebuke to the moderate Democratic establishment as well as to the right. Yet the network’s loose structure leaves questions of ideology to its members, and most envisaged nothing of the sort. The selection of Democratic candidates, in which activists played a part, shows this. Only a third of candidates endorsed by a left-wing campaign group, Our Revolution, launched by Senator Bernie Sanders, emerged successfully from the primaries. And most are running in districts the Democrats have either little hope of winning, or are guaranteed to carry. By contrast, 86% of candidates endorsed by the moderate New Democrat Coalition won, and they are mostly running in competitive races.

Analysis of the ideological positions taken by Democratic candidates suggests that the most left-wing—such as Alexandria Ocasio-Cortez, a 29-year-old firebrand who ousted a party leader, Joe Crowley, from his safe seat in New York—are more extreme than they were in 2016. But their presence is balanced by greater moderation at the other end of the Democratic spectrum. Primary voters, in other words, have picked the candidate they considered most likely to win a given race. This indicates that Mr Booker, Ms Harris and the rest may have confused the excitement of an energised Democratic base, which is manifest, with hunger for the left-wing policies they have adopted.

Lighting the blue paper

Another sign of pragmatism is a scarcity of litmus-test issues. Conor Lamb, a former marine who supports gun rights and is personally against abortion, ran for the Democrats in a conservative district outside Pittsburgh earlier this year. After he won, he became an idol of the left. Similarly, the party’s elected representatives have mostly avoided falling out over divisive issues. The battle-cry of “Medicare for all” sounded by Mr Sanders last year has morphed into a fudgier party-wide aspiration for “universal health care”. This is the biggest issue raised by Democratic candidates, the subject of 130,000 television ads aired by Democrats in September alone. Most pledge not to provide Medicare for all, but to defend and expand Mr Obama’s more moderate health-care reform, which has become more popular. The response from House Republicans suggests that this is hitting the mark. They have lately started running ads in which they also vow to defend some of Obamacare’s provisions, though they voted to scrap the reform.

The prevalence of women among the activist groups, starting with the huge “women’s march” after Mr Trump’s inauguration, helps explain their character. Most women members are first-time activists, motivated by Trump misogyny rather than left-wing ideology. Some are former Republicans. “We are liberals, greens and libertarians, some conservatives, but all Democrats now,” says Pam Hill of her central Virginia group, Liberal Women of Chesterfield County and Beyond. Set up after Mr Trump’s election by a soccer mom from a conservative suburb of Richmond, LWCCB now has almost 4,000 members and over a dozen chapters, loosely mapped around elementary-school catchment areas.

The mushrooming of such groups recalls the Tea Party insurgency that swept the Republicans to power in 2010. Yet they are less ideological and more local than the anti-government Tea Party was. Ms Hill, a civil servant, who “cried and cried” after Hillary Clinton’s defeat, is canvassing for Abigail Spanberger, a Democrat running for Virginia’s Republican-held 7th district. Her chapter of the Liberal Women has also adopted a local highway and is raising money to pay off poor children’s school-lunch debts. This, and thousands of like-minded groups across America, suggest that the civic spirit lauded by Alexis de Tocqueville is in ruder health than Americans gloomily suspect. Traditionally a preserve of the communitarian right, it is out door-knocking for the Democrats.

A record number of Democratic candidates are also women. Of the 23 women running for the Senate and 237 for the House, over 75% are Democrats. Many Democratic women candidates for the House are highly qualified political neophytes from diverse backgrounds, all motivated by disgust for Mr Trump. Ms Spanberger, though born and raised in the district, is a well-travelled, multilingual former CIA officer. She had not considered going into politics until Mr Trump’s victory. “He’s the personification of what’s wrong in our society, the anger, the divisiveness. He’s the voice on TV I don’t want my children to hear,” she says. A self-described pragmatist, she talks about the need to strengthen Obamacare and cut the budget deficit. She is running neck-and-neck with the district’s incumbent, David Brat, a former Tea Partier.

A wave that brought dozens of Spanbergers to the House would be a great infusion of Democratic talent. It might also anchor the party closer to the centre. If that happened, it would be largely because of women voters, especially college-educated white women, a group formerly split between the two parties, but which has broken for the Democrats. What Mr Bannon overlooked is how the president’s inflammatory speech offends women on both sides of the political divide. Surveys suggest three-quarters of white women with a college degree consider the president “embarrassing”; almost three-fifths say he is “racist”. They are the group likeliest to vote in mid-term elections, and polls suggest that 60% or more will vote Democratic.

This should help the party secure most of the 25 mainly suburban districts that are held by Republicans but voted for Mrs Clinton in 2016. That, in turn, would take them most of the way to securing the 23 extra seats they need for a majority, as long as they can retain most of the 12 Democrat-held seats that voted for Mr Trump. This seems likely. Perhaps surprisingly, the Democrats’ poll numbers are as strong in the midwestern rustbelt states, where those districts are concentrated, as they are in the formerly Republican suburbs. That may not mean that the midwestern working-class voters who forsook the Democrats for Mr Trump are suffering buyer’s remorse. It does suggest that they are still willing to vote Democratic when his name is not on the ballot.

Obstacle number one

Yet the Republican base looks solid. Many of its members, who tend to be white, male and heavily evangelical, are also privately uneasy about the president’s language. Yet they like the overarching message he transmits: “Liberals want to change your culture, I will defend it.” That is not an attitude Democrats, however moderate or multilingual, can easily overcome. In a middle-class neighbourhood of Chesterfield County Helen Marie, a hardworking wife and mother, confessed she didn’t like everything about Mr Trump. Yet she felt he shared her “Republican values”. Asked what she felt about the many women who have accused the president of sexual assault, she said she knew it was “going to sound awful”, but wondered if they were seeking “their 15 minutes” of fame. Blue-collar women have also left the Republicans since 2016, but by a much smaller margin. The Economist’s predictive model shows that, in even the best case for the Democrats, the resilience of the Republican base would put a hard ceiling of perhaps 55 seats on their House gains.

It probably also rules out the Democrats retaking the Senate, where they are defending two dozen seats, including ten in states that Mr Trump won. Even in the event of a fair-size blue wave, the Democrats could lose some of the ten Senate seats they are defending in states that voted for Mr Trump. Heidi Heitkamp in North Dakota and Claire McCaskill in Missouri are especially imperilled. This would be serious a blow to the Democrats’ long-term fortunes, for if they can no longer win in conservative states they will not win back the Senate. This divergence between the House and the Senate illustrates more than the two parties’ contrasting geographical strengths. It points to a country split down the middle on most big cultural and political questions, in which bruising and reversible victories, won inch by inch through much toil, are as much as either can realistically hope for.

In that context, the fact that Democratic voters on the front lines have mostly selected moderates, to campaign on bread-and-butter issues rather than transgender rights, should be instructive. “Opportunity is our best one-liner,” says Senator Chris Coons of Delaware, who has thought hard about how Democrats might regain the trust of working-class voters. But left-wingers also have their champions in the fray. Chief among them are a trio of liberals, Andrew Gillum and Stacey Abrams, who are running for governor in Florida and Georgia respectively, and Beto O’Rourke, who is running for the Senate in Texas. They have a different idea of how to win in a conservative state. It is to rally younger and Hispanic voters, who tend to vote Democratic when they do vote, which is not that often, with a relatively left-wing message.

Victory for Mr O’Rourke, a winsomely charismatic House member who wants to replace ICE and impeach Mr Trump, would electrify the left. No Democrat has won statewide in Texas for a quarter of a century. If Mr O’Rourke prevails, he or a liberal copycat is likely to be the party’s next presidential candidate. Yet, for all the hoopla he has generated, he is trailing Senator Ted Cruz by seven points.

Conversely, if the left-wingers flop and moderates soar, the odds of a centrist Democratic challenger to Mr Trump will increase. In that case, buy Joe Biden, sell Mr Booker and Ms Harris. The verdict is unlikely to be so clear-cut, however. Mr Gillum and Ms Abrams, the first black woman on a major party’s ticket for governor, could both win. Plenty of good moderate candidates will lose tight races. And the hard left will be undeterred by defeat. Still, if the Democrats take the House, the establishment wing of the party will be emboldened.

Thank you, Mr President

Democratic House leaders have pledged to provide a foretaste of Democratic government, even if they can do little. They intend to pursue plans for infrastructure spending (which the president might actually go for), lifelong training and the rebuilding of Obamacare. They would also launch investigations into the administration. Asked to name them, Representative Adam Schiff, who would preside over the House intelligence committee, reels off half a dozen for starters: probes into the feds’ response to Hurricane Maria last year, into Mr Trump’s alleged money-laundering, into the Trump family’s business in the Middle East.