A WEEK ago, demography was destiny for the Democrats. Along with many Republicans, they assumed—perhaps complacently—that swelling minority populations and left-leaning younger voters would form a winning electoral block, soon even an indomitable one. Instead they lost not only the White House but several governorships, their gains in Congress only pifflingly compensating for the attrition they have suffered, from the Senate to state houses, during Barack Obama’s presidency. In Kentucky’s house of representatives they lost their last legislative chamber in the South, a region in which their demographic hopes were strongest, but which instead remains a Republican bulwark.

All hat and no president The autopsy will be as rancorous as the fallout among Republicans would have been had Hillary Clinton won. For her party’s populist faction, the result confirms that she was a centrist throwback, a milksop out of touch with the public mood. For its centrists, some of the blame belongs to the left-wingers and their grouching. After the recriminations, this internecine row will focus on three linked issues.

First, strategy. For some, the debacle proves that the coalition on which Mrs Clinton relied—built around college-educated liberals, millennials and minorities—was insufficient and will be for a while, not least since Republican legislatures will persist in their gerrymandering and voter-suppression efforts. Thus the party must reconvert some of the white, blue-collar voters in the Rust Belt who clinched the White House for Donald Trump. Another reading is that it must emulate Mr Trump’s approach, by maximising turnout in existing constituencies. The poor Democratic showing in multiracial Milwaukee and Detroit, which helps to explain Mrs Clinton’s defeats in Wisconsin and Michigan, supports that analysis.

The corollary of this dispute is policy. Democrats, like other vanquished centre-left parties in the West, must decide if beating their opponents means joining them, or whether, morally and practically, they can’t. For some Mrs Clinton’s renunciation of the Trans-Pacific Partnership represented an insufficient disavowal of free-trade; they also regarded Mrs Clinton’s foreign-policy stance as too hawkish. The trouble is that Mr Trump has cornered the market in protectionism and isolationism. And even if the Democrats conclude that disenchanted voters want a more activist government—a dubious proposition—Mr Trump’s vows to protect Social-Security spending (public pensions) would complicate a bid to expand their base with more largesse. A tougher line on immigration, meanwhile, risks alienating the Hispanic voters they will continue to need.

Add to this the conundrum of Mr Obama’s legacy. The oddity in this rout is that the president himself is still popular: his approval rating rivals Ronald Reagan’s at the end of his second term. Yet his main reforms, above all the health-care expansion that was a party priority for decades, are set to be dismantled. The fact that low-income white voters are, numerically, Obamacare’s principal beneficiaries has failed to offset its technical glitches, market frictions and Republican attacks. Likewise many of Mr Obama’s environmental directives, cherished by mainstream Democrats but loathed in Appalachia and elsewhere, now look doomed.

Finally, there is the question of leadership. The deficit of options that, along with her heft and cash, helped to ensure Mrs Clinton’s nomination has not been rectified; on the contrary. Kamala Harris of California is a promising addition to the Senate, but otherwise the roster of senior talent is still thin. It includes Cory Booker, a senator from New Jersey, and Elizabeth Warren of Massachusetts, who stands to inherit the anti-establishment mantle from Bernie Sanders. Quite apart from her views, however—and shamingly tragic as it is to acknowledge—after the witch-burning atmosphere of Mr Trump’s rallies, it would be risky to adopt another female candidate in short order. The Democrats’ main talent reservoir is in big-city mayoralties, but those politicians often specialise in the sort of coalition of businessmen and minorities that flopped for Mrs Clinton.

The leadership chatter seems premature, but isn’t. If he implements a fraction of his ideas, or governs as he campaigned, Mr Trump’s presidency will be a disaster. The Democrats would have a golden chance to oust him in four years—with a plausible figurehead. “This is painful,” Mrs Clinton said on the morning after, “and it will be for a long time.” How long depends on the response.